#include <sys/types.h> #include <rpc.rpc.h> int bindresvport(int sd, struct sockaddr_in *sin); |
The bindresvport() function is used to bind a socket to a privileged IP port. This function can be used only by root.
On success, zero is returned. On failure, -1 is returned, and errno is set appropriately.