Next: ROM file parsing Up: Utility Routines Previous: Strings to Hosts

Host Name Service

A simple way of mapping host name strings to host IP addresses is provided via rom file entries (see section 13.2) and the interface function xk_gethostbyname.

During x-kernel startup, rom file lines beginning with the string ``dns'' are parsed into name and address components and added to the host name table. E.g.,


dns umbra 192.12.69.97

The host name must be less than 64 characters in length.

xk_gethostbyname

This function will look up a hostname and return its IP address in storage provided with the call. The name must be an exact match to a rom file entry, NB no substrings are allowed. If the name is not found, the return code indicates failure.

xkern_return_t xk_gethostbyname (char * name, IPhost * addr );


Tue Nov 29 16:28:56 MST 1994