Searches the protocols table until a matching protocol name is
found or until the end of the table is encountered.
Format
#include <netdb.h>
struct protoent *getprotobyname ( char *name );
1 – Argument
name
A pointer to a string containing the desired protocol name.
2 – Description
This function returns a pointer to a protoent structure
containing data from the protocols table. For information about
the protoent structure, refer to protoent Structure.
All information is contained in a static area, so it must be
copied to be saved.
Related Functions
See also getprotoent() and getprotobynumber().
3 – Return Values
NULL Indicates the end of the table or an error.
x A pointer to a protoent structure.