Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Posting-Version: version B 2.10.1 6/24/83; site wateng.UUCP Path: utzoo!watmath!wateng!padpowell From: padpowell@wateng.UUCP (PAD Powell [Admin]) Newsgroups: net.unix-wizards Subject: Help, I want to get the host name who sent me a message Message-ID: <1001@wateng.UUCP> Date: Thu, 17-May-84 10:51:09 EDT Article-I.D.: wateng.1001 Posted: Thu May 17 10:51:09 1984 Date-Received: Fri, 18-May-84 00:14:51 EDT Organization: U of Waterloo, Ontario Lines: 45 I have been trying to find a way to set up the networking data base to allow me to get a "unique" host name. The problem is the following. We have two networks, mathnet (1) and async (2) [Forget the numbers, they are changed to make life easy]. The host "watmath" is on both networks, and the /etc/hosts file looks like: 1.1 watmath 1.2 watdaisy 2.1 watmath-x 2.2 wateng To start up the network, watmath has an entry in the /etc/rc.local file /etc/ifconfig eu0 watmath /etc/ifconfig ttif0 watmath-x Similarly, wateng has an entry /etc/ifconfig ttif0 wateng /etc/route add mathnet watmath-x 1 This procedure has the following interesting property: all messages from watmath arriving at wateng are tagged as coming from watmath-x; this is the result returned by "gethostbyname(3n)", in the h_name field. What I would like to do is assign an "official name" to watmath, which would always be returned by "gethostbyname(3n)". In addition, I would like to be able to use this name for naming the host. My first thought was to change watmath-x to watmath, and leave it at that; this would cause conflicts in names. It seems to me that there should be a way to do this; I cannot find an example, and am a little leary of experimenting. Secondly, is the /etc/route line neccessary? If it is, can an entry in /etc/gateways be used instead? and if it can, what is the format? Finally, can anybody explain or give a pointer to a written explanation of the relationship between the files /etc/hosts, /etc/networks, and so forth, and the programs or operating system parts that use them? I have read the implementation document, but am still a little puzzled. Patrick Powell VLSI Research Group, U. Waterloo