18 February 2000
z88dk
Z80 processor assembler and SmallC+ cross compiler
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>