fgetprotoent_r man page on IRIX

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



GETPROTOENT(3N)						       GETPROTOENT(3N)

NAME
     getprotoent, getprotobynumber, getprotobyname, getprotoent_r,
     getprotobynumber_r, getprotobyname_r, fgetprotoent, fgetprotoent_r,
     setprotoent, endprotoent - get protocol entry

SYNOPSIS
     #include <netdb.h>

     struct protoent *getprotoent(void);

     struct protoent *getprotoent_r(struct protoent *entry, char *buffer, int buflen);

     struct protoent *getprotobyname(const char *name);

     struct protoent *getprotobyname_r(const char *name, struct protoent *entry, char *buffer, int buflen);

     struct protoent *getprotobynumber(int proto);

     struct protoent *getprotobynumber_r(int proto, struct protoent *entry, char *buffer, int buflen);

     struct protoent *fgetprotoent(FILE *f);

     struct protoent *fgetprotoent_r(FILE *f, struct protoent *entry, char *buffer, int buflen);

     void setprotoent(int stayopen);

     void endprotoent(void)

DESCRIPTION
     getprotoent, getprotobyname, and getprotobynumber each return a pointer
     to an object with the following structure containing the broken-out
     fields of a line in the network protocol data base file, /etc/protocols,
     or the NIS protocols map.

	  struct    protoent {
	       char *p_name;  /* official name of protocol */
	       char **p_aliases;   /* alias list */
	       int  p_proto;	   /* protocol number */
	  };

     The members of this structure are:

     p_name	The official name of the protocol.

     p_aliases	A zero terminated list of alternate names for the protocol.

     p_proto	The protocol number.

     Getprotoent reads the  next  line	of  the	 file,	opening	 the  file  if
     necessary.

									Page 1

GETPROTOENT(3N)						       GETPROTOENT(3N)

     Setprotoent opens and rewinds the file.  If the  stayopen	flag  is  non-
     zero,  the	 net  data  base  will	not  be	 closed	 after	each  call  to
     getprotobyname or getprotobynumber.

     Endprotoent closes the file.

     Getprotobyname  and  getprotobynumber  sequentially   search   from   the
     beginning	of  the file until a matching protocol name or protocol number
     is found, or until EOF is encountered.

     The primitives documented in this manual entry first  consult  Sun's  NIS
     distributed  lookup  service,  if	NIS  is	 enabled,  and	then  the file
     /etc/protocols.

     getprotoent_r,  getprotobynumber_r	 and  getprotobyname_r	are  reentrant
     versions of the corresponding function calls.

     fgetprotoent and fgetprotoent_r will read entries off of the passed  file
     handle.

NOTE
     The Mips ABI specifies nothing but local files so applications which wish
     to use anything else must compile with libc prior to libnsl in the
     library list.  When nsd is running changes to the local protocols file
     may not be noticed by getprotoent() until the enumeration cache file has
     timed out.

     The char buffer passed into the getprotoent functions must be aligned to
     a four byte boundary, otherwise the call will trigger a bus error.

DIAGNOSTICS
     All functions that return struct protoent * will return a null (0)
     pointer in the case of EOF or failure.

FILES
     /etc/protocols

SEE ALSO
     ypserv(1M), protocols(4)

DIAGNOSTICS
     Null pointer (0) returned on EOF or error.

									Page 2

[top]

List of man pages available for IRIX

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]
Tweet
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