.\" -*- coding: UTF-8 -*- .\" Copyright (c) 2012 YOSHIFUJI Hideaki .\" .\" %%%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 .\" .\"******************************************************************* .\" .\" This file was generated with po4a. Translate the source file. .\" .\"******************************************************************* .TH IF_NAMETOINDEX 3 "15 septembre 2017" GNU "Manuel du programmeur Linux" .SH NOM if_nametoindex, if_indextoname \- Correspondance entre noms d'interfaces réseau et indices .SH SYNOPSIS .nf \fB#include \fP .PP \fBunsigned int if_nametoindex(const char *\fP\fInom_if\fP\fB);\fP .PP \fBchar *if_indextoname(unsigned int indice_if, char *\fP\fInom_if\fP\fB);\fP .fi .SH DESCRIPTION La fonction \fBif_nametoindex\fP() renvoie l'indice de l'interface réseau correspondant au nom \fInom_if\fP. .PP La fonction \fBif_indextoname\fP() renvoie le nom de l'interface réseau correspondant à l'indice d'interface \fIindice_if\fP. Le nom est placé dans le tampon sur lequel pointe \fInom_if\fP. Le tampon doit autoriser le stockage d'au moins \fBIF_NAMESIZE\fP octets. .SH "VALEUR RENVOYÉE" En cas de réussite, \fBif_nametoindex\fP() renvoie l'indice de l'interface réseau. En cas d'erreur, elle renvoie 0 et \fIerrno\fP est rempli avec le code d'erreur. .PP En cas de réussite, \fBif_indextoname\fP() renvoie \fInom_if\fP. En cas d'erreur, elle renvoie un pointeur NULL et \fIerrno\fP est rempli avec le code d'erreur. .SH ERREURS \fBif_nametoindex\fP() may fail and set \fIerrno\fP if: .TP \fBENODEV\fP No interface found with given name. .PP \fBif_indextoname\fP() peut échouer et remplir \fIerrno\fP si\ : .TP \fBENXIO\fP aucune interface n'est trouvée pour l'indice. .PP \fBif_nametoindex\fP() et \fBif_indextoname\fP() peuvent aussi échouer pour une des erreurs précisées pour \fBsocket\fP(2) ou \fBioctl\fP(2). .SH ATTRIBUTS Pour une explication des termes utilisés dans cette section, consulter \fBattributes\fP(7). .TS allbox; lbw34 lb lb l l l. Interface Attribut Valeur T{ \fBif_nametoindex\fP(), \fBif_indextoname\fP() T} Sécurité des threads MT\-Safe .TE .SH CONFORMITÉ POSIX.1\-2001, POSIX.1\-2008, RFC\ 3493. .PP Cette fonction est d'abord apparue dans BSDi. .SH "VOIR AUSSI" \fBgetifaddrs\fP(3), \fBif_nameindex\fP(3), \fBifconfig\fP(8) .SH COLOPHON Cette page fait partie de la publication\ 5.10 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 .