Service Names Information

The following is a list of service related calls:

The getservbyname() call takes the service name and protocol, and returns a servent structure that contains the name of the service, aliases, port number, and protocol. The servent structure is defined in the <NETDB.H> header file. The getservbyport() call maps the port number and protocol into a servent structure.

The database for these calls is provided by the ETC\SERVICES file.

The setservent(), getservent(), and endservent() calls open, provide sequential access to, and close the ETC\SERVICES file.


[Back: Protocol Names Information]
[Next: Network Address Translation]