Your Browser is not longer supported

Please use Google Chrome, Mozilla Firefox or Microsoft Edge to view the page correctly
Loading...

{{viewport.spaceProperty.prod}}

Converting protocol names into protocol numbers

&pagelevel(3)&pagelevel

The getprotobyname() function converts a protocol name into a protocol number. The protocol name is passed when getprotobyname() is called.

As its result getprotobyname() returns a pointer to an object of data type struct protoent.

The protoent structure is declared as follows:

struct protoent {
     char *p_name;          /* Official protocol name */
     char **p_aliases;      /* Alias list */
     int  p_proto;          /* Protocol number */
};