The servent structure is used to store or return the name and service number for a given service name.
typedef struct servent {
char *s_name;
char **s_aliases;
char *s_proto;
short s_port;
} SERVENT, *PSERVENT, *LPSERVENT;
s_name
The official name of the service.
s_aliases
A NULL-terminated array of alternate names.
s_proto
The name of the protocol to use when contacting the service.
s_port
The port number at which the service can be contacted. Port numbers are returned in network byte order.
Header: Declared in winsock2.h.
Library: Use ws2_32.lib.