| 1 |
# French translation of manpages |
| 2 |
# This file is distributed under the same license as the manpages-l10n package. |
| 3 |
# Copyright © of this file: |
| 4 |
# Christophe Blaess <https://www.blaess.fr/christophe/>, 1996-2003. |
| 5 |
# Stéphan Rafin <[email protected]>, 2002. |
| 6 |
# Thierry Vignaud <[email protected]>, 1999,2002. |
| 7 |
# François Micaux, 2002. |
| 8 |
# Alain Portal <[email protected]>, 2003-2008. |
| 9 |
# Jean-Philippe Guérard <[email protected]>, 2005-2006. |
| 10 |
# Jean-Luc Coulon (f5ibh) <[email protected]>, 2006-2007. |
| 11 |
# Julien Cristau <[email protected]>, 2006-2007. |
| 12 |
# Thomas Huriaux <[email protected]>, 2006-2008. |
| 13 |
# Nicolas François <[email protected]>, 2006-2008. |
| 14 |
# Florentin Duneau <[email protected]>, 2006-2010. |
| 15 |
# Simon Paillard <[email protected]>, 2006, 2013. |
| 16 |
# Denis Barbier <[email protected]>, 2006,2010. |
| 17 |
# David Prévot <[email protected]>, 2010, 2013, 2014. |
| 18 |
# Cédric Boutillier <[email protected]>, 2011, 2012, 2013. |
| 19 |
# Frédéric Hantrais <[email protected]>, 2013, 2014. |
| 20 |
# Jean-Pierre Giraud <[email protected]>, 2023-2024. |
| 21 |
msgid "" |
| 22 |
msgstr "" |
| 23 |
"Project-Id-Version: manpages-l10n 4.21.0\n" |
| 24 |
"POT-Creation-Date: 2026-05-01 04:28+0200\n" |
| 25 |
"PO-Revision-Date: 2024-03-06 00:17+0100\n" |
| 26 |
"Last-Translator: Jean-Pierre Giraud <[email protected]>\n" |
| 27 |
"Language-Team: French <[email protected]>\n" |
| 28 |
"Language: fr\n" |
| 29 |
"MIME-Version: 1.0\n" |
| 30 |
"Content-Type: text/plain; charset=UTF-8\n" |
| 31 |
"Content-Transfer-Encoding: 8bit\n" |
| 32 |
"Plural-Forms: nplurals=2; plural=n > 1;\n" |
| 33 |
"X-Generator: Lokalize 22.12.3\n" |
| 34 |
|
| 35 |
#. type: TH |
| 36 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 37 |
#: mageia-cauldron |
| 38 |
#, no-wrap |
| 39 |
msgid "getifaddrs" |
| 40 |
msgstr "getifaddrs" |
| 41 |
|
| 42 |
#. type: TH |
| 43 |
#: archlinux debian-unstable mageia-cauldron |
| 44 |
#, no-wrap |
| 45 |
msgid "2026-02-08" |
| 46 |
msgstr "8 février 2026" |
| 47 |
|
| 48 |
#. type: TH |
| 49 |
#: archlinux debian-unstable |
| 50 |
#, no-wrap |
| 51 |
msgid "Linux man-pages 6.18" |
| 52 |
msgstr "Pages du manuel de Linux 6.18" |
| 53 |
|
| 54 |
#. type: SH |
| 55 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 56 |
#: mageia-cauldron |
| 57 |
#, no-wrap |
| 58 |
msgid "NAME" |
| 59 |
msgstr "NOM" |
| 60 |
|
| 61 |
#. type: Plain text |
| 62 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 63 |
#: mageia-cauldron |
| 64 |
msgid "getifaddrs, freeifaddrs - get interface addresses" |
| 65 |
msgstr "getifaddrs, freeifaddrs - Renvoyer les adresses des interfaces" |
| 66 |
|
| 67 |
#. type: SH |
| 68 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 69 |
#: mageia-cauldron |
| 70 |
#, no-wrap |
| 71 |
msgid "LIBRARY" |
| 72 |
msgstr "BIBLIOTHÈQUE" |
| 73 |
|
| 74 |
#. type: Plain text |
| 75 |
#: archlinux debian-unstable fedora-44 fedora-rawhide mageia-cauldron |
| 76 |
msgid "Standard C library (I<libc>,\\ I<-lc>)" |
| 77 |
msgstr "Bibliothèque C standard (I<libc>,\\ I<-lc>)" |
| 78 |
|
| 79 |
#. type: SH |
| 80 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 81 |
#: mageia-cauldron |
| 82 |
#, no-wrap |
| 83 |
msgid "SYNOPSIS" |
| 84 |
msgstr "SYNOPSIS" |
| 85 |
|
| 86 |
#. type: Plain text |
| 87 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 88 |
#: mageia-cauldron |
| 89 |
#, no-wrap |
| 90 |
msgid "" |
| 91 |
"B<#include E<lt>sys/types.hE<gt>>\n" |
| 92 |
"B<#include E<lt>ifaddrs.hE<gt>>\n" |
| 93 |
msgstr "" |
| 94 |
"B<#include E<lt>sys/types.hE<gt>>\n" |
| 95 |
"B<#include E<lt>ifaddrs.hE<gt>>\n" |
| 96 |
|
| 97 |
#. type: Plain text |
| 98 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 99 |
#: mageia-cauldron |
| 100 |
#, no-wrap |
| 101 |
msgid "" |
| 102 |
"B<int getifaddrs(struct ifaddrs **>I<ifap>B<);>\n" |
| 103 |
"B<void freeifaddrs(struct ifaddrs *>I<ifa>B<);>\n" |
| 104 |
msgstr "" |
| 105 |
"B<int getifaddrs(struct ifaddrs **>I<ifap>B<);>\n" |
| 106 |
"B<void freeifaddrs(struct ifaddrs *>I<ifa>B<);>\n" |
| 107 |
|
| 108 |
#. type: SH |
| 109 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 110 |
#: mageia-cauldron |
| 111 |
#, no-wrap |
| 112 |
msgid "DESCRIPTION" |
| 113 |
msgstr "DESCRIPTION" |
| 114 |
|
| 115 |
#. type: Plain text |
| 116 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 117 |
#: mageia-cauldron |
| 118 |
msgid "" |
| 119 |
"The B<getifaddrs>() function creates a linked list of structures describing " |
| 120 |
"the network interfaces of the local system, and stores the address of the " |
| 121 |
"first item of the list in I<*ifap>. The list consists of I<ifaddrs> " |
| 122 |
"structures, defined as follows:" |
| 123 |
msgstr "" |
| 124 |
"La fonction B<getifaddrs>() crée une liste chaînée de structures décrivant " |
| 125 |
"les interfaces réseau du système local et sauvegarde l'adresse du premier " |
| 126 |
"élément de la liste dans I<*ifap>. La liste est constituée de structures " |
| 127 |
"I<ifaddrs>, comme définie ci-dessous :" |
| 128 |
|
| 129 |
#. type: Plain text |
| 130 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 131 |
#: mageia-cauldron |
| 132 |
#, no-wrap |
| 133 |
msgid "" |
| 134 |
"struct ifaddrs {\n" |
| 135 |
" struct ifaddrs *ifa_next; /* Next item in list */\n" |
| 136 |
" char *ifa_name; /* Name of interface */\n" |
| 137 |
" unsigned int ifa_flags; /* Flags from SIOCGIFFLAGS */\n" |
| 138 |
" struct sockaddr *ifa_addr; /* Address of interface */\n" |
| 139 |
" struct sockaddr *ifa_netmask; /* Netmask of interface */\n" |
| 140 |
" union {\n" |
| 141 |
" struct sockaddr *ifu_broadaddr;\n" |
| 142 |
" /* Broadcast address of interface */\n" |
| 143 |
" struct sockaddr *ifu_dstaddr;\n" |
| 144 |
" /* Point-to-point destination address */\n" |
| 145 |
" } ifa_ifu;\n" |
| 146 |
"#define ifa_broadaddr ifa_ifu.ifu_broadaddr\n" |
| 147 |
"#define ifa_dstaddr ifa_ifu.ifu_dstaddr\n" |
| 148 |
" void *ifa_data; /* Address-specific data */\n" |
| 149 |
"};\n" |
| 150 |
msgstr "" |
| 151 |
"struct ifaddrs {\n" |
| 152 |
" struct ifaddrs *ifa_next; /* Next item in list */\n" |
| 153 |
" char *ifa_name; /* Name of interface */\n" |
| 154 |
" unsigned int ifa_flags; /* Flags from SIOCGIFFLAGS */\n" |
| 155 |
" struct sockaddr *ifa_addr; /* Address of interface */\n" |
| 156 |
" struct sockaddr *ifa_netmask; /* Netmask of interface */\n" |
| 157 |
" union {\n" |
| 158 |
" struct sockaddr *ifu_broadaddr;\n" |
| 159 |
" /* Broadcast address of interface */\n" |
| 160 |
" struct sockaddr *ifu_dstaddr;\n" |
| 161 |
" /* Point-to-point destination address */\n" |
| 162 |
" } ifa_ifu;\n" |
| 163 |
"#define ifa_broadaddr ifa_ifu.ifu_broadaddr\n" |
| 164 |
"#define ifa_dstaddr ifa_ifu.ifu_dstaddr\n" |
| 165 |
" void *ifa_data; /* Address-specific data */\n" |
| 166 |
"};\n" |
| 167 |
|
| 168 |
#. type: Plain text |
| 169 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 170 |
#: mageia-cauldron |
| 171 |
msgid "" |
| 172 |
"The I<ifa_next> field contains a pointer to the next structure on the list, " |
| 173 |
"or NULL if this is the last item of the list." |
| 174 |
msgstr "" |
| 175 |
"Le champ I<ifa_next> contient un pointeur vers la prochaine structure de la " |
| 176 |
"liste ou NULL si c'est le dernier de la liste." |
| 177 |
|
| 178 |
#. The constant |
| 179 |
#. .B IF NAMESIZE |
| 180 |
#. indicates the maximum length of this field. |
| 181 |
#. type: Plain text |
| 182 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 183 |
#: mageia-cauldron |
| 184 |
msgid "The I<ifa_name> points to the null-terminated interface name." |
| 185 |
msgstr "" |
| 186 |
"I<ifa_name> pointe vers un nom d'interface terminé par un caractère nul." |
| 187 |
|
| 188 |
#. type: Plain text |
| 189 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 190 |
#: mageia-cauldron |
| 191 |
msgid "" |
| 192 |
"The I<ifa_flags> field contains the interface flags, as returned by the " |
| 193 |
"B<SIOCGIFFLAGS> B<ioctl>(2) operation (see B<netdevice>(7) for a list of " |
| 194 |
"these flags)." |
| 195 |
msgstr "" |
| 196 |
"Le champ I<ifa_flags> contient les drapeaux de l'interface, comme renvoyé " |
| 197 |
"par l'opération B<ioctl>(2) B<SIOCGUFFLAGS> (consultez B<netdevice>(7) pour " |
| 198 |
"la liste des drapeaux)." |
| 199 |
|
| 200 |
#. type: Plain text |
| 201 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 202 |
#: mageia-cauldron |
| 203 |
msgid "" |
| 204 |
"The I<ifa_addr> field points to a structure containing the interface " |
| 205 |
"address. (The I<sa_family> subfield should be consulted to determine the " |
| 206 |
"format of the address structure.) This field may contain a null pointer." |
| 207 |
msgstr "" |
| 208 |
"Le champ I<ifa_addr> pointe vers une structure contenant l'adresse de " |
| 209 |
"l'interface (le sous-champ I<sa_family> devrait être consulté afin de " |
| 210 |
"déterminer le format de la structure d'adresse). Ce champ peut contenir un " |
| 211 |
"pointeur NULL." |
| 212 |
|
| 213 |
#. type: Plain text |
| 214 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 215 |
#: mageia-cauldron |
| 216 |
msgid "" |
| 217 |
"The I<ifa_netmask> field points to a structure containing the netmask " |
| 218 |
"associated with I<ifa_addr>, if applicable for the address family. This " |
| 219 |
"field may contain a null pointer." |
| 220 |
msgstr "" |
| 221 |
"Le champ I<ifa_netmask> pointe vers une structure contenant le masque réseau " |
| 222 |
"associé à I<ifa_addr>, si cela est valable pour cette famille d'adresse. Ce " |
| 223 |
"champ peut contenir un pointeur NULL." |
| 224 |
|
| 225 |
#. type: Plain text |
| 226 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 227 |
#: mageia-cauldron |
| 228 |
msgid "" |
| 229 |
"Depending on whether the bit B<IFF_BROADCAST> or B<IFF_POINTOPOINT> is set " |
| 230 |
"in I<ifa_flags> (only one can be set at a time), either I<ifa_broadaddr> " |
| 231 |
"will contain the broadcast address associated with I<ifa_addr> (if " |
| 232 |
"applicable for the address family) or I<ifa_dstaddr> will contain the " |
| 233 |
"destination address of the point-to-point interface." |
| 234 |
msgstr "" |
| 235 |
"Selon que le bit B<IFF_BROADCAST> ou B<IFF_POINTOPOINT> est défini dans " |
| 236 |
"I<ifa_flags> (seul l'un des deux bit peut être défini), soit " |
| 237 |
"I<ifa_broadaddr> contiendra l'adresse de diffusion associée à I<ifa_addr> " |
| 238 |
"(si cela est applicable avec cette famille d'adresse), ou soit " |
| 239 |
"I<ifa_dstaddr> contiendra l'adresse de destination de l'interface point à " |
| 240 |
"point." |
| 241 |
|
| 242 |
#. type: Plain text |
| 243 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 244 |
#: mageia-cauldron |
| 245 |
msgid "" |
| 246 |
"The I<ifa_data> field points to a buffer containing address-family-specific " |
| 247 |
"data; this field may be NULL if there is no such data for this interface." |
| 248 |
msgstr "" |
| 249 |
"Le champ I<ifa_data> pointe vers un tampon contenant les données spécifique " |
| 250 |
"de la famille d'adresse (« address-family-specific data »). Ce champ peut " |
| 251 |
"être NULL s'il n'y a aucune donnée de ce type pour cette interface. " |
| 252 |
|
| 253 |
#. type: Plain text |
| 254 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 255 |
#: mageia-cauldron |
| 256 |
msgid "" |
| 257 |
"The data returned by B<getifaddrs>() is dynamically allocated and should be " |
| 258 |
"freed using B<freeifaddrs>() when no longer needed." |
| 259 |
msgstr "" |
| 260 |
"La donnée renvoyée par B<getifaddrs>() est dynamiquement allouée et devrait " |
| 261 |
"être libérée avec B<freeifaddrs>()." |
| 262 |
|
| 263 |
#. type: SH |
| 264 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 265 |
#: mageia-cauldron |
| 266 |
#, no-wrap |
| 267 |
msgid "RETURN VALUE" |
| 268 |
msgstr "VALEUR RENVOYÉE" |
| 269 |
|
| 270 |
#. type: Plain text |
| 271 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 272 |
#: mageia-cauldron |
| 273 |
msgid "" |
| 274 |
"On success, B<getifaddrs>() returns zero; on error, -1 is returned, and " |
| 275 |
"I<errno> is set to indicate the error." |
| 276 |
msgstr "" |
| 277 |
"En cas de réussite, B<getifaddrs>() renvoie B<0>, en cas d'erreur, elle " |
| 278 |
"renvoie B<-1> et I<errno> est défini pour indiquer l'erreur." |
| 279 |
|
| 280 |
#. type: SH |
| 281 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 282 |
#: mageia-cauldron |
| 283 |
#, no-wrap |
| 284 |
msgid "ERRORS" |
| 285 |
msgstr "ERREURS" |
| 286 |
|
| 287 |
#. type: Plain text |
| 288 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 289 |
#: mageia-cauldron |
| 290 |
msgid "" |
| 291 |
"B<getifaddrs>() may fail and set I<errno> for any of the errors specified " |
| 292 |
"for B<socket>(2), B<bind>(2), B<getsockname>(2), B<recvmsg>(2), " |
| 293 |
"B<sendto>(2), B<malloc>(3), or B<realloc>(3)." |
| 294 |
msgstr "" |
| 295 |
"B<getifaddrs>() peut échouer et définir I<errno> pour toutes erreurs " |
| 296 |
"spécifiées pour B<socket>(2), B<bind>(2), B<getsockname>(2), B<recvmsg>(2), " |
| 297 |
"B<sendto>(2), B<malloc>(3) ou B<realloc>(3)." |
| 298 |
|
| 299 |
#. type: SH |
| 300 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 301 |
#: mageia-cauldron |
| 302 |
#, no-wrap |
| 303 |
msgid "ATTRIBUTES" |
| 304 |
msgstr "ATTRIBUTS" |
| 305 |
|
| 306 |
#. type: Plain text |
| 307 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 308 |
#: mageia-cauldron |
| 309 |
msgid "" |
| 310 |
"For an explanation of the terms used in this section, see B<attributes>(7)." |
| 311 |
msgstr "" |
| 312 |
"Pour une explication des termes utilisés dans cette section, consulter " |
| 313 |
"B<attributes>(7)." |
| 314 |
|
| 315 |
#. type: tbl table |
| 316 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 317 |
#: mageia-cauldron |
| 318 |
#, no-wrap |
| 319 |
msgid "Interface" |
| 320 |
msgstr "Interface" |
| 321 |
|
| 322 |
#. type: tbl table |
| 323 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 324 |
#: mageia-cauldron |
| 325 |
#, no-wrap |
| 326 |
msgid "Attribute" |
| 327 |
msgstr "Attribut" |
| 328 |
|
| 329 |
#. type: tbl table |
| 330 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 331 |
#: mageia-cauldron |
| 332 |
#, no-wrap |
| 333 |
msgid "Value" |
| 334 |
msgstr "Valeur" |
| 335 |
|
| 336 |
#. type: tbl table |
| 337 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 338 |
#: mageia-cauldron |
| 339 |
#, no-wrap |
| 340 |
msgid ".na\n" |
| 341 |
msgstr ".na\n" |
| 342 |
|
| 343 |
#. type: tbl table |
| 344 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 345 |
#: mageia-cauldron |
| 346 |
#, no-wrap |
| 347 |
msgid ".nh\n" |
| 348 |
msgstr ".nh\n" |
| 349 |
|
| 350 |
#. type: tbl table |
| 351 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 352 |
#: mageia-cauldron |
| 353 |
#, no-wrap |
| 354 |
msgid "" |
| 355 |
"B<getifaddrs>(),\n" |
| 356 |
"B<freeifaddrs>()" |
| 357 |
msgstr "" |
| 358 |
"B<getifaddrs>(),\n" |
| 359 |
"B<freeifaddrs>()" |
| 360 |
|
| 361 |
#. type: tbl table |
| 362 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 363 |
#: mageia-cauldron |
| 364 |
#, no-wrap |
| 365 |
msgid "Thread safety" |
| 366 |
msgstr "Sécurité des threads" |
| 367 |
|
| 368 |
#. type: tbl table |
| 369 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 370 |
#: mageia-cauldron |
| 371 |
#, no-wrap |
| 372 |
msgid "MT-Safe" |
| 373 |
msgstr "MT-Safe" |
| 374 |
|
| 375 |
#. type: SH |
| 376 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 377 |
#: mageia-cauldron |
| 378 |
#, no-wrap |
| 379 |
msgid "STANDARDS" |
| 380 |
msgstr "NORMES" |
| 381 |
|
| 382 |
#. type: Plain text |
| 383 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 384 |
#: mageia-cauldron |
| 385 |
msgid "None." |
| 386 |
msgstr "Aucun." |
| 387 |
|
| 388 |
#. type: SH |
| 389 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 390 |
#: mageia-cauldron |
| 391 |
#, no-wrap |
| 392 |
msgid "HISTORY" |
| 393 |
msgstr "HISTORIQUE" |
| 394 |
|
| 395 |
#. , but the BSD-derived documentation generally |
| 396 |
#. appears to be confused and obsolete on this point. |
| 397 |
#. i.e., commonly it still says one of them will be NULL, even if |
| 398 |
#. the ifa_ifu union is already present |
| 399 |
#. type: Plain text |
| 400 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 401 |
#: mageia-cauldron |
| 402 |
msgid "" |
| 403 |
"This function first appeared in BSDi and is present on the BSD systems, but " |
| 404 |
"with slightly different semantics documented\\[em]returning one entry per " |
| 405 |
"interface, not per address. This means I<ifa_addr> and other fields can " |
| 406 |
"actually be NULL if the interface has no address, and no link-level address " |
| 407 |
"is returned if the interface has an IP address assigned. Also, the way of " |
| 408 |
"choosing either I<ifa_broadaddr> or I<ifa_dstaddr> differs on various " |
| 409 |
"systems." |
| 410 |
msgstr "" |
| 411 |
"Cette fonction est apparue en premier dans BSDi et elle est présente sur les " |
| 412 |
"systèmes BSD avec de légères différences sémantiques documentées ; elle " |
| 413 |
"renvoie une entrée par interface et non pas par adresse. Cela signifie que " |
| 414 |
"I<ifa_addr> et d'autres champs peuvent être NULL si l'interface n'a pas " |
| 415 |
"d'adresse, et aucune adresse « link-level » (synonyme d'adresse MAC) n'est " |
| 416 |
"renvoyée si l'interface possède une adresse IP. De plus, la façon de choisir " |
| 417 |
"soit I<ifa_broadaddr> ou soit I<ifa_dstaddr> varie sur beaucoup de systèmes." |
| 418 |
|
| 419 |
#. type: Plain text |
| 420 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 421 |
#: mageia-cauldron |
| 422 |
msgid "" |
| 423 |
"B<getifaddrs>() first appeared in glibc 2.3, but before glibc 2.3.3, the " |
| 424 |
"implementation supported only IPv4 addresses; IPv6 support was added in " |
| 425 |
"glibc 2.3.3. Support of address families other than IPv4 is available only " |
| 426 |
"on kernels that support netlink." |
| 427 |
msgstr "" |
| 428 |
"B<getifaddrs>() est apparue dans la glibc 2.3. Les versions antérieures à la " |
| 429 |
"glibc 2.3.3 n'implémentaient que l'IPv4. La gestion de l'IPv6 a été ajoutée " |
| 430 |
"dans la glibc 2.3.3. La gestion des familles d'adresse autre que IPv4 n'est " |
| 431 |
"disponible que si le noyau gère netlink." |
| 432 |
|
| 433 |
#. type: SH |
| 434 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 435 |
#: mageia-cauldron |
| 436 |
#, no-wrap |
| 437 |
msgid "NOTES" |
| 438 |
msgstr "NOTES" |
| 439 |
|
| 440 |
#. type: Plain text |
| 441 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 442 |
#: mageia-cauldron |
| 443 |
msgid "" |
| 444 |
"The addresses returned on Linux will usually be the IPv4 and IPv6 addresses " |
| 445 |
"assigned to the interface, but also one B<AF_PACKET> address per interface " |
| 446 |
"containing lower-level details about the interface and its physical layer. " |
| 447 |
"In this case, the I<ifa_data> field may contain a pointer to a I<struct " |
| 448 |
"rtnl_link_stats>, defined in I<E<lt>linux/if_link.hE<gt>> (in Linux 2.4 and " |
| 449 |
"earlier, I<struct net_device_stats>, defined in I<E<lt>linux/" |
| 450 |
"netdevice.hE<gt>>), which contains various interface attributes and " |
| 451 |
"statistics." |
| 452 |
msgstr "" |
| 453 |
"Les adresses renvoyées sous Linux seront généralement les adresses IPv4 et " |
| 454 |
"IPv6 de l'interface, et une adresse B<AF_PACKET> contenant des détails bas " |
| 455 |
"niveau de l'interface et de sa couche physique. Dans ce cas, le champ " |
| 456 |
"I<ifa_data> peut contenir un pointeur vers une structure I<struct " |
| 457 |
"rtnl_link_stats>, définie dans I<E<lt>linux/if_link.hE<gt>> (pour les " |
| 458 |
"versions Linux 2.4 et antérieures, I<net_device_stats>, définie dans " |
| 459 |
"I<E<lt>linux/netdevice.hE<gt>>), qui contient différents attributs et " |
| 460 |
"statistiques sur les interfaces." |
| 461 |
|
| 462 |
#. type: SH |
| 463 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 464 |
#: mageia-cauldron |
| 465 |
#, no-wrap |
| 466 |
msgid "EXAMPLES" |
| 467 |
msgstr "EXEMPLES" |
| 468 |
|
| 469 |
#. type: Plain text |
| 470 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 471 |
#: mageia-cauldron |
| 472 |
msgid "" |
| 473 |
"The program below demonstrates the use of B<getifaddrs>(), B<freeifaddrs>(), " |
| 474 |
"and B<getnameinfo>(3). Here is what we see when running this program on one " |
| 475 |
"system:" |
| 476 |
msgstr "" |
| 477 |
"Le programme suivant décrit l'utilisation de B<getifaddrs>(), " |
| 478 |
"B<freeifaddrs>() et B<getnameinfo>(3). Ci-dessous, la sortie du programme " |
| 479 |
"sur un système :" |
| 480 |
|
| 481 |
#. type: Plain text |
| 482 |
#: archlinux debian-unstable mageia-cauldron |
| 483 |
#, fuzzy, no-wrap |
| 484 |
#| msgid "" |
| 485 |
#| "$ B<./a.out>\n" |
| 486 |
#| "lo AF_PACKET (17)\n" |
| 487 |
#| " tx_packets = 524; rx_packets = 524\n" |
| 488 |
#| " tx_bytes = 38788; rx_bytes = 38788\n" |
| 489 |
#| "wlp3s0 AF_PACKET (17)\n" |
| 490 |
#| " tx_packets = 108391; rx_packets = 130245\n" |
| 491 |
#| " tx_bytes = 30420659; rx_bytes = 94230014\n" |
| 492 |
#| "em1 AF_PACKET (17)\n" |
| 493 |
#| " tx_packets = 0; rx_packets = 0\n" |
| 494 |
#| " tx_bytes = 0; rx_bytes = 0\n" |
| 495 |
#| "lo AF_INET (2)\n" |
| 496 |
#| " address: E<lt>127.0.0.1E<gt>\n" |
| 497 |
#| "wlp3s0 AF_INET (2)\n" |
| 498 |
#| " address: E<lt>192.168.235.137E<gt>\n" |
| 499 |
#| "lo AF_INET6 (10)\n" |
| 500 |
#| " address: E<lt>::1E<gt>\n" |
| 501 |
#| "wlp3s0 AF_INET6 (10)\n" |
| 502 |
#| " address: E<lt>fe80::7ee9:d3ff:fef5:1a91%wlp3s0E<gt>\n" |
| 503 |
msgid "" |
| 504 |
"$B< ./a.out>;\n" |
| 505 |
"lo AF_PACKET (17)\n" |
| 506 |
" tx_packets = 524; rx_packets = 524\n" |
| 507 |
" tx_bytes = 38788; rx_bytes = 38788\n" |
| 508 |
"wlp3s0 AF_PACKET (17)\n" |
| 509 |
" tx_packets = 108391; rx_packets = 130245\n" |
| 510 |
" tx_bytes = 30420659; rx_bytes = 94230014\n" |
| 511 |
"em1 AF_PACKET (17)\n" |
| 512 |
" tx_packets = 0; rx_packets = 0\n" |
| 513 |
" tx_bytes = 0; rx_bytes = 0\n" |
| 514 |
"lo AF_INET (2)\n" |
| 515 |
" address: E<lt>127.0.0.1E<gt>\n" |
| 516 |
"wlp3s0 AF_INET (2)\n" |
| 517 |
" address: E<lt>192.168.235.137E<gt>\n" |
| 518 |
"lo AF_INET6 (10)\n" |
| 519 |
" address: E<lt>::1E<gt>\n" |
| 520 |
"wlp3s0 AF_INET6 (10)\n" |
| 521 |
" address: E<lt>fe80::7ee9:d3ff:fef5:1a91%wlp3s0E<gt>\n" |
| 522 |
msgstr "" |
| 523 |
"$ B<./a.out>\n" |
| 524 |
"lo AF_PACKET (17)\n" |
| 525 |
" tx_packets = 524; rx_packets = 524\n" |
| 526 |
" tx_bytes = 38788; rx_bytes = 38788\n" |
| 527 |
"wlp3s0 AF_PACKET (17)\n" |
| 528 |
" tx_packets = 108391; rx_packets = 130245\n" |
| 529 |
" tx_bytes = 30420659; rx_bytes = 94230014\n" |
| 530 |
"em1 AF_PACKET (17)\n" |
| 531 |
" tx_packets = 0; rx_packets = 0\n" |
| 532 |
" tx_bytes = 0; rx_bytes = 0\n" |
| 533 |
"lo AF_INET (2)\n" |
| 534 |
" address: E<lt>127.0.0.1E<gt>\n" |
| 535 |
"wlp3s0 AF_INET (2)\n" |
| 536 |
" address: E<lt>192.168.235.137E<gt>\n" |
| 537 |
"lo AF_INET6 (10)\n" |
| 538 |
" address: E<lt>::1E<gt>\n" |
| 539 |
"wlp3s0 AF_INET6 (10)\n" |
| 540 |
" address: E<lt>fe80::7ee9:d3ff:fef5:1a91%wlp3s0E<gt>\n" |
| 541 |
|
| 542 |
#. type: SS |
| 543 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 544 |
#: mageia-cauldron |
| 545 |
#, no-wrap |
| 546 |
msgid "Program source" |
| 547 |
msgstr "Source du programme" |
| 548 |
|
| 549 |
#. type: Plain text |
| 550 |
#: archlinux debian-unstable mageia-cauldron |
| 551 |
#, fuzzy, no-wrap |
| 552 |
#| msgid "" |
| 553 |
#| "#define _GNU_SOURCE /* To get defns of NI_MAXSERV and NI_MAXHOST */\n" |
| 554 |
#| "#include E<lt>arpa/inet.hE<gt>\n" |
| 555 |
#| "#include E<lt>sys/socket.hE<gt>\n" |
| 556 |
#| "#include E<lt>netdb.hE<gt>\n" |
| 557 |
#| "#include E<lt>ifaddrs.hE<gt>\n" |
| 558 |
#| "#include E<lt>stdio.hE<gt>\n" |
| 559 |
#| "#include E<lt>stdlib.hE<gt>\n" |
| 560 |
#| "#include E<lt>unistd.hE<gt>\n" |
| 561 |
#| "#include E<lt>linux/if_link.hE<gt>\n" |
| 562 |
#| "\\&\n" |
| 563 |
#| "int main(int argc, char *argv[])\n" |
| 564 |
#| "{\n" |
| 565 |
#| " struct ifaddrs *ifaddr;\n" |
| 566 |
#| " int family, s;\n" |
| 567 |
#| " char host[NI_MAXHOST];\n" |
| 568 |
#| "\\&\n" |
| 569 |
#| " if (getifaddrs(&ifaddr) == -1) {\n" |
| 570 |
#| " perror(\"getifaddrs\");\n" |
| 571 |
#| " exit(EXIT_FAILURE);\n" |
| 572 |
#| " }\n" |
| 573 |
#| "\\&\n" |
| 574 |
#| " /* Walk through linked list, maintaining head pointer so we\n" |
| 575 |
#| " can free list later. */\n" |
| 576 |
#| "\\&\n" |
| 577 |
#| " for (struct ifaddrs *ifa = ifaddr; ifa != NULL;\n" |
| 578 |
#| " ifa = ifa-E<gt>ifa_next) {\n" |
| 579 |
#| " if (ifa-E<gt>ifa_addr == NULL)\n" |
| 580 |
#| " continue;\n" |
| 581 |
#| "\\&\n" |
| 582 |
#| " family = ifa-E<gt>ifa_addr-E<gt>sa_family;\n" |
| 583 |
#| "\\&\n" |
| 584 |
#| " /* Display interface name and family (including symbolic\n" |
| 585 |
#| " form of the latter for the common families). */\n" |
| 586 |
#| "\\&\n" |
| 587 |
#| " printf(\"%-8s %s (%d)\\[rs]n\",\n" |
| 588 |
#| " ifa-E<gt>ifa_name,\n" |
| 589 |
#| " (family == AF_PACKET) ? \"AF_PACKET\" :\n" |
| 590 |
#| " (family == AF_INET) ? \"AF_INET\" :\n" |
| 591 |
#| " (family == AF_INET6) ? \"AF_INET6\" : \"???\",\n" |
| 592 |
#| " family);\n" |
| 593 |
#| "\\&\n" |
| 594 |
#| " /* For an AF_INET* interface address, display the address. */\n" |
| 595 |
#| "\\&\n" |
| 596 |
#| " if (family == AF_INET || family == AF_INET6) {\n" |
| 597 |
#| " s = getnameinfo(ifa-E<gt>ifa_addr,\n" |
| 598 |
#| " (family == AF_INET) ? sizeof(struct sockaddr_in) :\n" |
| 599 |
#| " sizeof(struct sockaddr_in6),\n" |
| 600 |
#| " host, NI_MAXHOST,\n" |
| 601 |
#| " NULL, 0, NI_NUMERICHOST);\n" |
| 602 |
#| " if (s != 0) {\n" |
| 603 |
#| " printf(\"getnameinfo() failed: %s\\[rs]n\", gai_strerror(s));\n" |
| 604 |
#| " exit(EXIT_FAILURE);\n" |
| 605 |
#| " }\n" |
| 606 |
#| "\\&\n" |
| 607 |
#| " printf(\"\\[rs]t\\[rs]taddress: E<lt>%sE<gt>\\[rs]n\", host);\n" |
| 608 |
#| "\\&\n" |
| 609 |
#| " } else if (family == AF_PACKET && ifa-E<gt>ifa_data != NULL) {\n" |
| 610 |
#| " struct rtnl_link_stats *stats = ifa-E<gt>ifa_data;\n" |
| 611 |
#| "\\&\n" |
| 612 |
#| " printf(\"\\[rs]t\\[rs]ttx_packets = %10u; rx_packets = %10u\\[rs]n\"\n" |
| 613 |
#| " \"\\[rs]t\\[rs]ttx_bytes = %10u; rx_bytes = %10u\\[rs]n\",\n" |
| 614 |
#| " stats-E<gt>tx_packets, stats-E<gt>rx_packets,\n" |
| 615 |
#| " stats-E<gt>tx_bytes, stats-E<gt>rx_bytes);\n" |
| 616 |
#| " }\n" |
| 617 |
#| " }\n" |
| 618 |
#| "\\&\n" |
| 619 |
#| " freeifaddrs(ifaddr);\n" |
| 620 |
#| " exit(EXIT_SUCCESS);\n" |
| 621 |
#| "}\n" |
| 622 |
msgid "" |
| 623 |
"#define _GNU_SOURCE /* To get defns of NI_MAXSERV and NI_MAXHOST */\n" |
| 624 |
"#include E<lt>arpa/inet.hE<gt>\n" |
| 625 |
"#include E<lt>sys/socket.hE<gt>\n" |
| 626 |
"#include E<lt>netdb.hE<gt>\n" |
| 627 |
"#include E<lt>ifaddrs.hE<gt>\n" |
| 628 |
"#include E<lt>stdio.hE<gt>\n" |
| 629 |
"#include E<lt>stdlib.hE<gt>\n" |
| 630 |
"#include E<lt>unistd.hE<gt>\n" |
| 631 |
"#include E<lt>linux/if_link.hE<gt>\n" |
| 632 |
"\\&\n" |
| 633 |
"int main(int argc, char *argv[])\n" |
| 634 |
"{\n" |
| 635 |
" struct ifaddrs *ifaddr;\n" |
| 636 |
" int family, s;\n" |
| 637 |
" char host[NI_MAXHOST];\n" |
| 638 |
"\\&\n" |
| 639 |
" if (getifaddrs(&ifaddr) == -1) {\n" |
| 640 |
" perror(\"getifaddrs\");\n" |
| 641 |
" exit(EXIT_FAILURE);\n" |
| 642 |
" }\n" |
| 643 |
"\\&\n" |
| 644 |
" /* Walk through linked list, maintaining head pointer so we\n" |
| 645 |
" can free list later. */\n" |
| 646 |
"\\&\n" |
| 647 |
" for (struct ifaddrs *ifa = ifaddr; ifa != NULL;\n" |
| 648 |
" ifa = ifa-E<gt>ifa_next) {\n" |
| 649 |
" if (ifa-E<gt>ifa_addr == NULL)\n" |
| 650 |
" continue;\n" |
| 651 |
"\\&\n" |
| 652 |
" family = ifa-E<gt>ifa_addr-E<gt>sa_family;\n" |
| 653 |
"\\&\n" |
| 654 |
" /* Display interface name and family (including symbolic\n" |
| 655 |
" form of the latter for the common families). */\n" |
| 656 |
"\\&\n" |
| 657 |
" printf(\"%-8s %s (%d)\\[rs]n\",\n" |
| 658 |
" ifa-E<gt>ifa_name,\n" |
| 659 |
" (family == AF_PACKET) ? \"AF_PACKET\" :\n" |
| 660 |
" (family == AF_INET) ? \"AF_INET\" :\n" |
| 661 |
" (family == AF_INET6) ? \"AF_INET6\" : \"???\",\n" |
| 662 |
" family);\n" |
| 663 |
"\\&\n" |
| 664 |
" /* For an AF_INET* interface address, display the address. */\n" |
| 665 |
"\\&\n" |
| 666 |
" if (family == AF_INET || family == AF_INET6) {\n" |
| 667 |
" s = getnameinfo(ifa-E<gt>ifa_addr,\n" |
| 668 |
" (family == AF_INET) ? sizeof(struct sockaddr_in) :\n" |
| 669 |
" sizeof(struct sockaddr_in6),\n" |
| 670 |
" host, NI_MAXHOST,\n" |
| 671 |
" NULL, 0, NI_NUMERICHOST);\n" |
| 672 |
" if (s != 0) {\n" |
| 673 |
" printf(\"getnameinfo() failed: %s\\[rs]n\", gai_strerror(s));\n" |
| 674 |
" exit(EXIT_FAILURE);\n" |
| 675 |
" }\n" |
| 676 |
"\\&\n" |
| 677 |
" printf(\"\\[rs]t\\[rs]taddress: E<lt>%sE<gt>\\[rs]n\", host);\n" |
| 678 |
"\\&\n" |
| 679 |
" } else if (family == AF_PACKET && ifa-E<gt>ifa_data != NULL) {\n" |
| 680 |
" struct rtnl_link_stats *stats = ifa-E<gt>ifa_data;\n" |
| 681 |
"\\&\n" |
| 682 |
" printf(\"\\[rs]t\\[rs]ttx_packets = %10u; rx_packets = %10u\\[rs]n\"\n" |
| 683 |
" \"\\[rs]t\\[rs]ttx_bytes = %10u; rx_bytes = %10u\\[rs]n\",\n" |
| 684 |
" stats-E<gt>tx_packets, stats-E<gt>rx_packets,\n" |
| 685 |
" stats-E<gt>tx_bytes, stats-E<gt>rx_bytes);\n" |
| 686 |
" }\n" |
| 687 |
" }\n" |
| 688 |
"\\&\n" |
| 689 |
" freeifaddrs(ifaddr);\n" |
| 690 |
" exit(EXIT_SUCCESS);\n" |
| 691 |
"}\n" |
| 692 |
msgstr "" |
| 693 |
"#define _GNU_SOURCE /* Afin d'avoir accès aux définitions de NI_MAXSERV et de NI_MAXHOST */\n" |
| 694 |
"#include E<lt>arpa/inet.hE<gt>\n" |
| 695 |
"#include E<lt>sys/socket.hE<gt>\n" |
| 696 |
"#include E<lt>netdb.hE<gt>\n" |
| 697 |
"#include E<lt>ifaddrs.hE<gt>\n" |
| 698 |
"#include E<lt>stdio.hE<gt>\n" |
| 699 |
"#include E<lt>stdlib.hE<gt>\n" |
| 700 |
"#include E<lt>unistd.hE<gt>\n" |
| 701 |
"#include E<lt>linux/if_link.hE<gt>\n" |
| 702 |
"\\&\n" |
| 703 |
"int main(int argc, char *argv[])\n" |
| 704 |
"{\n" |
| 705 |
" struct ifaddrs *ifaddr;\n" |
| 706 |
" int family, s;\n" |
| 707 |
" char host[NI_MAXHOST];\n" |
| 708 |
"\\&\n" |
| 709 |
" if (getifaddrs(&ifaddr) == -1) {\n" |
| 710 |
" perror(\"getifaddrs\");\n" |
| 711 |
" exit(EXIT_FAILURE);\n" |
| 712 |
" }\n" |
| 713 |
"\\&\n" |
| 714 |
" /* Parcourir la liste liée, en conservant le pointer de tête pour\n" |
| 715 |
" pouvoir libérer la liste ensuite. */\n" |
| 716 |
"\\&\n" |
| 717 |
" for (struct ifaddrs *ifa = ifaddr; ifa != NULL;\n" |
| 718 |
" ifa = ifa-E<gt>ifa_next) {\n" |
| 719 |
" if (ifa-E<gt>ifa_addr == NULL)\n" |
| 720 |
" continue;\n" |
| 721 |
"\\&\n" |
| 722 |
" family = ifa-E<gt>ifa_addr-E<gt>sa_family;\n" |
| 723 |
"\\&\n" |
| 724 |
" /* Afficher le nom et la famille de l'interface (y compris la\n" |
| 725 |
" forme symbolique du second pour les familles courantes). */\n" |
| 726 |
"\\&\n" |
| 727 |
" printf(\"%-8s %s (%d)\\[rs]n\",\n" |
| 728 |
" ifa-E<gt>ifa_name,\n" |
| 729 |
" (family == AF_PACKET) ? \"AF_PACKET\" :\n" |
| 730 |
" (family == AF_INET) ? \"AF_INET\" :\n" |
| 731 |
" (family == AF_INET6) ? \"AF_INET6\" : \"???\",\n" |
| 732 |
" family);\n" |
| 733 |
"\\&\n" |
| 734 |
" /* Pour une adresse d'interface AF_INET*, afficher l'adresse. */\n" |
| 735 |
"\\&\n" |
| 736 |
" if (family == AF_INET || family == AF_INET6) {\n" |
| 737 |
" s = getnameinfo(ifa-E<gt>ifa_addr,\n" |
| 738 |
" (family == AF_INET) ? sizeof(struct sockaddr_in) :\n" |
| 739 |
" sizeof(struct sockaddr_in6),\n" |
| 740 |
" host, NI_MAXHOST,\n" |
| 741 |
" NULL, 0, NI_NUMERICHOST);\n" |
| 742 |
" if (s != 0) {\n" |
| 743 |
" printf(\"getnameinfo() failed: %s\\[rs]n\", gai_strerror(s));\n" |
| 744 |
" exit(EXIT_FAILURE);\n" |
| 745 |
" }\n" |
| 746 |
"\\&\n" |
| 747 |
" printf(\"\\[rs]t\\[rs]taddress: E<lt>%sE<gt>\\[rs]n\", host);\n" |
| 748 |
"\\&\n" |
| 749 |
" } else if (family == AF_PACKET && ifa-E<gt>ifa_data != NULL) {\n" |
| 750 |
" struct rtnl_link_stats *stats = ifa-E<gt>ifa_data;\n" |
| 751 |
"\\&\n" |
| 752 |
" printf(\"\\[rs]t\\[rs]ttx_packets = %10u; rx_packets = %10u\\[rs]n\"\n" |
| 753 |
" \"\\[rs]t\\[rs]ttx_bytes = %10u; rx_bytes = %10u\\[rs]n\",\n" |
| 754 |
" stats-E<gt>tx_packets, stats-E<gt>rx_packets,\n" |
| 755 |
" stats-E<gt>tx_bytes, stats-E<gt>rx_bytes);\n" |
| 756 |
" }\n" |
| 757 |
" }\n" |
| 758 |
"\\&\n" |
| 759 |
" freeifaddrs(ifaddr);\n" |
| 760 |
" exit(EXIT_SUCCESS);\n" |
| 761 |
"}\n" |
| 762 |
|
| 763 |
#. type: SH |
| 764 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 765 |
#: mageia-cauldron |
| 766 |
#, no-wrap |
| 767 |
msgid "SEE ALSO" |
| 768 |
msgstr "VOIR AUSSI" |
| 769 |
|
| 770 |
#. type: Plain text |
| 771 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 772 |
#: mageia-cauldron |
| 773 |
msgid "" |
| 774 |
"B<bind>(2), B<getsockname>(2), B<socket>(2), B<packet>(7), B<ifconfig>(8)" |
| 775 |
msgstr "" |
| 776 |
"B<bind>(2), B<getsockname>(2), B<socket>(2), B<packet>(7), B<ifconfig>(8)" |
| 777 |
|
| 778 |
#. type: TH |
| 779 |
#: debian-trixie |
| 780 |
#, no-wrap |
| 781 |
msgid "2024-06-15" |
| 782 |
msgstr "15 juin 2024" |
| 783 |
|
| 784 |
#. type: TH |
| 785 |
#: debian-trixie |
| 786 |
#, no-wrap |
| 787 |
msgid "Linux man-pages 6.9.1" |
| 788 |
msgstr "Pages du manuel de Linux 6.9.1" |
| 789 |
|
| 790 |
#. type: Plain text |
| 791 |
#: debian-trixie |
| 792 |
msgid "Standard C library (I<libc>, I<-lc>)" |
| 793 |
msgstr "Bibliothèque C standard (I<libc>, I<-lc>)" |
| 794 |
|
| 795 |
#. type: Plain text |
| 796 |
#: debian-trixie fedora-44 fedora-rawhide |
| 797 |
#, no-wrap |
| 798 |
msgid "" |
| 799 |
"$ B<./a.out>\n" |
| 800 |
"lo AF_PACKET (17)\n" |
| 801 |
" tx_packets = 524; rx_packets = 524\n" |
| 802 |
" tx_bytes = 38788; rx_bytes = 38788\n" |
| 803 |
"wlp3s0 AF_PACKET (17)\n" |
| 804 |
" tx_packets = 108391; rx_packets = 130245\n" |
| 805 |
" tx_bytes = 30420659; rx_bytes = 94230014\n" |
| 806 |
"em1 AF_PACKET (17)\n" |
| 807 |
" tx_packets = 0; rx_packets = 0\n" |
| 808 |
" tx_bytes = 0; rx_bytes = 0\n" |
| 809 |
"lo AF_INET (2)\n" |
| 810 |
" address: E<lt>127.0.0.1E<gt>\n" |
| 811 |
"wlp3s0 AF_INET (2)\n" |
| 812 |
" address: E<lt>192.168.235.137E<gt>\n" |
| 813 |
"lo AF_INET6 (10)\n" |
| 814 |
" address: E<lt>::1E<gt>\n" |
| 815 |
"wlp3s0 AF_INET6 (10)\n" |
| 816 |
" address: E<lt>fe80::7ee9:d3ff:fef5:1a91%wlp3s0E<gt>\n" |
| 817 |
msgstr "" |
| 818 |
"$ B<./a.out>\n" |
| 819 |
"lo AF_PACKET (17)\n" |
| 820 |
" tx_packets = 524; rx_packets = 524\n" |
| 821 |
" tx_bytes = 38788; rx_bytes = 38788\n" |
| 822 |
"wlp3s0 AF_PACKET (17)\n" |
| 823 |
" tx_packets = 108391; rx_packets = 130245\n" |
| 824 |
" tx_bytes = 30420659; rx_bytes = 94230014\n" |
| 825 |
"em1 AF_PACKET (17)\n" |
| 826 |
" tx_packets = 0; rx_packets = 0\n" |
| 827 |
" tx_bytes = 0; rx_bytes = 0\n" |
| 828 |
"lo AF_INET (2)\n" |
| 829 |
" address: E<lt>127.0.0.1E<gt>\n" |
| 830 |
"wlp3s0 AF_INET (2)\n" |
| 831 |
" address: E<lt>192.168.235.137E<gt>\n" |
| 832 |
"lo AF_INET6 (10)\n" |
| 833 |
" address: E<lt>::1E<gt>\n" |
| 834 |
"wlp3s0 AF_INET6 (10)\n" |
| 835 |
" address: E<lt>fe80::7ee9:d3ff:fef5:1a91%wlp3s0E<gt>\n" |
| 836 |
|
| 837 |
#. type: Plain text |
| 838 |
#: debian-trixie fedora-44 fedora-rawhide |
| 839 |
#, no-wrap |
| 840 |
msgid "" |
| 841 |
"#define _GNU_SOURCE /* To get defns of NI_MAXSERV and NI_MAXHOST */\n" |
| 842 |
"#include E<lt>arpa/inet.hE<gt>\n" |
| 843 |
"#include E<lt>sys/socket.hE<gt>\n" |
| 844 |
"#include E<lt>netdb.hE<gt>\n" |
| 845 |
"#include E<lt>ifaddrs.hE<gt>\n" |
| 846 |
"#include E<lt>stdio.hE<gt>\n" |
| 847 |
"#include E<lt>stdlib.hE<gt>\n" |
| 848 |
"#include E<lt>unistd.hE<gt>\n" |
| 849 |
"#include E<lt>linux/if_link.hE<gt>\n" |
| 850 |
"\\&\n" |
| 851 |
"int main(int argc, char *argv[])\n" |
| 852 |
"{\n" |
| 853 |
" struct ifaddrs *ifaddr;\n" |
| 854 |
" int family, s;\n" |
| 855 |
" char host[NI_MAXHOST];\n" |
| 856 |
"\\&\n" |
| 857 |
" if (getifaddrs(&ifaddr) == -1) {\n" |
| 858 |
" perror(\"getifaddrs\");\n" |
| 859 |
" exit(EXIT_FAILURE);\n" |
| 860 |
" }\n" |
| 861 |
"\\&\n" |
| 862 |
" /* Walk through linked list, maintaining head pointer so we\n" |
| 863 |
" can free list later. */\n" |
| 864 |
"\\&\n" |
| 865 |
" for (struct ifaddrs *ifa = ifaddr; ifa != NULL;\n" |
| 866 |
" ifa = ifa-E<gt>ifa_next) {\n" |
| 867 |
" if (ifa-E<gt>ifa_addr == NULL)\n" |
| 868 |
" continue;\n" |
| 869 |
"\\&\n" |
| 870 |
" family = ifa-E<gt>ifa_addr-E<gt>sa_family;\n" |
| 871 |
"\\&\n" |
| 872 |
" /* Display interface name and family (including symbolic\n" |
| 873 |
" form of the latter for the common families). */\n" |
| 874 |
"\\&\n" |
| 875 |
" printf(\"%-8s %s (%d)\\[rs]n\",\n" |
| 876 |
" ifa-E<gt>ifa_name,\n" |
| 877 |
" (family == AF_PACKET) ? \"AF_PACKET\" :\n" |
| 878 |
" (family == AF_INET) ? \"AF_INET\" :\n" |
| 879 |
" (family == AF_INET6) ? \"AF_INET6\" : \"???\",\n" |
| 880 |
" family);\n" |
| 881 |
"\\&\n" |
| 882 |
" /* For an AF_INET* interface address, display the address. */\n" |
| 883 |
"\\&\n" |
| 884 |
" if (family == AF_INET || family == AF_INET6) {\n" |
| 885 |
" s = getnameinfo(ifa-E<gt>ifa_addr,\n" |
| 886 |
" (family == AF_INET) ? sizeof(struct sockaddr_in) :\n" |
| 887 |
" sizeof(struct sockaddr_in6),\n" |
| 888 |
" host, NI_MAXHOST,\n" |
| 889 |
" NULL, 0, NI_NUMERICHOST);\n" |
| 890 |
" if (s != 0) {\n" |
| 891 |
" printf(\"getnameinfo() failed: %s\\[rs]n\", gai_strerror(s));\n" |
| 892 |
" exit(EXIT_FAILURE);\n" |
| 893 |
" }\n" |
| 894 |
"\\&\n" |
| 895 |
" printf(\"\\[rs]t\\[rs]taddress: E<lt>%sE<gt>\\[rs]n\", host);\n" |
| 896 |
"\\&\n" |
| 897 |
" } else if (family == AF_PACKET && ifa-E<gt>ifa_data != NULL) {\n" |
| 898 |
" struct rtnl_link_stats *stats = ifa-E<gt>ifa_data;\n" |
| 899 |
"\\&\n" |
| 900 |
" printf(\"\\[rs]t\\[rs]ttx_packets = %10u; rx_packets = %10u\\[rs]n\"\n" |
| 901 |
" \"\\[rs]t\\[rs]ttx_bytes = %10u; rx_bytes = %10u\\[rs]n\",\n" |
| 902 |
" stats-E<gt>tx_packets, stats-E<gt>rx_packets,\n" |
| 903 |
" stats-E<gt>tx_bytes, stats-E<gt>rx_bytes);\n" |
| 904 |
" }\n" |
| 905 |
" }\n" |
| 906 |
"\\&\n" |
| 907 |
" freeifaddrs(ifaddr);\n" |
| 908 |
" exit(EXIT_SUCCESS);\n" |
| 909 |
"}\n" |
| 910 |
msgstr "" |
| 911 |
"#define _GNU_SOURCE /* Afin d'avoir accès aux définitions de NI_MAXSERV et de NI_MAXHOST */\n" |
| 912 |
"#include E<lt>arpa/inet.hE<gt>\n" |
| 913 |
"#include E<lt>sys/socket.hE<gt>\n" |
| 914 |
"#include E<lt>netdb.hE<gt>\n" |
| 915 |
"#include E<lt>ifaddrs.hE<gt>\n" |
| 916 |
"#include E<lt>stdio.hE<gt>\n" |
| 917 |
"#include E<lt>stdlib.hE<gt>\n" |
| 918 |
"#include E<lt>unistd.hE<gt>\n" |
| 919 |
"#include E<lt>linux/if_link.hE<gt>\n" |
| 920 |
"\\&\n" |
| 921 |
"int main(int argc, char *argv[])\n" |
| 922 |
"{\n" |
| 923 |
" struct ifaddrs *ifaddr;\n" |
| 924 |
" int family, s;\n" |
| 925 |
" char host[NI_MAXHOST];\n" |
| 926 |
"\\&\n" |
| 927 |
" if (getifaddrs(&ifaddr) == -1) {\n" |
| 928 |
" perror(\"getifaddrs\");\n" |
| 929 |
" exit(EXIT_FAILURE);\n" |
| 930 |
" }\n" |
| 931 |
"\\&\n" |
| 932 |
" /* Parcourir la liste liée, en conservant le pointer de tête pour\n" |
| 933 |
" pouvoir libérer la liste ensuite. */\n" |
| 934 |
"\\&\n" |
| 935 |
" for (struct ifaddrs *ifa = ifaddr; ifa != NULL;\n" |
| 936 |
" ifa = ifa-E<gt>ifa_next) {\n" |
| 937 |
" if (ifa-E<gt>ifa_addr == NULL)\n" |
| 938 |
" continue;\n" |
| 939 |
"\\&\n" |
| 940 |
" family = ifa-E<gt>ifa_addr-E<gt>sa_family;\n" |
| 941 |
"\\&\n" |
| 942 |
" /* Afficher le nom et la famille de l'interface (y compris la\n" |
| 943 |
" forme symbolique du second pour les familles courantes). */\n" |
| 944 |
"\\&\n" |
| 945 |
" printf(\"%-8s %s (%d)\\[rs]n\",\n" |
| 946 |
" ifa-E<gt>ifa_name,\n" |
| 947 |
" (family == AF_PACKET) ? \"AF_PACKET\" :\n" |
| 948 |
" (family == AF_INET) ? \"AF_INET\" :\n" |
| 949 |
" (family == AF_INET6) ? \"AF_INET6\" : \"???\",\n" |
| 950 |
" family);\n" |
| 951 |
"\\&\n" |
| 952 |
" /* Pour une adresse d'interface AF_INET*, afficher l'adresse. */\n" |
| 953 |
"\\&\n" |
| 954 |
" if (family == AF_INET || family == AF_INET6) {\n" |
| 955 |
" s = getnameinfo(ifa-E<gt>ifa_addr,\n" |
| 956 |
" (family == AF_INET) ? sizeof(struct sockaddr_in) :\n" |
| 957 |
" sizeof(struct sockaddr_in6),\n" |
| 958 |
" host, NI_MAXHOST,\n" |
| 959 |
" NULL, 0, NI_NUMERICHOST);\n" |
| 960 |
" if (s != 0) {\n" |
| 961 |
" printf(\"getnameinfo() failed: %s\\[rs]n\", gai_strerror(s));\n" |
| 962 |
" exit(EXIT_FAILURE);\n" |
| 963 |
" }\n" |
| 964 |
"\\&\n" |
| 965 |
" printf(\"\\[rs]t\\[rs]taddress: E<lt>%sE<gt>\\[rs]n\", host);\n" |
| 966 |
"\\&\n" |
| 967 |
" } else if (family == AF_PACKET && ifa-E<gt>ifa_data != NULL) {\n" |
| 968 |
" struct rtnl_link_stats *stats = ifa-E<gt>ifa_data;\n" |
| 969 |
"\\&\n" |
| 970 |
" printf(\"\\[rs]t\\[rs]ttx_packets = %10u; rx_packets = %10u\\[rs]n\"\n" |
| 971 |
" \"\\[rs]t\\[rs]ttx_bytes = %10u; rx_bytes = %10u\\[rs]n\",\n" |
| 972 |
" stats-E<gt>tx_packets, stats-E<gt>rx_packets,\n" |
| 973 |
" stats-E<gt>tx_bytes, stats-E<gt>rx_bytes);\n" |
| 974 |
" }\n" |
| 975 |
" }\n" |
| 976 |
"\\&\n" |
| 977 |
" freeifaddrs(ifaddr);\n" |
| 978 |
" exit(EXIT_SUCCESS);\n" |
| 979 |
"}\n" |
| 980 |
|
| 981 |
#. type: TH |
| 982 |
#: fedora-44 fedora-rawhide |
| 983 |
#, no-wrap |
| 984 |
msgid "2024-07-23" |
| 985 |
msgstr "23 juillet 2024" |
| 986 |
|
| 987 |
#. type: TH |
| 988 |
#: fedora-44 fedora-rawhide |
| 989 |
#, no-wrap |
| 990 |
msgid "Linux man-pages 6.13" |
| 991 |
msgstr "Pages du manuel de Linux 6.13" |
| 992 |
|
| 993 |
#. type: TH |
| 994 |
#: mageia-cauldron |
| 995 |
#, no-wrap |
| 996 |
msgid "Linux man-pages 6.17" |
| 997 |
msgstr "Pages du manuel de Linux 6.17" |