Gets a services file entry from the network services database file.
#include <netdb.h> struct servent *getservent (void);
This routine returns a servent structure that contains fields for a line of information from the network services database file. See the <netdb.h> header file for a description of the hostent structure.
This routine uses a common static area for its return values, so subsequent calls to this routine overwrite any existing network entry. You must make a copy of the network services entry, if you wish to save it.
See also setservent, and endservent in this section.
x | A pointer to a servent structure. |
NULL | Indicates an error or EOF. |