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

  man pages->IRIX man pages -> getnetconfig (3n)              


getnetconfig(3N)					      getnetconfig(3N)

NAME    [Toc]    [Back]

     getnetconfig - get	network	configuration database entry

SYNOPSIS    [Toc]    [Back]

     #include <netconfig.h>

     void *setnetconfig(void);
     struct netconfig *getnetconfig(void *handlep);

     int endnetconfig(void *handlep);
     struct netconfig *getnetconfigent(char *netid);

     void freenetconfigent(struct netconfig *netconfigp);

DESCRIPTION    [Toc]    [Back]

     The five library 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.	 In addition
     to	the netconfig database and the routines	for accessing it, Network
     Selection includes	the environment	variable NETPATH [see environ(5)] and
     the NETPATH access	routines described in getnetpath(3N).

     A call to setnetconfig has	the effect of ``binding'' or ``rewinding'' the
     netconfig database.  setnetconfig must be called before the first call to
     getnetconfig and may be called at any other time.	setnetconfig need not
     be	called before a	call to	getnetconfigent.  setnetconfig returns a
     unique handle to be used by getnetconfig.

     When first	called,	getnetconfig returns a pointer to the current entry in
     the netconfig database, formatted as a netconfig structure.  getnetconfig
     can thus be used to search	the entire netconfig file.  getnetconfig
     returns NULL at end of file.

     endnetconfig should be called when	processing is complete to release
     resources for reuse.  Programmers should be aware,	however, that the last
     call to endnetconfig frees	all memory allocated by	getnetconfig for the
     struct netconfig data structure.  endnetconfig may	not be called before
     setnetconfig.  endnetconfig returns 0 on success and -1 on	failure	(for
     example, if setnetconfig was not called previously).

     getnetconfigent returns a pointer to the netconfig	structure
     corresponding to netid.  It returns NULL if netid is invalid (that	is,
     does not name an entry in the netconfig database).	 It returns NULL and
     sets errno	in case	of failure (e.g., if setnetconfig was not called

     freenetconfigent frees the	netconfig structure pointed to by netconfigp,
     previously	returned by getnetconfigent.

									Page 1

getnetconfig(3N)					      getnetconfig(3N)

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

									PPPPaaaaggggeeee 2222
[ Back ]
 Similar pages
Name OS Title
netconfig IRIX network configuration database
netconfig HP-UX network configuration database
endnetent OpenBSD get network entry
getnetbyaddr NetBSD get network entry
getnetbyname NetBSD get network entry
setnetent NetBSD get network entry
getnetent Linux get network entry
getnetent FreeBSD get network entry
getnetbyname_r Tru64 Get a network entry by name
getnetent Tru64 Get a network entry
Copyright © 2004-2005 DeniX Solutions SRL
newsletter delivery service