Subject: [Sip] Question about hostname's BNF definition

From: Lei Yu <[email-masked]>
Date: Wed, 6 Nov 2002 09:50:37 -0800 (PST)

Hi, Everyone, 
I have 2 questions related to BNF definition for 
hostname. Here is the part from RFC3261: 
" 
hostname = *( domainlabel "." ) toplabel [ "." ] 
domainlabel = alphanum 
/ alphanum *( alphanum / "-" ) alphanum 
toplabel = ALPHA / ALPHA *( alphanum / "-" ) alphanum 
" 
And here are my 2 questions: 
(1). Based on the BNF definition for hostname, 
a "." at the end is legal which means the following 
string is a legal hostname: 
"company.com." 
This is wrong, right? No "." should be allowed 
at the end of hostname. 
(2). Based on the different definition for 
domainlable and toplable, toplable does not alow 
token starts with DIGIT. Why is that? 

Thanks. 

Lei Yu 
Software Engineer 
Motorola 

---------------------------------
Do you Yahoo!?
HotJobs - Search new jobs daily now

---

From: "Brett Tate" <[email-masked]>
Date: Wed, 6 Nov 2002 14:39:26 -0500

> I have 2 questions related to BNF definition 
> for hostname. Here is the part from RFC3261: 
>  
> domainlabel = alphanum / alphanum *( alphanum / "-" ) alphanum 

A dot at the end of hostname is valid;
see rfc1034 section 3.1.
It indicates that it is complete (also 
referred to as absolute or fully qualified).
 
> token starts with DIGIT. Why is that? 

See rfc1034 section 3.5 for definition.
I assume that it was for a quicker distinction 
between IPv4address and hostname.  However this
restriction is not very limiting since it applies
to the suffixes such as ".com", ".gov", etcetera.
If I recall correctly, the no starting-with-digits
used to also apply to the "domainlable" portion.  
The restriction was relaxed to accommodate company 
names such as 3com and 8x8; however I can't recall
the rfc that relaxed the rule.

_______________________________________________
Sip mailing list  https://www1.ietf.org/mailman/listinfo/sip
This list is for NEW development of the core SIP Protocol
Use [email-masked] for questions on current sip
Use [email-masked] for new developments on the application of sip