SEARCH
NEW RPMS
DIRECTORIES
ABOUT
FAQ
VARIOUS
BLOG
DONATE


YUM REPOSITORY

 
 

MAN page from PCLinuxOS lib64tirpc-devel-1.0.1-1pclos2017.x86_64.rpm

GETNETPATH

Section: C Library Functions (3)
Index
BSD mandoc
 

NAME

getnetpath setnetpath endnetpath - get/etc/netconfigentry corresponding toNETPATHcomponent 

SYNOPSIS

In netconfig.hFt struct netconfig *Fn getnetpath void *handlepFt void *Fn setnetpath voidFt intFn endnetpath void *handlep 

DESCRIPTION

The routines described in this page provide the application access to the systemnetwork configuration database,/etc/netconfig as it is``filtered''by theNETPATHenvironment variable (seeenviron(7)).Seegetnetconfig(3)for other routines that also access thenetwork configuration database directly.TheNETPATHvariable is a list of colon-separated network identifiers.

TheFn getnetpathfunctionreturns a pointer to thenetconfig database entry corresponding to the first validNETPATHcomponent.The netconfig entry is formatted as aFt struct netconfig .On each subsequent call,Fn getnetpathreturns a pointer to the netconfig entry that corresponds to the nextvalidNETPATHcomponent.TheFn getnetpathfunctioncan thus be used to search the netconfig database for all networksincluded in theNETPATHvariable.WhenNETPATHhas been exhausted,Fn getnetpathreturnsNULL

A call toFn setnetpath``binds''to or``rewinds''NETPATH TheFn setnetpathfunctionmust be called before the first call toFn getnetpathand may be called at any other time.It returns a handle that is used byFn getnetpath .

TheFn getnetpathfunctionsilently ignores invalidNETPATHcomponents.ANETPATHcomponent is invalid if there is no correspondingentry in the netconfig database.

If theNETPATHvariable is unset,Fn getnetpathbehaves as ifNETPATHwere set to the sequence of``default''or``visible''networks in the netconfig database, in theorder in which they are listed.

TheFn endnetpathfunctionmay be called to``unbind''fromNETPATHwhen processing is complete, releasing resources for reuse.Programmers should be aware, however, thatFn endnetpathfrees all memory allocated byFn getnetpathfor the struct netconfig data structure. 

RETURN VALUES

TheFn setnetpathfunctionreturns a handle that is used byFn getnetpath .In case of an error,Fn setnetpathreturnsNULL

TheFn endnetpathfunctionreturns 0 on success and -1 on failure(for example, ifFn setnetpathwas not called previously).TheFn nc_perrororFn nc_sperrorfunctioncan be used to print out the reason for failure.Seegetnetconfig(3).

When first called,Fn getnetpathreturns a pointer to the netconfig database entry corresponding to the firstvalidNETPATHcomponent.WhenNETPATHhas been exhausted,Fn getnetpathreturnsNULL  

AVAILABILITY

These functions are part of libtirpc. 

SEE ALSO

getnetconfig(3),netconfig(5),environ(7)


 

Index

NAME
SYNOPSIS
DESCRIPTION
RETURN VALUES
AVAILABILITY
SEE ALSO

This document was created byman2html,using the manual pages.