1.\" @(#)bindresvport.3n 2.2 88/08/02 4.0 RPCSRC; from 1.7 88/03/14 SMI 2.\" $NetBSD: bindresvport.3,v 1.3 1997/07/01 06:28:22 mikel Exp $ 3.\" 4.Dd November 22, 1987 5.Dt BINDRESVPORT 3 6.Os 7.Sh NAME 8.Nm bindresvport 9.Nd bind a socket to a privileged IP port 10.Sh SYNOPSIS 11.Fd #include <sys/types.h> 12.Fd #include <netinet/in.h> 13.Ft int 14.Fn bindresvport "int sd" "struct sockaddr_in **sin" 15.Sh DESCRIPTION 16.Fn bindresvport 17is used to bind a socket descriptor to a privileged 18.Tn IP 19port, that is, a 20port number in the range 0-1023. 21The routine returns 0 if it is successful, 22otherwise -1 is returned and 23.Va errno 24set to reflect the cause of the error. 25.Pp 26Only root can bind to a privileged port; this call will fail for any 27other users. 28