Debian Codegraph @

po/fr/man3/getservent_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-Pierre Giraud <[email protected]>, 2024-2025.
19 msgid ""
20 msgstr ""
21 "Project-Id-Version: manpages-l10n 4.21.0\n"
22 "POT-Creation-Date: 2026-06-05 06:26+0200\n"
23 "PO-Revision-Date: 2025-04-15 12:24+0200\n"
24 "Last-Translator: Jean-Pierre Giraud <[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 "getservent_r"
38 msgstr "getservent_r"
39
40 #. type: TH
41 #: archlinux debian-unstable opensuse-leap-16-1 opensuse-tumbleweed
42 #, no-wrap
43 msgid "2026-02-22"
44 msgstr "22 février 2026"
45
46 #. type: TH
47 #: archlinux debian-unstable
48 #, no-wrap
49 msgid "Linux man-pages 6.18"
50 msgstr "Pages du manuel de Linux 6.18"
51
52 #. type: SH
53 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
54 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
55 #, no-wrap
56 msgid "NAME"
57 msgstr "NOM"
58
59 #. type: Plain text
60 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
61 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
62 msgid ""
63 "getservent_r, getservbyname_r, getservbyport_r - get service entry "
64 "(reentrant)"
65 msgstr ""
66 "getservent_r, getservbyname_r, getservbyport_r – Accéder aux informations "
67 "sur les services (version réentrante)"
68
69 #. type: SH
70 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
71 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
72 #, no-wrap
73 msgid "LIBRARY"
74 msgstr "BIBLIOTHÈQUE"
75
76 #. type: Plain text
77 #: archlinux debian-unstable fedora-44 fedora-rawhide mageia-cauldron
78 #: opensuse-leap-16-1 opensuse-tumbleweed
79 msgid "Standard C library (I<libc>,\\ I<-lc>)"
80 msgstr "Bibliothèque C standard (I<libc>,\\ I<-lc>)"
81
82 #. type: SH
83 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
84 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
85 #, no-wrap
86 msgid "SYNOPSIS"
87 msgstr "SYNOPSIS"
88
89 #. type: Plain text
90 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
91 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
92 #, no-wrap
93 msgid "B<#include E<lt>netdb.hE<gt>>\n"
94 msgstr "B<#include E<lt>netdb.hE<gt>>\n"
95
96 #. type: Plain text
97 #: archlinux debian-unstable mageia-cauldron opensuse-leap-16-1
98 #: opensuse-tumbleweed
99 #, fuzzy, no-wrap
100 #| msgid ""
101 #| "B<int getservent_r(struct servent *restrict >I<result_buf>B<,>\n"
102 #| "B< char >I<buf>B<[restrict .>I<size>B<], size_t >I<size>B<,>\n"
103 #| "B< struct servent **restrict >I<result>B<);>\n"
104 #| "B<int getservbyname_r(const char *restrict >I<name>B<,>\n"
105 #| "B< const char *restrict >I<proto>B<,>\n"
106 #| "B< struct servent *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 servent **restrict >I<result>B<);>\n"
109 #| "B<int getservbyport_r(int >I<port>B<,>\n"
110 #| "B< const char *restrict >I<proto>B<,>\n"
111 #| "B< struct servent *restrict >I<result_buf>B<,>\n"
112 #| "B< char >I<buf>B<[restrict .>I<size>B<], size_t >I<size>B<,>\n"
113 #| "B< struct servent **restrict >I<result>B<);>\n"
114 msgid ""
115 "B<int getservent_r(>size_t size;\n"
116 "B< struct servent *restrict >I<result_buf>B<,>\n"
117 "B< char >I<buf>B<[restrict >I<size>B<], size_t >I<size>B<,>\n"
118 "B< struct servent **restrict >I<result>B<);>\n"
119 "B<int getservbyname_r(>size_t size;\n"
120 "B< const char *restrict >I<name>B<,>\n"
121 "B< const char *restrict >I<proto>B<,>\n"
122 "B< struct servent *restrict >I<result_buf>B<,>\n"
123 "B< char >I<buf>B<[restrict >I<size>B<], size_t >I<size>B<,>\n"
124 "B< struct servent **restrict >I<result>B<);>\n"
125 "B<int getservbyport_r(>size_t size;\n"
126 "B< int >I<port>B<,>\n"
127 "B< const char *restrict >I<proto>B<,>\n"
128 "B< struct servent *restrict >I<result_buf>B<,>\n"
129 "B< char >I<buf>B<[restrict >I<size>B<], size_t >I<size>B<,>\n"
130 "B< struct servent **restrict >I<result>B<);>\n"
131 msgstr ""
132 "B<int getservent_r(struct servent *restrict >I<result_buf>B<,>\n"
133 "B< char >I<buf>B<[restrict .>I<size>B<], size_t >I<size>B<,>\n"
134 "B< struct servent **restrict >I<result>B<);>\n"
135 "B<int getservbyname_r(const char *restrict >I<name>B<,>\n"
136 "B< const char *restrict >I<proto>B<,>\n"
137 "B< struct servent *restrict >I<result_buf>B<,>\n"
138 "B< char >I<buf>B<[restrict .>I<size>B<], size_t >I<size>B<,>\n"
139 "B< struct servent **restrict >I<result>B<);>\n"
140 "B<int getservbyport_r(int >I<port>B<,>\n"
141 "B< const char *restrict >I<proto>B<,>\n"
142 "B< struct servent *restrict >I<result_buf>B<,>\n"
143 "B< char >I<buf>B<[restrict .>I<size>B<], size_t >I<size>B<,>\n"
144 "B< struct servent **restrict >I<result>B<);>\n"
145
146 #. type: Plain text
147 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
148 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
149 msgid ""
150 "Feature Test Macro Requirements for glibc (see B<feature_test_macros>(7)):"
151 msgstr ""
152 "Exigences de macros de test de fonctionnalités pour la glibc (consulter "
153 "B<feature_test_macros>(7)) :"
154
155 #. type: Plain text
156 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
157 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
158 msgid "B<getservent_r>(), B<getservbyname_r>(), B<getservbyport_r>():"
159 msgstr "B<getservent_r>(), B<getservbyname_r>(), B<getservbyport_r>() :"
160
161 #. type: Plain text
162 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
163 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
164 #, no-wrap
165 msgid ""
166 " Since glibc 2.19:\n"
167 " _DEFAULT_SOURCE\n"
168 " glibc 2.19 and earlier:\n"
169 " _BSD_SOURCE || _SVID_SOURCE\n"
170 msgstr ""
171 " Depuis la glibc 2.19 :\n"
172 " _DEFAULT_SOURCE\n"
173 " glibc 2.19 et antérieures :\n"
174 " _BSD_SOURCE || _SVID_SOURCE\n"
175
176 #. type: SH
177 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
178 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
179 #, no-wrap
180 msgid "DESCRIPTION"
181 msgstr "DESCRIPTION"
182
183 #. type: Plain text
184 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
185 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
186 msgid ""
187 "The B<getservent_r>(), B<getservbyname_r>(), and B<getservbyport_r>() "
188 "functions are the reentrant equivalents of, respectively, B<getservent>(3), "
189 "B<getservbyname>(3), and B<getservbyport>(3). They differ in the way that "
190 "the I<servent> structure is returned, and in the function calling signature "
191 "and return value. This manual page describes just the differences from the "
192 "nonreentrant functions."
193 msgstr ""
194 "B<getservent_r>(), B<getservbyname_r>() et B<getservbyport_r>() sont "
195 "respectivement les versions réentrantes de B<getservent>(3), "
196 "B<getservbyname>(3) et B<getservbyport>(3). Elles diffèrent car la structure "
197 "I<servent> est renvoyée, les signatures et la valeur renvoyée sont aussi "
198 "différentes. Cette page de manuel décrit juste les différences depuis les "
199 "versions non réentrantes."
200
201 #. type: Plain text
202 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
203 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
204 msgid ""
205 "Instead of returning a pointer to a statically allocated I<servent> "
206 "structure as the function result, these functions copy the structure into "
207 "the location pointed to by I<result_buf>."
208 msgstr ""
209 "Au lieu de renvoyer un pointeur vers une structure I<servent> statiquement "
210 "allouée, ces fonctions copient la structure à l'adresse pointée par "
211 "I<result_buf>."
212
213 #. I can find no information on the required/recommended buffer size;
214 #. the nonreentrant functions use a 1024 byte buffer -- mtk.
215 #. type: Plain text
216 #: archlinux debian-unstable fedora-44 fedora-rawhide mageia-cauldron
217 #: opensuse-leap-16-1 opensuse-tumbleweed
218 msgid ""
219 "The I<buf> array is used to store the string fields pointed to by the "
220 "returned I<servent> structure. (The nonreentrant functions allocate these "
221 "strings in static storage.) The size of this array is specified in "
222 "I<size>. If I<buf> is too small, the call fails with the error B<ERANGE>, "
223 "and the caller must try again with a larger buffer. (A buffer of size 1024 "
224 "bytes should be sufficient for most applications.)"
225 msgstr ""
226 "Le tableau I<buf> est utilisé pour sauvegarder les champs de la chaîne "
227 "pointée par la structure I<servent> renvoyée (les fonctions non réentrantes "
228 "allouent ces chaînes de façon statique). La taille du tableau est indiquée "
229 "avec I<size>. Si I<buf> est trop petit, l'appel échoue avec l'erreur "
230 "B<ERANGE>, et l'appelant doit essayer de nouveau avec un tableau plus grand "
231 "(un tampon de 1024 octets est en général suffisant)."
232
233 #. type: Plain text
234 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
235 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
236 msgid ""
237 "If the function call successfully obtains a service record, then I<*result> "
238 "is set pointing to I<result_buf>; otherwise, I<*result> is set to NULL."
239 msgstr ""
240 "Si la fonction réussie à obtenir un enregistrement de service, alors "
241 "I<*result> pointe vers I<result_buf>, sinon I<*result> est défini à NULL."
242
243 #. type: SH
244 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
245 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
246 #, no-wrap
247 msgid "RETURN VALUE"
248 msgstr "VALEUR RENVOYÉE"
249
250 #. type: Plain text
251 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
252 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
253 msgid ""
254 "On success, these functions return 0. On error, they return one of the "
255 "positive error numbers listed in errors."
256 msgstr ""
257 "En cas de succès, ces fonctions renvoient zéro. En cas d'erreur, une valeur "
258 "d'erreur positive listée dans ERREURS est renvoyée."
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 "On error, record not found (B<getservbyname_r>(), B<getservbyport_r>()), or "
265 "end of input (B<getservent_r>()) I<result> is set to NULL."
266 msgstr ""
267 "En cas d'erreur, «\\ enregistrement non trouvé\\ » (B<getservbyname_r>(), "
268 "B<getservbyport_r>()) ou «\\ fin de l'entrée\\ » (B<getservent_r>()), "
269 "I<result> est défini à NULL."
270
271 #. type: SH
272 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
273 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
274 #, no-wrap
275 msgid "ERRORS"
276 msgstr "ERREURS"
277
278 #. type: TP
279 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
280 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
281 #, no-wrap
282 msgid "B<ENOENT>"
283 msgstr "B<ENOENT>"
284
285 #. type: Plain text
286 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
287 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
288 msgid "(B<getservent_r>()) No more records in database."
289 msgstr "(B<getservent_r>()) Plus d'enregistrement dans la base de données."
290
291 #. type: TP
292 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
293 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
294 #, no-wrap
295 msgid "B<ERANGE>"
296 msgstr "B<ERANGE>"
297
298 #. type: Plain text
299 #: archlinux debian-unstable fedora-44 fedora-rawhide mageia-cauldron
300 #: opensuse-leap-16-1 opensuse-tumbleweed
301 msgid ""
302 "I<buf> is too small. Try again with a larger buffer (and increased I<size>)."
303 msgstr ""
304 "I<buf> est trop petit. Réessayer avec un tampon plus grand (et augmentez "
305 "I<size>)."
306
307 #. type: SH
308 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
309 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
310 #, no-wrap
311 msgid "ATTRIBUTES"
312 msgstr "ATTRIBUTS"
313
314 #. type: Plain text
315 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
316 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
317 msgid ""
318 "For an explanation of the terms used in this section, see B<attributes>(7)."
319 msgstr ""
320 "Pour une explication des termes utilisés dans cette section, consulter "
321 "B<attributes>(7)."
322
323 #. type: tbl table
324 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
325 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
326 #, no-wrap
327 msgid "Interface"
328 msgstr "Interface"
329
330 #. type: tbl table
331 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
332 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
333 #, no-wrap
334 msgid "Attribute"
335 msgstr "Attribut"
336
337 #. type: tbl table
338 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
339 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
340 #, no-wrap
341 msgid "Value"
342 msgstr "Valeur"
343
344 #. type: tbl table
345 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
346 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
347 #, no-wrap
348 msgid ".na\n"
349 msgstr ".na\n"
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 ".nh\n"
356 msgstr ".nh\n"
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 ""
363 "B<getservent_r>(),\n"
364 "B<getservbyname_r>(),\n"
365 "B<getservbyport_r>()"
366 msgstr ""
367 "B<getservent_r>(),\n"
368 "B<getservbyname_r>(),\n"
369 "B<getservbyport_r>()"
370
371 #. type: tbl table
372 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
373 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
374 #, no-wrap
375 msgid "Thread safety"
376 msgstr "Sécurité des threads"
377
378 #. type: tbl table
379 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
380 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
381 #, no-wrap
382 msgid "MT-Safe locale"
383 msgstr "MT-Safe locale"
384
385 #. type: SH
386 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
387 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
388 #, no-wrap
389 msgid "VERSIONS"
390 msgstr "VERSIONS"
391
392 #. type: Plain text
393 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
394 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
395 msgid ""
396 "Functions with similar names exist on some other systems, though typically "
397 "with different calling signatures."
398 msgstr ""
399 "Des fonctions avec des noms similaires existent sur d'autres systèmes, bien "
400 "qu’en général avec des signatures d'appel différentes."
401
402 #. type: SH
403 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
404 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
405 #, no-wrap
406 msgid "STANDARDS"
407 msgstr "NORMES"
408
409 #. type: Plain text
410 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
411 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
412 msgid "GNU."
413 msgstr "GNU."
414
415 #. type: SH
416 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
417 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
418 #, no-wrap
419 msgid "EXAMPLES"
420 msgstr "EXEMPLES"
421
422 #. type: Plain text
423 #: archlinux debian-unstable fedora-44 fedora-rawhide mageia-cauldron
424 #: opensuse-leap-16-1 opensuse-tumbleweed
425 msgid ""
426 "The program below uses B<getservbyport_r>() to retrieve the service record "
427 "for the port and protocol named in its first command-line argument. If a "
428 "third (integer) command-line argument is supplied, it is used as the initial "
429 "value for I<size>; if B<getservbyport_r>() fails with the error B<ERANGE>, "
430 "the program retries with larger buffer sizes. The following shell session "
431 "shows a couple of sample runs:"
432 msgstr ""
433 "Le programme ci-dessous utilise B<getservbyport_r>() pour récupérer "
434 "l'enregistrement du port et du protocole nommé dans les deux premiers "
435 "arguments de sa ligne de commande. Si un troisième argument (un entier) est "
436 "fourni, il est utilisé comme valeur initiale de I<size>. Si "
437 "B<getservbyport_r>() échoue avec l'erreur B<ERANGE>, le programme recommence "
438 "avec une taille de tampon plus grande. La session shell suivante montre des "
439 "exemples d'utilisation. "
440
441 #. type: Plain text
442 #: archlinux debian-unstable fedora-44 fedora-rawhide mageia-cauldron
443 #: opensuse-leap-16-1 opensuse-tumbleweed
444 #, no-wrap
445 msgid ""
446 "$B< ./a.out 7 tcp 1>\n"
447 "ERANGE! Retrying with larger buffer\n"
448 "getservbyport_r() returned: 0 (success) (size=87)\n"
449 "s_name=echo; s_proto=tcp; s_port=7; aliases=\n"
450 "$B< ./a.out 77777 tcp>\n"
451 "getservbyport_r() returned: 0 (success) (size=1024)\n"
452 "Call failed/record not found\n"
453 msgstr ""
454 "$B< ./a.out 7 tcp 1>\n"
455 "ERANGE ! Nouvel essai avec un tampon plus grand\n"
456 "getservbyport_r() returned: 0 (succès) (size=87)\n"
457 "s_name=echo; s_proto=tcp; s_port=7; aliases=\n"
458 "$B< ./a.out 77777 tcp>\n"
459 "getservbyport_r() renvoyé: 0 (succès) (size=1024)\n"
460 "Échec appel/enregistrement non trouvé\n"
461
462 #. type: SS
463 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
464 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
465 #, no-wrap
466 msgid "Program source"
467 msgstr "Source du programme"
468
469 #. type: Plain text
470 #: archlinux debian-unstable opensuse-leap-16-1 opensuse-tumbleweed
471 #, fuzzy, no-wrap
472 #| msgid ""
473 #| "#define _GNU_SOURCE\n"
474 #| "#include E<lt>ctype.hE<gt>\n"
475 #| "#include E<lt>errno.hE<gt>\n"
476 #| "#include E<lt>netdb.hE<gt>\n"
477 #| "#include E<lt>stdio.hE<gt>\n"
478 #| "#include E<lt>stdlib.hE<gt>\n"
479 #| "#include E<lt>string.hE<gt>\n"
480 #| "\\&\n"
481 #| "#define MAX_BUF 10000\n"
482 #| "\\&\n"
483 #| "int\n"
484 #| "main(int argc, char *argv[])\n"
485 #| "{\n"
486 #| " int size, erange_cnt, port, s;\n"
487 #| " struct servent result_buf;\n"
488 #| " struct servent *result;\n"
489 #| " char buf[MAX_BUF];\n"
490 #| " char *protop;\n"
491 #| "\\&\n"
492 #| " if (argc E<lt> 3) {\n"
493 #| " printf(\"Usage: %s port-num proto-name [size]\\[rs]n\", argv[0]);\n"
494 #| " exit(EXIT_FAILURE);\n"
495 #| " }\n"
496 #| "\\&\n"
497 #| " port = htons(atoi(argv[1]));\n"
498 #| " protop = (strcmp(argv[2], \"null\") == 0 ||\n"
499 #| " strcmp(argv[2], \"NULL\") == 0) ? NULL : argv[2];\n"
500 #| "\\&\n"
501 #| " size = 1024;\n"
502 #| " if (argc E<gt> 3)\n"
503 #| " size = atoi(argv[3]);\n"
504 #| "\\&\n"
505 #| " if (size E<gt> MAX_BUF) {\n"
506 #| " printf(\"Exceeded buffer limit (%d)\\[rs]n\", MAX_BUF);\n"
507 #| " exit(EXIT_FAILURE);\n"
508 #| " }\n"
509 #| "\\&\n"
510 #| " erange_cnt = 0;\n"
511 #| " do {\n"
512 #| " s = getservbyport_r(port, protop, &result_buf,\n"
513 #| " buf, size, &result);\n"
514 #| " if (s == ERANGE) {\n"
515 #| " if (erange_cnt == 0)\n"
516 #| " printf(\"ERANGE! Retrying with larger buffer\\[rs]n\");\n"
517 #| " erange_cnt++;\n"
518 #| "\\&\n"
519 #| " /* Increment a byte at a time so we can see exactly\n"
520 #| " what size buffer was required. */\n"
521 #| "\\&\n"
522 #| " size++;\n"
523 #| "\\&\n"
524 #| " if (size E<gt> MAX_BUF) {\n"
525 #| " printf(\"Exceeded buffer limit (%d)\\[rs]n\", MAX_BUF);\n"
526 #| " exit(EXIT_FAILURE);\n"
527 #| " }\n"
528 #| " }\n"
529 #| " } while (s == ERANGE);\n"
530 #| "\\&\n"
531 #| " printf(\"getservbyport_r() returned: %s (size=%d)\\[rs]n\",\n"
532 #| " (s == 0) ? \"0 (success)\" : (s == ENOENT) ? \"ENOENT\" :\n"
533 #| " strerror(s), size);\n"
534 #| "\\&\n"
535 #| " if (s != 0 || result == NULL) {\n"
536 #| " printf(\"Call failed/record not found\\[rs]n\");\n"
537 #| " exit(EXIT_FAILURE);\n"
538 #| " }\n"
539 #| "\\&\n"
540 #| " printf(\"s_name=%s; s_proto=%s; s_port=%d; aliases=\",\n"
541 #| " result_buf.s_name, result_buf.s_proto,\n"
542 #| " ntohs(result_buf.s_port));\n"
543 #| " for (char **p = result_buf.s_aliases; *p != NULL; p++)\n"
544 #| " printf(\"%s \", *p);\n"
545 #| " printf(\"\\[rs]n\");\n"
546 #| "\\&\n"
547 #| " exit(EXIT_SUCCESS);\n"
548 #| "}\n"
549 msgid ""
550 "#define _GNU_SOURCE\n"
551 "#include E<lt>ctype.hE<gt>\n"
552 "#include E<lt>errno.hE<gt>\n"
553 "#include E<lt>netdb.hE<gt>\n"
554 "#include E<lt>stdio.hE<gt>\n"
555 "#include E<lt>stdlib.hE<gt>\n"
556 "#include E<lt>string.hE<gt>\n"
557 "\\&\n"
558 "#define MAX_BUF 10000\n"
559 "\\&\n"
560 "#define streq(...) (strcmp(__VA_ARGS__) == 0)\n"
561 "\\&\n"
562 "int\n"
563 "main(int argc, char *argv[])\n"
564 "{\n"
565 " int size, erange_cnt, port, s;\n"
566 " struct servent result_buf;\n"
567 " struct servent *result;\n"
568 " char buf[MAX_BUF];\n"
569 " char *protop;\n"
570 "\\&\n"
571 " if (argc E<lt> 3) {\n"
572 " printf(\"Usage: %s port-num proto-name [size]\\[rs]n\", argv[0]);\n"
573 " exit(EXIT_FAILURE);\n"
574 " }\n"
575 "\\&\n"
576 " port = htons(atoi(argv[1]));\n"
577 " protop = (streq(argv[2], \"null\") ||\n"
578 " streq(argv[2], \"NULL\")) ? NULL : argv[2];\n"
579 "\\&\n"
580 " size = 1024;\n"
581 " if (argc E<gt> 3)\n"
582 " size = atoi(argv[3]);\n"
583 "\\&\n"
584 " if (size E<gt> MAX_BUF) {\n"
585 " printf(\"Exceeded buffer limit (%d)\\[rs]n\", MAX_BUF);\n"
586 " exit(EXIT_FAILURE);\n"
587 " }\n"
588 "\\&\n"
589 " erange_cnt = 0;\n"
590 " do {\n"
591 " s = getservbyport_r(port, protop, &result_buf,\n"
592 " buf, size, &result);\n"
593 " if (s == ERANGE) {\n"
594 " if (erange_cnt == 0)\n"
595 " printf(\"ERANGE! Retrying with larger buffer\\[rs]n\");\n"
596 " erange_cnt++;\n"
597 "\\&\n"
598 " /* Increment a byte at a time so we can see exactly\n"
599 " what size buffer was required. */\n"
600 "\\&\n"
601 " size++;\n"
602 "\\&\n"
603 " if (size E<gt> MAX_BUF) {\n"
604 " printf(\"Exceeded buffer limit (%d)\\[rs]n\", MAX_BUF);\n"
605 " exit(EXIT_FAILURE);\n"
606 " }\n"
607 " }\n"
608 " } while (s == ERANGE);\n"
609 "\\&\n"
610 " printf(\"getservbyport_r() returned: %s (size=%d)\\[rs]n\",\n"
611 " (s == 0) ? \"0 (success)\" : (s == ENOENT) ? \"ENOENT\" :\n"
612 " strerror(s), size);\n"
613 "\\&\n"
614 " if (s != 0 || result == NULL) {\n"
615 " printf(\"Call failed/record not found\\[rs]n\");\n"
616 " exit(EXIT_FAILURE);\n"
617 " }\n"
618 "\\&\n"
619 " printf(\"s_name=%s; s_proto=%s; s_port=%d; aliases=\",\n"
620 " result_buf.s_name, result_buf.s_proto,\n"
621 " ntohs(result_buf.s_port));\n"
622 " for (char **p = result_buf.s_aliases; *p != NULL; p++)\n"
623 " printf(\"%s \", *p);\n"
624 " printf(\"\\[rs]n\");\n"
625 "\\&\n"
626 " exit(EXIT_SUCCESS);\n"
627 "}\n"
628 msgstr ""
629 "#define _GNU_SOURCE\n"
630 "#include E<lt>ctype.hE<gt>\n"
631 "#include E<lt>errno.hE<gt>\n"
632 "#include E<lt>netdb.hE<gt>\n"
633 "#include E<lt>stdio.hE<gt>\n"
634 "#include E<lt>stdlib.hE<gt>\n"
635 "#include E<lt>string.hE<gt>\n"
636 "\\&\n"
637 "#define MAX_BUF 10000\n"
638 "\\&\n"
639 "int\n"
640 "main(int argc, char *argv[])\n"
641 "{\n"
642 " int size, erange_cnt, port, s;\n"
643 " struct servent result_buf;\n"
644 " struct servent *result;\n"
645 " char buf[MAX_BUF];\n"
646 " char *protop;\n"
647 "\\&\n"
648 " if (argc E<lt> 3) {\n"
649 " printf(\"Utilisation : %s port-num proto-name [size]\\[rs]n\", argv[0]);\n"
650 " exit(EXIT_FAILURE);\n"
651 " }\n"
652 "\\&\n"
653 " port = htons(atoi(argv[1]));\n"
654 " protop = (strcmp(argv[2], \"null\") == 0 ||\n"
655 " strcmp(argv[2], \"NULL\") == 0) ? NULL : argv[2];\n"
656 "\\&\n"
657 " size = 1024;\n"
658 " if (argc E<gt> 3)\n"
659 " size = atoi(argv[3]);\n"
660 "\\&\n"
661 " if (size E<gt> MAX_BUF) {\n"
662 " printf(\"limite du tampon dépassée (%d)\\[rs]n\", MAX_BUF);\n"
663 " exit(EXIT_FAILURE);\n"
664 " }\n"
665 "\\&\n"
666 " erange_cnt = 0;\n"
667 " do {\n"
668 " s = getservbyport_r(port, protop, &result_buf,\n"
669 " buf, size, &result);\n"
670 " if (s == ERANGE) {\n"
671 " if (erange_cnt == 0)\n"
672 " printf(\"ERANGE ! Nouvel essai avec un tampon plus grand\\[rs]n\");\n"
673 " erange_cnt++;\n"
674 "\\&\n"
675 " /* Incrémenter un octet à la fois pour pouvoir voir\n"
676 " exactement la taille du tampon nécessaire. */\n"
677 "\\&\n"
678 " size++;\n"
679 "\\&\n"
680 " if (size E<gt> MAX_BUF) {\n"
681 " printf(\"limite du tampon dépassée (%d)\\[rs]n\", MAX_BUF);\n"
682 " exit(EXIT_FAILURE);\n"
683 " }\n"
684 " }\n"
685 " } while (s == ERANGE);\n"
686 "\\&\n"
687 " printf(\"getservbyport_r() renvoyé : %s (size=%d)\\[rs]n\",\n"
688 " (s == 0) ? \"0 (succès)\" : (s == ENOENT) ? \"ENOENT\" :\n"
689 " strerror(s), size);\n"
690 "\\&\n"
691 " if (s != 0 || result == NULL) {\n"
692 " printf(\"Échec appel/enregistrement non trouvé\\[rs]n\");\n"
693 " exit(EXIT_FAILURE);\n"
694 " }\n"
695 "\\&\n"
696 " printf(\"s_name=%s; s_proto=%s; s_port=%d; aliases=\",\n"
697 " result_buf.s_name, result_buf.s_proto,\n"
698 " ntohs(result_buf.s_port));\n"
699 " for (char **p = result_buf.s_aliases; *p != NULL; p++)\n"
700 " printf(\"%s \", *p);\n"
701 " printf(\"\\[rs]n\");\n"
702 "\\&\n"
703 " exit(EXIT_SUCCESS);\n"
704 "}\n"
705
706 #. SRC END
707 #. type: SH
708 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
709 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
710 #, no-wrap
711 msgid "SEE ALSO"
712 msgstr "VOIR AUSSI"
713
714 #. type: Plain text
715 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
716 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
717 msgid "B<getservent>(3), B<services>(5)"
718 msgstr "B<getservent>(3), B<services>(5)"
719
720 #. type: TH
721 #: debian-trixie
722 #, no-wrap
723 msgid "2024-06-15"
724 msgstr "15 juin 2024"
725
726 #. type: TH
727 #: debian-trixie
728 #, no-wrap
729 msgid "Linux man-pages 6.9.1"
730 msgstr "Pages du manuel de Linux 6.9.1"
731
732 #. type: Plain text
733 #: debian-trixie
734 msgid "Standard C library (I<libc>, I<-lc>)"
735 msgstr "Bibliothèque C standard (I<libc>, I<-lc>)"
736
737 #. type: Plain text
738 #: debian-trixie
739 #, no-wrap
740 msgid ""
741 "B<int getservent_r(struct servent *restrict >I<result_buf>B<,>\n"
742 "B< char >I<buf>B<[restrict .>I<buflen>B<], size_t >I<buflen>B<,>\n"
743 "B< struct servent **restrict >I<result>B<);>\n"
744 "B<int getservbyname_r(const char *restrict >I<name>B<,>\n"
745 "B< const char *restrict >I<proto>B<,>\n"
746 "B< struct servent *restrict >I<result_buf>B<,>\n"
747 "B< char >I<buf>B<[restrict .>I<buflen>B<], size_t >I<buflen>B<,>\n"
748 "B< struct servent **restrict >I<result>B<);>\n"
749 "B<int getservbyport_r(int >I<port>B<,>\n"
750 "B< const char *restrict >I<proto>B<,>\n"
751 "B< struct servent *restrict >I<result_buf>B<,>\n"
752 "B< char >I<buf>B<[restrict .>I<buflen>B<], size_t >I<buflen>B<,>\n"
753 "B< struct servent **restrict >I<result>B<);>\n"
754 msgstr ""
755 "B<int getservent_r(struct servent *restrict >I<result_buf>B<,>\n"
756 "B< char >I<buf>B<[restrict .>I<buflen>B<], size_t >I<buflen>B<,>\n"
757 "B< struct servent **restrict >I<result>B<);>\n"
758 "B<int getservbyname_r(const char *restrict >I<name>B<,>\n"
759 "B< const char *restrict >I<proto>B<,>\n"
760 "B< struct servent *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 servent **restrict >I<result>B<);>\n"
763 "B<int getservbyport_r(int >I<port>B<,>\n"
764 "B< const char *restrict >I<proto>B<,>\n"
765 "B< struct servent *restrict >I<result_buf>B<,>\n"
766 "B< char >I<buf>B<[restrict .>I<buflen>B<], size_t >I<buflen>B<,>\n"
767 "B< struct servent **restrict >I<result>B<);>\n"
768
769 #. I can find no information on the required/recommended buffer size;
770 #. the nonreentrant functions use a 1024 byte buffer -- mtk.
771 #. type: Plain text
772 #: debian-trixie
773 msgid ""
774 "The I<buf> array is used to store the string fields pointed to by the "
775 "returned I<servent> structure. (The nonreentrant functions allocate these "
776 "strings in static storage.) The size of this array is specified in "
777 "I<buflen>. If I<buf> is too small, the call fails with the error B<ERANGE>, "
778 "and the caller must try again with a larger buffer. (A buffer of length "
779 "1024 bytes should be sufficient for most applications.)"
780 msgstr ""
781 "Le tableau I<buf> est utilisé pour sauvegarder les champs de la chaîne "
782 "pointée par la structure I<servent> renvoyée (les fonctions non réentrantes "
783 "allouent ces chaînes de façon statique). La taille du tableau est indiquée "
784 "avec I<buflen>. Si I<buf> est trop petit, l'appel échoue avec l'erreur "
785 "B<ERANGE>, et l'appelant doit essayer de nouveau avec un tableau plus grand "
786 "(un tableau de 1024 octets est en général suffisant)."
787
788 #. type: Plain text
789 #: debian-trixie
790 msgid ""
791 "I<buf> is too small. Try again with a larger buffer (and increased "
792 "I<buflen>)."
793 msgstr ""
794 "I<buf> est trop petit. Réessayer avec un tampon plus grand (et augmentez "
795 "I<buflen>)."
796
797 #. type: Plain text
798 #: debian-trixie
799 msgid ""
800 "The program below uses B<getservbyport_r>() to retrieve the service record "
801 "for the port and protocol named in its first command-line argument. If a "
802 "third (integer) command-line argument is supplied, it is used as the initial "
803 "value for I<buflen>; if B<getservbyport_r>() fails with the error "
804 "B<ERANGE>, the program retries with larger buffer sizes. The following "
805 "shell session shows a couple of sample runs:"
806 msgstr ""
807 "Le programme ci-dessous utilise B<getservbyport_r>() pour récupérer "
808 "l'enregistrement du port et du protocole nommé dans les deux premiers "
809 "arguments de sa ligne de commande. Si un troisième argument (un entier) est "
810 "fourni, il est utilisé comme valeur initiale de I<buflen>. Si "
811 "B<getservbyport_r>() échoue avec l'erreur B<ERANGE>, le programme recommence "
812 "avec une taille de tampon plus grande. La session shell suivante montre des "
813 "exemples d'utilisation. "
814
815 #. type: Plain text
816 #: debian-trixie
817 #, no-wrap
818 msgid ""
819 "$B< ./a.out 7 tcp 1>\n"
820 "ERANGE! Retrying with larger buffer\n"
821 "getservbyport_r() returned: 0 (success) (buflen=87)\n"
822 "s_name=echo; s_proto=tcp; s_port=7; aliases=\n"
823 "$B< ./a.out 77777 tcp>\n"
824 "getservbyport_r() returned: 0 (success) (buflen=1024)\n"
825 "Call failed/record not found\n"
826 msgstr ""
827 "$B< ./a.out 7 tcp 1>\n"
828 "ERANGE ! Nouvel essai avec un tampon plus grand\n"
829 "getservbyport_r() returned: 0 (succès) (buflen=87)\n"
830 "s_name=echo; s_proto=tcp; s_port=7; aliases=\n"
831 "$B< ./a.out 77777 tcp>\n"
832 "getservbyport_r() renvoyé: 0 (succès) (buflen=1024)\n"
833 "Échec appel/enregistrement non trouvé\n"
834
835 #. type: Plain text
836 #: debian-trixie
837 #, no-wrap
838 msgid ""
839 "#define _GNU_SOURCE\n"
840 "#include E<lt>ctype.hE<gt>\n"
841 "#include E<lt>errno.hE<gt>\n"
842 "#include E<lt>netdb.hE<gt>\n"
843 "#include E<lt>stdio.hE<gt>\n"
844 "#include E<lt>stdlib.hE<gt>\n"
845 "#include E<lt>string.hE<gt>\n"
846 "\\&\n"
847 "#define MAX_BUF 10000\n"
848 "\\&\n"
849 "int\n"
850 "main(int argc, char *argv[])\n"
851 "{\n"
852 " int buflen, erange_cnt, port, s;\n"
853 " struct servent result_buf;\n"
854 " struct servent *result;\n"
855 " char buf[MAX_BUF];\n"
856 " char *protop;\n"
857 "\\&\n"
858 " if (argc E<lt> 3) {\n"
859 " printf(\"Usage: %s port-num proto-name [buflen]\\[rs]n\", argv[0]);\n"
860 " exit(EXIT_FAILURE);\n"
861 " }\n"
862 "\\&\n"
863 " port = htons(atoi(argv[1]));\n"
864 " protop = (strcmp(argv[2], \"null\") == 0 ||\n"
865 " strcmp(argv[2], \"NULL\") == 0) ? NULL : argv[2];\n"
866 "\\&\n"
867 " buflen = 1024;\n"
868 " if (argc E<gt> 3)\n"
869 " buflen = atoi(argv[3]);\n"
870 "\\&\n"
871 " if (buflen E<gt> MAX_BUF) {\n"
872 " printf(\"Exceeded buffer limit (%d)\\[rs]n\", MAX_BUF);\n"
873 " exit(EXIT_FAILURE);\n"
874 " }\n"
875 "\\&\n"
876 " erange_cnt = 0;\n"
877 " do {\n"
878 " s = getservbyport_r(port, protop, &result_buf,\n"
879 " buf, buflen, &result);\n"
880 " if (s == ERANGE) {\n"
881 " if (erange_cnt == 0)\n"
882 " printf(\"ERANGE! Retrying with larger buffer\\[rs]n\");\n"
883 " erange_cnt++;\n"
884 "\\&\n"
885 " /* Increment a byte at a time so we can see exactly\n"
886 " what size buffer was required. */\n"
887 "\\&\n"
888 " buflen++;\n"
889 "\\&\n"
890 " if (buflen E<gt> MAX_BUF) {\n"
891 " printf(\"Exceeded buffer limit (%d)\\[rs]n\", MAX_BUF);\n"
892 " exit(EXIT_FAILURE);\n"
893 " }\n"
894 " }\n"
895 " } while (s == ERANGE);\n"
896 "\\&\n"
897 " printf(\"getservbyport_r() returned: %s (buflen=%d)\\[rs]n\",\n"
898 " (s == 0) ? \"0 (success)\" : (s == ENOENT) ? \"ENOENT\" :\n"
899 " strerror(s), buflen);\n"
900 "\\&\n"
901 " if (s != 0 || result == NULL) {\n"
902 " printf(\"Call failed/record not found\\[rs]n\");\n"
903 " exit(EXIT_FAILURE);\n"
904 " }\n"
905 "\\&\n"
906 " printf(\"s_name=%s; s_proto=%s; s_port=%d; aliases=\",\n"
907 " result_buf.s_name, result_buf.s_proto,\n"
908 " ntohs(result_buf.s_port));\n"
909 " for (char **p = result_buf.s_aliases; *p != NULL; p++)\n"
910 " printf(\"%s \", *p);\n"
911 " printf(\"\\[rs]n\");\n"
912 "\\&\n"
913 " exit(EXIT_SUCCESS);\n"
914 "}\n"
915 msgstr ""
916 "#define _GNU_SOURCE\n"
917 "#include E<lt>ctype.hE<gt>\n"
918 "#include E<lt>errno.hE<gt>\n"
919 "#include E<lt>netdb.hE<gt>\n"
920 "#include E<lt>stdio.hE<gt>\n"
921 "#include E<lt>stdlib.hE<gt>\n"
922 "#include E<lt>string.hE<gt>\n"
923 "\\&\n"
924 "#define MAX_BUF 10000\n"
925 "\\&\n"
926 "int\n"
927 "main(int argc, char *argv[])\n"
928 "{\n"
929 " int buflen, erange_cnt, port, s;\n"
930 " struct servent result_buf;\n"
931 " struct servent *result;\n"
932 " char buf[MAX_BUF];\n"
933 " char *protop;\n"
934 "\\&\n"
935 " if (argc E<lt> 3) {\n"
936 " printf(\"Utilisation : %s port-num proto-name [buflen]\\[rs]n\", argv[0]);\n"
937 " exit(EXIT_FAILURE);\n"
938 " }\n"
939 "\\&\n"
940 " port = htons(atoi(argv[1]));\n"
941 " protop = (strcmp(argv[2], \"null\") == 0 ||\n"
942 " strcmp(argv[2], \"NULL\") == 0) ? NULL : argv[2];\n"
943 "\\&\n"
944 " buflen = 1024;\n"
945 " if (argc E<gt> 3)\n"
946 " buflen = atoi(argv[3]);\n"
947 "\\&\n"
948 " if (buflen E<gt> MAX_BUF) {\n"
949 " printf(\"limite du tampon dépassée (%d)\\[rs]n\", MAX_BUF);\n"
950 " exit(EXIT_FAILURE);\n"
951 " }\n"
952 "\\&\n"
953 " erange_cnt = 0;\n"
954 " do {\n"
955 " s = getservbyport_r(port, protop, &result_buf,\n"
956 " buf, buflen, &result);\n"
957 " if (s == ERANGE) {\n"
958 " if (erange_cnt == 0)\n"
959 " printf(\"ERANGE ! Nouvel essai avec un tampon plus grand\\[rs]n\");\n"
960 " erange_cnt++;\n"
961 "\\&\n"
962 " /* Incrémenter un octet à la fois pour pouvoir voir\n"
963 " exactement la taille du tampon nécessaire. */\n"
964 "\\&\n"
965 " buflen++;\n"
966 "\\&\n"
967 " if (buflen E<gt> MAX_BUF) {\n"
968 " printf(\"limite du tampon dépassée (%d)\\[rs]n\", MAX_BUF);\n"
969 " exit(EXIT_FAILURE);\n"
970 " }\n"
971 " }\n"
972 " } while (s == ERANGE);\n"
973 "\\&\n"
974 " printf(\"getservbyport_r() renvoyé : %s (buflen=%d)\\[rs]n\",\n"
975 " (s == 0) ? \"0 (succès)\" : (s == ENOENT) ? \"ENOENT\" :\n"
976 " strerror(s), buflen);\n"
977 "\\&\n"
978 " if (s != 0 || result == NULL) {\n"
979 " printf(\"Échec appel/enregistrement non trouvé\\[rs]n\");\n"
980 " exit(EXIT_FAILURE);\n"
981 " }\n"
982 "\\&\n"
983 " printf(\"s_name=%s; s_proto=%s; s_port=%d; aliases=\",\n"
984 " result_buf.s_name, result_buf.s_proto,\n"
985 " ntohs(result_buf.s_port));\n"
986 " for (char **p = result_buf.s_aliases; *p != NULL; p++)\n"
987 " printf(\"%s \", *p);\n"
988 " printf(\"\\[rs]n\");\n"
989 "\\&\n"
990 " exit(EXIT_SUCCESS);\n"
991 "}\n"
992
993 #. type: TH
994 #: fedora-44 fedora-rawhide
995 #, no-wrap
996 msgid "2024-12-24"
997 msgstr "24 décembre 2024"
998
999 #. type: TH
1000 #: fedora-44 fedora-rawhide
1001 #, no-wrap
1002 msgid "Linux man-pages 6.13"
1003 msgstr "Pages du manuel de Linux 6.13"
1004
1005 #. type: Plain text
1006 #: fedora-44 fedora-rawhide
1007 #, no-wrap
1008 msgid ""
1009 "B<int getservent_r(struct servent *restrict >I<result_buf>B<,>\n"
1010 "B< char >I<buf>B<[restrict .>I<size>B<], size_t >I<size>B<,>\n"
1011 "B< struct servent **restrict >I<result>B<);>\n"
1012 "B<int getservbyname_r(const char *restrict >I<name>B<,>\n"
1013 "B< const char *restrict >I<proto>B<,>\n"
1014 "B< struct servent *restrict >I<result_buf>B<,>\n"
1015 "B< char >I<buf>B<[restrict .>I<size>B<], size_t >I<size>B<,>\n"
1016 "B< struct servent **restrict >I<result>B<);>\n"
1017 "B<int getservbyport_r(int >I<port>B<,>\n"
1018 "B< const char *restrict >I<proto>B<,>\n"
1019 "B< struct servent *restrict >I<result_buf>B<,>\n"
1020 "B< char >I<buf>B<[restrict .>I<size>B<], size_t >I<size>B<,>\n"
1021 "B< struct servent **restrict >I<result>B<);>\n"
1022 msgstr ""
1023 "B<int getservent_r(struct servent *restrict >I<result_buf>B<,>\n"
1024 "B< char >I<buf>B<[restrict .>I<size>B<], size_t >I<size>B<,>\n"
1025 "B< struct servent **restrict >I<result>B<);>\n"
1026 "B<int getservbyname_r(const char *restrict >I<name>B<,>\n"
1027 "B< const char *restrict >I<proto>B<,>\n"
1028 "B< struct servent *restrict >I<result_buf>B<,>\n"
1029 "B< char >I<buf>B<[restrict .>I<size>B<], size_t >I<size>B<,>\n"
1030 "B< struct servent **restrict >I<result>B<);>\n"
1031 "B<int getservbyport_r(int >I<port>B<,>\n"
1032 "B< const char *restrict >I<proto>B<,>\n"
1033 "B< struct servent *restrict >I<result_buf>B<,>\n"
1034 "B< char >I<buf>B<[restrict .>I<size>B<], size_t >I<size>B<,>\n"
1035 "B< struct servent **restrict >I<result>B<);>\n"
1036
1037 #. type: Plain text
1038 #: fedora-44 fedora-rawhide
1039 #, no-wrap
1040 msgid ""
1041 "#define _GNU_SOURCE\n"
1042 "#include E<lt>ctype.hE<gt>\n"
1043 "#include E<lt>errno.hE<gt>\n"
1044 "#include E<lt>netdb.hE<gt>\n"
1045 "#include E<lt>stdio.hE<gt>\n"
1046 "#include E<lt>stdlib.hE<gt>\n"
1047 "#include E<lt>string.hE<gt>\n"
1048 "\\&\n"
1049 "#define MAX_BUF 10000\n"
1050 "\\&\n"
1051 "int\n"
1052 "main(int argc, char *argv[])\n"
1053 "{\n"
1054 " int size, erange_cnt, port, s;\n"
1055 " struct servent result_buf;\n"
1056 " struct servent *result;\n"
1057 " char buf[MAX_BUF];\n"
1058 " char *protop;\n"
1059 "\\&\n"
1060 " if (argc E<lt> 3) {\n"
1061 " printf(\"Usage: %s port-num proto-name [size]\\[rs]n\", argv[0]);\n"
1062 " exit(EXIT_FAILURE);\n"
1063 " }\n"
1064 "\\&\n"
1065 " port = htons(atoi(argv[1]));\n"
1066 " protop = (strcmp(argv[2], \"null\") == 0 ||\n"
1067 " strcmp(argv[2], \"NULL\") == 0) ? NULL : argv[2];\n"
1068 "\\&\n"
1069 " size = 1024;\n"
1070 " if (argc E<gt> 3)\n"
1071 " size = atoi(argv[3]);\n"
1072 "\\&\n"
1073 " if (size E<gt> MAX_BUF) {\n"
1074 " printf(\"Exceeded buffer limit (%d)\\[rs]n\", MAX_BUF);\n"
1075 " exit(EXIT_FAILURE);\n"
1076 " }\n"
1077 "\\&\n"
1078 " erange_cnt = 0;\n"
1079 " do {\n"
1080 " s = getservbyport_r(port, protop, &result_buf,\n"
1081 " buf, size, &result);\n"
1082 " if (s == ERANGE) {\n"
1083 " if (erange_cnt == 0)\n"
1084 " printf(\"ERANGE! Retrying with larger buffer\\[rs]n\");\n"
1085 " erange_cnt++;\n"
1086 "\\&\n"
1087 " /* Increment a byte at a time so we can see exactly\n"
1088 " what size buffer was required. */\n"
1089 "\\&\n"
1090 " size++;\n"
1091 "\\&\n"
1092 " if (size E<gt> MAX_BUF) {\n"
1093 " printf(\"Exceeded buffer limit (%d)\\[rs]n\", MAX_BUF);\n"
1094 " exit(EXIT_FAILURE);\n"
1095 " }\n"
1096 " }\n"
1097 " } while (s == ERANGE);\n"
1098 "\\&\n"
1099 " printf(\"getservbyport_r() returned: %s (size=%d)\\[rs]n\",\n"
1100 " (s == 0) ? \"0 (success)\" : (s == ENOENT) ? \"ENOENT\" :\n"
1101 " strerror(s), size);\n"
1102 "\\&\n"
1103 " if (s != 0 || result == NULL) {\n"
1104 " printf(\"Call failed/record not found\\[rs]n\");\n"
1105 " exit(EXIT_FAILURE);\n"
1106 " }\n"
1107 "\\&\n"
1108 " printf(\"s_name=%s; s_proto=%s; s_port=%d; aliases=\",\n"
1109 " result_buf.s_name, result_buf.s_proto,\n"
1110 " ntohs(result_buf.s_port));\n"
1111 " for (char **p = result_buf.s_aliases; *p != NULL; p++)\n"
1112 " printf(\"%s \", *p);\n"
1113 " printf(\"\\[rs]n\");\n"
1114 "\\&\n"
1115 " exit(EXIT_SUCCESS);\n"
1116 "}\n"
1117 msgstr ""
1118 "#define _GNU_SOURCE\n"
1119 "#include E<lt>ctype.hE<gt>\n"
1120 "#include E<lt>errno.hE<gt>\n"
1121 "#include E<lt>netdb.hE<gt>\n"
1122 "#include E<lt>stdio.hE<gt>\n"
1123 "#include E<lt>stdlib.hE<gt>\n"
1124 "#include E<lt>string.hE<gt>\n"
1125 "\\&\n"
1126 "#define MAX_BUF 10000\n"
1127 "\\&\n"
1128 "int\n"
1129 "main(int argc, char *argv[])\n"
1130 "{\n"
1131 " int size, erange_cnt, port, s;\n"
1132 " struct servent result_buf;\n"
1133 " struct servent *result;\n"
1134 " char buf[MAX_BUF];\n"
1135 " char *protop;\n"
1136 "\\&\n"
1137 " if (argc E<lt> 3) {\n"
1138 " printf(\"Utilisation : %s port-num proto-name [size]\\[rs]n\", argv[0]);\n"
1139 " exit(EXIT_FAILURE);\n"
1140 " }\n"
1141 "\\&\n"
1142 " port = htons(atoi(argv[1]));\n"
1143 " protop = (strcmp(argv[2], \"null\") == 0 ||\n"
1144 " strcmp(argv[2], \"NULL\") == 0) ? NULL : argv[2];\n"
1145 "\\&\n"
1146 " size = 1024;\n"
1147 " if (argc E<gt> 3)\n"
1148 " size = atoi(argv[3]);\n"
1149 "\\&\n"
1150 " if (size E<gt> MAX_BUF) {\n"
1151 " printf(\"limite du tampon dépassée (%d)\\[rs]n\", MAX_BUF);\n"
1152 " exit(EXIT_FAILURE);\n"
1153 " }\n"
1154 "\\&\n"
1155 " erange_cnt = 0;\n"
1156 " do {\n"
1157 " s = getservbyport_r(port, protop, &result_buf,\n"
1158 " buf, size, &result);\n"
1159 " if (s == ERANGE) {\n"
1160 " if (erange_cnt == 0)\n"
1161 " printf(\"ERANGE ! Nouvel essai avec un tampon plus grand\\[rs]n\");\n"
1162 " erange_cnt++;\n"
1163 "\\&\n"
1164 " /* Incrémenter un octet à la fois pour pouvoir voir\n"
1165 " exactement la taille du tampon nécessaire. */\n"
1166 "\\&\n"
1167 " size++;\n"
1168 "\\&\n"
1169 " if (size E<gt> MAX_BUF) {\n"
1170 " printf(\"limite du tampon dépassée (%d)\\[rs]n\", MAX_BUF);\n"
1171 " exit(EXIT_FAILURE);\n"
1172 " }\n"
1173 " }\n"
1174 " } while (s == ERANGE);\n"
1175 "\\&\n"
1176 " printf(\"getservbyport_r() renvoyé : %s (size=%d)\\[rs]n\",\n"
1177 " (s == 0) ? \"0 (succès)\" : (s == ENOENT) ? \"ENOENT\" :\n"
1178 " strerror(s), size);\n"
1179 "\\&\n"
1180 " if (s != 0 || result == NULL) {\n"
1181 " printf(\"Échec appel/enregistrement non trouvé\\[rs]n\");\n"
1182 " exit(EXIT_FAILURE);\n"
1183 " }\n"
1184 "\\&\n"
1185 " printf(\"s_name=%s; s_proto=%s; s_port=%d; aliases=\",\n"
1186 " result_buf.s_name, result_buf.s_proto,\n"
1187 " ntohs(result_buf.s_port));\n"
1188 " for (char **p = result_buf.s_aliases; *p != NULL; p++)\n"
1189 " printf(\"%s \", *p);\n"
1190 " printf(\"\\[rs]n\");\n"
1191 "\\&\n"
1192 " exit(EXIT_SUCCESS);\n"
1193 "}\n"
1194
1195 #. type: TH
1196 #: mageia-cauldron
1197 #, no-wrap
1198 msgid "2025-09-21"
1199 msgstr "21 septembre 2025"
1200
1201 #. type: TH
1202 #: mageia-cauldron
1203 #, no-wrap
1204 msgid "Linux man-pages 6.17"
1205 msgstr "Pages du manuel de Linux 6.17"
1206
1207 #. type: Plain text
1208 #: mageia-cauldron
1209 #, fuzzy, no-wrap
1210 #| msgid ""
1211 #| "#define _GNU_SOURCE\n"
1212 #| "#include E<lt>ctype.hE<gt>\n"
1213 #| "#include E<lt>errno.hE<gt>\n"
1214 #| "#include E<lt>netdb.hE<gt>\n"
1215 #| "#include E<lt>stdio.hE<gt>\n"
1216 #| "#include E<lt>stdlib.hE<gt>\n"
1217 #| "#include E<lt>string.hE<gt>\n"
1218 #| "\\&\n"
1219 #| "#define MAX_BUF 10000\n"
1220 #| "\\&\n"
1221 #| "int\n"
1222 #| "main(int argc, char *argv[])\n"
1223 #| "{\n"
1224 #| " int size, erange_cnt, port, s;\n"
1225 #| " struct servent result_buf;\n"
1226 #| " struct servent *result;\n"
1227 #| " char buf[MAX_BUF];\n"
1228 #| " char *protop;\n"
1229 #| "\\&\n"
1230 #| " if (argc E<lt> 3) {\n"
1231 #| " printf(\"Usage: %s port-num proto-name [size]\\[rs]n\", argv[0]);\n"
1232 #| " exit(EXIT_FAILURE);\n"
1233 #| " }\n"
1234 #| "\\&\n"
1235 #| " port = htons(atoi(argv[1]));\n"
1236 #| " protop = (strcmp(argv[2], \"null\") == 0 ||\n"
1237 #| " strcmp(argv[2], \"NULL\") == 0) ? NULL : argv[2];\n"
1238 #| "\\&\n"
1239 #| " size = 1024;\n"
1240 #| " if (argc E<gt> 3)\n"
1241 #| " size = atoi(argv[3]);\n"
1242 #| "\\&\n"
1243 #| " if (size E<gt> MAX_BUF) {\n"
1244 #| " printf(\"Exceeded buffer limit (%d)\\[rs]n\", MAX_BUF);\n"
1245 #| " exit(EXIT_FAILURE);\n"
1246 #| " }\n"
1247 #| "\\&\n"
1248 #| " erange_cnt = 0;\n"
1249 #| " do {\n"
1250 #| " s = getservbyport_r(port, protop, &result_buf,\n"
1251 #| " buf, size, &result);\n"
1252 #| " if (s == ERANGE) {\n"
1253 #| " if (erange_cnt == 0)\n"
1254 #| " printf(\"ERANGE! Retrying with larger buffer\\[rs]n\");\n"
1255 #| " erange_cnt++;\n"
1256 #| "\\&\n"
1257 #| " /* Increment a byte at a time so we can see exactly\n"
1258 #| " what size buffer was required. */\n"
1259 #| "\\&\n"
1260 #| " size++;\n"
1261 #| "\\&\n"
1262 #| " if (size E<gt> MAX_BUF) {\n"
1263 #| " printf(\"Exceeded buffer limit (%d)\\[rs]n\", MAX_BUF);\n"
1264 #| " exit(EXIT_FAILURE);\n"
1265 #| " }\n"
1266 #| " }\n"
1267 #| " } while (s == ERANGE);\n"
1268 #| "\\&\n"
1269 #| " printf(\"getservbyport_r() returned: %s (size=%d)\\[rs]n\",\n"
1270 #| " (s == 0) ? \"0 (success)\" : (s == ENOENT) ? \"ENOENT\" :\n"
1271 #| " strerror(s), size);\n"
1272 #| "\\&\n"
1273 #| " if (s != 0 || result == NULL) {\n"
1274 #| " printf(\"Call failed/record not found\\[rs]n\");\n"
1275 #| " exit(EXIT_FAILURE);\n"
1276 #| " }\n"
1277 #| "\\&\n"
1278 #| " printf(\"s_name=%s; s_proto=%s; s_port=%d; aliases=\",\n"
1279 #| " result_buf.s_name, result_buf.s_proto,\n"
1280 #| " ntohs(result_buf.s_port));\n"
1281 #| " for (char **p = result_buf.s_aliases; *p != NULL; p++)\n"
1282 #| " printf(\"%s \", *p);\n"
1283 #| " printf(\"\\[rs]n\");\n"
1284 #| "\\&\n"
1285 #| " exit(EXIT_SUCCESS);\n"
1286 #| "}\n"
1287 msgid ""
1288 "#define _GNU_SOURCE\n"
1289 "#include E<lt>ctype.hE<gt>\n"
1290 "#include E<lt>errno.hE<gt>\n"
1291 "#include E<lt>netdb.hE<gt>\n"
1292 "#include E<lt>stdio.hE<gt>\n"
1293 "#include E<lt>stdlib.hE<gt>\n"
1294 "#include E<lt>string.hE<gt>\n"
1295 "\\&\n"
1296 "#define MAX_BUF 10000\n"
1297 "\\&\n"
1298 "int\n"
1299 "main(int argc, char *argv[])\n"
1300 "{\n"
1301 " int size, erange_cnt, port, s;\n"
1302 " struct servent result_buf;\n"
1303 " struct servent *result;\n"
1304 " char buf[MAX_BUF];\n"
1305 " char *protop;\n"
1306 "\\&\n"
1307 " if (argc E<lt> 3) {\n"
1308 " printf(\"Usage: %s port-num proto-name [size]\\[rs]n\", argv[0]);\n"
1309 " exit(EXIT_FAILURE);\n"
1310 " }\n"
1311 "\\&\n"
1312 " port = htons(atoi(argv[1]));\n"
1313 " protop = (strcmp(argv[2], \"null\") == 0 ||\n"
1314 " strcmp(argv[2], \"NULL\") == 0) ? NULL : argv[2];\n"
1315 "\\&\n"
1316 " size = 1024;\n"
1317 " if (argc E<gt> 3)\n"
1318 " size = atoi(argv[3]);\n"
1319 "\\&\n"
1320 " if (size E<gt> MAX_BUF) {\n"
1321 " printf(\"Exceeded buffer limit (%d)\\[rs]n\", MAX_BUF);\n"
1322 " exit(EXIT_FAILURE);\n"
1323 " }\n"
1324 "\\&\n"
1325 " erange_cnt = 0;\n"
1326 " do {\n"
1327 " s = getservbyport_r(port, protop, &result_buf,\n"
1328 " buf, size, &result);\n"
1329 " if (s == ERANGE) {\n"
1330 " if (erange_cnt == 0)\n"
1331 " printf(\"ERANGE! Retrying with larger buffer\\[rs]n\");\n"
1332 " erange_cnt++;\n"
1333 "\\&\n"
1334 " /* Increment a byte at a time so we can see exactly\n"
1335 " what size buffer was required. */\n"
1336 "\\&\n"
1337 " size++;\n"
1338 "\\&\n"
1339 " if (size E<gt> MAX_BUF) {\n"
1340 " printf(\"Exceeded buffer limit (%d)\\[rs]n\", MAX_BUF);\n"
1341 " exit(EXIT_FAILURE);\n"
1342 " }\n"
1343 " }\n"
1344 " } while (s == ERANGE);\n"
1345 "\\&\n"
1346 " printf(\"getservbyport_r() returned: %s (size=%d)\\[rs]n\",\n"
1347 " (s == 0) ? \"0 (success)\" : (s == ENOENT) ? \"ENOENT\" :\n"
1348 " strerror(s), size);\n"
1349 "\\&\n"
1350 " if (s != 0 || result == NULL) {\n"
1351 " printf(\"Call failed/record not found\\[rs]n\");\n"
1352 " exit(EXIT_FAILURE);\n"
1353 " }\n"
1354 "\\&\n"
1355 " printf(\"s_name=%s; s_proto=%s; s_port=%d; aliases=\",\n"
1356 " result_buf.s_name, result_buf.s_proto,\n"
1357 " ntohs(result_buf.s_port));\n"
1358 " for (char **p = result_buf.s_aliases; *p != NULL; p++)\n"
1359 " printf(\"%s \", *p);\n"
1360 " printf(\"\\[rs]n\");\n"
1361 "\\&\n"
1362 " exit(EXIT_SUCCESS);\n"
1363 "}\n"
1364 msgstr ""
1365 "#define _GNU_SOURCE\n"
1366 "#include E<lt>ctype.hE<gt>\n"
1367 "#include E<lt>errno.hE<gt>\n"
1368 "#include E<lt>netdb.hE<gt>\n"
1369 "#include E<lt>stdio.hE<gt>\n"
1370 "#include E<lt>stdlib.hE<gt>\n"
1371 "#include E<lt>string.hE<gt>\n"
1372 "\\&\n"
1373 "#define MAX_BUF 10000\n"
1374 "\\&\n"
1375 "int\n"
1376 "main(int argc, char *argv[])\n"
1377 "{\n"
1378 " int size, erange_cnt, port, s;\n"
1379 " struct servent result_buf;\n"
1380 " struct servent *result;\n"
1381 " char buf[MAX_BUF];\n"
1382 " char *protop;\n"
1383 "\\&\n"
1384 " if (argc E<lt> 3) {\n"
1385 " printf(\"Utilisation : %s port-num proto-name [size]\\[rs]n\", argv[0]);\n"
1386 " exit(EXIT_FAILURE);\n"
1387 " }\n"
1388 "\\&\n"
1389 " port = htons(atoi(argv[1]));\n"
1390 " protop = (strcmp(argv[2], \"null\") == 0 ||\n"
1391 " strcmp(argv[2], \"NULL\") == 0) ? NULL : argv[2];\n"
1392 "\\&\n"
1393 " size = 1024;\n"
1394 " if (argc E<gt> 3)\n"
1395 " size = atoi(argv[3]);\n"
1396 "\\&\n"
1397 " if (size E<gt> MAX_BUF) {\n"
1398 " printf(\"limite du tampon dépassée (%d)\\[rs]n\", MAX_BUF);\n"
1399 " exit(EXIT_FAILURE);\n"
1400 " }\n"
1401 "\\&\n"
1402 " erange_cnt = 0;\n"
1403 " do {\n"
1404 " s = getservbyport_r(port, protop, &result_buf,\n"
1405 " buf, size, &result);\n"
1406 " if (s == ERANGE) {\n"
1407 " if (erange_cnt == 0)\n"
1408 " printf(\"ERANGE ! Nouvel essai avec un tampon plus grand\\[rs]n\");\n"
1409 " erange_cnt++;\n"
1410 "\\&\n"
1411 " /* Incrémenter un octet à la fois pour pouvoir voir\n"
1412 " exactement la taille du tampon nécessaire. */\n"
1413 "\\&\n"
1414 " size++;\n"
1415 "\\&\n"
1416 " if (size E<gt> MAX_BUF) {\n"
1417 " printf(\"limite du tampon dépassée (%d)\\[rs]n\", MAX_BUF);\n"
1418 " exit(EXIT_FAILURE);\n"
1419 " }\n"
1420 " }\n"
1421 " } while (s == ERANGE);\n"
1422 "\\&\n"
1423 " printf(\"getservbyport_r() renvoyé : %s (size=%d)\\[rs]n\",\n"
1424 " (s == 0) ? \"0 (succès)\" : (s == ENOENT) ? \"ENOENT\" :\n"
1425 " strerror(s), size);\n"
1426 "\\&\n"
1427 " if (s != 0 || result == NULL) {\n"
1428 " printf(\"Échec appel/enregistrement non trouvé\\[rs]n\");\n"
1429 " exit(EXIT_FAILURE);\n"
1430 " }\n"
1431 "\\&\n"
1432 " printf(\"s_name=%s; s_proto=%s; s_port=%d; aliases=\",\n"
1433 " result_buf.s_name, result_buf.s_proto,\n"
1434 " ntohs(result_buf.s_port));\n"
1435 " for (char **p = result_buf.s_aliases; *p != NULL; p++)\n"
1436 " printf(\"%s \", *p);\n"
1437 " printf(\"\\[rs]n\");\n"
1438 "\\&\n"
1439 " exit(EXIT_SUCCESS);\n"
1440 "}\n"
1441
1442 #. type: TH
1443 #: opensuse-leap-16-1 opensuse-tumbleweed
1444 #, no-wrap
1445 msgid "Linux man-pages (unreleased)"
1446 msgstr "Pages du manuel de Linux (non publiées)"