summaryrefslogtreecommitdiffstats
path: root/lib/libc/rpc/bindresvport.3
diff options
context:
space:
mode:
authorpeter <peter@FreeBSD.org>1996-12-30 14:12:36 +0000
committerpeter <peter@FreeBSD.org>1996-12-30 14:12:36 +0000
commit3f7f69c440e3515ba1e7a2b85eccaa91dc75feca (patch)
treed0b62aab1d6753e4217040b652dbe97e68425bd3 /lib/libc/rpc/bindresvport.3
parent55c2a4947b6ad40d28901906fbdc9983afd7a373 (diff)
downloadFreeBSD-src-3f7f69c440e3515ba1e7a2b85eccaa91dc75feca.zip
FreeBSD-src-3f7f69c440e3515ba1e7a2b85eccaa91dc75feca.tar.gz
- Man page fix, updates.
- minor cosmetic tweaks Obtained from: a diff of FreeBSD vs. OpenBSD/NetBSD rpc code.
Diffstat (limited to 'lib/libc/rpc/bindresvport.3')
-rw-r--r--lib/libc/rpc/bindresvport.39
1 files changed, 7 insertions, 2 deletions
diff --git a/lib/libc/rpc/bindresvport.3 b/lib/libc/rpc/bindresvport.3
index 8b9f3bf..5dd71e3 100644
--- a/lib/libc/rpc/bindresvport.3
+++ b/lib/libc/rpc/bindresvport.3
@@ -9,11 +9,11 @@
.Fd #include <sys/types.h>
.Fd #include <netinet/in.h>
.Ft int
-.Fn bindresvport "int sd "struct sockaddr_in **sin"
+.Fn bindresvport "int sd" "struct sockaddr_in **sin"
.Sh DESCRIPTION
.Nm Bindresvport
is used to bind a socket descriptor to a privileged
-.Em IP
+.Tn IP
port, that is, a
port number in the range 0-1023.
The routine returns 0 if it is successful,
@@ -23,3 +23,8 @@ set to reflect the cause of the error.
.Pp
Only root can bind to a privileged port; this call will fail for any
other users.
+.Pp
+If the value of sin->sin_port is non-zero
+.Fn bindresvport
+will attempt to use that specific port. If it fails, it chooses another
+privileged port automatically.
OpenPOWER on IntegriCloud