Path: utzoo!attcan!uunet!ingr!b11!dwig From: dwig@b11.ingr.com (David Wiggins) Newsgroups: comp.windows.x Subject: connections to numeric host names Message-ID: <8340@b11.ingr.com> Date: 19 Jul 90 14:35:31 GMT Organization: Intergraph Corp. Huntsville, AL Lines: 23 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. This appears to succeed (inet_addr does not return INVALID_INETADDR), but the connect fails because there's no machine with that address on the network. What we'd like to do is change Xlib to interpret the hostname string as a hostname first (via gethostbyname), and if there's no such host, interpret it as an IP address (via inet_addr), effectively reversing the order that Xlib currently uses. Would this introduce any new problems? 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. Anybody understand what this comment means? David P. Wiggins dwig@ingr.com or uunet!ingr!dwig (205)730-6365 Intergraph Corporation, One Madison Industrial Park, Huntsville, AL 35807