OpenSS7
SS7 for the
Common Man
© Copyright 1997-2007 OpenSS7 Corporation All Rights Reserved.
Last modified: Sat, 01 Nov 2008 10:42:37 GMT
Home TopIndex FirstPrev Next LastMore Download Info FAQ Mail  Home -> Documentation -> Man Pages -> Manpage of BIND
Quick Links

Download

SCTP

SIGTRAN

SS7

Hardware

STREAMS

Asterisk

Related

Package

Manual

FAQ

Man Pages

Applications

SS7 Stack

ISDN Stack

SIGTRAN Stack

VoIP Stack

MG Stack

SS7/ISDN Devices

IP Transport

Embedded Systems

OS

Documentation

FAQ

SIGTRAN

Design

Conformance

Performance

References

Man Pages

Manuals

Papers

Home

Overview

Status

Documentation

Resources

About

News

Manpage of BIND

Description: Manual Page

Keywords: ss7 ss7/ip ss7 over ip ss7 mtp ss7 sccp ss7 tcap sigtran mtp sccp tcap openss7 acb56 linux telephony pstn linux telephony linux nebs linux compactpci


BIND

Section: OpenSS7 STREAMS Sockets Library Calls (3)
Updated: 2008-10-31
Index Return to Main Contents

NAME

bind - bind a name to a socket

SYNOPSIS

#include <sys/socket.h>

int bind(int socket, const struct sockaddr *address, socklen_t address_len);

ARGUMENTS


The function takes the following arguments:

socket
Specifies the file descriptor of the socket to be bound.
address
Points to a sockaddr structure containing the address to be bound to the socket. The length and format of the address depend on the address family of the socket.
address_len
Specifies the length of the sockaddr structure pointed to by the address argument.

DESCRIPTION

The bind() function assigns an address to an unnamed socket. Sockets created with the socket(3) function are initially unnamed; they are identified only by their address family.

The socket in use may require the process to have appropriate privileges to use the bind() function.

NOTES

An application program can retrieve the assigned socket name with the getsockname(3) function.

CAVEATS

This system call is implemented as a SIOCSOCKSYS IOCTL. See socksys(4) for more information.

RETURN VALUE

Upon successful completion, bind() returns 0. Otherwise, -1 is returned and errno(3) is set to indicate the error.

ERRORS

The bind() function will fail if:

[EADDRINUSE]
The specified address is already in use.
[EADDRNOTAVAIL]
The specified address is not available from the local machine.
[EAFNOSUPPORT]
The specified address is not a valid address for the address family of the specified socket.
[EBADF]
The socket argument is not a valid file descriptor.
[EFAULT]
The address argument can not be accessed.
[EINVAL]
The socket is already bound to an address, and the protocol does not support binding to a new address; or the socket has been shut down.
[ENOTSOCK]
The socket argument does not refer to a socket.
[EOPNOTSUPP]
The socket type of the specified socket does not support binding to an address.

If the address family of the socket is AF_UNIX, then bind() will fail if:

[EACCES]
A component of the path prefix denies search permission, or the requested name requires writing in a directory with a mode that denies write permission.
[EDESTADDRREQ] or [EISDIR]
The address argument is a null pointer.
[EIO]
An I/O error occurred.
[ELOOP]
Too many symbolic links were encountered in translating the pathname in address.
[ENAMETOOLONG]
A component of a pathname exceeded {NAME_MAX} characters, or an entire pathname exceeded {PATH_MAX} characters.
[ENOENT]
A component of the pathname does not name an existing file or the pathname is an empty string.
[ENOTDIR]
A component of the path prefix of the pathname in address is not a directory.
[EROFS]
The name would reside on a read-only filesystem.

The bind() function may fail if:

[EACCES]
The specified address is protected and the current user does not have permission to bind to it.
[EINVAL]
The address_len argument is not a valid length for the address family.
[EISCONN]
The socket is already connected.
[ENAMETOOLONG]
Pathname resolution of a symbolic link produced an intermediate result whose length exceeds {PATH_MAX}.
[ENOBUFS]
Insufficient resources were available to complete the call.
[ENOSR]
There were insufficient STREAMS resources for the operation to complete.

SEE ALSO

connect(3), getsockname(3), listen(3), socket(3), <sys/socket.h>(5).

COMPATIBILITY

This function and sockets implementation is compatible to SVR 4.2[1], and implementations based on SVR 4.2, including Solaris®[2], with the following portability considerations:

---
Where 4BSD differs from POSIX, this function follows POSIX[3].

See sockets(3) and socklib(3) for more compatibility information.

CONFORMING TO

The Open Group XNS Issue 5.2[4].

HISTORY

Most sockets functions first appeared in 4BSD.

REFERENCES

[1]
SVR 4.2, UNIX® System V Release 4.2 Programmer's Manual, 1992, (Englewood Cliffs, New Jersey), AT&T UNIX System Laboratories, Inc., Prentice Hall.
[2]
Solaris® 8, Solaris 8 Docmentation, 2001, (Santa Clara, California), Sun Microsystems, Inc., Sun. <http://docs.sun.com/>
[3]
SUS Version 3, Single UNIX Specification, OpenGroup, Open Group Publication. <http://www.opengroup.org/onlinepubs/>
[4]
XNS, Open Group CAE Specification: Technical Standard: Network Services (XNS), Issue 5.2, Draft 2, 1999, (Berkshire, UK), OpenGroup, Open Group Publication. [ISBN 1-85912-241-8] <http://www.opengroup.org/onlinepubs/>

TRADEMARKS

OpenSS7tm
is a trademark of OpenSS7 Corporation.
Linux®
is a registered trademark of Linus Torvalds.
UNIX®
is a registered trademark of The Open Group.
Solaris®
is a registered trademark of Sun Microsystems.

Other trademarks are the property of their respective owners.

IDENTIFICATION


OpenSS7 STREAMS Sockets: Package strsock version 0.9.2.4 released 2008-10-31.

Copyright©1997-2008OpenSS7 Corp. All Rights Reserved.
(See roff source for permission notice.)



Index

NAME
SYNOPSIS
ARGUMENTS
DESCRIPTION
NOTES
CAVEATS
RETURN VALUE
ERRORS
SEE ALSO
COMPATIBILITY
CONFORMING TO
HISTORY
REFERENCES
TRADEMARKS
IDENTIFICATION

This document was created by man2html, using the manual pages.
Time: 17:07:03 GMT, May 19, 2013
OpenSS7
SS7 for the
Common Man
Home TopIndex FirstPrev Next LastMore Download Info FAQ Mail  Home -> Documentation -> Man Pages -> Manpage of BIND
Last modified: Sat, 01 Nov 2008 10:42:37 GMT
© Copyright 1997-2007 OpenSS7 Corporation All Rights Reserved.