ICANN/GNSO GNSO Email List Archives

[ga]


<<< Chronological Index >>>    <<< Thread Index >>>

RE: [ga] More on localized tlds



You are definitely right about the possibly of ambiguity between a text format domain name that looks like 192.168.1.1 and an IPv4 address in text format. (IPv6, because the text format uses colons rather than dots does not suffer from this ambiguity. Good reason to switch to V6?)


Of course, the text representation of DNS names is made even more ambiguous by the way that many systems allow the user to input partial domain names and then goes through trying out a sequence of suffixes. (That is, unless the user appends a "." to the end of the name to indicate that it's fully qualified already - the trailing dot being another DNS convention that is not universally honored.)

I'm not sure how most resolver code is implemented - once I dug into the BSD version of getXbyY() and my brain was instantly trapped by the infinitely entangled strands of spaghetti code - but in days of yore (before the internet was electrified) gethostbyname() required that the string be a domain name, i.e. it was the programmers job to figure out whether to hand the string to gethostbyname() or inet_aton().

In more recent days gethostbyname() is smarter. But I don't know whether it begins by trying to resolve the name via DNS and then fall back onto inet_aton() only if DNS fails and the name is all digits. I guess a few minutes with ethereal would give me an answer.

Because the DNS protocol is itself capable of carrying 8-bit bytes, any implementation that is handling DNS packets, as opposed to the textual representations, ought to be cable of handling any arbitrary binary DNS labels, whether they be the first, last, or an intermediate label. Unfortunately not all DNS protocol code can handle that. (I've been blowing numerous SIP phones out of the water on this particular point.)

Overall it has always been a bit of a mess. When a domain name is embedded into an HTTP URL or SIP URI things get even more messy - the various characters could be represented by their hex codes using the %xx syntax.

And yes, a few rules to say "don't do this" does make life a lot easier.

		--karl--




<<< Chronological Index >>>    <<< Thread Index >>>