getservprotobyname(3z)

NAME
getservprotobyname, getservprotobyport - get servprotoice entry

SYNOPSIS
#include <net/resolv.h>

u8_t getservprotobyname(char *name);
u8_t getservprotobyport(tcpport_t port);

DESCRIPTION
The getservprotobyname() function returns the appropriate protocol for the service with the name name. If the service isn't known then NULL is returned.

The getservprotobyport() function returns the appropriate protocol for the service with the standard port number port. If the service is unknown then NULL is returned.

RETURN VALUE
If a service is known to more than one protocol then the most frequently used is returned.

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>