.\" -*- coding: UTF-8 -*- .\" Copyright (C) 2007, Michael Kerrisk .\" and Copyright (C) 2008, Linux Foundation, written by Michael Kerrisk .\" .\" .\" %%%LICENSE_START(VERBATIM) .\" Permission is granted to make and distribute verbatim copies of this .\" manual provided the copyright notice and this permission notice are .\" preserved on all copies. .\" .\" Permission is granted to copy and distribute modified versions of this .\" manual under the conditions for verbatim copying, provided that the .\" entire resulting derived work is distributed under the terms of a .\" permission notice identical to this one. .\" .\" Since the Linux kernel and libraries are constantly changing, this .\" manual page may be incorrect or out-of-date. The author(s) assume no .\" responsibility for errors or omissions, or for damages resulting from .\" the use of the information contained herein. The author(s) may not .\" have taken the same level of care in the production of this manual, .\" which is licensed free of charge, as they might when working .\" professionally. .\" .\" Formatted or processed versions of this manual, if unaccompanied by .\" the source, must acknowledge the copyright and authors of this work. .\" %%%LICENSE_END .\" .\" 2007-05-31, mtk: Rewrite and substantial additional text. .\" 2008-12-03, mtk: Rewrote some pieces and fixed some errors .\" .\"******************************************************************* .\" .\" This file was generated with po4a. Translate the source file. .\" .\"******************************************************************* .TH BINDRESVPORT 3 "15 septembre 2017" "" "Manuel du programmeur Linux" .SH NOM bindresvport \- Affecter une socket à un port IP privilégié .SH SYNOPSIS .nf \fB#include \fP \fB#include \fP .PP \fBint bindresvport(int \fP\fIsockfd\fP\fB, struct sockaddr_in *\fP\fIsin\fP\fB);\fP .fi .SH DESCRIPTION .PP .\" Glibc actually starts searching with a port # in the range 600 to 1023 \fBbindresvport\fP() is used to bind the socket referred to by the file descriptor \fIsockfd\fP to a privileged anonymous IP port, that is, a port number arbitrarily selected from the range 512 to 1023. .PP Si le \fBbind\fP(2) réalisé par \fBbindresvport\fP() réussi et si \fIsin\fP est non NULL, alors \fIsin\->sin_port\fP renvoie le numéro de port alloué. .PP \fIsin\fP peut être NULL, dans ce cas \fIsin\->sin_family\fP est simplement considéré comme \fBAF_INET\fP. Cependant, dans ce cas, \fBbindresvport\fP() ne peut renvoyer le port actuellement alloué (cette information peut être obtenu ultérieurement avec \fBgetsockname\fP(2)). .SH "VALEUR RENVOYÉE" \fBbindresvport\fP() renvoie 0 en cas de succès. En cas d'erreur, \-1 est renvoyé et \fIerrno\fP est définie. .SH ERREURS \fBbindresvport\fP() peut échouer pour les mêmes raisons que \fBbind\fP(2). De plus, les erreurs suivantes peuvent se produire\ : .TP \fBEACCES\fP The calling process was not privileged (on Linux: the calling process did not have the \fBCAP_NET_BIND_SERVICE\fP capability in the user namespace governing its network namespace). .TP \fBEADDRINUSE\fP Tous les ports privilégiés sont utilisés. .TP \fBEAFNOSUPPORT\fP (\fBEPFNOSUPPORT\fP dans la glibc\ 2.7 et les versions précédentes) \fIsin\fP est non NULL et \fIsin\->sin_family\fP n'est pas \fBAF_INET\fP. .SH ATTRIBUTS Pour une explication des termes utilisés dans cette section, consulter \fBattributes\fP(7). .TS allbox; lb lb lb l l lw23. Interface Attribut Valeur T{ \fBbindresvport\fP() T} Sécurité des threads T{ .\" commit f6da27e53695ad1cc0e2a9490358decbbfdff5e5 glibc >= 2.17: MT\-Safe .br glibc < 2.17: MT\-Unsafe T} .TE .PP The \fBbindresvport\fP() function uses a static variable that was not protected by a lock before glibc 2.17, rendering the function MT\-Unsafe. .SH CONFORMITÉ Not in POSIX.1. Present on the BSDs, Solaris, and many other systems. .SH NOTES Contrairement à d'autres implémentations de \fBbindresvport\fP(), l'implémentation de la glibc ignore toutes les valeurs que l'appelant passe à \fIsin\->sin_port\fP. .SH "VOIR AUSSI" \fBbind\fP(2), \fBgetsockname\fP(2) .SH COLOPHON Cette page fait partie de la publication\ 5.04 du projet \fIman\-pages\fP Linux. Une description du projet et des instructions pour signaler des anomalies et la dernière version de cette page peuvent être trouvées à l'adresse \%https://www.kernel.org/doc/man\-pages/. .SH TRADUCTION La traduction française de cette page de manuel a été créée par Christophe Blaess , Stéphan Rafin , Thierry Vignaud , François Micaux, Alain Portal , Jean-Philippe Guérard , Jean-Luc Coulon (f5ibh) , Julien Cristau , Thomas Huriaux , Nicolas François , Florentin Duneau , Simon Paillard , Denis Barbier , David Prévot , Cédric Boutillier et Frédéric Hantrais . Cette traduction est une documentation libre ; veuillez vous reporter à la .UR https://www.gnu.org/licenses/gpl-3.0.html GNU General Public License version 3 .UE concernant les conditions de copie et de distribution. Il n'y a aucune RESPONSABILITÉ LÉGALE. Si vous découvrez un bogue dans la traduction de cette page de manuel, veuillez envoyer un message à .MT debian-l10n-french@lists.debian.org .ME .