getservbyname(3z)

NAME
getservbyname, getservbyport - get service entry

SYNOPSIS
#include <net/resolv.h>

tcpport_t getservbyname(char *name);
char *getservbyport(tcpport_t port, char * buf);

DESCRIPTION
The getservbyname() function returns the standard port for the service with the name name. If no service is known then NULL is returned.

The getservbyport() function copies into buf (and returns buf) the service matching the standard port port. If no service is known then port is returned in ASCII form.

RETURN VALUE
Detailed above.

NOTES
These functions use a lookup table compiled into the ZSock kernel, it is not likely that method will change in the near future.

AUTHOR
Dominic Morris <dom@jb.man.ac.uk>