Megaco-Parser and IPv6-addresses

Stefan Fritzsche Stefan.Fritzsche@REDACTED
Tue Jan 6 18:15:16 CET 2004


Hello Dear Mailing-List,

I did take a look at the Erlang-Megaco-Parser and wonder
if the Megaco-Parser correctly parses IPv6-addresses.

In the  RFC 3525 chapter 15.2 IPv6-Addresses are defined
as following:
   
   domainAddress  = "[" (IPv4address / IPv6address) "]"
   IPv6address    = hexpart [ ":" IPv4address ]
   hexpart        = hexseq "::" [ hexseq ] / "::" [ hexseq ] / hexseq
   hexseq         = hex4 *( ":" hex4)
   hex4           = 1*4HEXDIG
   
This means that an IPv6-Address might contain one ore
more colons (":").
In contrast to that, the Erlang-Text-Parser defines
domain-addresses as a "safeToken" in square-brackets
(without to differentiate between IPv4- and IPv6-
Addresses), whereas a "safeToken" cannot contain
any colon!?

because:
- 'safeToken' is derived from 'SafeChars'
- 'SafeChars' is derived from ({safechar})+
- and 'safechar' is defined as:
    ({digit}|{alpha}|[\+\-\&\!\_\/\'\?\@\^\`\~\*\$\\\(\)\%\|\.])

... no colon for IPv6-Addresses

It might might be, that I'm totally wrong. I didn't try
this, because I do not have any experience with erlang.
But as far as I can see IPv6-addresses can't get parsed
correctly.

So ... am I wrong?


Best Regards and Thanks in Advance,
Stefan Fritzsche

-- 
+++ GMX - die erste Adresse für Mail, Message, More +++
Neu: Preissenkung für MMS und FreeMMS! http://www.gmx.net





More information about the erlang-questions mailing list