servent

structure for information from the services database

Synopsis:

#include <netdb.h>

struct servent {
     char *s_name;
     char **s_aliases;
     int s_port;
     char *s_proto;   
};

Description:

This structure is used to hold the broken-out fields of a line in the network services database, /etc/services. The members of this structure are:

s_name
The name of the service.
s_aliases
A zero-terminated list of alternate names for the service.
s_port
The port number that the service resides at. Port numbers are returned in network byte order.
s_proto
The name of the protocol to use when contacting the service.

Classification:

POSIX 1003.1g (draft)

See also:

endservent(), getservbyname(), getservbyport(), getservent(), setservent()

/etc/services in the TCP/IP User's Guide