bindresvport(3) Library Functions Manual bindresvport(3) bindresvport - IP C (libc, -lc) #include #include int bindresvport(int sockfd, struct sockaddr_in *sin); bindresvport() , sockfd, IP, 512 1023. bind(2), bindresvport(), , sin NULL, sin->sin_port . sin NULL; sin->sin_family AF_INET. bindresvport() , ( getsockname(2)). bindresvport() returns 0 on success; otherwise -1 is returned and errno is set to indicate the error. bindresvport() bind(2). : EACCES ( Linux: CAP_NET_BIND_SERVICE , ). EADDRINUSE . EAFNOSUPPORT (EPFNOSUPPORT glibc 2.7 ) sin NULL sin->sin_family AF_INET. attributes(7). +----------------------------+----------------------------------------------------------+--------------------------+ | | | | +----------------------------+----------------------------------------------------------+--------------------------+ |bindresvport() | | . glibc >= 2.17: | | | | MT-Safe; glibc < 2.17: | | | | MT-Unsafe | +----------------------------+----------------------------------------------------------+--------------------------+ glibc 2.17 bindresvport() , . Present on the BSDs, Solaris, and many other systems. bindresvport(), glibc , sin->sin_port. BSD. bind(2), getsockname(2) () Artyom Kunyov , Azamat Hackimov , Dmitriy Ovchinnikov , Dmitry Bolkhovskikh , ITriskTI , Yuri Kozlov ; GNU (GNU General Public License - GPL, 3 ) , - . - , , () () () . Linux man-pages 6.18 8 2026 . bindresvport(3)