getprotobyname

Searches the protocols database until a matching protocol name is found or until EOF is encountered.

Format

#include  <netdb.h>

struct protoent *getprotobyname  (char *name);

Argument

name
A pointer to a string containing the desired protocol name.

Description

This routine returns a pointer to a protoent structure containing the broken-out fields of the requested line from the protocols database.

See the <netdb.h> header file for a description of the protoent structure.

See also getprotoent and getprotobynumber in this section.

Return Values
NULL  Indicates EOF or an error. 
A pointer to a protoent structure. 


Previous Page | Next Page | Table of Contents | Index