*nix Documentation Project
·  Home
 +   man pages
·  Linux HOWTOs
·  FreeBSD Tips
·  *niX Forums

  man pages->Tru64 Unix man pages -> setservent (3)              
Title
Content
Arch
Section
 

setservent(3)

Contents


NAME    [Toc]    [Back]

       setservent,  setservent_r  -  Open  or rewind the services
       file

SYNOPSIS    [Toc]    [Back]

       #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 system: 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 system: int setservent(
               int stay_open );

LIBRARY    [Toc]    [Back]

       Standard C Library (libc)

       Curses Library (libcurses)

STANDARDS    [Toc]    [Back]

       Interfaces documented on this reference  page  conform  to
       industry standards as follows:

       setservent(): XNS4.0, XNS5.0

       Refer to the standards(5) reference page for more information
 about industry standards and associated tags.

PARAMETERS    [Toc]    [Back]

       Indicates 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  setservent_r()
       stores information about the services file.

DESCRIPTION    [Toc]    [Back]

       The 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    [Toc]    [Back]

       [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 VALUES    [Toc]    [Back]

       Current 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.  Otherwise, it returns a value of 0 (zero).

ERRORS    [Toc]    [Back]

       Current  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.

FILES    [Toc]    [Back]

       Contains service names.  The  database  service  selection
       configuration file.

SEE ALSO    [Toc]    [Back]

      
      
       Functions:   endservent(3),  getservbyname(3),  getservbyport(3), getservent(3).

       Files: services(4), svc.conf(4).

       Networks: nis_intro(7).

       Standards: standards(5).



                                                    setservent(3)
[ Back ]
 Similar pages
Name OS Title
setprotoent_r Tru64 Open or rewind the protocols file
setprotoent Tru64 Open or rewind the protocols file
endnetent_r Tru64 Open, rewind, or close the networks file
setnetent_r Tru64 Open, rewind, or close the networks file
endnetent Tru64 Open, rewind, or close the networks file
setnetent Tru64 Open, rewind, or close the networks file
getservent Tru64 Get a services file entry from the /etc/services file.
getservent_r Tru64 Get a services file entry from the /etc/services file.
nondcesvc HP-UX file for dceping(8) that lists non-DCE services.
AFidentifyfd IRIX retrieve the audio file format of a file descriptor / open AFfilehandle
Copyright © 2004-2005 DeniX Solutions SRL
newsletter delivery service