bindresvport
Name
bindresvport -- bind socket to
privileged IP port
Synopsis
#include <sys/types.h>
#include <rpc.rpc.h>
|
int bindresvport(int
sd
, struct sockaddr_in
*sin
);
Description
bindresvport binds a socket to a
privileged IP port. This function can be used only by
root
.
Return Value
On success, 0 is returned.
On error, -1 is returned and
the global variable errno is set
appropriately.
Errors
- EPFNOSUPPORT
-
Address of
sin
did
not match address family of
sd
.