diff options
author | deraadt <> | 1999-12-16 21:30:34 +0000 |
---|---|---|
committer | deraadt <> | 1999-12-16 21:30:34 +0000 |
commit | 4bbe99685ce9ae55f318adc00406e0caf4432bdf (patch) | |
tree | 8382773087d5ec817a48ab45a39f045c3d6f5539 /src/lib/libc/net/rcmd.3 | |
parent | ac10646d45729b02230d6ba16729bb91850b3186 (diff) | |
download | openbsd-4bbe99685ce9ae55f318adc00406e0caf4432bdf.tar.gz openbsd-4bbe99685ce9ae55f318adc00406e0caf4432bdf.tar.bz2 openbsd-4bbe99685ce9ae55f318adc00406e0caf4432bdf.zip |
rresvport_af() and bindresvport_af()
Diffstat (limited to 'src/lib/libc/net/rcmd.3')
-rw-r--r-- | src/lib/libc/net/rcmd.3 | 27 |
1 files changed, 19 insertions, 8 deletions
diff --git a/src/lib/libc/net/rcmd.3 b/src/lib/libc/net/rcmd.3 index d086e875bf..5f6ff98459 100644 --- a/src/lib/libc/net/rcmd.3 +++ b/src/lib/libc/net/rcmd.3 | |||
@@ -1,4 +1,4 @@ | |||
1 | .\" $OpenBSD: rcmd.3,v 1.13 1999/07/05 04:41:00 aaron Exp $ | 1 | .\" $OpenBSD: rcmd.3,v 1.14 1999/12/16 21:30:34 deraadt 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. |
@@ -47,6 +47,8 @@ | |||
47 | .Ft int | 47 | .Ft int |
48 | .Fn rresvport "int *port" | 48 | .Fn rresvport "int *port" |
49 | .Ft int | 49 | .Ft int |
50 | .Fn rresvport_af "int *port" "int af" | ||
51 | .Ft int | ||
50 | .Fn iruserok "u_int32_t raddr" "int superuser" "const char *ruser" "const char *luser" | 52 | .Fn iruserok "u_int32_t raddr" "int superuser" "const char *ruser" "const char *luser" |
51 | .Ft int | 53 | .Ft int |
52 | .Fn ruserok "const char *rhost" "int superuser" "const char *ruser" "const char *luser" | 54 | .Fn ruserok "const char *rhost" "int superuser" "const char *ruser" "const char *luser" |
@@ -73,8 +75,10 @@ to run the command via | |||
73 | .Xr rsh 1 . | 75 | .Xr rsh 1 . |
74 | The | 76 | The |
75 | .Fn rresvport | 77 | .Fn rresvport |
76 | function | 78 | and |
77 | returns a descriptor to a socket | 79 | .Fn rresvport_af |
80 | functions | ||
81 | return a descriptor to a socket | ||
78 | with an address in the privileged port space. | 82 | with an address in the privileged port space. |
79 | The | 83 | The |
80 | .Fn iruserok | 84 | .Fn iruserok |
@@ -142,7 +146,9 @@ The protocol is described in detail in | |||
142 | .Pp | 146 | .Pp |
143 | The | 147 | The |
144 | .Fn rresvport | 148 | .Fn rresvport |
145 | function is used to obtain a socket with a privileged | 149 | and |
150 | .Fn rresvport_af | ||
151 | functions are used to obtain a socket with a privileged | ||
146 | address bound to it. This socket is suitable for use | 152 | address bound to it. This socket is suitable for use |
147 | by | 153 | by |
148 | .Fn rcmd | 154 | .Fn rcmd |
@@ -150,8 +156,10 @@ and several other functions. Privileged Internet ports are those | |||
150 | in the range 0 to 1023. Only the super-user | 156 | in the range 0 to 1023. Only the super-user |
151 | is allowed to bind an address of this sort to a socket. | 157 | is allowed to bind an address of this sort to a socket. |
152 | .Fn rresvport | 158 | .Fn rresvport |
153 | needs to be seeded with a port number; if that port | 159 | and |
154 | is not available it will find another. | 160 | .Fn rresvport_af |
161 | need to be seeded with a port number; if that port | ||
162 | is not available these functions will find another. | ||
155 | .Pp | 163 | .Pp |
156 | The | 164 | The |
157 | .Fn iruserok | 165 | .Fn iruserok |
@@ -200,8 +208,10 @@ It returns \-1 on error and prints a diagnostic message on the standard error. | |||
200 | .Pp | 208 | .Pp |
201 | The | 209 | The |
202 | .Fn rresvport | 210 | .Fn rresvport |
203 | function | 211 | and |
204 | returns a valid, bound socket descriptor on success. | 212 | .Fn rresvport_af |
213 | functions | ||
214 | return a valid, bound socket descriptor on success. | ||
205 | It returns \-1 on error with the global value | 215 | It returns \-1 on error with the global value |
206 | .Va errno | 216 | .Va errno |
207 | set according to the reason for failure. | 217 | set according to the reason for failure. |
@@ -214,6 +224,7 @@ is overloaded to mean | |||
214 | .Xr rsh 1 , | 224 | .Xr rsh 1 , |
215 | .Xr intro 2 , | 225 | .Xr intro 2 , |
216 | .Xr bindresvport 3 , | 226 | .Xr bindresvport 3 , |
227 | .Xr bindresvport_af 3 , | ||
217 | .Xr rcmdsh 3 , | 228 | .Xr rcmdsh 3 , |
218 | .Xr rexec 3 , | 229 | .Xr rexec 3 , |
219 | .Xr rexecd 8 , | 230 | .Xr rexecd 8 , |