bindresvport(3R) SDK R4.11 bindresvport(3R)
NAME
bindresvport - bind a socket to a privileged IP port
SYNOPSIS
#include <sys/types.h>
#include <netinet/in.h>
int bindresvport(sd, sin)
int sd;
struct sockaddrin *sin;
DESCRIPTION
Bindresvport(3R) is used to bind a socket descriptor to a privileged
Internet Protocol (IP) port, that is, a port number in the range
0-1023. The routine returns 0 if it is successful, otherwise -1 is
returned and errno set to reflect the cause of the error. This
routine differs with rresvport (see rcmd(3X)) in that this works for
any IP socket, whereas rresvport() only works for TCP.
Only a user with appropriate privilege can bind to a privileged port;
this call will fail for any other users. For systems supporting the
DG/UX Capability Option, appropriate privilege is defined as having
one or more specific capabilities enabled in the effective capability
set of the user. See capdefaults(5) for the default capabilities
for this command.
On systems without the DG/UX Capability Option, appropriate privilege
means that your process has an effective UID of root. See the
appropriateprivilege(5) man page for more information.
SEE ALSO
rcmd(3X), appropriateprivilege(5).
capdefaults(5).
Licensed material--property of copyright holder(s)