# French translation of manpages # This file is distributed under the same license as the manpages-l10n package. # Copyright © of this file: # Christophe Blaess , 1996-2003. # Stéphan Rafin , 2002. # Thierry Vignaud , 1999, 2002. # François Micaux, 2002. # Alain Portal , 2003-2008. # Jean-Philippe Guérard , 2005-2006. # Jean-Luc Coulon (f5ibh) , 2006-2007. # Julien Cristau , 2006-2007. # Thomas Huriaux , 2006-2008. # Nicolas François , 2006-2008. # Florentin Duneau , 2006-2010. # Simon Paillard , 2006, 2013-2014. # Denis Barbier , 2006, 2010. # David Prévot , 2010-2014. # Jean-Pierre Giraud , 2023-2024. msgid "" msgstr "" "Project-Id-Version: manpages-l10n 4.22.0\n" "POT-Creation-Date: 2024-06-01 05:51+0200\n" "PO-Revision-Date: 2024-06-02 14:07+0200\n" "Last-Translator: Jean-Pierre Giraud \n" "Language-Team: French \n" "Language: fr\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "Plural-Forms: nplurals=2; plural=n > 1;\n" "X-Generator: Lokalize 22.12.3\n" #. type: TH #: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide #: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed #, no-wrap msgid "getaddrinfo" msgstr "getaddrinfo" #. type: TH #: archlinux debian-unstable opensuse-tumbleweed #, no-wrap msgid "2024-05-02" msgstr "2 mai 2024" #. type: TH #: archlinux debian-unstable #, no-wrap msgid "Linux man-pages 6.8" msgstr "Pages du manuel de Linux 6.8" #. type: SH #: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide #: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed #, no-wrap msgid "NAME" msgstr "NOM" #. type: Plain text #: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide #: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed msgid "" "getaddrinfo, freeaddrinfo, gai_strerror - network address and service " "translation" msgstr "" "getaddrinfo, freeaddrinfo, gai_strerror - Traduction d'adresses et de " "services réseau" #. type: SH #: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide #: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed #, no-wrap msgid "LIBRARY" msgstr "BIBLIOTHÈQUE" #. type: Plain text #: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide #: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed msgid "Standard C library (I, I<-lc>)" msgstr "Bibliothèque C standard (I, I<-lc>)" #. type: SH #: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide #: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed #, no-wrap msgid "SYNOPSIS" msgstr "SYNOPSIS" #. type: Plain text #: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide #: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed #, no-wrap msgid "" "B<#include Esys/types.hE>\n" "B<#include Esys/socket.hE>\n" "B<#include Enetdb.hE>\n" msgstr "" "B<#include Esys/types.hE>\n" "B<#include Esys/socket.hE>\n" "B<#include Enetdb.hE>\n" #. type: Plain text #: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide #: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed #, no-wrap msgid "" "BIB<,>\n" "B< const char *restrict >IB<,>\n" "B< const struct addrinfo *restrict >IB<,>\n" "B< struct addrinfo **restrict >IB<);>\n" msgstr "" "BIB<,>\n" "B< const char *restrict >IB<,>\n" "B< const struct addrinfo *restrict >IB<,>\n" "B< struct addrinfo **restrict >IB<);>\n" #. type: Plain text #: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide #: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed #, no-wrap msgid "BIB<);>\n" msgstr "BIB<);>\n" #. type: Plain text #: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide #: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed #, no-wrap msgid "BIB<);>\n" msgstr "BIB<);>\n" #. type: Plain text #: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide #: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed msgid "" "Feature Test Macro Requirements for glibc (see B(7)):" msgstr "" "Exigences de macros de test de fonctionnalités pour la glibc (consulter " "B(7)) :" #. type: Plain text #: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide #: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed msgid "B(), B(), B():" msgstr "B(), B(), B() :" #. type: Plain text #: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide #: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed #, no-wrap msgid "" " Since glibc 2.22:\n" " _POSIX_C_SOURCE E= 200112L\n" " glibc 2.21 and earlier:\n" " _POSIX_C_SOURCE\n" msgstr "" " Avant la glibc 2.22 :\n" " _POSIX_C_SOURCE E= 200112L\n" " glibc 2.21 et antérieures :\n" " _POSIX_C_SOURCE\n" #. type: SH #: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide #: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed #, no-wrap msgid "DESCRIPTION" msgstr "DESCRIPTION" #. .BR getipnodebyname (3), #. .BR getipnodebyaddr (3), #. type: Plain text #: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide #: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed msgid "" "Given I and I, which identify an Internet host and a service, " "B() returns one or more I structures, each of which " "contains an Internet address that can be specified in a call to B(2) " "or B(2). The B() function combines the functionality " "provided by the B(3) and B(3) functions into " "a single interface, but unlike the latter functions, B() is " "reentrant and allows programs to eliminate IPv4-versus-IPv6 dependencies." msgstr "" "Étant donnés I et I, qui identifient un hôte Internet et un " "service, B() renvoie une ou plusieurs structure I, " "chacune d'entre elles contenant une adresse Internet qui puisse être " "indiquée dans un appel à B(2) ou B(2). La fonction " "B() combine la fonctionnalité fournie par les fonctions " "B(3) et B(3) en une interface unique, mais à " "l'inverse de ces fonctions, B() est réentrante et permet aux " "programmes d'éliminer la dépendance envers IPv4 ou IPv6." #. type: Plain text #: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide #: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed msgid "" "The I structure used by B() contains the following " "fields:" msgstr "" "La structure I utilisée par B() contient les membres " "suivants\\ :" #. type: Plain text #: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide #: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed #, no-wrap msgid "" "struct addrinfo {\n" " int ai_flags;\n" " int ai_family;\n" " int ai_socktype;\n" " int ai_protocol;\n" " socklen_t ai_addrlen;\n" " struct sockaddr *ai_addr;\n" " char *ai_canonname;\n" " struct addrinfo *ai_next;\n" "};\n" msgstr "" "struct addrinfo {\n" " int ai_flags;\n" " int ai_family;\n" " int ai_socktype;\n" " int ai_protocol;\n" " socklen_t ai_addrlen;\n" " struct sockaddr *ai_addr;\n" " char *ai_canonname;\n" " struct addrinfo *ai_next;\n" "};\n" #. type: Plain text #: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide #: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed msgid "" "The I argument points to an I structure that specifies " "criteria for selecting the socket address structures returned in the list " "pointed to by I. If I is not NULL it points to an I " "structure whose I, I, and I specify " "criteria that limit the set of socket addresses returned by " "B(), as follows:" msgstr "" "Le paramètre I pointe sur une structure I qui indique les " "critères de sélection des structures d'adresses de sockets renvoyées dans la " "liste pointée par I. Si I n'est pas NULL, il doit pointer sur " "une structure I dont les membres I, I, et " "I indiquent les critères limitant l'ensemble d'adresses de " "sockets renvoyées par B(), de la façon suivante :" #. type: TP #: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide #: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed #, no-wrap msgid "I" msgstr "I" #. type: Plain text #: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide #: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed msgid "" "This field specifies the desired address family for the returned addresses. " "Valid values for this field include B and B. The value " "B indicates that B() should return socket addresses " "for any address family (either IPv4 or IPv6, for example) that can be used " "with I and I." msgstr "" "Ce champ indique la famille d'adresse désirée des adresses renvoyées. " "B et B font partie des valeurs valables pour ce champ. La " "valeur B indique que B() doit renvoyer les adresses " "de socket de n'importe quelle famille d'adresses (par exemple, IPv4 ou IPv6) " "pouvant être utilisées avec I et I." #. type: TP #: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide #: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed #, no-wrap msgid "I" msgstr "I" #. type: Plain text #: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide #: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed msgid "" "This field specifies the preferred socket type, for example B " "or B. Specifying 0 in this field indicates that socket " "addresses of any type can be returned by B()." msgstr "" "Ce champ indique le type préféré de socket, par exemple B ou " "B. Mettre 0 dans ce champ indique que B() peut " "renvoyer n'importe quel type d'adresse de socket." #. type: TP #: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide #: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed #, no-wrap msgid "I" msgstr "I" #. type: Plain text #: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide #: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed msgid "" "This field specifies the protocol for the returned socket addresses. " "Specifying 0 in this field indicates that socket addresses with any protocol " "can be returned by B()." msgstr "" "Ce champ indique le protocole des adresses de socket renvoyées. Mettre 0 " "dans ce champ indique que B() peut renvoyer des adresses de " "socket de n'importe quel type." #. type: TP #: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide #: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed #, no-wrap msgid "I" msgstr "I" #. type: Plain text #: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide #: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed msgid "" "This field specifies additional options, described below. Multiple flags " "are specified by bitwise OR-ing them together." msgstr "" "Ce champ indique des options supplémentaires, décrites ci-dessous. Plusieurs " "attributs peuvent être indiqués en les groupant par un OU binaire." #. type: Plain text #: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide #: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed msgid "" "All the other fields in the structure pointed to by I must contain " "either 0 or a null pointer, as appropriate." msgstr "" "Tous les autres membres de la structure pointée par I doivent " "contenir 0 ou être des pointeurs NULL." #. type: Plain text #: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide #: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed msgid "" "Specifying I as NULL is equivalent to setting I and " "I to 0; I to B; and I to " "B<(AI_V4MAPPED\\ |\\ AI_ADDRCONFIG)>. (POSIX specifies different defaults " "for I; see NOTES.) I specifies either a numerical network " "address (for IPv4, numbers-and-dots notation as supported by " "B(3); for IPv6, hexadecimal string format as supported by " "B(3)), or a network hostname, whose network addresses are looked " "up and resolved. If I contains the B flag, " "then I must be a numerical network address. The B " "flag suppresses any potentially lengthy network host address lookups." msgstr "" "Spécifier I à NULL est équivalent à définir I et " "I à 0, I à B et I à " "B<(AI_V4MAPPED\\ |\\ AI_ADDRCONFIG)>. (POSIX spécifie d'autres valeurs par " "défaut pour I ; consultez les NOTES.) I indique soit une " "adresse réseau en format numérique (décimal pointé pour l'IPv4, comme prise " "en charge par B(3) ; hexadécimal pour l'IPv6, comme prise en " "charge par B(3)), soit un nom d'hôte, dont l'adresse réseau est " "alors résolue. Si le membre I contient l'attribut " "B alors I devra être une adresse réseau numérique. " "L'attribut B empêche toute tentative, éventuellement longue, " "de résolution de nom d'hôte." #. type: Plain text #: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide #: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed msgid "" "If the B flag is specified in I, and I is " "NULL, then the returned socket addresses will be suitable for B(2)ing " "a socket that will B(2) connections. The returned socket address " "will contain the \"wildcard address\" (B for IPv4 addresses, " "B for IPv6 address). The wildcard address is used by " "applications (typically servers) that intend to accept connections on any " "of the host's network addresses. If I is not NULL, then the " "B flag is ignored." msgstr "" "Si l'attribut B est indiqué dans I, et si " "I est NULL, les adresses de socket renvoyées seront pertinentes pour " "lier (B(2)) un socket qui acceptera (B(2)) les connexions. Les " "adresses de socket renvoyées contiendront l'« adresse joker » (wildcard " "adress) (B pour les adresses IPv4, B pour les " "adresses IPv6). L'« adresse joker » est utilisée par des applications " "(typiquement des serveurs) qui ont l'intention d'accepter des connexions de " "n'importe quel hôte. Si I n'est pas NULL, l'attribut B est " "ignoré." #. type: Plain text #: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide #: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed msgid "" "If the B flag is not set in I, then the returned " "socket addresses will be suitable for use with B(2), B(2), " "or B(2). If I is NULL, then the network address will be set " "to the loopback interface address (B for IPv4 addresses, " "B for IPv6 address); this is used by applications " "that intend to communicate with peers running on the same host." msgstr "" "Si l'attribut B n'est pas positionné dans I, les " "adresses de socket renvoyées seront pertinentes pour être utilisées avec " "B(2), B(2) ou B(2). Si I est NULL, l'adresse " "réseau sera définie avec l'adresse de l'interface de boucle (loopback) " "(B pour les adresses IPv4, B pour " "les adresses IPv6) ; cela est utilisé par les applications qui doivent " "communiquer avec des correspondants s'exécutant sur la même machine." #. type: Plain text #: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide #: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed msgid "" "I sets the port in each returned address structure. If this " "argument is a service name (see B(5)), it is translated to the " "corresponding port number. This argument can also be specified as a decimal " "number, which is simply converted to binary. If I is NULL, then " "the port number of the returned socket addresses will be left " "uninitialized. If B is specified in I and " "I is not NULL, then I must point to a string containing a " "numeric port number. This flag is used to inhibit the invocation of a name " "resolution service in cases where it is known not to be required." msgstr "" "I définit le port dans chacune des structures d'adresses renvoyées. " "Si cet argument est un nom de service (consultez B(5)), il est " "convertit en son numéro de port correspondant. Cet argument peut également " "être indiqué sous forme décimale, qui est simplement converti en binaire. Si " "I est NULL, le numéro de port des adresses de socket renvoyées " "n'est pas initialisé. Si B est indiqué dans I et si I n'est pas NULL, I doit pointer vers une " "chaîne contenant une valeur numérique de port. Cet attribut est utilisé pour " "inhiber l'invocation du service de résolution des noms dans les cas où l'on " "sait qu'il n'est pas nécessaire." #. type: Plain text #: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide #: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed msgid "Either I or I, but not both, may be NULL." msgstr "I ou I peuvent être NULL, mais pas les deux à la fois." #. type: Plain text #: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide #: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed msgid "" "The B() function allocates and initializes a linked list of " "I structures, one for each network address that matches I " "and I, subject to any restrictions imposed by I, and returns " "a pointer to the start of the list in I. The items in the linked list " "are linked by the I field." msgstr "" "La fonction B() alloue et initialise une liste chaînée de " "structures I, une pour chaque adresse réseau correspondant à " "I et I, soumise aux restrictions imposées par l'argument " "I, et renvoie dans I un pointeur sur le début de la liste. Les " "éléments de la liste sont chaînés par le champ I." #. type: Plain text #: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide #: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed msgid "" "There are several reasons why the linked list may have more than one " "I structure, including: the network host is multihomed, accessible " "over multiple protocols (e.g., both B and B); or the same " "service is available from multiple socket types (one B address " "and another B address, for example). Normally, the application " "should try using the addresses in the order in which they are returned. The " "sorting function used within B() is defined in RFC\\ 3484; the " "order can be tweaked for a particular system by editing I " "(available since glibc 2.5)." msgstr "" "Il y a plusieurs raisons pour lesquelles la liste chaînée peut avoir plus " "d'une structure I\\ : l'hôte réseau est « multihomed » ; le même " "service est accessible depuis plusieurs protocoles (par exemple B " "et B) ou accessible depuis plusieurs types de socket (par exemple " "une adresse de type B et une autre de type B). " "Normalement, l'application essaie d'utiliser les adresses dans l'ordre où " "elles sont renvoyées. La fonction de tri utilisée dans B() est " "définie dans la RFC\\ 3484\\ ; le tri peut être configuré pour un système " "particulier avec le fichier I (disponible depuis la glibc\\ " "2.5)." #. Prior to glibc 2.3.4, the ai_canonname of each addrinfo #. structure was set pointing to the canonical name; that was #. more than POSIX.1-2001 specified, or other implementations provided. #. MTK, Aug 05 #. type: Plain text #: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide #: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed msgid "" "If I includes the B flag, then the " "I field of the first of the I structures in the " "returned list is set to point to the official name of the host." msgstr "" "Si I contient l'attribut B, le champ " "I de la première structure I de la liste renvoyée " "est défini pour pointer vers le nom officiel de l'hôte." #. type: Plain text #: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide #: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed msgid "" "The remaining fields of each returned I structure are initialized " "as follows:" msgstr "" "Les champs restants de chaque structure I renvoyée sont " "initialisés de la façon suivante :" #. type: IP #: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide #: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed #, no-wrap msgid "\\[bu]" msgstr "-" #. type: Plain text #: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide #: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed msgid "" "The I, I, and I fields return the " "socket creation parameters (i.e., these fields have the same meaning as the " "corresponding arguments of B(2)). For example, I might " "return B or B; I might return B " "or B; and I returns the protocol for the socket." msgstr "" "Les champs I, I et I renvoient les " "paramètres de création de la socket (c'est-à-dire que ces champs ont la même " "signification que les paramètres correspondants de B(2)). Par " "exemple, I pourrait renvoyer B ou B ; " "I pourrait renvoyer B ou B ; et " "I renvoie le protocole de la socket." #. type: Plain text #: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide #: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed msgid "" "A pointer to the socket address is placed in the I field, and the " "length of the socket address, in bytes, is placed in the I field." msgstr "" "Un pointeur vers l'adresse de la socket est placé dans le champ I, " "et la longueur de l'adresse de la socket, en octets, est inscrite dans le " "champ I de la structure." #. type: Plain text #: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide #: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed msgid "" "If I includes the B flag, then IPv4 addresses " "are returned in the list pointed to by I only if the local system has " "at least one IPv4 address configured, and IPv6 addresses are returned only " "if the local system has at least one IPv6 address configured. The loopback " "address is not considered for this case as valid as a configured address. " "This flag is useful on, for example, IPv4-only systems, to ensure that " "B() does not return IPv6 socket addresses that would always " "fail in B(2) or B(2)." msgstr "" "Si I inclut l'attribut B, alors des adresses " "IPv4 sont renvoyées dans la liste pointée par I seulement si le système " "local possède au moins une adresse IPv4 configurée. Des adresses IPv6 sont " "seulement renvoyées si le système local possède au moins une adresse IPv6 " "configurée. Dans ce cas, l'adresse de boucle n'est pas considérée comme une " "adresse configurée valable. Cet attribut est par exemple utile sur les " "systèmes uniquement en IPv4, pour s’assurer que B() ne renvoie " "pas d’adresse de socket IPv6 qui échouerait toujours dans B(2) ou " "B(2)." #. type: Plain text #: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide #: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed msgid "" "If I specifies the B flag, and I was specified as B, and no matching IPv6 addresses " "could be found, then return IPv4-mapped IPv6 addresses in the list pointed " "to by I. If both B and B are specified in I, then return both IPv6 and IPv4-mapped IPv6 addresses in the list " "pointed to by I. B is ignored if B is not also " "specified." msgstr "" "Si I indique le drapeau B, et si I a été indiqué avec B et qu'aucune adresse IPv6 " "correspondante n'a pu être trouvée, alors des adresses IPv4 au format IPv6 " "sont renvoyées dans la liste pointée par I. Si B et " "B sont indiqués dans I, des adresses IPv6 et des " "adresses IPv4 au format IPv6 sont renvoyées dans la liste pointée par " "I. B est ignoré si B n'est pas aussi indiqué." #. type: Plain text #: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide #: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed msgid "" "The B() function frees the memory that was allocated for the " "dynamically allocated linked list I." msgstr "" "La fonction B() libère la mémoire qui a été allouée " "dynamiquement pour la liste chaînée I." #. type: SS #: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide #: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed #, no-wrap msgid "Extensions to getaddrinfo() for Internationalized Domain Names" msgstr "Extensions de getaddrinfo() pour les noms de domaines internationalisés" #. type: Plain text #: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide #: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed msgid "" "Starting with glibc 2.3.4, B() has been extended to " "selectively allow the incoming and outgoing hostnames to be transparently " "converted to and from the Internationalized Domain Name (IDN) format (see " "RFC 3490, I). Four " "new flags are defined:" msgstr "" "Depuis la glibc\\ 2.3.4, B() a été modifié pour sélectivement " "permettre que les noms d'hôtes entrant et sortant soient convertis vers ou " "depuis le format des noms de domaines internationalisés (IDN). Consultez la " "RFC\\ 3490, I. " "Quatre nouveaux attributs ont été ajoutés\\ :" #. type: TP #: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide #: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed #, no-wrap msgid "B" msgstr "B" #. type: Plain text #: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide #: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed msgid "" "If this flag is specified, then the node name given in I is converted " "to IDN format if necessary. The source encoding is that of the current " "locale." msgstr "" "Si cet attribut est défini, alors le nom du nœud contenu dans I est " "converti dans le format IDN si nécessaire. Le format d'encodage choisi est " "celui de la locale du système." #. Implementation Detail: #. To minimize effects on system performance the implementation might #. want to check whether the input string contains any non-ASCII #. characters. If there are none the IDN step can be skipped completely. #. On systems which allow not-ASCII safe encodings for a locale this #. might be a problem. #. type: Plain text #: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide #: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed msgid "" "If the input name contains non-ASCII characters, then the IDN encoding is " "used. Those parts of the node name (delimited by dots) that contain non-" "ASCII characters are encoded using ASCII Compatible Encoding (ACE) before " "being passed to the name resolution functions." msgstr "" "Si le nom du nœud contient des caractères non ASCII, alors le format IDN est " "utilisé. Ces parties du nom du nœud (séparées par des points) qui " "contiennent des caractères non ASCI sont encodées avec «\\ ASCII Compatible " "Encoding (ACE)\\ » avant d'être transférées aux fonctions de résolution de " "noms." #. type: TP #: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide #: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed #, no-wrap msgid "B" msgstr "B" #. type: Plain text #: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide #: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed msgid "" "After a successful name lookup, and if the B flag was " "specified, B() will return the canonical name of the node " "corresponding to the I structure value passed back. The return " "value is an exact copy of the value returned by the name resolution function." msgstr "" "À la suite d'une résolution de nom réussie et si B a été " "indiqué, B() retournera le nom canonique du nœud correspondant " "à la valeur de la structure I passée. La valeur renvoyée est une " "copie exacte de la valeur retournée par la fonction de résolution de noms." # #. Implementation Detail: #. If no component of the returned name starts with xn\-\- the IDN #. step can be skipped, therefore avoiding unnecessary slowdowns. #. type: Plain text #: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide #: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed msgid "" "If the name is encoded using ACE, then it will contain the I prefix " "for one or more components of the name. To convert these components into a " "readable form the B flag can be passed in addition to " "B. The resulting string is encoded using the current locale's " "encoding." msgstr "" "Si le nom est encodé avec ACE, alors une ou plusieurs composantes de son nom " "sont préfixées par I. Pour convertir ces composantes dans un format " "lisible, l'attribut B peut être utilisé en plus de " "B. La chaîne résultante est encodée selon la locale du système." #. type: TP #: archlinux debian-unstable fedora-40 fedora-rawhide mageia-cauldron #: opensuse-tumbleweed #, no-wrap msgid "B" msgstr "B" #. type: TQ #: archlinux debian-unstable fedora-40 fedora-rawhide mageia-cauldron #: opensuse-tumbleweed #, no-wrap msgid "B" msgstr "B" #. type: Plain text #: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide #: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed msgid "" "Setting these flags will enable the IDNA_ALLOW_UNASSIGNED (allow unassigned " "Unicode code points) and IDNA_USE_STD3_ASCII_RULES (check output to make " "sure it is a STD3 conforming hostname) flags respectively to be used in the " "IDNA handling." msgstr "" "Utiliser ces attributs permet d'activer respectivement les attributs «\\ " "IDNA_ALLOW_UNASSIGNED\\ » (permettre des caractères Unicode non assignés) et " "«\\ IDNA_USE_STD3_ASCII_RULES\\ » (vérifier la sortie pour être sûr que le " "nom d'hôte est conforme à STD3) utilisés dans la gestion de l'IDNA." #. type: SH #: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide #: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed #, no-wrap msgid "RETURN VALUE" msgstr "VALEUR RENVOYÉE" #. FIXME glibc defines the following additional errors, some which #. can probably be returned by getaddrinfo(); they need to #. be documented. #. #ifdef __USE_GNU #. #define EAI_INPROGRESS -100 /* Processing request in progress. */ #. #define EAI_CANCELED -101 /* Request canceled. */ #. #define EAI_NOTCANCELED -102 /* Request not canceled. */ #. #define EAI_ALLDONE -103 /* All requests done. */ #. #define EAI_INTR -104 /* Interrupted by a signal. */ #. #define EAI_IDN_ENCODE -105 /* IDN encoding failed. */ #. #endif #. type: Plain text #: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide #: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed msgid "" "B() returns 0 if it succeeds, or one of the following nonzero " "error codes:" msgstr "" "B() renvoie B<0> si elle réussit, ou l'un des codes d'erreur " "différent de suivants\\ :" #. type: TP #: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide #: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed #, no-wrap msgid "B" msgstr "B" #. Not in SUSv3 #. type: Plain text #: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide #: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed msgid "" "The specified network host does not have any network addresses in the " "requested address family." msgstr "L'hôte indiqué n'a pas d'adresse dans la famille réseau demandée." #. type: TP #: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide #: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed #, no-wrap msgid "B" msgstr "B" #. type: Plain text #: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide #: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed msgid "" "The name server returned a temporary failure indication. Try again later." msgstr "" "Le serveur de noms a renvoyé une erreur temporaire. Réessayez plus tard." #. type: TP #: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide #: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed #, no-wrap msgid "B" msgstr "B" #. type: Plain text #: archlinux debian-unstable fedora-rawhide opensuse-tumbleweed msgid "" "I contains invalid flags; or, I included " "B and I was NULL." msgstr "" "I contient des drapeaux incorrects ; ou I " "inclut B et I est NULL." #. type: TP #: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide #: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed #, no-wrap msgid "B" msgstr "B" #. type: Plain text #: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide #: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed msgid "The name server returned a permanent failure indication." msgstr "Le serveur de noms a renvoyé une erreur définitive." #. type: TP #: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide #: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed #, no-wrap msgid "B" msgstr "B" #. type: Plain text #: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide #: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed msgid "The requested address family is not supported." msgstr "La famille d'adresse réclamée n'est pas supportée." #. type: TP #: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide #: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed #, no-wrap msgid "B" msgstr "B" #. type: Plain text #: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide #: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed msgid "Out of memory." msgstr "Plus assez de mémoire." #. type: TP #: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide #: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed #, no-wrap msgid "B" msgstr "B" #. Not in SUSv3 #. type: Plain text #: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide #: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed msgid "" "The specified network host exists, but does not have any network addresses " "defined." msgstr "L'hôte existe mais n'a pas d'adresse réseau définie." #. type: TP #: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide #: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed #, no-wrap msgid "B" msgstr "B" #. type: Plain text #: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide #: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed msgid "" "The I or I is not known; or both I and I are " "NULL; or B was specified in I and I " "was not a numeric port-number string." msgstr "" "I ou I sont inconnus ou ils sont tous les deux NULL\\ ; ou " "B a été indiqué dans I mais I n'est " "pas un numéro de port." #. type: TP #: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide #: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed #, no-wrap msgid "B" msgstr "B" #. type: Plain text #: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide #: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed msgid "" "The requested service is not available for the requested socket type. It " "may be available through another socket type. For example, this error could " "occur if I was \"shell\" (a service available only on stream " "sockets), and either I was B, or I was B; or the error could occur if I was " "not NULL, and I was B (a socket type that does " "not support the concept of services)." msgstr "" "Le service demandé n'est pas disponible pour le type de socket demandé. Il " "est probablement disponible avec un autre type de socket. Par exemple, cette " "erreur peut se produire si I est «\\ shell\\ » (un service " "uniquement disponible avec les sockets de type flux), et soit si I est égal à B ou soit si I est " "égal à B. L'erreur peut aussi se produire si I est non " "NULL et I est égal à B (un type de socket qui " "ne gère pas le concept de service)." #. type: TP #: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide #: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed #, no-wrap msgid "B" msgstr "B" #. type: Plain text #: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide #: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed msgid "" "The requested socket type is not supported. This could occur, for example, " "if I and I are inconsistent (e.g., " "B and B, respectively)." msgstr "" "Le type de socket demandé n'est pas géré. Cela peut se produire, par exemple " "si I et I sont inconsistants (par " "exemple, B et B, respectivement)." #. type: TP #: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide #: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed #, no-wrap msgid "B" msgstr "B" #. type: Plain text #: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide #: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed msgid "Other system error; I is set to indicate the error." msgstr "" "Autre erreur système, la valeur de retour est B<-1> et I est défini " "pour indiquer l'erreur." #. type: Plain text #: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide #: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed msgid "" "The B() function translates these error codes to a human " "readable string, suitable for error reporting." msgstr "" "La fonction B() traduit ces codes d'erreur en une chaîne de " "caractères compréhensible, utilisable pour rendre compte du problème." #. type: SH #: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide #: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed #, no-wrap msgid "FILES" msgstr "FICHIERS" #. type: Plain text #: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide #: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed msgid "I" msgstr "I" #. type: SH #: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide #: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed #, no-wrap msgid "ATTRIBUTES" msgstr "ATTRIBUTS" #. type: Plain text #: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide #: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed msgid "" "For an explanation of the terms used in this section, see B(7)." msgstr "" "Pour une explication des termes utilisés dans cette section, consulter " "B(7)." #. type: tbl table #: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide #: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed #, no-wrap msgid "Interface" msgstr "Interface" #. type: tbl table #: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide #: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed #, no-wrap msgid "Attribute" msgstr "Attribut" #. type: tbl table #: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide #: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed #, no-wrap msgid "Value" msgstr "Valeur" #. type: tbl table #: archlinux debian-unstable fedora-40 fedora-rawhide mageia-cauldron #: opensuse-tumbleweed #, no-wrap msgid ".na\n" msgstr ".na\n" #. type: tbl table #: archlinux debian-unstable fedora-40 fedora-rawhide mageia-cauldron #: opensuse-tumbleweed #, no-wrap msgid ".nh\n" msgstr ".nh\n" #. #-#-#-#-# archlinux: getaddrinfo.3.pot (PACKAGE VERSION) #-#-#-#-# #. type: TP #. #-#-#-#-# debian-bookworm: getaddrinfo.3.pot (PACKAGE VERSION) #-#-#-#-# #. type: tbl table #. #-#-#-#-# debian-unstable: getaddrinfo.3.pot (PACKAGE VERSION) #-#-#-#-# #. type: TP #. #-#-#-#-# fedora-40: getaddrinfo.3.pot (PACKAGE VERSION) #-#-#-#-# #. type: TP #. #-#-#-#-# fedora-rawhide: getaddrinfo.3.pot (PACKAGE VERSION) #-#-#-#-# #. type: TP #. #-#-#-#-# mageia-cauldron: getaddrinfo.3.pot (PACKAGE VERSION) #-#-#-#-# #. type: TP #. #-#-#-#-# opensuse-leap-15-6: getaddrinfo.3.pot (PACKAGE VERSION) #-#-#-#-# #. type: TP #. #-#-#-#-# opensuse-tumbleweed: getaddrinfo.3.pot (PACKAGE VERSION) #-#-#-#-# #. type: TP #: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide #: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed #, no-wrap msgid "B()" msgstr "B()" #. type: tbl table #: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide #: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed #, no-wrap msgid "Thread safety" msgstr "Sécurité des threads" #. type: tbl table #: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide #: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed #, no-wrap msgid "MT-Safe env locale" msgstr "MT-Safe env locale" #. type: tbl table #: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide #: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed #, no-wrap msgid "" "B(),\n" "B()" msgstr "" "B(),\n" "B()" #. type: tbl table #: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide #: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed #, no-wrap msgid "MT-Safe" msgstr "MT-Safe" #. type: SH #: archlinux debian-unstable fedora-40 fedora-rawhide mageia-cauldron #: opensuse-leap-15-6 opensuse-tumbleweed #, no-wrap msgid "VERSIONS" msgstr "VERSIONS" #. POSIX.1-2001, POSIX.1-2008 #. type: Plain text #: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide #: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed msgid "" "According to POSIX.1, specifying I as NULL should cause I " "to be assumed as 0. The GNU C library instead assumes a value of " "B<(AI_V4MAPPED\\ |\\ AI_ADDRCONFIG)> for this case, since this value is " "considered an improvement on the specification." msgstr "" "Selon POSIX.1, définir I comme NULL devrait supposer que I " "soit égal à B<0>. La bibliothèque C de GNU suppose à la place que " "I est égal à B<(AI_V4MAPPED\\ |\\ AI_ADDRCONFIG)> dans ce cas, " "puisque cette valeur est considérée comme une amélioration de la " "spécification." #. type: SH #: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide #: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed #, no-wrap msgid "STANDARDS" msgstr "STANDARDS" #. type: Plain text #: archlinux debian-unstable fedora-40 fedora-rawhide mageia-cauldron #: opensuse-leap-15-6 opensuse-tumbleweed msgid "POSIX.1-2008." msgstr "POSIX.1-2008." #. type: Plain text #: archlinux debian-unstable fedora-40 fedora-rawhide mageia-cauldron #: opensuse-leap-15-6 opensuse-tumbleweed msgid "RFC\\ 2553." msgstr "RFC\\ 2553." #. type: SH #: archlinux debian-unstable fedora-40 fedora-rawhide mageia-cauldron #: opensuse-leap-15-6 opensuse-tumbleweed #, no-wrap msgid "HISTORY" msgstr "HISTORIQUE" #. type: Plain text #: archlinux debian-unstable fedora-40 fedora-rawhide mageia-cauldron #: opensuse-leap-15-6 opensuse-tumbleweed msgid "POSIX.1-2001." msgstr "POSIX.1-2001." #. type: TP #: archlinux debian-unstable fedora-40 fedora-rawhide mageia-cauldron #: opensuse-leap-15-6 opensuse-tumbleweed #, no-wrap msgid "B" msgstr "B" #. type: TQ #: archlinux debian-unstable fedora-40 fedora-rawhide mageia-cauldron #: opensuse-leap-15-6 opensuse-tumbleweed #, no-wrap msgid "B" msgstr "B" #. type: TQ #: archlinux debian-unstable fedora-40 fedora-rawhide mageia-cauldron #: opensuse-leap-15-6 opensuse-tumbleweed #, no-wrap msgid "B" msgstr "B" #. type: Plain text #: archlinux debian-unstable fedora-40 fedora-rawhide mageia-cauldron #: opensuse-leap-15-6 opensuse-tumbleweed msgid "glibc 2.3.3." msgstr "glibc 2.3.3." #. type: TP #: archlinux debian-unstable fedora-40 fedora-rawhide mageia-cauldron #: opensuse-leap-15-6 opensuse-tumbleweed #, no-wrap msgid "B" msgstr "B" #. type: Plain text #: archlinux debian-unstable fedora-40 fedora-rawhide mageia-cauldron #: opensuse-leap-15-6 opensuse-tumbleweed msgid "glibc 2.3.4." msgstr "glibc 2.3.4." #. type: SH #: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide #: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed #, no-wrap msgid "NOTES" msgstr "NOTES" #. type: Plain text #: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide #: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed msgid "" "B() supports the I
B<%>I notation for " "specifying the IPv6 scope-ID." msgstr "" "B() gère la notation I
B<%>I pour indiquer " "l'identifiant scope de IPv6." #. type: SH #: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide #: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed #, no-wrap msgid "EXAMPLES" msgstr "EXEMPLES" #. getnameinfo.3 refers to this example #. socket.2 refers to this example #. bind.2 refers to this example #. connect.2 refers to this example #. recvfrom.2 refers to this example #. sendto.2 refers to this example #. type: Plain text #: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide #: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed msgid "" "The following programs demonstrate the use of B(), " "B(), B(), and B(3). The programs " "are an echo server and client for UDP datagrams." msgstr "" "Le programme suivant explique l'utilisation de B(), " "B(), B(), et B(3). Les programmes " "sont des clients et serveurs pour les datagrammes UDP." #. type: SS #: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide #: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed #, no-wrap msgid "Server program" msgstr "Programme du serveur" #. type: Plain text #: archlinux debian-unstable fedora-40 fedora-rawhide mageia-cauldron #: opensuse-tumbleweed #, no-wrap msgid "" "#include Enetdb.hE\n" "#include Estdio.hE\n" "#include Estdlib.hE\n" "#include Estring.hE\n" "#include Esys/socket.hE\n" "#include Esys/types.hE\n" "#include Eunistd.hE\n" "\\&\n" "#define BUF_SIZE 500\n" "\\&\n" "int\n" "main(int argc, char *argv[])\n" "{\n" " int sfd, s;\n" " char buf[BUF_SIZE];\n" " ssize_t nread;\n" " socklen_t peer_addrlen;\n" " struct addrinfo hints;\n" " struct addrinfo *result, *rp;\n" " struct sockaddr_storage peer_addr;\n" "\\&\n" " if (argc != 2) {\n" " fprintf(stderr, \"Usage: %s port\\en\", argv[0]);\n" " exit(EXIT_FAILURE);\n" " }\n" "\\&\n" " memset(&hints, 0, sizeof(hints));\n" " hints.ai_family = AF_UNSPEC; /* Allow IPv4 or IPv6 */\n" " hints.ai_socktype = SOCK_DGRAM; /* Datagram socket */\n" " hints.ai_flags = AI_PASSIVE; /* For wildcard IP address */\n" " hints.ai_protocol = 0; /* Any protocol */\n" " hints.ai_canonname = NULL;\n" " hints.ai_addr = NULL;\n" " hints.ai_next = NULL;\n" "\\&\n" " s = getaddrinfo(NULL, argv[1], &hints, &result);\n" " if (s != 0) {\n" " fprintf(stderr, \"getaddrinfo: %s\\en\", gai_strerror(s));\n" " exit(EXIT_FAILURE);\n" " }\n" "\\&\n" " /* getaddrinfo() returns a list of address structures.\n" " Try each address until we successfully bind(2).\n" " If socket(2) (or bind(2)) fails, we (close the socket\n" " and) try the next address. */\n" "\\&\n" " for (rp = result; rp != NULL; rp = rp-Eai_next) {\n" " sfd = socket(rp-Eai_family, rp-Eai_socktype,\n" " rp-Eai_protocol);\n" " if (sfd == -1)\n" " continue;\n" "\\&\n" " if (bind(sfd, rp-Eai_addr, rp-Eai_addrlen) == 0)\n" " break; /* Success */\n" "\\&\n" " close(sfd);\n" " }\n" "\\&\n" " freeaddrinfo(result); /* No longer needed */\n" "\\&\n" " if (rp == NULL) { /* No address succeeded */\n" " fprintf(stderr, \"Could not bind\\en\");\n" " exit(EXIT_FAILURE);\n" " }\n" "\\&\n" " /* Read datagrams and echo them back to sender. */\n" "\\&\n" " for (;;) {\n" " char host[NI_MAXHOST], service[NI_MAXSERV];\n" "\\&\n" " peer_addrlen = sizeof(peer_addr);\n" " nread = recvfrom(sfd, buf, BUF_SIZE, 0,\n" " (struct sockaddr *) &peer_addr, &peer_addrlen);\n" " if (nread == -1)\n" " continue; /* Ignore failed request */\n" "\\&\n" " s = getnameinfo((struct sockaddr *) &peer_addr,\n" " peer_addrlen, host, NI_MAXHOST,\n" " service, NI_MAXSERV, NI_NUMERICSERV);\n" " if (s == 0)\n" " printf(\"Received %zd bytes from %s:%s\\en\",\n" " nread, host, service);\n" " else\n" " fprintf(stderr, \"getnameinfo: %s\\en\", gai_strerror(s));\n" "\\&\n" " if (sendto(sfd, buf, nread, 0, (struct sockaddr *) &peer_addr,\n" " peer_addrlen) != nread)\n" " {\n" " fprintf(stderr, \"Error sending response\\en\");\n" " }\n" " }\n" "}\n" msgstr "" "#include Enetdb.hE\n" "#include Estdio.hE\n" "#include Estdlib.hE\n" "#include Estring.hE\n" "#include Esys/socket.hE\n" "#include Esys/types.hE\n" "#include Eunistd.hE\n" "\\&\n" "#define BUF_SIZE 500\n" "\\&\n" "int\n" "main(int argc, char *argv[])\n" "{\n" " int sfd, s;\n" " char buf[BUF_SIZE];\n" " ssize_t nread;\n" " socklen_t peer_addrlen;\n" " struct addrinfo hints;\n" " struct addrinfo *result, *rp;\n" " struct sockaddr_storage peer_addr;\n" "\\&\n" " if (argc != 2) {\n" " fprintf(stderr, \"Utilisation : %s port\\en\", argv[0]);\n" " exit(EXIT_FAILURE);\n" " }\n" "\\&\n" " memset(&hints, 0, sizeof(hints));\n" " hints.ai_family = AF_UNSPEC; /* IPv4 ou IPv6 permis */\n" " hints.ai_socktype = SOCK_DGRAM; /* Socket du datagramme */\n" " hints.ai_flags = AI_PASSIVE; /* Pour une adresse IP joker */\n" " hints.ai_protocol = 0; /* Tout protocole */\n" " hints.ai_canonname = NULL;\n" " hints.ai_addr = NULL;\n" " hints.ai_next = NULL;\n" "\\&\n" " s = getaddrinfo(NULL, argv[1], &hints, &result);\n" " if (s != 0) {\n" " fprintf(stderr, \"getaddrinfo: %s\\en\", gai_strerror(s));\n" " exit(EXIT_FAILURE);\n" " }\n" "\\&\n" " /* getaddrinfo() renvoie une liste de structures d'adresse.\n" " Essayer cheque adresse jusqu'à un bind(2) réussi.\n" " Si socket(2) (ou bind(2)) échoue, on (clôt le socket\n" " et) essaie l'adresse suivante. */\n" "\\&\n" " for (rp = result; rp != NULL; rp = rp-Eai_next) {\n" " sfd = socket(rp-Eai_family, rp-Eai_socktype,\n" " rp-Eai_protocol);\n" " if (sfd == -1)\n" " continue;\n" "\\&\n" " if (bind(sfd, rp-Eai_addr, rp-Eai_addrlen) == 0)\n" " break; /* Succès */\n" "\\&\n" " close(sfd);\n" " }\n" "\\&\n" " freeaddrinfo(result); /* Plus nécessaire */\n" "\\&\n" " if (rp == NULL) { /* Toutes les adresses ont échoué */\n" " fprintf(stderr, \"Pas de lien créé\\en\");\n" " exit(EXIT_FAILURE);\n" " }\n" "\\&\n" " /* Lire les datagrammes et les renvoyer à l'envoyeur. */\n" "\\&\n" " for (;;) {\n" " char host[NI_MAXHOST], service[NI_MAXSERV];\n" "\\&\n" " peer_addrlen = sizeof(peer_addr);\n" " nread = recvfrom(sfd, buf, BUF_SIZE, 0,\n" " (struct sockaddr *) &peer_addr, &peer_addrlen);\n" " if (nread == -1)\n" " continue; /* Ignorer la requête en échec */\n" "\\&\n" " s = getnameinfo((struct sockaddr *) &peer_addr,\n" " peer_addrlen, host, NI_MAXHOST,\n" " service, NI_MAXSERV, NI_NUMERICSERV);\n" " if (s == 0)\n" " printf(\"%zd octets reçus de %s:%s\\en\",\n" " nread, host, service);\n" " else\n" " fprintf(stderr, \"getnameinfo : %s\\en\", gai_strerror(s));\n" "\\&\n" " if (sendto(sfd, buf, nread, 0, (struct sockaddr *) &peer_addr,\n" " peer_addrlen) != nread)\n" " {\n" " fprintf(stderr, \"Erreur d'envoi de réponse\\en\");\n" " }\n" " }\n" "}\n" # NOTE: .R " " not supported by po4a #. SRC END #. type: SS #: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide #: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed #, no-wrap msgid "Client program" msgstr "Programme du client" #. type: Plain text #: archlinux debian-unstable fedora-40 fedora-rawhide mageia-cauldron #: opensuse-tumbleweed #, no-wrap msgid "" "#include Enetdb.hE\n" "#include Estdio.hE\n" "#include Estdlib.hE\n" "#include Estring.hE\n" "#include Esys/socket.hE\n" "#include Esys/types.hE\n" "#include Eunistd.hE\n" "\\&\n" "#define BUF_SIZE 500\n" "\\&\n" "int\n" "main(int argc, char *argv[])\n" "{\n" " int sfd, s;\n" " char buf[BUF_SIZE];\n" " size_t len;\n" " ssize_t nread;\n" " struct addrinfo hints;\n" " struct addrinfo *result, *rp;\n" "\\&\n" " if (argc E 3) {\n" " fprintf(stderr, \"Usage: %s host port msg...\\en\", argv[0]);\n" " exit(EXIT_FAILURE);\n" " }\n" "\\&\n" " /* Obtain address(es) matching host/port. */\n" "\\&\n" " memset(&hints, 0, sizeof(hints));\n" " hints.ai_family = AF_UNSPEC; /* Allow IPv4 or IPv6 */\n" " hints.ai_socktype = SOCK_DGRAM; /* Datagram socket */\n" " hints.ai_flags = 0;\n" " hints.ai_protocol = 0; /* Any protocol */\n" "\\&\n" " s = getaddrinfo(argv[1], argv[2], &hints, &result);\n" " if (s != 0) {\n" " fprintf(stderr, \"getaddrinfo: %s\\en\", gai_strerror(s));\n" " exit(EXIT_FAILURE);\n" " }\n" "\\&\n" " /* getaddrinfo() returns a list of address structures.\n" " Try each address until we successfully connect(2).\n" " If socket(2) (or connect(2)) fails, we (close the socket\n" " and) try the next address. */\n" "\\&\n" " for (rp = result; rp != NULL; rp = rp-Eai_next) {\n" " sfd = socket(rp-Eai_family, rp-Eai_socktype,\n" " rp-Eai_protocol);\n" " if (sfd == -1)\n" " continue;\n" "\\&\n" " if (connect(sfd, rp-Eai_addr, rp-Eai_addrlen) != -1)\n" " break; /* Success */\n" "\\&\n" " close(sfd);\n" " }\n" "\\&\n" " freeaddrinfo(result); /* No longer needed */\n" "\\&\n" " if (rp == NULL) { /* No address succeeded */\n" " fprintf(stderr, \"Could not connect\\en\");\n" " exit(EXIT_FAILURE);\n" " }\n" "\\&\n" " /* Send remaining command-line arguments as separate\n" " datagrams, and read responses from server. */\n" "\\&\n" " for (size_t j = 3; j E argc; j++) {\n" " len = strlen(argv[j]) + 1;\n" " /* +1 for terminating null byte */\n" "\\&\n" " if (len E BUF_SIZE) {\n" " fprintf(stderr,\n" " \"Ignoring long message in argument %zu\\en\", j);\n" " continue;\n" " }\n" "\\&\n" " if (write(sfd, argv[j], len) != len) {\n" " fprintf(stderr, \"partial/failed write\\en\");\n" " exit(EXIT_FAILURE);\n" " }\n" "\\&\n" " nread = read(sfd, buf, BUF_SIZE);\n" " if (nread == -1) {\n" " perror(\"read\");\n" " exit(EXIT_FAILURE);\n" " }\n" "\\&\n" " printf(\"Received %zd bytes: %s\\en\", nread, buf);\n" " }\n" "\\&\n" " exit(EXIT_SUCCESS);\n" "}\n" msgstr "" "#include Enetdb.hE\n" "#include Estdio.hE\n" "#include Estdlib.hE\n" "#include Estring.hE\n" "#include Esys/socket.hE\n" "#include Esys/types.hE\n" "#include Eunistd.hE\n" "\\&\n" "#define BUF_SIZE 500\n" "\\&\n" "int\n" "main(int argc, char *argv[])\n" "{\n" " int sfd, s;\n" " char buf[BUF_SIZE];\n" " size_t len;\n" " ssize_t nread;\n" " struct addrinfo hints;\n" " struct addrinfo *result, *rp;\n" "\\&\n" " if (argc E 3) {\n" " fprintf(stderr, \"Utilisation : %s host port msg...\\en\", argv[0]);\n" " exit(EXIT_FAILURE);\n" " }\n" "\\&\n" " /* Obtenir les adresses correspondantes hôte/port. */\n" "\\&\n" " memset(&hints, 0, sizeof(hints));\n" " hints.ai_family = AF_UNSPEC; /* IPv4 ou IPv6 permis */\n" " hints.ai_socktype = SOCK_DGRAM; /* Socket du datagramme */\n" " hints.ai_flags = 0;\n" " hints.ai_protocol = 0; /* Tout protocole */\n" "\\&\n" " s = getaddrinfo(argv[1], argv[2], &hints, &result);\n" " if (s != 0) {\n" " fprintf(stderr, \"getaddrinfo: %s\\en\", gai_strerror(s));\n" " exit(EXIT_FAILURE);\n" " }\n" "\\&\n" " /* getaddrinfo() renvoie une liste de structures d'adresse.\n" " Essayer chaque adresse jusqu'à un bind(2) réussi.\n" " Si socket(2) (ou bind(2)) échoue, on (clôt le socket\n" " et) essaie l'adresse suivante. */\n" "\\&\n" " for (rp = result; rp != NULL; rp = rp-Eai_next) {\n" " sfd = socket(rp-Eai_family, rp-Eai_socktype,\n" " rp-Eai_protocol);\n" " if (sfd == -1)\n" " continue;\n" "\\&\n" " if (connect(sfd, rp-Eai_addr, rp-Eai_addrlen) != -1)\n" " break; /* Succès */\n" "\\&\n" " close(sfd);\n" " }\n" "\\&\n" " freeaddrinfo(result); /* Plus nécessaire */\n" "\\&\n" " if (rp == NULL) { /* Toutes les adresses ont échoué */\n" " fprintf(stderr, \"Connexion impossible\\en\");\n" " exit(EXIT_FAILURE);\n" " }\n" "\\&\n" " /* Envoyer les arguments en ligne de commande comme des datagrammes\n" " séparés et lire les réponses du serveur. */\n" "\\&\n" " for (size_t j = 3; j E argc; j++) {\n" " len = strlen(argv[j]) + 1;\n" " /* +1 pour l'octet NULL de terminaison */\n" "\\&\n" " if (len E BUF_SIZE) {\n" " fprintf(stderr,\n" " \"Ignorer le message long dans l'argument %zu\\en\", j);\n" " continue;\n" " }\n" "\\&\n" " if (write(sfd, argv[j], len) != len) {\n" " fprintf(stderr, \"écriture partielle/échec\\en\");\n" " exit(EXIT_FAILURE);\n" " }\n" "\\&\n" " nread = read(sfd, buf, BUF_SIZE);\n" " if (nread == -1) {\n" " perror(\"read\");\n" " exit(EXIT_FAILURE);\n" " }\n" "\\&\n" " printf(\"%zd octets reçus de : %s\\en\", nread, buf);\n" " }\n" "\\&\n" " exit(EXIT_SUCCESS);\n" "}\n" #. SRC END #. type: SH #: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide #: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed #, no-wrap msgid "SEE ALSO" msgstr "VOIR AUSSI" #. .BR getipnodebyaddr (3), #. .BR getipnodebyname (3), #. type: Plain text #: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide #: mageia-cauldron msgid "" "B(3), B(3), B(3), B(3), " "B(5), B(7), B(7)" msgstr "" "B(3), B(3), B(3), B(3), " "B(5), B(7), B(7)" #. type: TH #: debian-bookworm #, no-wrap msgid "2023-02-05" msgstr "5 février 2023" #. type: TH #: debian-bookworm #, no-wrap msgid "Linux man-pages 6.03" msgstr "Pages du manuel de Linux 6.03" #. type: TP #: debian-bookworm opensuse-leap-15-6 #, no-wrap msgid "B, B" msgstr "B, B" #. type: Plain text #: debian-bookworm fedora-40 mageia-cauldron opensuse-leap-15-6 msgid "" "I contains invalid flags; or, I included " "B and I was NULL." msgstr "" "I contient des drapeaux incorrects ; ou I " "inclut B et I est NULL." #. type: Plain text #: debian-bookworm msgid "" "POSIX.1-2001, POSIX.1-2008. The B() function is documented in " "RFC\\ 2553." msgstr "" "POSIX.1-2001, POSIX.1-2008. La fonction B() est documentée dans " "la RFC\\ 2553." #. type: Plain text #: debian-bookworm msgid "" "B, B, and B are available since glibc " "2.3.3. B is available since glibc 2.3.4." msgstr "" "B, B et B sont disponibles depuis la " "glibc\\ 2.3.3. B est disponible depuis la glibc\\ 2.3.4." #. type: Plain text #: debian-bookworm opensuse-leap-15-6 #, no-wrap msgid "" "#include Enetdb.hE\n" "#include Estdio.hE\n" "#include Estdlib.hE\n" "#include Estring.hE\n" "#include Esys/socket.hE\n" "#include Esys/types.hE\n" "#include Eunistd.hE\n" msgstr "" "#include Enetdb.hE\n" "#include Estdio.hE\n" "#include Estdlib.hE\n" "#include Estring.hE\n" "#include Esys/socket.hE\n" "#include Esys/types.hE\n" "#include Eunistd.hE\n" #. type: Plain text #: debian-bookworm opensuse-leap-15-6 #, no-wrap msgid "#define BUF_SIZE 500\n" msgstr "#define BUF_SIZE 500\n" #. type: Plain text #: debian-bookworm opensuse-leap-15-6 #, no-wrap msgid "" "int\n" "main(int argc, char *argv[])\n" "{\n" " int sfd, s;\n" " char buf[BUF_SIZE];\n" " ssize_t nread;\n" " socklen_t peer_addrlen;\n" " struct addrinfo hints;\n" " struct addrinfo *result, *rp;\n" " struct sockaddr_storage peer_addr;\n" msgstr "" "int\n" "main(int argc, char *argv[])\n" "{\n" " int sfd, s;\n" " char buf[BUF_SIZE];\n" " ssize_t nread;\n" " socklen_t peer_addrlen;\n" " struct addrinfo hints;\n" " struct addrinfo *result, *rp;\n" " struct sockaddr_storage peer_addr;\n" #. type: Plain text #: debian-bookworm opensuse-leap-15-6 #, no-wrap msgid "" " if (argc != 2) {\n" " fprintf(stderr, \"Usage: %s port\\en\", argv[0]);\n" " exit(EXIT_FAILURE);\n" " }\n" msgstr "" " if (argc != 2) {\n" " fprintf(stderr, \"Utilisation : %s port\\en\", argv[0]);\n" " exit(EXIT_FAILURE);\n" " }\n" #. type: Plain text #: debian-bookworm opensuse-leap-15-6 #, no-wrap msgid "" " memset(&hints, 0, sizeof(hints));\n" " hints.ai_family = AF_UNSPEC; /* Allow IPv4 or IPv6 */\n" " hints.ai_socktype = SOCK_DGRAM; /* Datagram socket */\n" " hints.ai_flags = AI_PASSIVE; /* For wildcard IP address */\n" " hints.ai_protocol = 0; /* Any protocol */\n" " hints.ai_canonname = NULL;\n" " hints.ai_addr = NULL;\n" " hints.ai_next = NULL;\n" msgstr "" " memset(&hints, 0, sizeof(hints));\n" " hints.ai_family = AF_UNSPEC; /* IPv4 ou IPv6 permis */\n" " hints.ai_socktype = SOCK_DGRAM; /* Socket du datagramme */\n" " hints.ai_flags = AI_PASSIVE; /* Pour une adresse IP joker */\n" " hints.ai_protocol = 0; /* Tout protocole */\n" " hints.ai_canonname = NULL;\n" " hints.ai_addr = NULL;\n" " hints.ai_next = NULL;\n" #. type: Plain text #: debian-bookworm opensuse-leap-15-6 #, no-wrap msgid "" " s = getaddrinfo(NULL, argv[1], &hints, &result);\n" " if (s != 0) {\n" " fprintf(stderr, \"getaddrinfo: %s\\en\", gai_strerror(s));\n" " exit(EXIT_FAILURE);\n" " }\n" msgstr "" " s = getaddrinfo(NULL, argv[1], &hints, &result);\n" " if (s != 0) {\n" " fprintf(stderr, \"getaddrinfo: %s\\en\", gai_strerror(s));\n" " exit(EXIT_FAILURE);\n" " }\n" #. type: Plain text #: debian-bookworm opensuse-leap-15-6 #, no-wrap msgid "" " /* getaddrinfo() returns a list of address structures.\n" " Try each address until we successfully bind(2).\n" " If socket(2) (or bind(2)) fails, we (close the socket\n" " and) try the next address. */\n" msgstr "" " /* getaddrinfo() renvoie une liste de structures d'adresse.\n" " Essayer chaque adresse jusqu'à un bind(2) réussi.\n" " Si socket(2) (ou bind(2)) échoue, on (clôt le socket\n" " et) essaie l'adresse suivante. */\n" #. type: Plain text #: debian-bookworm opensuse-leap-15-6 #, no-wrap msgid "" " for (rp = result; rp != NULL; rp = rp-Eai_next) {\n" " sfd = socket(rp-Eai_family, rp-Eai_socktype,\n" " rp-Eai_protocol);\n" " if (sfd == -1)\n" " continue;\n" msgstr "" " for (rp = result; rp != NULL; rp = rp-Eai_next) {\n" " sfd = socket(rp-Eai_family, rp-Eai_socktype,\n" " rp-Eai_protocol);\n" " if (sfd == -1)\n" " continue;\n" #. type: Plain text #: debian-bookworm opensuse-leap-15-6 #, no-wrap msgid "" " if (bind(sfd, rp-Eai_addr, rp-Eai_addrlen) == 0)\n" " break; /* Success */\n" msgstr "" " if (bind(sfd, rp-Eai_addr, rp-Eai_addrlen) == 0)\n" " break; /* Succès */\n" #. type: Plain text #: debian-bookworm opensuse-leap-15-6 #, no-wrap msgid "" " close(sfd);\n" " }\n" msgstr "" " close(sfd);\n" " }\n" #. type: Plain text #: debian-bookworm opensuse-leap-15-6 #, no-wrap msgid " freeaddrinfo(result); /* No longer needed */\n" msgstr " freeaddrinfo(result); /* Plus nécessaire */\n" #. type: Plain text #: debian-bookworm opensuse-leap-15-6 #, no-wrap msgid "" " if (rp == NULL) { /* No address succeeded */\n" " fprintf(stderr, \"Could not bind\\en\");\n" " exit(EXIT_FAILURE);\n" " }\n" msgstr "" " if (rp == NULL) { /* Toutes les adresses ont échoué */\n" " fprintf(stderr, \"Pas de lien créé\\en\");\n" " exit(EXIT_FAILURE);\n" " }\n" #. type: Plain text #: debian-bookworm opensuse-leap-15-6 #, no-wrap msgid " /* Read datagrams and echo them back to sender. */\n" msgstr " /* Lire les datagrammes et les renvoyer à l'envoyeur. */\n" #. type: Plain text #: debian-bookworm opensuse-leap-15-6 #, no-wrap msgid "" " for (;;) {\n" " char host[NI_MAXHOST], service[NI_MAXSERV];\n" msgstr "" " for (;;) {\n" " char host[NI_MAXHOST], service[NI_MAXSERV];\n" #. type: Plain text #: debian-bookworm opensuse-leap-15-6 #, no-wrap msgid "" " peer_addrlen = sizeof(peer_addr);\n" " nread = recvfrom(sfd, buf, BUF_SIZE, 0,\n" " (struct sockaddr *) &peer_addr, &peer_addrlen);\n" " if (nread == -1)\n" " continue; /* Ignore failed request */\n" msgstr "" " peer_addrlen = sizeof(peer_addr);\n" " nread = recvfrom(sfd, buf, BUF_SIZE, 0,\n" " (struct sockaddr *) &peer_addr, &peer_addrlen);\n" " if (nread == -1)\n" " continue; /* Ignorer la requête en échec */\n" #. type: Plain text #: debian-bookworm opensuse-leap-15-6 #, no-wrap msgid "" " s = getnameinfo((struct sockaddr *) &peer_addr,\n" " peer_addrlen, host, NI_MAXHOST,\n" " service, NI_MAXSERV, NI_NUMERICSERV);\n" " if (s == 0)\n" " printf(\"Received %zd bytes from %s:%s\\en\",\n" " nread, host, service);\n" " else\n" " fprintf(stderr, \"getnameinfo: %s\\en\", gai_strerror(s));\n" msgstr "" " s = getnameinfo((struct sockaddr *) &peer_addr,\n" " peer_addrlen, host, NI_MAXHOST,\n" " service, NI_MAXSERV, NI_NUMERICSERV);\n" " if (s == 0)\n" " printf(\"%zd octets reçus de %s:%s\\en\",\n" " nread, host, service);\n" " else\n" " fprintf(stderr, \"getnameinfo: %s\\en\", gai_strerror(s));\n" #. type: Plain text #: debian-bookworm opensuse-leap-15-6 #, no-wrap msgid "" " if (sendto(sfd, buf, nread, 0, (struct sockaddr *) &peer_addr,\n" " peer_addrlen) != nread)\n" " {\n" " fprintf(stderr, \"Error sending response\\en\");\n" " }\n" " }\n" "}\n" msgstr "" " if (sendto(sfd, buf, nread, 0, (struct sockaddr *) &peer_addr,\n" " peer_addrlen) != nread)\n" " {\n" " fprintf(stderr, \"Erreur d'envoi de réponse\\en\");\n" " }\n" " }\n" "}\n" #. type: Plain text #: debian-bookworm opensuse-leap-15-6 #, no-wrap msgid "" "int\n" "main(int argc, char *argv[])\n" "{\n" " int sfd, s;\n" " char buf[BUF_SIZE];\n" " size_t len;\n" " ssize_t nread;\n" " struct addrinfo hints;\n" " struct addrinfo *result, *rp;\n" msgstr "" "int\n" "main(int argc, char *argv[])\n" "{\n" " int sfd, s;\n" " char buf[BUF_SIZE];\n" " size_t len;\n" " ssize_t nread;\n" " struct addrinfo hints;\n" " struct addrinfo *result, *rp;\n" #. type: Plain text #: debian-bookworm opensuse-leap-15-6 #, no-wrap msgid "" " if (argc E 3) {\n" " fprintf(stderr, \"Usage: %s host port msg...\\en\", argv[0]);\n" " exit(EXIT_FAILURE);\n" " }\n" msgstr "" " if (argc E 3) {\n" " fprintf(stderr, \"Ustilisation : %s host port msg...\\en\", argv[0]);\n" " exit(EXIT_FAILURE);\n" " }\n" #. type: Plain text #: debian-bookworm opensuse-leap-15-6 #, no-wrap msgid " /* Obtain address(es) matching host/port. */\n" msgstr " /* Obtain address(es) matching host/port. */\n" #. type: Plain text #: debian-bookworm opensuse-leap-15-6 #, no-wrap msgid "" " memset(&hints, 0, sizeof(hints));\n" " hints.ai_family = AF_UNSPEC; /* Allow IPv4 or IPv6 */\n" " hints.ai_socktype = SOCK_DGRAM; /* Datagram socket */\n" " hints.ai_flags = 0;\n" " hints.ai_protocol = 0; /* Any protocol */\n" msgstr "" " memset(&hints, 0, sizeof(hints));\n" " hints.ai_family = AF_UNSPEC; /* IPv4 ou IPv6 permis */\n" " hints.ai_socktype = SOCK_DGRAM; /* Socket du datagramme */\n" " hints.ai_flags = 0;\n" " hints.ai_protocol = 0; /* Tout protocole */\n" #. type: Plain text #: debian-bookworm opensuse-leap-15-6 #, no-wrap msgid "" " s = getaddrinfo(argv[1], argv[2], &hints, &result);\n" " if (s != 0) {\n" " fprintf(stderr, \"getaddrinfo: %s\\en\", gai_strerror(s));\n" " exit(EXIT_FAILURE);\n" " }\n" msgstr "" " s = getaddrinfo(argv[1], argv[2], &hints, &result);\n" " if (s != 0) {\n" " fprintf(stderr, \"getaddrinfo: %s\\en\", gai_strerror(s));\n" " exit(EXIT_FAILURE);\n" " }\n" #. type: Plain text #: debian-bookworm opensuse-leap-15-6 #, no-wrap msgid "" " /* getaddrinfo() returns a list of address structures.\n" " Try each address until we successfully connect(2).\n" " If socket(2) (or connect(2)) fails, we (close the socket\n" " and) try the next address. */\n" msgstr "" " /* getaddrinfo() renvoie une liste de structures d'adresse.\n" " Essayer chaque adresse jusqu'à un bind(2) réussi.\n" " Si socket(2) (ou bind(2)) échoue, on (clôt le socket\n" " et) essaie l'adresse suivante. */\n" #. type: Plain text #: debian-bookworm opensuse-leap-15-6 #, no-wrap msgid "" " if (connect(sfd, rp-Eai_addr, rp-Eai_addrlen) != -1)\n" " break; /* Success */\n" msgstr "" " if (connect(sfd, rp-Eai_addr, rp-Eai_addrlen) != -1)\n" " break; /* Success */\n" #. type: Plain text #: debian-bookworm opensuse-leap-15-6 #, no-wrap msgid "" " if (rp == NULL) { /* No address succeeded */\n" " fprintf(stderr, \"Could not connect\\en\");\n" " exit(EXIT_FAILURE);\n" " }\n" msgstr "" " if (rp == NULL) { /* Toutes les adresses ont échoué */\n" " fprintf(stderr, \"Connexion impossible\\en\");\n" " exit(EXIT_FAILURE);\n" " }\n" #. type: Plain text #: debian-bookworm opensuse-leap-15-6 #, no-wrap msgid "" " /* Send remaining command-line arguments as separate\n" " datagrams, and read responses from server. */\n" msgstr "" " /* Envoyer les arguments en ligne de commande comme des datagrammes\n" " séparés et lire les réponses du serveur. */\n" #. type: Plain text #: debian-bookworm opensuse-leap-15-6 #, no-wrap msgid "" " for (size_t j = 3; j E argc; j++) {\n" " len = strlen(argv[j]) + 1;\n" " /* +1 for terminating null byte */\n" msgstr "" " for (size_t j = 3; j E argc; j++) {\n" " len = strlen(argv[j]) + 1;\n" " /* +1 pour l'octet NULL de terminaison */\n" #. type: Plain text #: debian-bookworm opensuse-leap-15-6 #, no-wrap msgid "" " if (len E BUF_SIZE) {\n" " fprintf(stderr,\n" " \"Ignoring long message in argument %zu\\en\", j);\n" " continue;\n" " }\n" msgstr "" " if (len E BUF_SIZE) {\n" " fprintf(stderr,\n" " \"Ignorer le message long dans l'argument %zu\\en\", j);\n" " continue;\n" " }\n" #. type: Plain text #: debian-bookworm opensuse-leap-15-6 #, no-wrap msgid "" " if (write(sfd, argv[j], len) != len) {\n" " fprintf(stderr, \"partial/failed write\\en\");\n" " exit(EXIT_FAILURE);\n" " }\n" msgstr "" " if (write(sfd, argv[j], len) != len) {\n" " fprintf(stderr, \"écriture partielle/échec\\en\");\n" " exit(EXIT_FAILURE);\n" " }\n" #. type: Plain text #: debian-bookworm opensuse-leap-15-6 #, no-wrap msgid "" " nread = read(sfd, buf, BUF_SIZE);\n" " if (nread == -1) {\n" " perror(\"read\");\n" " exit(EXIT_FAILURE);\n" " }\n" msgstr "" " nread = read(sfd, buf, BUF_SIZE);\n" " if (nread == -1) {\n" " perror(\"read\");\n" " exit(EXIT_FAILURE);\n" " }\n" #. type: Plain text #: debian-bookworm opensuse-leap-15-6 #, no-wrap msgid "" " printf(\"Received %zd bytes: %s\\en\", nread, buf);\n" " }\n" msgstr "" " printf(\"%zd octets reçus de : %s\\en\", nread, buf);\n" " }\n" #. type: Plain text #: debian-bookworm opensuse-leap-15-6 #, no-wrap msgid "" " exit(EXIT_SUCCESS);\n" "}\n" msgstr "" " exit(EXIT_SUCCESS);\n" "}\n" #. type: TH #: fedora-40 mageia-cauldron #, no-wrap msgid "2023-10-31" msgstr "31 octobre 2023" #. type: TH #: fedora-40 mageia-cauldron #, no-wrap msgid "Linux man-pages 6.06" msgstr "Pages du manuel de Linux 6.06" #. type: TH #: fedora-rawhide #, no-wrap msgid "2024-02-18" msgstr "18 février 2024" #. type: TH #: fedora-rawhide #, no-wrap msgid "Linux man-pages 6.7" msgstr "Pages du manuel de Linux 6.7" #. type: TH #: opensuse-leap-15-6 #, no-wrap msgid "2023-03-30" msgstr "30 mars 2023" #. type: TH #: opensuse-leap-15-6 #, no-wrap msgid "Linux man-pages 6.04" msgstr "Pages du manuel de Linux 6.04" #. .BR getipnodebyaddr (3), #. .BR getipnodebyname (3), #. type: Plain text #: opensuse-leap-15-6 opensuse-tumbleweed msgid "" "B(3), B(3), B(3), B(5), " "B(3), B(5), B(7), B(7)" msgstr "" "B(3), B(3), B(3), B(5), " "B(3), B(5), B(7), B(7)" #. type: TH #: opensuse-tumbleweed #, no-wrap msgid "Linux man-pages (unreleased)" msgstr "Pages du manuel de Linux (non publiées)"