18 February 2000
getprotobyname, getprotobynumber - get protocol entry
int getprotobyname(char *name); char *getprotobynumber(int protocol, char * buf);
The getprotobyname() function returns the standard number for the protocol with the name name. If no protocol is known then NULL is returned.
The getprotobynumber() function copies into buf (and returns buf) the protocol matching the protocol. If no protocol is known then protocol is returned in ASCII form.
These functions use a lookup table compiled into the ZSock kernel, it is not likely that method will change in the near future.
Dominic Morris <dom>