next up previous contents index
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 12.4) 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 addr. The name must be an exact match to a rom file entry; no substrings are allowed. If the name is not found, the return code indicates failure.

XkReturn xk_gethostbyname(char *name, IPhost *addr)



Larry Peterson
Tue Jul 1 14:50:34 MST 1997