Subject: problem parsing IPv6 address vs FQDN

From: "Tulpule, Naren" <[email-masked]>
Date: Fri, 3 Nov 2000 13:01:25 -0800

Hi,
  I have a very simple problem, regarding the IPv6 address format. Please
let me know if I should redirect it to some other list. In SDP, you can have
IPv4, IPv6 and FQDN (fully qualified domain name) formats coexisiting and
would like to parse them differently so as to take different actions (eg
invoking DNS). 
  How do you parse "ABC" ? IPv6 ABNF is so braindead that this is a valid
IPv6 address, while the intention in most likelihood is to name a local
host. Of course you can choose arbitrarily to make this either IPv6 address
or FQDN, yet with a simple change to IPv6 format (e.g a leading colon) this
problem can be avoided.

-- Naren.
These views and opinions are mine alone, not those of Intel    (yet ;-) 
Narendra C. Tulpule SMTS, Trillium (an Intel company)
Ph: +1-310-442-9222              Fax: +1-310-442-1162
12100 Wilshire Bl #1800         Los Angeles, CA 90025

---

From: "Stephen Sprunk" <[email-masked]>
Date: Fri, 3 Nov 2000 17:01:32 -0600

Thus spake "Tulpule, Naren" <[email-masked]>
> or FQDN, yet with a simple change to IPv6 format (e.g a leading colon)
this

While a literal reading of the IPv6 ABNF is that an address might not
contain at least one colon, there is no logical meaning to such an
address.

According to tests on my Linux system, gethostbyname("abcd") performs a
host lookup, whereas gethostbyname("abcd::") simply copies the address
as a literal in the same way gethostbyname("1.2.3.4") does.  This
behavior seems logical, and is probably the most correct answer.

S

     |          |         Stephen Sprunk, K5SSS, CCIE #3723
    :|:        :|:        Network Design Consultant, GSOLE
   :|||:      :|||:       New office: RCDN2 in Richardson, TX
.:|||||||:..:|||||||:.    Email: [email-masked]