getnetpath.3 (84306) | getnetpath.3 (108037) |
---|---|
1.\" @(#)getnetpath.3n 1.26 93/05/07 SMI; from SVr4 2.\" $NetBSD: getnetpath.3,v 1.1 2000/06/02 23:11:11 fvdl Exp $ | 1.\" @(#)getnetpath.3n 1.26 93/05/07 SMI; from SVr4 2.\" $NetBSD: getnetpath.3,v 1.1 2000/06/02 23:11:11 fvdl Exp $ |
3.\" $FreeBSD: head/lib/libc/rpc/getnetpath.3 84306 2001-10-01 16:09:29Z ru $ | 3.\" $FreeBSD: head/lib/libc/rpc/getnetpath.3 108037 2002-12-18 12:45:11Z ru $ |
4.\" Copyright 1989 AT&T 5.Dd April 22, 2000 6.Dt GETNETPATH 3 7.Os 8.Sh NAME 9.Nm getnetpath , 10.Nm setnetpath , 11.Nm endnetpath --- 25 unchanged lines hidden (view full) --- 37See 38.Xr getnetconfig 3 39for other routines that also access the 40network configuration database directly. 41The 42.Ev NETPATH 43variable is a list of colon-separated network identifiers. 44.Pp | 4.\" Copyright 1989 AT&T 5.Dd April 22, 2000 6.Dt GETNETPATH 3 7.Os 8.Sh NAME 9.Nm getnetpath , 10.Nm setnetpath , 11.Nm endnetpath --- 25 unchanged lines hidden (view full) --- 37See 38.Xr getnetconfig 3 39for other routines that also access the 40network configuration database directly. 41The 42.Ev NETPATH 43variable is a list of colon-separated network identifiers. 44.Pp |
45The |
|
45.Fn getnetpath | 46.Fn getnetpath |
47function |
|
46returns a pointer to the 47netconfig database entry corresponding to the first valid 48.Ev NETPATH 49component. 50The netconfig entry is formatted as a 51.Ft "struct netconfig" . 52On each subsequent call, 53.Fn getnetpath 54returns a pointer to the netconfig entry that corresponds to the next 55valid 56.Ev NETPATH 57component. | 48returns a pointer to the 49netconfig database entry corresponding to the first valid 50.Ev NETPATH 51component. 52The netconfig entry is formatted as a 53.Ft "struct netconfig" . 54On each subsequent call, 55.Fn getnetpath 56returns a pointer to the netconfig entry that corresponds to the next 57valid 58.Ev NETPATH 59component. |
60The |
|
58.Fn getnetpath | 61.Fn getnetpath |
62function |
|
59can thus be used to search the netconfig database for all networks 60included in the 61.Ev NETPATH 62variable. 63When 64.Ev NETPATH 65has been exhausted, 66.Fn getnetpath 67returns 68.Dv NULL . 69.Pp 70A call to 71.Fn setnetpath 72.Dq binds 73to or 74.Dq rewinds 75.Ev NETPATH . | 63can thus be used to search the netconfig database for all networks 64included in the 65.Ev NETPATH 66variable. 67When 68.Ev NETPATH 69has been exhausted, 70.Fn getnetpath 71returns 72.Dv NULL . 73.Pp 74A call to 75.Fn setnetpath 76.Dq binds 77to or 78.Dq rewinds 79.Ev NETPATH . |
80The |
|
76.Fn setnetpath | 81.Fn setnetpath |
82function |
|
77must be called before the first call to 78.Fn getnetpath 79and may be called at any other time. 80It returns a handle that is used by 81.Fn getnetpath . 82.Pp | 83must be called before the first call to 84.Fn getnetpath 85and may be called at any other time. 86It returns a handle that is used by 87.Fn getnetpath . 88.Pp |
89The |
|
83.Fn getnetpath | 90.Fn getnetpath |
91function |
|
84silently ignores invalid 85.Ev NETPATH 86components. 87A 88.Ev NETPATH 89component is invalid if there is no corresponding 90entry in the netconfig database. 91.Pp --- 7 unchanged lines hidden (view full) --- 99.Dq default 100or 101.Dq visible 102networks in the netconfig database, in the 103order in which they are listed. 104.\"This proviso holds also for this 105.\"whole manpage. 106.Pp | 92silently ignores invalid 93.Ev NETPATH 94components. 95A 96.Ev NETPATH 97component is invalid if there is no corresponding 98entry in the netconfig database. 99.Pp --- 7 unchanged lines hidden (view full) --- 107.Dq default 108or 109.Dq visible 110networks in the netconfig database, in the 111order in which they are listed. 112.\"This proviso holds also for this 113.\"whole manpage. 114.Pp |
115The |
|
107.Fn endnetpath | 116.Fn endnetpath |
117function |
|
108may be called to 109.Dq unbind 110from 111.Ev NETPATH 112when processing is complete, releasing resources for reuse. 113Programmers should be aware, however, that 114.Fn endnetpath 115frees all memory allocated by 116.Fn getnetpath 117for the struct netconfig data structure. 118.Sh RETURN VALUES | 118may be called to 119.Dq unbind 120from 121.Ev NETPATH 122when processing is complete, releasing resources for reuse. 123Programmers should be aware, however, that 124.Fn endnetpath 125frees all memory allocated by 126.Fn getnetpath 127for the struct netconfig data structure. 128.Sh RETURN VALUES |
129The |
|
119.Fn setnetpath | 130.Fn setnetpath |
131function |
|
120returns a handle that is used by 121.Fn getnetpath . 122In case of an error, 123.Fn setnetpath 124returns 125.Dv NULL . 126.Pp | 132returns a handle that is used by 133.Fn getnetpath . 134In case of an error, 135.Fn setnetpath 136returns 137.Dv NULL . 138.Pp |
139The |
|
127.Fn endnetpath | 140.Fn endnetpath |
141function |
|
128returns 0 on success and \-1 on failure 129(for example, if 130.Fn setnetpath 131was not called previously). | 142returns 0 on success and \-1 on failure 143(for example, if 144.Fn setnetpath 145was not called previously). |
146The |
|
132.Fn nc_perror 133or 134.Fn nc_sperror | 147.Fn nc_perror 148or 149.Fn nc_sperror |
150function |
|
135can be used to print out the reason for failure. 136See 137.Xr getnetconfig 3 . 138.Pp 139When first called, 140.Fn getnetpath 141returns a pointer to the netconfig database entry corresponding to the first 142valid --- 12 unchanged lines hidden --- | 151can be used to print out the reason for failure. 152See 153.Xr getnetconfig 3 . 154.Pp 155When first called, 156.Fn getnetpath 157returns a pointer to the netconfig database entry corresponding to the first 158valid --- 12 unchanged lines hidden --- |