Returns information about a service, given its name.
#include <netdb.h> struct servent *getservbyname ( const char *name, const char *proto);
(IN) Points to the official name of the service.
(IN) Points to the name of the protocol (such as "TCP" or "icmp") to use when contacting a service. The matching is case insensitive.
If successful, returns a pointer to a structure of type servent. Otherwise, returns NULL.
The getservbyname function returns a pointer to a servent structure in the services file. The function searches for the service from the beginning of the sys:\etc\services file and continues until it finds a matching entry or reaches end-of-file. If proto is NULL, getservbyname returns the first entry matching the service name.
NOTE:Calling any database routine overwrites the results of the last call to getservbyname.