Provided by: manpages-zh_1.5.2-1_all bug

NAME

       bind - ()

SYNOPSIS

       #include <sys/types.h>
       #include <sys/socket.h>

       int bind(int sockfd, struct sockaddr *my_addr, socklen_t addrlen);

DESCRIPTION

       bind sockfd my_addr.  my_addr addrlen ()..  socket(2), ,(),

        SOCK_STREAM bind .  accept(2)).

NOTES

       .   7(man7).   AF_INET  ip(7),  AF_UNIX  unix(7),  AF_APPLETALK ddp(7),
       AF_PACKET packet(7), r AF_X25 x25(7) AF_NETLINK netlink(7).

RETURN VALUE

       0,-1, .

ERRORS

       EBADF  sockfd .

       EINVAL .: linux/unix/sock.c

       EACCES ,.

       ENOTSOCK
              ,.

       UNIX (AF_UNIX) .

       EINVAL  addrlen , AF_UNIX .

       EROFS  .

       EFAULT my_addr .

       ENAMETOOLONG
              my_addr .

       ENOENT .

       ENOMEM .

       ENOTDIR
              .

       EACCES .

       ELOOP   my_addr .

BUGS

       .

CONFORMING TO

       SVr4,4.4BSD( bind BSD 4.2)SVr4 EADDRNOTAVAIL, EADDRINUSE, ENOSR ,  EIO,
       EISDIR EROFS Unix.

NOTE

        bind int(BSD 4.*libc4libc5).  POSIXsocklen_t.  ,glibc2.  accept(2).

SEE ALSO

       accept(2),  connect(2),  listen(2),  socket(2),  getsockname(2), ip(7),
       socket(7)