Debian Codegraph @

po/fr/man3/getprotoent_r.3.po

raw
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-2014.
16 # Denis Barbier <[email protected]>, 2006, 2010.
17 # David Prévot <[email protected]>, 2010-2014.
18 # Jean-Philippe MENGUAL <[email protected]>, 2023.
19 msgid ""
20 msgstr ""
21 "Project-Id-Version: manpages-l10n 4.21.0\n"
22 "POT-Creation-Date: 2026-06-05 06:25+0200\n"
23 "PO-Revision-Date: 2023-09-11 21:57+0200\n"
24 "Last-Translator: Jean-Philippe MENGUAL <[email protected]>\n"
25 "Language-Team: French <[email protected]>\n"
26 "Language: fr\n"
27 "MIME-Version: 1.0\n"
28 "Content-Type: text/plain; charset=UTF-8\n"
29 "Content-Transfer-Encoding: 8bit\n"
30 "Plural-Forms: nplurals=2; plural=n > 1;\n"
31 "X-Generator: Lokalize 22.12.3\n"
32
33 #. type: TH
34 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
35 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
36 #, no-wrap
37 msgid "getprotoent_r"
38 msgstr "getprotoent_r"
39
40 #. type: TH
41 #: archlinux debian-unstable mageia-cauldron opensuse-leap-16-1
42 #: opensuse-tumbleweed
43 #, no-wrap
44 msgid "2025-09-21"
45 msgstr "21 septembre 2025"
46
47 #. type: TH
48 #: archlinux debian-unstable
49 #, no-wrap
50 msgid "Linux man-pages 6.18"
51 msgstr "Pages du manuel de Linux 6.18"
52
53 #. type: SH
54 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
55 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
56 #, no-wrap
57 msgid "NAME"
58 msgstr "NOM"
59
60 #. type: Plain text
61 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
62 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
63 msgid ""
64 "getprotoent_r, getprotobyname_r, getprotobynumber_r - get protocol entry "
65 "(reentrant)"
66 msgstr ""
67 "getprotoent_r, getprotobyname_r, getprotobynumber_r — Lire une entrée de "
68 "protocole (version réentrante)"
69
70 #. type: SH
71 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
72 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
73 #, no-wrap
74 msgid "LIBRARY"
75 msgstr "BIBLIOTHÈQUE"
76
77 #. type: Plain text
78 #: archlinux debian-unstable fedora-44 fedora-rawhide mageia-cauldron
79 #: opensuse-leap-16-1 opensuse-tumbleweed
80 msgid "Standard C library (I<libc>,\\ I<-lc>)"
81 msgstr "Bibliothèque C standard (I<libc>,\\ I<-lc>)"
82
83 #. type: SH
84 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
85 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
86 #, no-wrap
87 msgid "SYNOPSIS"
88 msgstr "SYNOPSIS"
89
90 #. type: Plain text
91 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
92 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
93 #, no-wrap
94 msgid "B<#include E<lt>netdb.hE<gt>>\n"
95 msgstr "B<#include E<lt>netdb.hE<gt>>\n"
96
97 #. type: Plain text
98 #: archlinux debian-unstable mageia-cauldron opensuse-leap-16-1
99 #: opensuse-tumbleweed
100 #, fuzzy, no-wrap
101 #| msgid ""
102 #| "B<int getprotoent_r(struct protoent *restrict >I<result_buf>B<,>\n"
103 #| "B< char >I<buf>B<[restrict .>I<size>B<], size_t >I<size>B<,>\n"
104 #| "B< struct protoent **restrict >I<result>B<);>\n"
105 #| "B<int getprotobyname_r(const char *restrict >I<name>B<,>\n"
106 #| "B< struct protoent *restrict >I<result_buf>B<,>\n"
107 #| "B< char >I<buf>B<[restrict .>I<size>B<], size_t >I<size>B<,>\n"
108 #| "B< struct protoent **restrict >I<result>B<);>\n"
109 #| "B<int getprotobynumber_r(int >I<proto>B<,>\n"
110 #| "B< struct protoent *restrict >I<result_buf>B<,>\n"
111 #| "B< char >I<buf>B<[restrict .>I<size>B<], size_t >I<size>B<,>\n"
112 #| "B< struct protoent **restrict >I<result>B<);>\n"
113 msgid ""
114 "B<int getprotoent_r(>size_t size;\n"
115 "B< struct protoent *restrict >I<result_buf>B<,>\n"
116 "B< char >I<buf>B<[restrict >I<size>B<], size_t >I<size>B<,>\n"
117 "B< struct protoent **restrict >I<result>B<);>\n"
118 "B<int getprotobyname_r(>size_t size;\n"
119 "B< const char *restrict >I<name>B<,>\n"
120 "B< struct protoent *restrict >I<result_buf>B<,>\n"
121 "B< char >I<buf>B<[restrict >I<size>B<], size_t >I<size>B<,>\n"
122 "B< struct protoent **restrict >I<result>B<);>\n"
123 "B<int getprotobynumber_r(>size_t size;\n"
124 "B< int >I<proto>B<,>\n"
125 "B< struct protoent *restrict >I<result_buf>B<,>\n"
126 "B< char >I<buf>B<[restrict >I<size>B<], size_t >I<size>B<,>\n"
127 "B< struct protoent **restrict >I<result>B<);>\n"
128 msgstr ""
129 "B<int getprotoent_r(struct protoent *restrict >I<tampon_resultat>B<,>\n"
130 "B< char >I<tampon>B<[restrict .>I<taille>B<], size_t >I<taille>B<,>\n"
131 "B< struct protoent **restrict >I<resultat>B<);>\n"
132 "B<int getprotobyname_r(const char *restrict >I<nom>B<,>\n"
133 "B< struct protoent *restrict >I<tampon_resultat>B<,>\n"
134 "B< char >I<tampon>B<[restrict .>I<taille>B<], size_t >I<taille>B<,>\n"
135 "B< struct protoent **restrict >I<resultat>B<);>\n"
136 "B<int getprotobynumber_r(int >I<proto>B<,>\n"
137 "B< struct protoent *restrict >I<tampon_resultat>B<,>\n"
138 "B< char >I<tampon>B<[restrict .>I<taille>B<], size_t >I<taille>B<,>\n"
139 "B< struct protoent **restrict >I<resultat>B<);>\n"
140
141 #. type: Plain text
142 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
143 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
144 msgid ""
145 "Feature Test Macro Requirements for glibc (see B<feature_test_macros>(7)):"
146 msgstr ""
147 "Exigences de macros de test de fonctionnalités pour la glibc (consulter "
148 "B<feature_test_macros>(7)) :"
149
150 #. type: Plain text
151 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
152 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
153 msgid "B<getprotoent_r>(), B<getprotobyname_r>(), B<getprotobynumber_r>():"
154 msgstr "B<getprotoent_r>(), B<getprotobyname_r>(), B<getprotobynumber_r>() :"
155
156 #. type: Plain text
157 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
158 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
159 #, no-wrap
160 msgid ""
161 " Since glibc 2.19:\n"
162 " _DEFAULT_SOURCE\n"
163 " glibc 2.19 and earlier:\n"
164 " _BSD_SOURCE || _SVID_SOURCE\n"
165 msgstr ""
166 " Depuis la glibc 2.19 :\n"
167 " _DEFAULT_SOURCE\n"
168 " glibc 2.19 et antérieures :\n"
169 " _BSD_SOURCE || _SVID_SOURCE\n"
170
171 #. type: SH
172 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
173 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
174 #, no-wrap
175 msgid "DESCRIPTION"
176 msgstr "DESCRIPTION"
177
178 #. type: Plain text
179 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
180 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
181 msgid ""
182 "The B<getprotoent_r>(), B<getprotobyname_r>(), and B<getprotobynumber_r>() "
183 "functions are the reentrant equivalents of, respectively, B<getprotoent>(3), "
184 "B<getprotobyname>(3), and B<getprotobynumber>(3). They differ in the way "
185 "that the I<protoent> structure is returned, and in the function calling "
186 "signature and return value. This manual page describes just the differences "
187 "from the nonreentrant functions."
188 msgstr ""
189 "B<getprotoent_r>(), B<getprotobyname_r>(), et B<getprotobynumber_r>() sont "
190 "respectivement, les versions réentrantes des fonctions B<getprotoent>(3), "
191 "B<getprotobyname>(3) et B<getprotobynumber>(3). Elles en diffèrent car elles "
192 "renvoient une structure I<protoent>, et leur signature ainsi que leur valeur "
193 "de retour sont aussi différentes. Cette page de manuel décrit juste les "
194 "différences avec les fonctions non réentrantes."
195
196 #. type: Plain text
197 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
198 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
199 msgid ""
200 "Instead of returning a pointer to a statically allocated I<protoent> "
201 "structure as the function result, these functions copy the structure into "
202 "the location pointed to by I<result_buf>."
203 msgstr ""
204 "Au lieu de renvoyer un pointeur vers une structure I<protoent> statiquement "
205 "allouée, ces fonctions copient la structure à l'adresse pointée par "
206 "I<tampon_resultat>."
207
208 #. #-#-#-#-# archlinux: getprotoent_r.3.pot (PACKAGE VERSION) #-#-#-#-#
209 #. I can find no information on the required/recommended buffer size;
210 #. the nonreentrant functions use a 1024 byte buffer.
211 #. The 1024 byte value is also what the Solaris man page suggests. -- mtk
212 #. type: Plain text
213 #. #-#-#-#-# debian-unstable: getprotoent_r.3.pot (PACKAGE VERSION) #-#-#-#-#
214 #. I can find no information on the required/recommended buffer size;
215 #. the nonreentrant functions use a 1024 byte buffer.
216 #. The 1024 byte value is also what the Solaris man page suggests. -- mtk
217 #. type: Plain text
218 #. #-#-#-#-# fedora-44: getprotoent_r.3.pot (PACKAGE VERSION) #-#-#-#-#
219 #. I can find no information on the required/recommended buffer size;
220 #. the nonreentrant functions use a 1024 byte buffer.
221 #. The 1024 byte value is also what the Solaris man page suggests. -- mtk
222 #. type: Plain text
223 #. #-#-#-#-# fedora-rawhide: getprotoent_r.3.pot (PACKAGE VERSION) #-#-#-#-#
224 #. I can find no information on the required/recommended buffer size;
225 #. the nonreentrant functions use a 1024 byte buffer.
226 #. The 1024 byte value is also what the Solaris man page suggests. -- mtk
227 #. type: Plain text
228 #. #-#-#-#-# mageia-cauldron: getprotoent_r.3.pot (PACKAGE VERSION) #-#-#-#-#
229 #. I can find no information on the required/recommended buffer size;
230 #. the nonreentrant functions use a 1024 byte buffer.
231 #. The 1024 byte value is also what the Solaris man page suggests. -- mtk
232 #. type: Plain text
233 #. #-#-#-#-# opensuse-leap-16-1: getprotoent_r.3.pot (PACKAGE VERSION) #-#-#-#-#
234 #. I can find no information on the required/recommended buffer size;
235 #. the nonreentrant functions use a 1024 byte buffer.
236 #. The 1024 byte value is also what the Solaris man page suggests. -- mtk
237 #. type: Plain text
238 #. #-#-#-#-# opensuse-tumbleweed: getprotoent_r.3.pot (PACKAGE VERSION) #-#-#-#-#
239 #. I can find no information on the required/recommended buffer size;
240 #. the nonreentrant functions use a 1024 byte buffer.
241 #. The 1024 byte value is also what the Solaris man page suggests. -- mtk
242 #. type: Plain text
243 #: archlinux debian-unstable fedora-44 fedora-rawhide mageia-cauldron
244 #: opensuse-leap-16-1 opensuse-tumbleweed
245 msgid ""
246 "The I<buf> array is used to store the string fields pointed to by the "
247 "returned I<protoent> structure. (The nonreentrant functions allocate these "
248 "strings in static storage.) The size of this array is specified in "
249 "I<size>. If I<buf> is too small, the call fails with the error B<ERANGE>, "
250 "and the caller must try again with a larger buffer. (A buffer of size 1024 "
251 "bytes should be sufficient for most applications.)"
252 msgstr ""
253 "Le tableau I<tampon> est utilisé pour sauvegarder les champs de la chaîne "
254 "pointés par la structure I<protoent> renvoyée (les fonctions non réentrantes "
255 "allouent ces chaînes de façon statique). La taille du tableau est indiquée "
256 "avec I<taille>. Si I<tampon> est trop petit, l'appel échoue avec l'erreur "
257 "B<ERANGE>, et l'appelant doit essayer de nouveau avec un tampon plus grand "
258 "(un tampon de 1024 octets est en général suffisant). "
259
260 #. type: Plain text
261 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
262 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
263 msgid ""
264 "If the function call successfully obtains a protocol record, then I<*result> "
265 "is set pointing to I<result_buf>; otherwise, I<*result> is set to NULL."
266 msgstr ""
267 "Si la fonction obtient un enregistrement de protocole, alors I<*resultat> "
268 "pointe vers I<tampon_resultat> sinon I<*resultat> est défini à NULL."
269
270 #. type: SH
271 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
272 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
273 #, no-wrap
274 msgid "RETURN VALUE"
275 msgstr "VALEUR RENVOYÉE"
276
277 #. type: Plain text
278 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
279 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
280 msgid ""
281 "On success, these functions return 0. On error, they return one of the "
282 "positive error numbers listed in ERRORS."
283 msgstr ""
284 "En cas de succès, ces fonctions renvoient zéro. En cas d'erreur, une valeur "
285 "d'erreur positive listée dans ERREURS est renvoyée."
286
287 #. type: Plain text
288 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
289 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
290 msgid ""
291 "On error, record not found (B<getprotobyname_r>(), B<getprotobynumber_r>()), "
292 "or end of input (B<getprotoent_r>()) I<result> is set to NULL."
293 msgstr ""
294 "Dans le cas des erreurs «\\ enregistrement non trouvé\\ » "
295 "(B<getprotobyname_r>(), B<getprotobynumber_r>()) ou «\\ fin de l'entrée\\ » "
296 "(B<getprotoent_r>()), I<resultat> est défini à NULL."
297
298 #. type: SH
299 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
300 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
301 #, no-wrap
302 msgid "ERRORS"
303 msgstr "ERREURS"
304
305 #. type: TP
306 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
307 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
308 #, no-wrap
309 msgid "B<ENOENT>"
310 msgstr "B<ENOENT>"
311
312 #. type: Plain text
313 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
314 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
315 msgid "(B<getprotoent_r>()) No more records in database."
316 msgstr ""
317 "(B<getprotoent_r>()) Plus d'autres enregistrements dans la base de données."
318
319 #. type: TP
320 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
321 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
322 #, no-wrap
323 msgid "B<ERANGE>"
324 msgstr "B<ERANGE>"
325
326 #. type: Plain text
327 #: archlinux debian-unstable fedora-44 fedora-rawhide mageia-cauldron
328 #: opensuse-leap-16-1 opensuse-tumbleweed
329 msgid ""
330 "I<buf> is too small. Try again with a larger buffer (and increased I<size>)."
331 msgstr ""
332 "I<buf> est trop petit. Réessayer avec un tampon plus grand (et augmentez "
333 "I<taille>)."
334
335 #. type: SH
336 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
337 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
338 #, no-wrap
339 msgid "ATTRIBUTES"
340 msgstr "ATTRIBUTS"
341
342 #. type: Plain text
343 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
344 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
345 msgid ""
346 "For an explanation of the terms used in this section, see B<attributes>(7)."
347 msgstr ""
348 "Pour une explication des termes utilisés dans cette section, consulter "
349 "B<attributes>(7)."
350
351 #. type: tbl table
352 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
353 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
354 #, no-wrap
355 msgid "Interface"
356 msgstr "Interface"
357
358 #. type: tbl table
359 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
360 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
361 #, no-wrap
362 msgid "Attribute"
363 msgstr "Attribut"
364
365 #. type: tbl table
366 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
367 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
368 #, no-wrap
369 msgid "Value"
370 msgstr "Valeur"
371
372 #. type: tbl table
373 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
374 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
375 #, no-wrap
376 msgid ".na\n"
377 msgstr ".na\n"
378
379 #. type: tbl table
380 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
381 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
382 #, no-wrap
383 msgid ".nh\n"
384 msgstr ".nh\n"
385
386 #. type: tbl table
387 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
388 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
389 #, no-wrap
390 msgid ""
391 "B<getprotoent_r>(),\n"
392 "B<getprotobyname_r>(),\n"
393 "B<getprotobynumber_r>()"
394 msgstr ""
395 "B<getprotoent_r>(),\n"
396 "B<getprotobyname_r>(),\n"
397 "B<getprotobynumber_r>()"
398
399 #. type: tbl table
400 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
401 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
402 #, no-wrap
403 msgid "Thread safety"
404 msgstr "Sécurité des threads"
405
406 #. type: tbl table
407 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
408 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
409 #, no-wrap
410 msgid "MT-Safe locale"
411 msgstr "MT-Safe locale"
412
413 #. type: SH
414 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
415 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
416 #, no-wrap
417 msgid "VERSIONS"
418 msgstr "VERSIONS"
419
420 #. type: Plain text
421 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
422 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
423 msgid ""
424 "Functions with similar names exist on some other systems, though typically "
425 "with different calling signatures."
426 msgstr ""
427 "Des fonctions avec des noms similaires existent sur d'autres systèmes, bien "
428 "qu’en général avec des signatures d'appel différentes."
429
430 #. type: SH
431 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
432 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
433 #, no-wrap
434 msgid "STANDARDS"
435 msgstr "NORMES"
436
437 #. type: Plain text
438 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
439 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
440 msgid "GNU."
441 msgstr "GNU."
442
443 #. type: SH
444 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
445 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
446 #, no-wrap
447 msgid "EXAMPLES"
448 msgstr "EXEMPLES"
449
450 #. type: Plain text
451 #: archlinux debian-unstable fedora-44 fedora-rawhide mageia-cauldron
452 #: opensuse-leap-16-1 opensuse-tumbleweed
453 msgid ""
454 "The program below uses B<getprotobyname_r>() to retrieve the protocol "
455 "record for the protocol named in its first command-line argument. If a "
456 "second (integer) command-line argument is supplied, it is used as the "
457 "initial value for I<size>; if B<getprotobyname_r>() fails with the error "
458 "B<ERANGE>, the program retries with larger buffer sizes. The following "
459 "shell session shows a couple of sample runs:"
460 msgstr ""
461 "Le programme ci-dessous utilise B<getprotobyname_r>() pour récupérer "
462 "l'enregistrement de protocole du protocole nommé dans le premier argument de "
463 "sa ligne de commande. Si un second argument (un entier) est fourni, il est "
464 "utilisé comme valeur initiale de I<taille>. Si B<getprotobyname_r>() échoue "
465 "avec l'erreur B<ERANGE>, le programme recommence avec une taille de tampon "
466 "plus grande. La session d'interpréteur suivante montre des exemples "
467 "d'exécution :"
468
469 #. type: Plain text
470 #: archlinux debian-unstable fedora-44 fedora-rawhide mageia-cauldron
471 #: opensuse-leap-16-1 opensuse-tumbleweed
472 #, no-wrap
473 msgid ""
474 "$B< ./a.out tcp 1>\n"
475 "ERANGE! Retrying with larger buffer\n"
476 "getprotobyname_r() returned: 0 (success) (size=78)\n"
477 "p_name=tcp; p_proto=6; aliases=TCP\n"
478 "$B< ./a.out xxx 1>\n"
479 "ERANGE! Retrying with larger buffer\n"
480 "getprotobyname_r() returned: 0 (success) (size=100)\n"
481 "Call failed/record not found\n"
482 msgstr ""
483 "$B< ./a.out tcp 1>\n"
484 "ERANGE! Nouvelle tentative avec un tampon plus grand\n"
485 "getprotobyname_r() a renvoyé : 0 (success) (size=78)\n"
486 "p_name=tcp; p_proto=6; aliases=TCP\n"
487 "$B< ./a.out xxx 1>\n"
488 "ERANGE! Nouvelle tentative avec un tampon plus grand\n"
489 "getprotobyname_r() a renvoyé : 0 (success) (size=100)\n"
490 "Call failed/record not found\n"
491
492 #. type: SS
493 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
494 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
495 #, no-wrap
496 msgid "Program source"
497 msgstr "Source du programme"
498
499 #. type: Plain text
500 #: archlinux debian-unstable mageia-cauldron opensuse-leap-16-1
501 #: opensuse-tumbleweed
502 #, fuzzy, no-wrap
503 #| msgid ""
504 #| "#define _GNU_SOURCE\n"
505 #| "#include E<lt>ctype.hE<gt>\n"
506 #| "#include E<lt>errno.hE<gt>\n"
507 #| "#include E<lt>netdb.hE<gt>\n"
508 #| "#include E<lt>stdio.hE<gt>\n"
509 #| "#include E<lt>stdlib.hE<gt>\n"
510 #| "#include E<lt>string.hE<gt>\n"
511 #| "\\&\n"
512 #| "#define MAX_BUF 10000\n"
513 #| "\\&\n"
514 #| "int\n"
515 #| "main(int argc, char *argv[])\n"
516 #| "{\n"
517 #| " int size, erange_cnt, s;\n"
518 #| " struct protoent result_buf;\n"
519 #| " struct protoent *result;\n"
520 #| " char buf[MAX_BUF];\n"
521 #| "\\&\n"
522 #| " if (argc E<lt> 2) {\n"
523 #| " printf(\"Usage: %s proto-name [size]\\[rs]n\", argv[0]);\n"
524 #| " exit(EXIT_FAILURE);\n"
525 #| " }\n"
526 #| "\\&\n"
527 #| " size = 1024;\n"
528 #| " if (argc E<gt> 2)\n"
529 #| " size = atoi(argv[2]);\n"
530 #| "\\&\n"
531 #| " if (size E<gt> MAX_BUF) {\n"
532 #| " printf(\"Exceeded buffer limit (%d)\\[rs]n\", MAX_BUF);\n"
533 #| " exit(EXIT_FAILURE);\n"
534 #| " }\n"
535 #| "\\&\n"
536 #| " erange_cnt = 0;\n"
537 #| " do {\n"
538 #| " s = getprotobyname_r(argv[1], &result_buf,\n"
539 #| " buf, size, &result);\n"
540 #| " if (s == ERANGE) {\n"
541 #| " if (erange_cnt == 0)\n"
542 #| " printf(\"ERANGE! Retrying with larger buffer\\[rs]n\");\n"
543 #| " erange_cnt++;\n"
544 #| "\\&\n"
545 #| " /* Increment a byte at a time so we can see exactly\n"
546 #| " what size buffer was required. */\n"
547 #| "\\&\n"
548 #| " size++;\n"
549 #| "\\&\n"
550 #| " if (size E<gt> MAX_BUF) {\n"
551 #| " printf(\"Exceeded buffer limit (%d)\\[rs]n\", MAX_BUF);\n"
552 #| " exit(EXIT_FAILURE);\n"
553 #| " }\n"
554 #| " }\n"
555 #| " } while (s == ERANGE);\n"
556 #| "\\&\n"
557 #| " printf(\"getprotobyname_r() returned: %s (size=%d)\\[rs]n\",\n"
558 #| " (s == 0) ? \"0 (success)\" : (s == ENOENT) ? \"ENOENT\" :\n"
559 #| " strerror(s), size);\n"
560 #| "\\&\n"
561 #| " if (s != 0 || result == NULL) {\n"
562 #| " printf(\"Call failed/record not found\\[rs]n\");\n"
563 #| " exit(EXIT_FAILURE);\n"
564 #| " }\n"
565 #| "\\&\n"
566 #| " printf(\"p_name=%s; p_proto=%d; aliases=\",\n"
567 #| " result_buf.p_name, result_buf.p_proto);\n"
568 #| " for (char **p = result_buf.p_aliases; *p != NULL; p++)\n"
569 #| " printf(\"%s \", *p);\n"
570 #| " printf(\"\\[rs]n\");\n"
571 #| "\\&\n"
572 #| " exit(EXIT_SUCCESS);\n"
573 #| "}\n"
574 msgid ""
575 "#define _GNU_SOURCE\n"
576 "#include E<lt>ctype.hE<gt>\n"
577 "#include E<lt>errno.hE<gt>\n"
578 "#include E<lt>netdb.hE<gt>\n"
579 "#include E<lt>stdio.hE<gt>\n"
580 "#include E<lt>stdlib.hE<gt>\n"
581 "#include E<lt>string.hE<gt>\n"
582 "\\&\n"
583 "#define MAX_BUF 10000\n"
584 "\\&\n"
585 "int\n"
586 "main(int argc, char *argv[])\n"
587 "{\n"
588 " int size, erange_cnt, s;\n"
589 " struct protoent result_buf;\n"
590 " struct protoent *result;\n"
591 " char buf[MAX_BUF];\n"
592 "\\&\n"
593 " if (argc E<lt> 2) {\n"
594 " printf(\"Usage: %s proto-name [size]\\[rs]n\", argv[0]);\n"
595 " exit(EXIT_FAILURE);\n"
596 " }\n"
597 "\\&\n"
598 " size = 1024;\n"
599 " if (argc E<gt> 2)\n"
600 " size = atoi(argv[2]);\n"
601 "\\&\n"
602 " if (size E<gt> MAX_BUF) {\n"
603 " printf(\"Exceeded buffer limit (%d)\\[rs]n\", MAX_BUF);\n"
604 " exit(EXIT_FAILURE);\n"
605 " }\n"
606 "\\&\n"
607 " erange_cnt = 0;\n"
608 " do {\n"
609 " s = getprotobyname_r(argv[1], &result_buf,\n"
610 " buf, size, &result);\n"
611 " if (s == ERANGE) {\n"
612 " if (erange_cnt == 0)\n"
613 " printf(\"ERANGE! Retrying with larger buffer\\[rs]n\");\n"
614 " erange_cnt++;\n"
615 "\\&\n"
616 " /* Increment a byte at a time so we can see exactly\n"
617 " what size buffer was required. */\n"
618 "\\&\n"
619 " size++;\n"
620 "\\&\n"
621 " if (size E<gt> MAX_BUF) {\n"
622 " printf(\"Exceeded buffer limit (%d)\\[rs]n\", MAX_BUF);\n"
623 " exit(EXIT_FAILURE);\n"
624 " }\n"
625 " }\n"
626 " } while (s == ERANGE);\n"
627 "\\&\n"
628 " printf(\"getprotobyname_r() returned: %s (size=%d)\\[rs]n\",\n"
629 " (s == 0) ? \"0 (success)\" : (s == ENOENT) ? \"ENOENT\" :\n"
630 " strerror(s), size);\n"
631 "\\&\n"
632 " if (s != 0 || result == NULL) {\n"
633 " printf(\"Call failed/record not found\\[rs]n\");\n"
634 " exit(EXIT_FAILURE);\n"
635 " }\n"
636 "\\&\n"
637 " printf(\"p_name=%s; p_proto=%d; aliases=\",\n"
638 " result_buf.p_name, result_buf.p_proto);\n"
639 " for (char **p = result_buf.p_aliases; *p != NULL; p++)\n"
640 " printf(\"%s \", *p);\n"
641 " printf(\"\\[rs]n\");\n"
642 "\\&\n"
643 " exit(EXIT_SUCCESS);\n"
644 "}\n"
645 msgstr ""
646 "#define _GNU_SOURCE\n"
647 "#include E<lt>ctype.hE<gt>\n"
648 "#include E<lt>errno.hE<gt>\n"
649 "#include E<lt>netdb.hE<gt>\n"
650 "#include E<lt>stdio.hE<gt>\n"
651 "#include E<lt>stdlib.hE<gt>\n"
652 "#include E<lt>string.hE<gt>\n"
653 "\\&\n"
654 "#define MAX_BUF 10000\n"
655 "\\&\n"
656 "int\n"
657 "main(int argc, char *argv[])\n"
658 "{\n"
659 " int size, erange_cnt, s;\n"
660 " struct protoent result_buf;\n"
661 " struct protoent *result;\n"
662 " char buf[MAX_BUF];\n"
663 "\\&\n"
664 " if (argc E<lt> 2) {\n"
665 " printf(\"Utilisation : %s proto-name [size]\\[rs]n\", argv[0]);\n"
666 " exit(EXIT_FAILURE);\n"
667 " }\n"
668 "\\&\n"
669 " size = 1024;\n"
670 " if (argc E<gt> 2)\n"
671 " size = atoi(argv[2]);\n"
672 "\\&\n"
673 " if (size E<gt> MAX_BUF) {\n"
674 " printf(\"Dépassement de la limite du tampon (%d)\\[rs]n\", MAX_BUF);\n"
675 " exit(EXIT_FAILURE);\n"
676 " }\n"
677 "\\&\n"
678 " erange_cnt = 0;\n"
679 " do {\n"
680 " s = getprotobyname_r(argv[1], &result_buf,\n"
681 " buf, size, &result);\n"
682 " if (s == ERANGE) {\n"
683 " if (erange_cnt == 0)\n"
684 " printf(\"ERANGE ! Nouvelle tentative avec un tampon plus grand\\[rs]n\");\n"
685 " erange_cnt++;\n"
686 "\\&\n"
687 " /* Incrémenter un octet à la fois pour pouvoir voir exactement\n"
688 " la taille du tampon nécessaire. */\n"
689 "\\&\n"
690 " size++;\n"
691 "\\&\n"
692 " if (size E<gt> MAX_BUF) {\n"
693 " printf(\"Dépassement de la limite du tampon (%d)\\[rs]n\", MAX_BUF);\n"
694 " exit(EXIT_FAILURE);\n"
695 " }\n"
696 " }\n"
697 " } while (s == ERANGE);\n"
698 "\\&\n"
699 " printf(\"getprotobyname_r() a renvoyé : %s (size=%d)\\[rs]n\",\n"
700 " (s == 0) ? \"0 (success)\" : (s == ENOENT) ? \"ENOENT\" :\n"
701 " strerror(s), size);\n"
702 "\\&\n"
703 " if (s != 0 || result == NULL) {\n"
704 " printf(\"Appel échoué/enregistrement non trouvé\\[rs]n\");\n"
705 " exit(EXIT_FAILURE);\n"
706 " }\n"
707 "\\&\n"
708 " printf(\"p_name=%s; p_proto=%d; aliases=\",\n"
709 " result_buf.p_name, result_buf.p_proto);\n"
710 " for (char **p = result_buf.p_aliases; *p != NULL; p++)\n"
711 " printf(\"%s \", *p);\n"
712 " printf(\"\\[rs]n\");\n"
713 "\\&\n"
714 " exit(EXIT_SUCCESS);\n"
715 "}\n"
716
717 #. SRC END
718 #. type: SH
719 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
720 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
721 #, no-wrap
722 msgid "SEE ALSO"
723 msgstr "VOIR AUSSI"
724
725 #. type: Plain text
726 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
727 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
728 msgid "B<getprotoent>(3), B<protocols>(5)"
729 msgstr "B<getprotoent>(3), B<protocols>(5)"
730
731 #. type: TH
732 #: debian-trixie
733 #, no-wrap
734 msgid "2024-06-15"
735 msgstr "15 juin 2024"
736
737 #. type: TH
738 #: debian-trixie
739 #, no-wrap
740 msgid "Linux man-pages 6.9.1"
741 msgstr "Pages du manuel de Linux 6.9.1"
742
743 #. type: Plain text
744 #: debian-trixie
745 msgid "Standard C library (I<libc>, I<-lc>)"
746 msgstr "Bibliothèque C standard (I<libc>, I<-lc>)"
747
748 #. type: Plain text
749 #: debian-trixie
750 #, no-wrap
751 msgid ""
752 "B<int getprotoent_r(struct protoent *restrict >I<result_buf>B<,>\n"
753 "B< char >I<buf>B<[restrict .>I<buflen>B<], size_t >I<buflen>B<,>\n"
754 "B< struct protoent **restrict >I<result>B<);>\n"
755 "B<int getprotobyname_r(const char *restrict >I<name>B<,>\n"
756 "B< struct protoent *restrict >I<result_buf>B<,>\n"
757 "B< char >I<buf>B<[restrict .>I<buflen>B<], size_t >I<buflen>B<,>\n"
758 "B< struct protoent **restrict >I<result>B<);>\n"
759 "B<int getprotobynumber_r(int >I<proto>B<,>\n"
760 "B< struct protoent *restrict >I<result_buf>B<,>\n"
761 "B< char >I<buf>B<[restrict .>I<buflen>B<], size_t >I<buflen>B<,>\n"
762 "B< struct protoent **restrict >I<result>B<);>\n"
763 msgstr ""
764 "B<int getprotoent_r(struct protoent *restrict >I<tampon_resultat>B<,>\n"
765 "B< char >I<tampon>B<[restrict .>I<taille_tampon>B<], size_t >I<taille_tampon>B<,>\n"
766 "B< struct protoent **restrict >I<resultat>B<);>\n"
767 "B<int getprotobyname_r(const char *restrict >I<nom>B<,>\n"
768 "B< struct protoent *restrict >I<tampon_resultat>B<,>\n"
769 "B< char >I<tampon>B<[restrict .>I<taille_tampon>B<], size_t >I<taille_tampon>B<,>\n"
770 "B< struct protoent **restrict >I<resultat>B<);>\n"
771 "B<int getprotobynumber_r(int >I<proto>B<,>\n"
772 "B< struct protoent *restrict >I<tampon_resultat>B<,>\n"
773 "B< char >I<tampon>B<[restrict .>I<taille_tampon>B<], size_t >I<taille_tampon>B<,>\n"
774 "B< struct protoent **restrict >I<resultat>B<);>\n"
775
776 #. I can find no information on the required/recommended buffer size;
777 #. the nonreentrant functions use a 1024 byte buffer.
778 #. The 1024 byte value is also what the Solaris man page suggests. -- mtk
779 #. type: Plain text
780 #: debian-trixie
781 msgid ""
782 "The I<buf> array is used to store the string fields pointed to by the "
783 "returned I<protoent> structure. (The nonreentrant functions allocate these "
784 "strings in static storage.) The size of this array is specified in "
785 "I<buflen>. If I<buf> is too small, the call fails with the error B<ERANGE>, "
786 "and the caller must try again with a larger buffer. (A buffer of length "
787 "1024 bytes should be sufficient for most applications.)"
788 msgstr ""
789 "Le tableau I<tampon> est utilisé pour sauvegarder les champs de la chaîne "
790 "pointés par la structure I<protoent> renvoyée (les fonctions non réentrantes "
791 "allouent ces chaînes de façon statique). La taille du tableau est indiquée "
792 "avec I<taille_tampon>. Si I<tampon> est trop petit, l'appel échoue avec "
793 "l'erreur B<ERANGE>, et l'appelant doit essayer de nouveau avec un tableau "
794 "plus grand (un tableau de 1024 octets est en général suffisant). "
795
796 #. type: Plain text
797 #: debian-trixie
798 msgid ""
799 "I<buf> is too small. Try again with a larger buffer (and increased "
800 "I<buflen>)."
801 msgstr ""
802 "I<buf> est trop petit. Réessayer avec un tampon plus grand (et augmentez "
803 "I<buflen>)."
804
805 #. type: Plain text
806 #: debian-trixie
807 msgid ""
808 "The program below uses B<getprotobyname_r>() to retrieve the protocol "
809 "record for the protocol named in its first command-line argument. If a "
810 "second (integer) command-line argument is supplied, it is used as the "
811 "initial value for I<buflen>; if B<getprotobyname_r>() fails with the error "
812 "B<ERANGE>, the program retries with larger buffer sizes. The following "
813 "shell session shows a couple of sample runs:"
814 msgstr ""
815 "Le programme ci-dessous utilise B<getprotobyname_r>() pour récupérer "
816 "l'enregistrement de protocole du protocole nommé dans le premier argument de "
817 "sa ligne de commande. Si un second argument (un entier) est fourni, il est "
818 "utilisé comme valeur initiale de I<taille_tampon>. Si B<getprotobyname_r>() "
819 "échoue avec l'erreur B<ERANGE>, le programme recommence avec une taille de "
820 "tampon plus grande. La session d'interpréteur suivante montre des exemples "
821 "d'exécution :"
822
823 #. type: Plain text
824 #: debian-trixie
825 #, no-wrap
826 msgid ""
827 "$B< ./a.out tcp 1>\n"
828 "ERANGE! Retrying with larger buffer\n"
829 "getprotobyname_r() returned: 0 (success) (buflen=78)\n"
830 "p_name=tcp; p_proto=6; aliases=TCP\n"
831 "$B< ./a.out xxx 1>\n"
832 "ERANGE! Retrying with larger buffer\n"
833 "getprotobyname_r() returned: 0 (success) (buflen=100)\n"
834 "Call failed/record not found\n"
835 msgstr ""
836 "$B< ./a.out tcp 1>\n"
837 "ERANGE! Nouvelle tentative avec un tampon plus grand\n"
838 "getprotobyname_r() a renvoyé : 0 (success) (buflen=78)\n"
839 "p_name=tcp; p_proto=6; aliases=TCP\n"
840 "$B< ./a.out xxx 1>\n"
841 "ERANGE! Nouvelle tentative avec un tampon plus grand\n"
842 "getprotobyname_r() a renvoyé : 0 (success) (buflen=100)\n"
843 "Call failed/record not found\n"
844
845 #. type: Plain text
846 #: debian-trixie
847 #, no-wrap
848 msgid ""
849 "#define _GNU_SOURCE\n"
850 "#include E<lt>ctype.hE<gt>\n"
851 "#include E<lt>errno.hE<gt>\n"
852 "#include E<lt>netdb.hE<gt>\n"
853 "#include E<lt>stdio.hE<gt>\n"
854 "#include E<lt>stdlib.hE<gt>\n"
855 "#include E<lt>string.hE<gt>\n"
856 "\\&\n"
857 "#define MAX_BUF 10000\n"
858 "\\&\n"
859 "int\n"
860 "main(int argc, char *argv[])\n"
861 "{\n"
862 " int buflen, erange_cnt, s;\n"
863 " struct protoent result_buf;\n"
864 " struct protoent *result;\n"
865 " char buf[MAX_BUF];\n"
866 "\\&\n"
867 " if (argc E<lt> 2) {\n"
868 " printf(\"Usage: %s proto-name [buflen]\\[rs]n\", argv[0]);\n"
869 " exit(EXIT_FAILURE);\n"
870 " }\n"
871 "\\&\n"
872 " buflen = 1024;\n"
873 " if (argc E<gt> 2)\n"
874 " buflen = atoi(argv[2]);\n"
875 "\\&\n"
876 " if (buflen E<gt> MAX_BUF) {\n"
877 " printf(\"Exceeded buffer limit (%d)\\[rs]n\", MAX_BUF);\n"
878 " exit(EXIT_FAILURE);\n"
879 " }\n"
880 "\\&\n"
881 " erange_cnt = 0;\n"
882 " do {\n"
883 " s = getprotobyname_r(argv[1], &result_buf,\n"
884 " buf, buflen, &result);\n"
885 " if (s == ERANGE) {\n"
886 " if (erange_cnt == 0)\n"
887 " printf(\"ERANGE! Retrying with larger buffer\\[rs]n\");\n"
888 " erange_cnt++;\n"
889 "\\&\n"
890 " /* Increment a byte at a time so we can see exactly\n"
891 " what size buffer was required. */\n"
892 "\\&\n"
893 " buflen++;\n"
894 "\\&\n"
895 " if (buflen E<gt> MAX_BUF) {\n"
896 " printf(\"Exceeded buffer limit (%d)\\[rs]n\", MAX_BUF);\n"
897 " exit(EXIT_FAILURE);\n"
898 " }\n"
899 " }\n"
900 " } while (s == ERANGE);\n"
901 "\\&\n"
902 " printf(\"getprotobyname_r() returned: %s (buflen=%d)\\[rs]n\",\n"
903 " (s == 0) ? \"0 (success)\" : (s == ENOENT) ? \"ENOENT\" :\n"
904 " strerror(s), buflen);\n"
905 "\\&\n"
906 " if (s != 0 || result == NULL) {\n"
907 " printf(\"Call failed/record not found\\[rs]n\");\n"
908 " exit(EXIT_FAILURE);\n"
909 " }\n"
910 "\\&\n"
911 " printf(\"p_name=%s; p_proto=%d; aliases=\",\n"
912 " result_buf.p_name, result_buf.p_proto);\n"
913 " for (char **p = result_buf.p_aliases; *p != NULL; p++)\n"
914 " printf(\"%s \", *p);\n"
915 " printf(\"\\[rs]n\");\n"
916 "\\&\n"
917 " exit(EXIT_SUCCESS);\n"
918 "}\n"
919 msgstr ""
920 "#define _GNU_SOURCE\n"
921 "#include E<lt>ctype.hE<gt>\n"
922 "#include E<lt>errno.hE<gt>\n"
923 "#include E<lt>netdb.hE<gt>\n"
924 "#include E<lt>stdio.hE<gt>\n"
925 "#include E<lt>stdlib.hE<gt>\n"
926 "#include E<lt>string.hE<gt>\n"
927 "\\&\n"
928 "#define MAX_BUF 10000\n"
929 "\\&\n"
930 "int\n"
931 "main(int argc, char *argv[])\n"
932 "{\n"
933 " int buflen, erange_cnt, s;\n"
934 " struct protoent result_buf;\n"
935 " struct protoent *result;\n"
936 " char buf[MAX_BUF];\n"
937 "\\&\n"
938 " if (argc E<lt> 2) {\n"
939 " printf(\"Utilisation : %s proto-name [buflen]\\[rs]n\", argv[0]);\n"
940 " exit(EXIT_FAILURE);\n"
941 " }\n"
942 "\\&\n"
943 " buflen = 1024;\n"
944 " if (argc E<gt> 2)\n"
945 " buflen = atoi(argv[2]);\n"
946 "\\&\n"
947 " if (buflen E<gt> MAX_BUF) {\n"
948 " printf(\"Dépassement de la limite du tampon (%d)\\[rs]n\", MAX_BUF);\n"
949 " exit(EXIT_FAILURE);\n"
950 " }\n"
951 "\\&\n"
952 " erange_cnt = 0;\n"
953 " do {\n"
954 " s = getprotobyname_r(argv[1], &result_buf,\n"
955 " buf, buflen, &result);\n"
956 " if (s == ERANGE) {\n"
957 " if (erange_cnt == 0)\n"
958 " printf(\"ERANGE ! Nouvelle tentative avec un tampon plus grand\\[rs]n\");\n"
959 " erange_cnt++;\n"
960 "\\&\n"
961 " /* Incrémenter un octet à la fois pour pouvoir voir exactement\n"
962 " la taille du tampon nécessaire. */\n"
963 "\\&\n"
964 " buflen++;\n"
965 "\\&\n"
966 " if (buflen E<gt> MAX_BUF) {\n"
967 " printf(\"Dépassement de la limite du tampon (%d)\\[rs]n\", MAX_BUF);\n"
968 " exit(EXIT_FAILURE);\n"
969 " }\n"
970 " }\n"
971 " } while (s == ERANGE);\n"
972 "\\&\n"
973 " printf(\"getprotobyname_r() a renvoyé : %s (buflen=%d)\\[rs]n\",\n"
974 " (s == 0) ? \"0 (success)\" : (s == ENOENT) ? \"ENOENT\" :\n"
975 " strerror(s), buflen);\n"
976 "\\&\n"
977 " if (s != 0 || result == NULL) {\n"
978 " printf(\"Appel échoué/enregistrement non trouvé\\[rs]n\");\n"
979 " exit(EXIT_FAILURE);\n"
980 " }\n"
981 "\\&\n"
982 " printf(\"p_name=%s; p_proto=%d; aliases=\",\n"
983 " result_buf.p_name, result_buf.p_proto);\n"
984 " for (char **p = result_buf.p_aliases; *p != NULL; p++)\n"
985 " printf(\"%s \", *p);\n"
986 " printf(\"\\[rs]n\");\n"
987 "\\&\n"
988 " exit(EXIT_SUCCESS);\n"
989 "}\n"
990
991 #. type: TH
992 #: fedora-44 fedora-rawhide
993 #, no-wrap
994 msgid "2024-12-24"
995 msgstr "24 décembre 2024"
996
997 #. type: TH
998 #: fedora-44 fedora-rawhide
999 #, no-wrap
1000 msgid "Linux man-pages 6.13"
1001 msgstr "Pages du manuel de Linux 6.13"
1002
1003 #. type: Plain text
1004 #: fedora-44 fedora-rawhide
1005 #, no-wrap
1006 msgid ""
1007 "B<int getprotoent_r(struct protoent *restrict >I<result_buf>B<,>\n"
1008 "B< char >I<buf>B<[restrict .>I<size>B<], size_t >I<size>B<,>\n"
1009 "B< struct protoent **restrict >I<result>B<);>\n"
1010 "B<int getprotobyname_r(const char *restrict >I<name>B<,>\n"
1011 "B< struct protoent *restrict >I<result_buf>B<,>\n"
1012 "B< char >I<buf>B<[restrict .>I<size>B<], size_t >I<size>B<,>\n"
1013 "B< struct protoent **restrict >I<result>B<);>\n"
1014 "B<int getprotobynumber_r(int >I<proto>B<,>\n"
1015 "B< struct protoent *restrict >I<result_buf>B<,>\n"
1016 "B< char >I<buf>B<[restrict .>I<size>B<], size_t >I<size>B<,>\n"
1017 "B< struct protoent **restrict >I<result>B<);>\n"
1018 msgstr ""
1019 "B<int getprotoent_r(struct protoent *restrict >I<tampon_resultat>B<,>\n"
1020 "B< char >I<tampon>B<[restrict .>I<taille>B<], size_t >I<taille>B<,>\n"
1021 "B< struct protoent **restrict >I<resultat>B<);>\n"
1022 "B<int getprotobyname_r(const char *restrict >I<nom>B<,>\n"
1023 "B< struct protoent *restrict >I<tampon_resultat>B<,>\n"
1024 "B< char >I<tampon>B<[restrict .>I<taille>B<], size_t >I<taille>B<,>\n"
1025 "B< struct protoent **restrict >I<resultat>B<);>\n"
1026 "B<int getprotobynumber_r(int >I<proto>B<,>\n"
1027 "B< struct protoent *restrict >I<tampon_resultat>B<,>\n"
1028 "B< char >I<tampon>B<[restrict .>I<taille>B<], size_t >I<taille>B<,>\n"
1029 "B< struct protoent **restrict >I<resultat>B<);>\n"
1030
1031 #. type: Plain text
1032 #: fedora-44 fedora-rawhide
1033 #, no-wrap
1034 msgid ""
1035 "#define _GNU_SOURCE\n"
1036 "#include E<lt>ctype.hE<gt>\n"
1037 "#include E<lt>errno.hE<gt>\n"
1038 "#include E<lt>netdb.hE<gt>\n"
1039 "#include E<lt>stdio.hE<gt>\n"
1040 "#include E<lt>stdlib.hE<gt>\n"
1041 "#include E<lt>string.hE<gt>\n"
1042 "\\&\n"
1043 "#define MAX_BUF 10000\n"
1044 "\\&\n"
1045 "int\n"
1046 "main(int argc, char *argv[])\n"
1047 "{\n"
1048 " int size, erange_cnt, s;\n"
1049 " struct protoent result_buf;\n"
1050 " struct protoent *result;\n"
1051 " char buf[MAX_BUF];\n"
1052 "\\&\n"
1053 " if (argc E<lt> 2) {\n"
1054 " printf(\"Usage: %s proto-name [size]\\[rs]n\", argv[0]);\n"
1055 " exit(EXIT_FAILURE);\n"
1056 " }\n"
1057 "\\&\n"
1058 " size = 1024;\n"
1059 " if (argc E<gt> 2)\n"
1060 " size = atoi(argv[2]);\n"
1061 "\\&\n"
1062 " if (size E<gt> MAX_BUF) {\n"
1063 " printf(\"Exceeded buffer limit (%d)\\[rs]n\", MAX_BUF);\n"
1064 " exit(EXIT_FAILURE);\n"
1065 " }\n"
1066 "\\&\n"
1067 " erange_cnt = 0;\n"
1068 " do {\n"
1069 " s = getprotobyname_r(argv[1], &result_buf,\n"
1070 " buf, size, &result);\n"
1071 " if (s == ERANGE) {\n"
1072 " if (erange_cnt == 0)\n"
1073 " printf(\"ERANGE! Retrying with larger buffer\\[rs]n\");\n"
1074 " erange_cnt++;\n"
1075 "\\&\n"
1076 " /* Increment a byte at a time so we can see exactly\n"
1077 " what size buffer was required. */\n"
1078 "\\&\n"
1079 " size++;\n"
1080 "\\&\n"
1081 " if (size E<gt> MAX_BUF) {\n"
1082 " printf(\"Exceeded buffer limit (%d)\\[rs]n\", MAX_BUF);\n"
1083 " exit(EXIT_FAILURE);\n"
1084 " }\n"
1085 " }\n"
1086 " } while (s == ERANGE);\n"
1087 "\\&\n"
1088 " printf(\"getprotobyname_r() returned: %s (size=%d)\\[rs]n\",\n"
1089 " (s == 0) ? \"0 (success)\" : (s == ENOENT) ? \"ENOENT\" :\n"
1090 " strerror(s), size);\n"
1091 "\\&\n"
1092 " if (s != 0 || result == NULL) {\n"
1093 " printf(\"Call failed/record not found\\[rs]n\");\n"
1094 " exit(EXIT_FAILURE);\n"
1095 " }\n"
1096 "\\&\n"
1097 " printf(\"p_name=%s; p_proto=%d; aliases=\",\n"
1098 " result_buf.p_name, result_buf.p_proto);\n"
1099 " for (char **p = result_buf.p_aliases; *p != NULL; p++)\n"
1100 " printf(\"%s \", *p);\n"
1101 " printf(\"\\[rs]n\");\n"
1102 "\\&\n"
1103 " exit(EXIT_SUCCESS);\n"
1104 "}\n"
1105 msgstr ""
1106 "#define _GNU_SOURCE\n"
1107 "#include E<lt>ctype.hE<gt>\n"
1108 "#include E<lt>errno.hE<gt>\n"
1109 "#include E<lt>netdb.hE<gt>\n"
1110 "#include E<lt>stdio.hE<gt>\n"
1111 "#include E<lt>stdlib.hE<gt>\n"
1112 "#include E<lt>string.hE<gt>\n"
1113 "\\&\n"
1114 "#define MAX_BUF 10000\n"
1115 "\\&\n"
1116 "int\n"
1117 "main(int argc, char *argv[])\n"
1118 "{\n"
1119 " int size, erange_cnt, s;\n"
1120 " struct protoent result_buf;\n"
1121 " struct protoent *result;\n"
1122 " char buf[MAX_BUF];\n"
1123 "\\&\n"
1124 " if (argc E<lt> 2) {\n"
1125 " printf(\"Utilisation : %s proto-name [size]\\[rs]n\", argv[0]);\n"
1126 " exit(EXIT_FAILURE);\n"
1127 " }\n"
1128 "\\&\n"
1129 " size = 1024;\n"
1130 " if (argc E<gt> 2)\n"
1131 " size = atoi(argv[2]);\n"
1132 "\\&\n"
1133 " if (size E<gt> MAX_BUF) {\n"
1134 " printf(\"Dépassement de la limite du tampon (%d)\\[rs]n\", MAX_BUF);\n"
1135 " exit(EXIT_FAILURE);\n"
1136 " }\n"
1137 "\\&\n"
1138 " erange_cnt = 0;\n"
1139 " do {\n"
1140 " s = getprotobyname_r(argv[1], &result_buf,\n"
1141 " buf, size, &result);\n"
1142 " if (s == ERANGE) {\n"
1143 " if (erange_cnt == 0)\n"
1144 " printf(\"ERANGE ! Nouvelle tentative avec un tampon plus grand\\[rs]n\");\n"
1145 " erange_cnt++;\n"
1146 "\\&\n"
1147 " /* Incrémenter un octet à la fois pour pouvoir voir exactement\n"
1148 " la taille du tampon nécessaire. */\n"
1149 "\\&\n"
1150 " size++;\n"
1151 "\\&\n"
1152 " if (size E<gt> MAX_BUF) {\n"
1153 " printf(\"Dépassement de la limite du tampon (%d)\\[rs]n\", MAX_BUF);\n"
1154 " exit(EXIT_FAILURE);\n"
1155 " }\n"
1156 " }\n"
1157 " } while (s == ERANGE);\n"
1158 "\\&\n"
1159 " printf(\"getprotobyname_r() a renvoyé : %s (size=%d)\\[rs]n\",\n"
1160 " (s == 0) ? \"0 (success)\" : (s == ENOENT) ? \"ENOENT\" :\n"
1161 " strerror(s), size);\n"
1162 "\\&\n"
1163 " if (s != 0 || result == NULL) {\n"
1164 " printf(\"Appel échoué/enregistrement non trouvé\\[rs]n\");\n"
1165 " exit(EXIT_FAILURE);\n"
1166 " }\n"
1167 "\\&\n"
1168 " printf(\"p_name=%s; p_proto=%d; aliases=\",\n"
1169 " result_buf.p_name, result_buf.p_proto);\n"
1170 " for (char **p = result_buf.p_aliases; *p != NULL; p++)\n"
1171 " printf(\"%s \", *p);\n"
1172 " printf(\"\\[rs]n\");\n"
1173 "\\&\n"
1174 " exit(EXIT_SUCCESS);\n"
1175 "}\n"
1176
1177 #. type: TH
1178 #: mageia-cauldron
1179 #, no-wrap
1180 msgid "Linux man-pages 6.17"
1181 msgstr "Pages du manuel de Linux 6.17"
1182
1183 #. type: TH
1184 #: opensuse-leap-16-1 opensuse-tumbleweed
1185 #, no-wrap
1186 msgid "Linux man-pages (unreleased)"
1187 msgstr "Pages du manuel de Linux (non publiées)"