getprotobynumber

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

Format

#include  <netdb.h>

struct protoent *getprotobynumber  (int *proto);

Argument

proto
A pointer to a string containing the desired protocol number.

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 getprotobyname 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