Content-type: text/html Man page of rresvport

rresvport

Section: C Library Functions (3)
Index Return to Main Contents
 

NAME

rresvport - Retrieves a socket with a privileged address  

LIBRARY

Standard C Library (libc.a)  

SYNOPSIS

int rresvport (

       int *port );
 

PARAMETERS

Specifies the port to use for the connection.  

DESCRIPTION

The rresvport() function obtains a socket with a privileged address bound to the socket. A privileged Internet port is one that falls in the range of 0 to 1023.

Only processes with an effective user ID of root can use the rresvport() function. An authentication scheme based on remote port numbers is used to verify permissions.

If the connection succeeds, a socket in the Internet domain of type SOCK_STREAM is returned to the calling process.  

RETURN VALUES

Upon successful completion, the rresvport() function returns a valid, bound socket descriptor. Otherwise, a value of -1 is returned and errno is set to indicate the error.  

ERRORS

If the rresvport() function fails, errno may be set to one of the following values: All network ports are in use. The addresses in the specified address family cannot be used with this socket.

Two hundred (200) file descriptors are currently open. The system file table is full. Insufficient buffers are available in the system to complete the function.  

FILES

Contains the service names.  

RELATED INFORMATION

Functions: rcmd(3), ruserok(3) delim off


 

Index

NAME
LIBRARY
SYNOPSIS
PARAMETERS
DESCRIPTION
RETURN VALUES
ERRORS
FILES
RELATED INFORMATION

This document was created by man2html, using the manual pages.
Time: 02:41:25 GMT, October 02, 2010