diff options
Diffstat (limited to 'lib/libc/rpc/bindresvport.3')
-rw-r--r-- | lib/libc/rpc/bindresvport.3 | 9 |
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. |