Query: setservent
OS: osf1
Section: 3
Format: Original Unix Latex Style Formatted with HTML and a Horizontal Scroll Bar
setservent(3) Library Functions Manual setservent(3)NAMEsetservent, setservent_r - Open or rewind the services fileLIBRARYStandard C Library (libc.so, libc.a)SYNOPSIS#include <netdb.h> void setservent( int stay_open); [Tru64 UNIX] The following function is supported in order to maintain backward compatibility with previous versions of the operating sys- tem. int setservent_r( int stay_open, struct servent_data *serv_data); [Tru64 UNIX] The following function is supported in order to maintain backward compatibility with previous versions of the operating sys- tem. int setservent( int stay_open);STANDARDSInterfaces documented on this reference page conform to industry standards as follows: setservent(): XNS4.0 Refer to the standards(5) reference page for more information about industry standards and associated tags.PARAMETERSIndicates when to close the services file. Specifying a value of 0 (zero) causes the file to be closed after each call to the getservent() function. Specifying a nonzero value allows the file to remain open after each call. [Tru64 UNIX] Points to a structure where setser- vent_r() stores information about the services file.DESCRIPTIONThe setservent() (set service entry) function opens either the local /etc/services file or the NIS distributed services file, and sets the file marker at the beginning of the file. To determine which file or files to search, and in which order, the system uses the switches in the /etc/svc.conf file.NOTES[Tru64 UNIX] The setservent_r() function is the reentrant version of the setservent() function. It is supported in order to maintain backward compatibility with previous versions of the operating system. Upon successful completion, the setservent_r() function returns a value of 0 (zero). Otherwise, it returns a value of -1. [Tru64 UNIX] Before calling the setservent_r() function for the first time, you must zero-fill the servent_data structure. The netdb.h header file defines the servent_data structure.RETURN VALUESCurrent industry standards for setservent() do not define return values. [Tru64 UNIX] Upon successful completion, the setservent() function included for backward compatibility returns a 1 for success. Other- wise, it returns a value of 0 (zero).ERRORSCurrent industry standards for setservent() do not define error values. [Tru64 UNIX] If any of the following conditions occurs, the setservent_r() function sets errno to the corresponding value: If serv_data is invalid. In addition, the setservent() and setservent_r() functions can fail to open the file. In this case, errno will be set to the failure.FILESContains service names. The database service selection configuration file.RELATED INFORMATIONFunctions: endservent(3), getservbyname(3), getservbyport(3), getservent(3). Files: services(4), svc.conf(4). Networks: nis_intro(7). Standards: standards(5). delim off setservent(3)
Related Man Pages |
---|
endservent_r(3) - osf1 |
getservbyname_r(3) - osf1 |
getservbyport(3) - osf1 |
setprotoent(3) - osf1 |
setservent(3) - osf1 |
Similar Topics in the Unix Linux Community |
---|
Tru64 Unix |
When Tru64 will die ? |
Network Scanning - Enterprise Networks & Servers |
Automatically Determining Compatibility of Evolving Services |
How to determine the level of OS in HP-UNIX |