Path: utzoo!attcan!uunet!lll-winken!casey@gauss.llnl.gov From: casey@gauss.llnl.gov (Casey Leedom) Newsgroups: comp.windows.x Subject: Re: connections to numeric host names Message-ID: <65391@lll-winken.LLNL.GOV> Date: 26 Jul 90 18:20:24 GMT References: <8340@b11.ingr.com> Sender: usenet@lll-winken.LLNL.GOV Reply-To: casey@gauss.llnl.gov (Casey Leedom) Organization: Lawrence Livermore National Laboratory Lines: 37 | From: dwig@b11.ingr.com (David Wiggins) | | We have a problem making X connections to hosts whose names are pure | numbers, e.g. 2020. MakeTCPConnection (XConnDis.c) tries to use this | as an IP address instead of a host name. | | What we'd like to do is change Xlib to interpret the hostname string as | a hostname first, and if there's no such host, interpret it as an IP | address ... I balk at changing the order because the following comment... | | /* | * if numeric host name then try to parse it as such; do the number | * first because some systems return garbage instead of INVALID_INETADDR | */ | | ...indicates that there was a good reason for the current order. From RFC-952, page 1 discussing the format of host names (among others): 1. A "name" (Net, Host, Gateway, or Domain name) is a text string up to 24 characters drawn from the alphabet (A-Z), digits (0-9), minus sign (-), and period (.). Note that periods are only allowed when they serve to delimit components of "domain style names". (See RFC-921, "Domain Name System Implementation Schedule", for background). No blank or space characters are permitted as part of a name. No disinction is made between upper and lower case. The first character must be an alpha character. The last character must not be a minus sign or a period. ... (Note that RFC-1122 or RFC-1123 probably has something to say about this also but I *still* haven't had time to read through them. (sigh)) Thus, if a name begins with a non-alpha, it's not a ``host name''. It must be some other method of naming a host. If it begins with a numeric digit, it's a good guess that the host is being named via its IP address. Casey