GETNETPATH - Online Linux Manual PageSection : 3
Updated : April 22, 2000
NAME getnetpath, setnetpath, endnetpath —get /etc/netconfig entry corresponding to NETPATH component
SYNOPSIS #include <netconfig.h>
struct netconfig * getnetpath(void *handlep);
void * setnetpath(void);
int endnetpath(void *handlep);
DESCRIPTIONThe routines described in this page provide the application access to the system network configuration database, /etc/netconfig, as it is ‟filtered” by the NETPATH environment variable (see environ(7)). See getnetconfig(3) for other routines that also access the network configuration database directly. The NETPATH variable is a list of colon-separated network identifiers. The getnetpath() function returns a pointer to the netconfig database entry corresponding to the first valid NETPATH component. The netconfig entry is formatted as a struct netconfig. On each subsequent call, getnetpath() returns a pointer to the netconfig entry that corresponds to the next valid NETPATH component. The getnetpath() function 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. A call to setnetpath() ‟binds” to or ‟rewinds” NETPATH. The setnetpath() function 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(). The getnetpath() function 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. The endnetpath() function may be called to ‟unbind” from NETPATH when processing is complete, releasing resources for reuse. Programmers should be aware, however, that endnetpath() frees all memory allocated by getnetpath() for the struct netconfig data structure.
RETURN VALUESThe setnetpath() function returns a handle that is used by getnetpath(). In case of an error, setnetpath() returns NULL. The endnetpath() function returns 0 on success and −1 on failure (for example, if setnetpath() was not called previously). The nc_perror() or nc_sperror() function can be used to print out the reason for failure. See getnetconfig(3). When first called, getnetpath() returns a pointer to the netconfig database entry corresponding to the first valid NETPATH component. When NETPATH has been exhausted, getnetpath() returns NULL.
AVAILABILITYThese functions are part of libtirpc.
SEE ALSOgetnetconfig(3), netconfig(5), environ(7) 0
Johanes Gumabo
Data Size : 9,543 byte
man-getnetpath.3tBuild : 2024-12-05, 20:55 :
Visitor Screen : x
Visitor Counter ( page / site ) : 3 / 236,392
Visitor ID : :
Visitor IP : 3.142.131.51 :
Visitor Provider : AMAZON-02 :
Provider Position ( lat x lon ) : 39.962500 x -83.006100 : x
Provider Accuracy Radius ( km ) : 1000 :
Provider City : Columbus :
Provider Province : Ohio , : ,
Provider Country : United States :
Provider Continent : North America :
Visitor Recorder : Version :
Visitor Recorder : Library :
Online Linux Manual Page : Version : Online Linux Manual Page - Fedora.40 - march=x86-64 - mtune=generic - 24.12.05
Online Linux Manual Page : Library : lib_c - 24.10.03 - march=x86-64 - mtune=generic - Fedora.40
Online Linux Manual Page : Library : lib_m - 24.10.03 - march=x86-64 - mtune=generic - Fedora.40
Data Base : Version : Online Linux Manual Page Database - 24.04.13 - march=x86-64 - mtune=generic - fedora-38
Data Base : Library : lib_c - 23.02.07 - march=x86-64 - mtune=generic - fedora.36
Very long time ago, I have the best tutor, Wenzel Svojanovsky . If someone knows the email address of Wenzel Svojanovsky , please send an email to johanes_gumabo@yahoo.co.id .
If error, please print screen and send to johanes_gumabo@yahoo.co.id
Under development. Support me via PayPal.