1 .\" from: @(#)bindresvport.3n 2.2 88/08/02 4.0 RPCSRC; from 1.7 88/03/14 SMI
2 .\" $Id: bindresvport.3,v 1.1 1999/04/13 23:15:36 wsanchez Exp $
9 .Nd bind a socket to a privileged IP port
11 .Fd #include <sys/types.h>
12 .Fd include <netinet/in.h>
14 .Fn bindresvport "int sd" "struct sockaddr_in **sin"
17 is used to bind a socket descriptor to a privileged
20 port number in the range 0-1023.
21 The routine returns 0 if it is successful,
22 otherwise -1 is returned and
24 set to reflect the cause of the error.
26 Only root can bind to a privileged port; this call will fail for any