nanog mailing list archives
Re: Regular Expression for IPv6 addresses
From: isabel dias <isabeldias1 () yahoo com>
Date: Fri, 5 Feb 2010 02:37:41 -0800 (PST)
I Just Don't Know What To Do With Myself ----- Original Message ---- From: Jeroen Massar <jeroen () unfix org> To: Mark Andrews <marka () isc org> Cc: nanog () nanog org; Richard E. Brown <Richard.E.Brown () dartware com> Sent: Fri, February 5, 2010 1:16:53 AM Subject: Re: Regular Expression for IPv6 addresses Mark Andrews wrote: [..]
And now for the trick question. Is ::ffff:077.077.077.077 a legal mapped address and if it, does it match 077.077.077.077?
::ffff:0:0:0:0/96 should never ever be shown to a user, as it is confusing (is it IPv6 or IPv4?) and does not make sense at all. As such whatever one thinks of it, it is "illegal" in that context. Internally inside a program though using a 128bit sequence of memory is of course a great way to store both IPv6 and IPv4 addresses in one structure and that is where the ::ffff:0:0:0:0::/96 format is very useful and intended for. Of course still the representation to the user of addresses stored that way would be 77.77.77.77 (and thus an IPv4 address and not IPv6) even though internally it is written as an IPv6 address. As that usage is internal, you don't need any validation of the format as the input will be either an IPv6 or IPv4 address without any of the compatibility stuff, thus one does not need to handle it anyway. Of course, there should be only limited places where a user can enter or see IP addresses in the first place. There is this great thing called DNS which is what most people should be using. Greets, Jeroen
Current thread:
- Regular Expression for IPv6 addresses Richard E. Brown (Feb 04)
- Re: Regular Expression for IPv6 addresses Jeroen Massar (Feb 04)
- Re: Regular Expression for IPv6 addresses Mark Andrews (Feb 04)
- Re: Regular Expression for IPv6 addresses Jeroen Massar (Feb 04)
- Re: Regular Expression for IPv6 addresses Mark Andrews (Feb 04)
- Re: Regular Expression for IPv6 addresses sthaug (Feb 04)
- Re: Regular Expression for IPv6 addresses James Hess (Feb 06)
- Re: Regular Expression for IPv6 addresses Mark Andrews (Feb 06)
- Re: Regular Expression for IPv6 addresses Mark Andrews (Feb 04)
- Re: Regular Expression for IPv6 addresses isabel dias (Feb 05)
- Re: Regular Expression for IPv6 addresses Jeroen Massar (Feb 04)
- Re: Regular Expression for IPv6 addresses Thomas Habets (Feb 09)
- Re: Regular Expression for IPv6 addresses Mark Andrews (Feb 09)
- Re: Regular Expression for IPv6 addresses Valdis . Kletnieks (Feb 09)
- <Possible follow-ups>
- Re: Regular Expression for IPv6 addresses Richard E. Brown (Feb 06)