Subject: Re: [Sip] how do you segregate host from token?

From: Jonathan Rosenberg <[email-masked]>
Date: Thu, 03 Apr 2003 04:45:46 -0500

inline.

murali wrote:
 > Hi,
 >
 > In the field generic-param, its mentioned that generic-param =
 > token[EQUAL gen-value}
 >
 > now gen-value = token/host/quoted-string. If host is an IPV4 address
 > or IPV6 address, its fine. But, if host is a hostname which in turn
 > is defined as hostname = *(domainlabel".")toplabel [.] token also has
 > the same allowable characters as allowed in domainname.
 >
 > So, if I am writing a parser for gen-value, when do I recognize it as
 > a token and when do I recognise it as a host with a hostname which
 > comprises of a domainlabel followed by a toplabel?

I don't think you can distinguish, and I dont think it matters. The 
value of the generic param will depend on which generic param it is. So, 
just store it as token, and when the application processes it, it can 
properly determine whether its a domain name or a token.

-Jonathan R.

-- 
Jonathan D. Rosenberg, Ph.D.                600 Lanidex Plaza
Chief Scientist                             Parsippany, NJ 07054-2711
dynamicsoft
[email-masked]                     FAX:   (973) 952-5050
http://www.jdrosen.net                      PHONE: (973) 952-5000
http://www.dynamicsoft.com

_______________________________________________
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