.\" -*- coding: UTF-8 -*- '\" t .\" Copyright (c) 2012 YOSHIFUJI Hideaki .\" .\" SPDX-License-Identifier: Linux-man-pages-copyleft .\" .\"******************************************************************* .\" .\" This file was generated with po4a. Translate the source file. .\" .\"******************************************************************* .TH if_nametoindex 3 "15 décembre 2022" "Pages du manuel de Linux 6.03" .SH NOM if_nametoindex, if_indextoname \- Correspondance entre noms d'interfaces réseau et indices .SH BIBLIOTHÈQUE Bibliothèque C standard (\fIlibc\fP, \fI\-lc\fP) .SH SYNOPSIS .nf \fB#include \fP .PP \fBunsigned int if_nametoindex(const char *\fP\fIifname\fP\fB);\fP \fBchar *if_indextoname(unsigned int ifindex, char *\fP\fIifname\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" On success, \fBif_nametoindex\fP() returns the index number of the network interface; on error, 0 is returned and \fIerrno\fP is set to indicate the error. .PP On success, \fBif_indextoname\fP() returns \fIifname\fP; on error, NULL is returned and \fIerrno\fP is set to indicate the error. .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). .ad l .nh .TS allbox; lbx lb lb l l l. Interface Attribut Valeur T{ \fBif_nametoindex\fP(), \fBif_indextoname\fP() T} Sécurité des threads MT\-Safe .TE .hy .ad .sp 1 .SH STANDARDS 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) .PP .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 . .PP 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. .PP 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 .