endservent_r Subroutine
Purpose
Closes the /etc/services file.
Library
Standard C Library (libc.a)
Syntax
#include <netdb.h>
void endservent_r(serv_data)
struct servent_data *serv_data;
Description
The endservent_r subroutine closes the /etc/services file, which is opend by a call made to the getservent_r subroutine, getservbyname_r subroutine, or getservbyport_r subroutine opens the /etc/services file.
Parameters
Item | Description |
---|---|
serv_data | Points to the servent_data structure |
Examples
To close the
/etc/services file, type:
endservent_r(serv_data);
Files
Item | Description |
---|---|
/etc/services | Contains service names. |