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

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

setprotoent(3)

Contents


NAME    [Toc]    [Back]

       setprotoent,  setprotoent_r - Open or rewind the protocols
       file

SYNOPSIS    [Toc]    [Back]

       #include <netdb.h>

       void setprotoent
               int stay_open );

       [Tru64 UNIX]  The following function is supported in order
       to  maintain backward compatibility with previous versions
       of the operating system: int setprotoent_r
               int stay_open,
               struct protoent_data *proto_data );

       The following definition  of  the  setprotoent()  function
       does  not  conform  to  current standards and is supported
       only for backward compatibility  (see  standards(5)):  int
       setprotoent(
               int stay_open );

LIBRARY    [Toc]    [Back]

       Standard C Library (libc)

STANDARDS    [Toc]    [Back]

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

       setprotoent():  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 protocols file. Specifying a
       value of 0 (zero) causes the file to be closed after  each
       call  to the setprotoent() function.  Specifying a nonzero
       value allows the protocols file to remain open after  each
       function.   [Tru64  UNIX]  For  setprotoent_r() only, this
       points at a structure where setprotoent_r() stores  information
 about the protocols file.

DESCRIPTION    [Toc]    [Back]

       The  setprotoent()  (set  protocol  entry)  function opens
       either the local  /etc/protocols  file  or  the  NIS  distributed
  protocols  file  and sets the file marker to 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 setprotoent_r() function  is  the  reentrant
  version  of the setprotoent() function.  It is supported
 in order to maintain  backward  compatibility  with
       previous  versions of the operating system.  Upon successful
 completion, the  setprotoent_r()  function  returns  a
       value of 0 (zero). Otherwise, it returns a value of -1.

       [Tru64 UNIX]  Note that before calling the setprotoent_r()
       function for the first time, you must zero-fill  the  protoent_data
  structure. The netdb.h header file defines the
       protoent_data structure.

RETURN VALUES    [Toc]    [Back]

       [Tru64 UNIX]  Upon successful completion, the  version  of
       setprotoent()  provided for backward compatibility returns
       a value of 1.  Otherwise, it returns a value of 0  (zero).

ERRORS    [Toc]    [Back]

       Current  industry standards do not define error values for
       the setprotoent() function.

       [Tru64 UNIX]  If any of the following  conditions  occurs,
       the setprotoent_r() function sets errno to the corresponding
 value: The proto_data parameter is invalid.

       In addition, the setprotoent(), backward  compatible  version
  of  setprotoent(), and setprotoent_r() functions can
       fail to open the file.  In this case, errno will be set to
       the failure.

FILES    [Toc]    [Back]

       Contains  the protocol names.  The database service selection
 configuration file.

SEE ALSO    [Toc]    [Back]

      
      
       Functions:  endprotoent(3),  getprotobyname(3),  getprotobynumber(3), getprotoent(3).

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

       Networks: nis_intro(7).

       Standards: standards(5).

       Network Programmer's Guide



                                                   setprotoent(3)
[ Back ]
 Similar pages
Name OS Title
setservent Tru64 Open or rewind the services file
setservent_r Tru64 Open or rewind the services file
endnetent_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
setnetent_r Tru64 Open, rewind, or close the networks file
protocols Linux the protocols definition file
endprotoent_r Tru64 Close the network protocols database file
endprotoent Tru64 Close the network protocols database file
AFidentifyfd IRIX retrieve the audio file format of a file descriptor / open AFfilehandle
Copyright © 2004-2005 DeniX Solutions SRL
newsletter delivery service