diff options
Diffstat (limited to 'src/lib/libc/net/getnetent.3')
-rw-r--r-- | src/lib/libc/net/getnetent.3 | 24 |
1 files changed, 8 insertions, 16 deletions
diff --git a/src/lib/libc/net/getnetent.3 b/src/lib/libc/net/getnetent.3 index 3227f39b06..0c401c74ff 100644 --- a/src/lib/libc/net/getnetent.3 +++ b/src/lib/libc/net/getnetent.3 | |||
@@ -1,4 +1,4 @@ | |||
1 | .\" $OpenBSD: getnetent.3,v 1.10 2000/12/17 21:30:38 millert Exp $ | 1 | .\" $OpenBSD: getnetent.3,v 1.11 2000/12/24 00:30:56 aaron Exp $ |
2 | .\" | 2 | .\" |
3 | .\" Copyright (c) 1983, 1991, 1993 | 3 | .\" Copyright (c) 1983, 1991, 1993 |
4 | .\" The Regents of the University of California. All rights reserved. | 4 | .\" The Regents of the University of California. All rights reserved. |
@@ -59,11 +59,8 @@ The | |||
59 | .Fn getnetbyname , | 59 | .Fn getnetbyname , |
60 | and | 60 | and |
61 | .Fn getnetbyaddr | 61 | .Fn getnetbyaddr |
62 | functions | 62 | functions each return a pointer to an object with the following structure |
63 | each return a pointer to an object with the | 63 | containing the broken-out fields of a line in the network database, |
64 | following structure | ||
65 | containing the broken-out | ||
66 | fields of a line in the network database, | ||
67 | .Pa /etc/networks . | 64 | .Pa /etc/networks . |
68 | .Bd -literal -offset indent | 65 | .Bd -literal -offset indent |
69 | struct netent { | 66 | struct netent { |
@@ -90,13 +87,11 @@ Network numbers are returned in machine byte order. | |||
90 | .Pp | 87 | .Pp |
91 | The | 88 | The |
92 | .Fn getnetent | 89 | .Fn getnetent |
93 | function | 90 | function reads the next line of the file, opening the file if necessary. |
94 | reads the next line of the file, opening the file if necessary. | ||
95 | .Pp | 91 | .Pp |
96 | The | 92 | The |
97 | .Fn setnetent | 93 | .Fn setnetent |
98 | function | 94 | function opens and rewinds the file. |
99 | opens and rewinds the file. | ||
100 | If the | 95 | If the |
101 | .Fa stayopen | 96 | .Fa stayopen |
102 | flag is non-zero, | 97 | flag is non-zero, |
@@ -107,15 +102,13 @@ or | |||
107 | .Pp | 102 | .Pp |
108 | The | 103 | The |
109 | .Fn endnetent | 104 | .Fn endnetent |
110 | function | 105 | function closes the file. |
111 | closes the file. | ||
112 | .Pp | 106 | .Pp |
113 | The | 107 | The |
114 | .Fn getnetbyname | 108 | .Fn getnetbyname |
115 | function | ||
116 | and | 109 | and |
117 | .Fn getnetbyaddr | 110 | .Fn getnetbyaddr |
118 | search the domain name server if the system is configured to use one. | 111 | functions search the domain name server if the system is configured to use one. |
119 | If the search fails, or no name server is configured, they sequentially | 112 | If the search fails, or no name server is configured, they sequentially |
120 | search from the beginning of the file until a matching net name or | 113 | search from the beginning of the file until a matching net name or |
121 | net address and type is found, or until | 114 | net address and type is found, or until |
@@ -127,8 +120,7 @@ Network numbers are supplied in host order. | |||
127 | .It Pa /etc/networks | 120 | .It Pa /etc/networks |
128 | .El | 121 | .El |
129 | .Sh DIAGNOSTICS | 122 | .Sh DIAGNOSTICS |
130 | Null pointer | 123 | Null pointer (0) returned on |
131 | (0) returned on | ||
132 | .Dv EOF | 124 | .Dv EOF |
133 | or error. | 125 | or error. |
134 | .Sh SEE ALSO | 126 | .Sh SEE ALSO |