icon Top 9 categories map      RocketAware > man pages >


Tips: Browse or Search all pages for efficient awareness of more than 6000 of the most popular reusable and open source applications, functions, libraries, and FAQs.

The "RKT couplings" below include links to source code, updates, additional information, advice, FAQs, and overviews.


Search all pages


By activity
Professions, Sciences, Humanities, Business, ...

User Interface
Text-based, GUI, Audio, Video, Keyboards, Mouse, Images,...

Text Strings
Conversions, tests, processing, manipulation,...

Integer, Floating point, Matrix, Statistics, Boolean, ...

Algorithms, Memory, Process control, Debugging, ...

Stored Data
Data storage, Integrity, Encryption, Compression, ...

Networks, protocols, Interprocess, Remote, Client Server, ...

Hard World
Timing, Calendar and Clock, Audio, Video, Printer, Controls...

File System
Management, Filtering, File & Directory access, Viewers, ...


RocketLink!--> Man page versions: OpenBSD FreeBSD Others

BINDRESVPORT(3)           OpenBSD Programmer's Manual          BINDRESVPORT(3)

     bindresvport - bind a socket to a privileged IP port

     #include <sys/types.h>
     #include <netinet/in.h>

     bindresvport(int sd, struct sockaddr_in *sin);

     bindresvport() is used to bind a socket descriptor to a privileged IP
     port, that is, a port number in the range 0-1023.  sd is a socket de-
     scriptor that was returned by a call to socket(2).

     Only root can bind to a privileged port; this call will fail for any oth-
     er users.

     If the value of sin->sin_port is non-zero, bindresvport() attempts to use
     the specified port.  If that fails, it chooses another privileged port
     number automatically.

     bindresvport() returns 0 if it is successful, otherwise -1 is returned
     and errno set to reflect the cause of the error.

     The bindresvport() function fails if:

     [EBADF]       sd is not a valid descriptor.

     [ENOTSOCK]    sd is not a socket.

                   The specified address is not available from the local ma-

     [EADDRINUSE]  The specified address is already in use.

     [EINVAL]      The socket is already bound to an address.

     [EACCES]      The requested address is protected, and the current user
                   has inadequate permission to access it.

     [EFAULT]      The name parameter is not in a valid part of the user ad-
                   dress space.

     [ENOBUFS]     Insufficient resources were available in the system to per-
                   form the operation.

                   The protocol family has not been configured into the system
                   or no implementation for it exists.

     bind(2),  socket(2),  rresvport(3)

OpenBSD 2.6                     August 9, 1997                               1

Source: OpenBSD 2.6 man pages. Copyright: Portions are copyrighted by BERKELEY
SOFTWARE DESIGN, INC., The Regents of the University of California, Massachusetts
Institute of Technology, Free Software Foundation, FreeBSD Inc., and others.

(Corrections, notes, and links courtesy of RocketAware.com)

[Detailed Topics]
FreeBSD Sources for bindresvport(3) functions
OpenBSD sources for bindresvport(3)

[Overview Topics]

Up to: Socket and I/O Operations - socket() and related functions.

RocketLink!--> Man page versions: OpenBSD FreeBSD Others

Rapid-Links: Search | About | Comments | Submit Path: RocketAware > man pages > bindresvport.3/
RocketAware.com is a service of Mib Software
Copyright 1999, Forrest J. Cavalier III. All Rights Reserved.
We welcome submissions and comments