dwww Home | Manual pages | Find package

if_nametoindex(3)          Library Functions Manual          if_nametoindex(3)

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

BIBLIOTHÈQUE
       Bibliothèque C standard (libc, -lc)

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 cor-
       respondant à 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 er-
       ror.

       On success, if_indextoname()  returns ifname; on error, NULL is  retur-
       ned 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 │
       └─────────────────────────────────────┴──────────────────────┴─────────┘

STANDARDS
       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)

TRADUCTION
       La  traduction française de cette page de manuel a été créée par Chris-
       tophe Blaess <https://www.blaess.fr/christophe/>, Stéphan  Rafin  <ste-
       phan.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.cou-
       lon@wanadoo.fr>, Julien Cristau <jcristau@debian.org>,  Thomas  Huriaux
       <thomas.huriaux@gmail.com>,  Nicolas François <nicolas.francois@centra-
       liens.net>, Florentin Duneau <fduneau@gmail.com>, Simon  Paillard  <si-
       mon.paillard@resel.enst-bretagne.fr>,    Denis   Barbier   <barbier@de-
       bian.org>, David Prévot  <david@tilapin.org>,  Cédric  Boutillier  <ce-
       dric.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⟩.

Pages du manuel de Linux 6.03  15 décembre 2022              if_nametoindex(3)

Generated by dwww version 1.15 on Sat Jun 29 01:37:14 CEST 2024.