struct protoent *getprotobynumber(int proto); |
The getprotobyname() function returns a protoent structure for the line from /etc/protocols that matches the protocol name name.
The protoent structure is defined in <netdb.h> as follows:
char *p_name; /* official protocol name */
char **p_aliases; /* alias list */
int p_proto; /* protocol number */
}