Previous: Local (Unix) Domain Sockets, Up: Networking


13.6 Name Service

Presently name service is implemented by calling whatever gethostbyname(2) uses. This may be any or all of /etc/hosts, NIS, DNS, or something completely different. Typically it's controlled by /etc/nsswitch.conf.

Direct links to the asynchronous resolver(3) routines would be nice to have eventually, so that we can do DNS lookups in parallel with other things

— Class: sb-bsd-sockets:host-ent

Class precedence list: host-ent, standard-object, t

— Function: sb-bsd-sockets:get-host-by-name host-name

Returns a host-ent instance for host-name or throws some kind of condition. host-name may also be an ip address in dotted quad notation or some other weird stuff - see gethostbyname(3) for grisly details.

— Function: sb-bsd-sockets:get-host-by-address address

Returns a host-ent instance for address, which should be a vector of (integer 0 255), or throws some kind of error. See gethostbyaddr(3) for grisly details.

— Generic Function: sb-bsd-sockets:host-ent-address host-ent

— Function: sb-bsd-sockets:name-service-error where