Provided by: manpages-fr-dev_4.15.0-9_all bug

NOM

       if_nametoindex, if_indextoname - Correspondance entre noms d'interfaces réseau et indices

SYNOPSIS

       #include <net/if.h>

       unsigned int if_nametoindex(const char *ifname);
       char *if_indextoname(unsigned int ifindex, char *ifname);

DESCRIPTION

       La  fonction  if_nametoindex() renvoie l'indice de l'interface réseau correspondant au nom
       nom_if.

       La fonction if_indextoname() renvoie le nom de l'interface réseau correspondant à l'indice
       d'interface indice_if. Le nom est placé dans le tampon sur lequel pointe nom_if. Le tampon
       doit autoriser le stockage d'au moins IF_NAMESIZE octets.

VALEUR RENVOYÉE

       On success, if_nametoindex()  returns the index number of the network interface; on error,
       0 is returned and errno is set to indicate the error.

       On  success, if_indextoname()  returns ifname; on error, NULL is returned and errno is set
       to indicate the error.

ERREURS

       if_nametoindex()  may fail and set errno if:

       ENODEV No interface found with given name.

       if_indextoname() peut échouer et remplir errno si :

       ENXIO  aucune interface n'est trouvée pour l'indice.

       if_nametoindex() et if_indextoname() peuvent aussi échouer pour une des erreurs  précisées
       pour socket(2) ou ioctl(2).

ATTRIBUTS

       Pour une explication des termes utilisés dans cette section, consulter attributes(7).

       ┌────────────────────────────────────────────────────────┬──────────────────────┬─────────┐
       │InterfaceAttributValeur  │
       ├────────────────────────────────────────────────────────┼──────────────────────┼─────────┤
       │if_nametoindex(), if_indextoname()                      │ Sécurité des threads │ MT-Safe │
       └────────────────────────────────────────────────────────┴──────────────────────┴─────────┘

CONFORMITÉ

       POSIX.1-2001, POSIX.1-2008, RFC 3493.

       Cette fonction est d'abord apparue dans BSDi.

VOIR AUSSI

       getifaddrs(3), if_nameindex(3), ifconfig(8)

COLOPHON

       Cette  page  fait partie de la publication 5.13 du projet man-pages 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/.

TRADUCTION

       La  traduction  française  de  cette  page  de  manuel  a  été créée par Christophe Blaess
       <https://www.blaess.fr/christophe/>, Stéphan  Rafin  <stephan.rafin@laposte.net>,  Thierry
       Vignaud  <tvignaud@mandriva.com>,  François Micaux, Alain Portal <aportal@univ-montp2.fr>,
       Jean-Philippe   Guérard   <fevrier@tigreraye.org>,   Jean-Luc   Coulon   (f5ibh)    <jean-
       luc.coulon@wanadoo.fr>,    Julien    Cristau    <jcristau@debian.org>,    Thomas   Huriaux
       <thomas.huriaux@gmail.com>, Nicolas François <nicolas.francois@centraliens.net>, Florentin
       Duneau  <fduneau@gmail.com>, Simon Paillard <simon.paillard@resel.enst-bretagne.fr>, Denis
       Barbier  <barbier@debian.org>,  David  Prévot   <david@tilapin.org>,   Cédric   Boutillier
       <cedric.boutillier@gmail.com> et Frédéric Hantrais <fhantrais@gmail.com>

       Cette  traduction  est  une  documentation libre ; veuillez vous reporter à la GNU General
       Public  License  version 3  ⟨https://www.gnu.org/licenses/gpl-3.0.html⟩   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 à ⟨debian-l10n-french@lists.debian.org⟩.