next up previous contents
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 gif) and the interface function xk_gethostbyname.

During 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
Mon Feb 5 16:32:40 MST 1996