Bind a socket to a privileged IP port
#include <sys/types.h>
#include <netinet/in.h>
int bindresvport( int sd,
struct sockaddr_in * sin );
socket3r.lib, socket3s.lib
The bindresvport() function binds a socket descriptor to a privileged IP port (i.e. a port number in the range 0-1023).
![]() |
Only root can bind to a privileged port; this call fails for any other user. |
| Safety: | |
|---|---|
| Interrupt handler | No |
| Signal handler | No |
| Thread | No |
connect(), getsockname(), listen(), socket()