Marco,

Trailing "." may be used to distinguish local domain names. The relevant
part of RFC 2396, section 3.2.2 is quoted below.

-------- RFC 2396 snippet begins ---------
The host is a domain name of a network host, or its IPv4 address as a
set of four decimal digit groups separated by ".". Literal IPv6
addresses are not supported.

hostport = host [ ":" port ]
host = hostname | IPv4address
hostname = *( domainlabel "." ) toplabel [ "." ]
domainlabel = alphanum | alphanum *( alphanum | "-" ) alphanum
toplabel = alpha | alpha *( alphanum | "-" ) alphanum
IPv4address = 1*digit "." 1*digit "." 1*digit "." 1*digit
port = *digit

Hostnames take the form described in Section 3 of [RFC1034] and Section
2.1 of [RFC1123]: a sequence of domain labels separated by ".", each
domain label starting and ending with an alphanumeric character and
possibly also containing "-" characters. The rightmost domain label of a
fully qualified domain name will never start with a digit, thus
syntactically distinguishing domain names from IPv4 addresses, and may
be followed by a single "." if it is necessary to distinguish between
the complete domain name and any local domain. To actually be "Uniform"
as a resource locator, a URL hostname should be a fully qualified domain
name. In practice, however, the host component may be a local domain
literal.
-------- RFC 2396 snippet ends ---------

rgds,
-vishal

-----Original Message-----
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of
Marco Ambu
Sent: Tuesday, September 11, 2007 2:50 PM
To: SIP-implementors mailing list
Subject: [Sip-implementors] BNF for hostname ends with optional dot

Hi,
according to BNF a hostname can end with a dot, so "cnn.com." is a valid

hostname.

[RFC 3261 - Page 222]
host            = hostname / IPv4address / IPv6reference
hostname        = *( domainlabel "." ) toplabel [ "." ]      <<==!!!
domainlabel     = alphanum
                  / alphanum *( alphanum / "-" ) alphanum
toplabel        = ALPHA / ALPHA *( alphanum / "-" ) alphanum


Is it correct?
Thanks,
-- 

Marco Ambu
R&D Software Engineering
Abbeynet S.p.A. - www.abbeynet.com <http://www.abbeynet.com>

Phone: +390702339331

Call me for free: <http://www.marco-ambu.sitofono.it>


_______________________________________________
Sip-implementors mailing list
[email protected]
https://lists.cs.columbia.edu/cucslists/listinfo/sip-implementors

_______________________________________________
Sip-implementors mailing list
[email protected]
https://lists.cs.columbia.edu/cucslists/listinfo/sip-implementors

Reply via email to