getprotoent man page on DigitalUNIX

Man page or keyword search:  
man Server   12896 pages
apropos Keyword Search (all sections)
Output format
DigitalUNIX logo
[printable version]

getprotoent(3)							getprotoent(3)

       getprotoent, getprotoent_r - Get a protocol entry

       #include <netdb.h>

       struct protoent *getprotoent(
	       void );

       [Tru64  UNIX]  The following obsolete function is supported in order to
       maintain backward compatibility with previous versions of the operating
       system. You should not use it in new designs.  int getprotoent_r(
	       struct protoent *proto,
	       struct protoent_data *proto_data );

       Standard C Library (libc)

       Interfaces  documented on this reference page conform to industry stan‐
       dards as follows:

       getprotoent():  XNS4.0, XNS5.0

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

       [Tru64  UNIX]  For  getprotoent_r(),  points to the protoent structure.
       The  netdb.h  header  file  defines  the	 protoent  structure.	[Tru64
       UNIX]  For   getprotoent_r(),  is  data	for  the  protocols  database.
       Thenetdb.h header file defines the protoent_data structure.

       The getprotoent() (get  protocol	 entry)	 function  retrieves  protocol
       information  from  either the local /etc/protocols file or the NIS dis‐
       tributed networks file for  the	requested  information.	 To  determine
       which  file or files to search, and in which order, the system uses the
       switches in the /etc/svc.conf file.

       The getprotoent() function returns a pointer to a  protoent  structure,
       which  contains	the  fields  for a line of information in the networks
       protocols database file.	 The netdb.h header file defines the  protoent

       An  application	program can use the getprotoent() function to access a
       protocol name, its aliases, and protocol number. Use the	 endprotoent()
       function to close the /etc/protocols file.  Use the setprotoent() func‐
       tion to rewind.

       The getprotoent() function returns a pointer to	thread-specific	 data.
       Subsequent  calls  to  this  or a related function from the same thread
       overwrite this data.

       [Tru64 UNIX]  The getprotoent_r() function  is  an  obsolete  reentrant
       version	of  the	 getprotoent()	function.  It is supported in order to
       maintain backward compatibility with previous versions of the operating
       system and should not be used in new designs.  Note that you must zero-
       fill the proto_data structure before its first  access  by  either  the
       setprotoent_r()	or  getprotoent_r()  function.	When using the getpro‐
       toent_r() function, use the setprotoent_r() function to rewind the net‐
       work  protocols database file and the endprotoent_r() function to close

       Upon  successful	 completion,  the  getprotoent()  function  returns  a
       pointer to a protoent structure.	 If it fails or reaches the end of the
       network protocols database file, it returns a null pointer.

       [Tru64 UNIX]  Upon successful completion, the getprotoent_r()  function
       stores  the protoent structure in the location pointed to by proto, and
       returns a value of 0 (zero).  Otherwise it returns a value of -1.

       Current industry standards do not define error values for  the  getpro‐
       toent() function.

       [Tru64  UNIX]  If  any  of the following conditions occurs, the getpro‐
       toent_r() function sets errno to the corresponding value: The proto  or
       proto_data parameter is invalid.	 The search failed.

       In  addition, if the getprotoent() or getprotoent_r() function fails to
       open the file, it sets errno to indicate the cause of the failure.

       Contains protocol information.  The database service selection configu‐
       ration file.

       Functions: getprotobynumber(3), getprotobyname(3), setprotoent(3), end‐

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

       Networks: nis_intro(7).

       Standards: standards(5).

       Network Programmer's Guide


List of man pages available for DigitalUNIX

Copyright (c) for man pages and the logo by the respective OS vendor.

For those who want to learn more, the polarhome community provides shell access and support.

[legal] [privacy] [GNU] [policy] [cookies] [netiquette] [sponsors] [FAQ]
Polarhome, production since 1999.
Member of Polarhome portal.
Based on Fawad Halim's script.
Vote for polarhome
Free Shell Accounts :: the biggest list on the net