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

  man pages->IRIX man pages -> getnetpath (3n)              
Title
Content
Arch
Section
 

Contents


getnetpath(3N)							getnetpath(3N)


NAME    [Toc]    [Back]

     getnetpath	- get netconfig	entry corresponding to NETPATH component

SYNOPSIS    [Toc]    [Back]

     #include <netconfig.h>

     void *setnetpath(void);
     struct netconfig *getnetpath(void *handlep);
     int endnetpath(void *handlep);

DESCRIPTION    [Toc]    [Back]

     The three routines	described on this page are part	of the UNIX System V
     Network Selection component.  They	provide	application access to the
     system network configuration database, /etc/netconfig, as it is
     ``filtered'' by the NETPATH environment variable [see environ(5)].
     Network Selection also includes routines that access the network
     configuration database directly [see getnetconfig(3N)].

     A call to setnetpath ``binds'' or ``rewinds'' NETPATH.  setnetpath	must
     be	called before the first	call to	getnetpath and may be called at	any
     other time.  It returns a handle that is used by getnetpath.  setnetpath
     will fail if the netconfig	database is not	present.  If NETPATH is	unset,
     setnetpath	returns	the number of ``visible'' networks in the netconfig
     file.  The	set of visible networks	constitutes a default NETPATH.

     When first	called,	getnetpath returns a pointer to	the netconfig database
     entry corresponding to the	first valid NETPATH component.	The netconfig
     entry is formatted	as a netconfig structure.  On each subsequent call,
     getnetpath	returns	a pointer to the netconfig entry that corresponds to
     the next valid NETPATH component.	getnetpath can thus be used to search
     the netconfig database for	all networks included in the NETPATH variable.
     When NETPATH has been exhausted, getnetpath returns NULL.

     getnetpath	silently ignores invalid NETPATH components.  A	NETPATH
     component is invalid if there is no corresponding entry in	the netconfig
     database.

     If	the NETPATH variable is	unset, getnetpath behaves as if	NETPATH	were
     set to the	sequence of ``default''	or ``visible'' networks	in the
     netconfig database, in the	order in which they are	listed.

     endnetpath	may be called to ``unbind'' NETPATH when processing is
     complete, releasing resources for reuse.  Programmer's should be aware,
     however, that endnetpath frees all	memory allocated by setnetpath.
     endnetpath	returns	0 on success and -1 on failure (for example, if
     setnetpath	was not	called previously).

SEE ALSO    [Toc]    [Back]

      
      
     netconfig(4), getnetconfig(3N), environ(5)


									PPPPaaaaggggeeee 1111
[ Back ]
 Similar pages
Name OS Title
setnetpath FreeBSD get /etc/netconfig entry corresponding to NETPATH component
getnetpath NetBSD get /etc/netconfig entry corresponding to NETPATH component
endnetpath FreeBSD get /etc/netconfig entry corresponding to NETPATH component
setnetpath NetBSD get /etc/netconfig entry corresponding to NETPATH component
getnetpath FreeBSD get /etc/netconfig entry corresponding to NETPATH component
endnetpath NetBSD get /etc/netconfig entry corresponding to NETPATH component
DXmSvnInsertComponent Tru64 Inserts a new component into each SVN entry.
DXmSvnRemoveComponent Tru64 Removes a component from each SVN entry.
DXmSvnSelectComponent Tru64 Selects an entry using a specific component.
DXmSvnSetComponentPixmap Tru64 Adds a pixmap component to an entry.
Copyright © 2004-2005 DeniX Solutions SRL
newsletter delivery service