|
NAMEgetprotoent , getprotobynumber ,
getprotobyname , setprotoent ,
endprotoent —
get protocol entry
LIBRARYStandard C Library (libc, -lc)SYNOPSIS#include <netdb.h>
struct protoent *
struct protoent *
struct protoent *
void
void
DESCRIPTIONThegetprotoent (),
getprotobyname (), and
getprotobynumber () functions each return a pointer to
an object with the following structure containing the broken-out fields of a
line in the network protocol data base,
/etc/protocols.
struct protoent { char *p_name; /* official name of protocol */ char **p_aliases; /* alias list */ int p_proto; /* protocol number */ }; The members of this structure are:
The The The The RETURN VALUESNull pointer returned onEOF or error.
FILES
SEE ALSOprotocols(5)HISTORYThegetprotoent (),
getprotobynumber (),
getprotobyname (),
setprotoent (), and
endprotoent () functions appeared in
4.2BSD.
BUGSThese functions use a thread-specific data space; if the data is needed for future use, it should be copied before any subsequent calls overwrite it. Only the Internet protocols are currently understood.
Visit the GSP FreeBSD Man Page Interface. |