NAME
netname_check_in - check in a name into the local name-space
netname_check_out - check out a name from the local name-space
netname_look_up - look up a name on a specific host
netname_version - get the version of the network name server

SYNOPSIS
#include <servers/netname.h>

void init_netname(ReplyPort)
port_t ReplyPort;

kern_return_t netname_check_in(ServPort,port_name,signature,port_id)
port_t ServPort;
netname_name_t port_name;
port_t signature;
port_t port_id;

kern_return_t netname_look_up(ServPort,host_name,port_name,port_id)
port_t ServPort;
netname_name_t host_name;
netname_name_t port_name;
port_t *port_id;

kern_return_t netname_check_out(ServPort,port_name,signature)
port_t ServPort;
netname_name_t port_name;
port_t signature;

kern_return_t netname_version(ServPort,version)
port_t ServPort;
netname_name_t version;

ARGUMENTS
ReplyPort Port on which the interface will receive replies.

ServPort port to the Network Name Server.

port_name name of port to be looked up, checked in, or checked
out.

signature port that is used to protect the right to remove a
name.

port_id port that was looked up or is to be checked in or
checked out.

version version of the Network Name Server that is currently
running.

DESCRIPTION
netname_check_in enters a port with the name port_name into the
name-space of the local network server. Signature is a port which
is used to protect this name. This same port must be presented on
a netname_check_out call for that call to be able to remove the
name from the name-space. netname_check_in may be called to check
in a new port with the same name. In this case the association with
the old port will be lost and if a signature was used on the
original check_in the same signature must be used here.

netname_look_up returns the value of the port named by port_name by
questioning the host named by the host_name argument. Thus this
call is a directed name look up. The host_name may be any of the
host’s official nick-names. If it is null, then the local host is
assumed. If it is equal to "*", then a broadcast look up is
performed.

netname_check_out removes a port with the name port_name from the
name-space of the local network server. Signature must be the same
port as the signature port presented to netname_check_in when this
name was checked in.

netname_version returns a string containing the version number of
the Network Name Server that is running.

Note that the ServPort parameter to all the name service calls
should be set to name_server_port in order to use the system
Network Name Server.

FILES
<servers/netname.h>, <servers/netname_defs.h>

DIAGNOSTICS
NETNAME_SUCCESS operation succeeded.

NETNAME_NOT_YOURS the signature given to netname_check_out
or to a second netname_check_in of the
same name did not match the signature with
which the port was checked in.

NETNAME_NOT_CHECKED_IN netname_look_up could not find the name at
the given host.

NETNAME_NO_SUCH_HOST the host_name argument to netname_look_up
does not name a valid host.

NETNAME_HOST_NOT_FOUND netname_look_up could not reach the host
named by host_name (for instance because
it is down).

NETNAME_INVALID_PORT netname_check_in found that the port you
were trying to check in was PORT_NULL.
This can happen if the port died before it
got checked in.

SEE ALSO
mach_init(3)

BUGS
The version number is not always current.