servent

Defines an internet service.

Service:Networking

Structure

  #include <netdb.h>
  
  struct servent 
  {
     char    *s_name;   
     char   **s_aliases; 
     short    s_port;
     char     s_proto; 
  };
  

Fields

s_name

Points to the official name of the service.

s_aliases

Points to the first element in a list of pointers to alternate names (aliases) for the service (null terminates the list).

s_port

Specifies the port the service is using, in network byte order.

s_proto

Specifies the name of the protocol to use when contacting the service.