Debian Codegraph @

po/ar/man3/getprotoent_r.3.po

raw
1 # Arabic translation of manpages
2 # This file is distributed under the same license as the manpages-l10n package.
3 # Copyright © of this file:
4 # زايد السعيدي <[email protected]>, 2026.
5 msgid ""
6 msgstr ""
7 "Project-Id-Version: manpages-l10n 4.30.2\n"
8 "POT-Creation-Date: 2026-06-05 06:25+0200\n"
9 "PO-Revision-Date: 2026-06-01 18:50+0400\n"
10 "Last-Translator: Zayed Al-Saidi <[email protected]>\n"
11 "Language-Team: Arabic <[email protected]>\n"
12 "Language: ar\n"
13 "MIME-Version: 1.0\n"
14 "Content-Type: text/plain; charset=UTF-8\n"
15 "Content-Transfer-Encoding: 8bit\n"
16 "Plural-Forms: nplurals=6; plural=n==0 ? 0 : n==1 ? 1 : n==2 ? 2 : n%100>=3 "
17 "&& n%100<=10 ? 3 : n%100>=11 && n%100<=99 ? 4 : 5;\n"
18 "X-Generator: Lokalize 23.08.5\n"
19
20 #. type: TH
21 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
22 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
23 #, no-wrap
24 msgid "getprotoent_r"
25 msgstr "getprotoent_r"
26
27 #. type: TH
28 #: archlinux debian-unstable mageia-cauldron opensuse-leap-16-1
29 #: opensuse-tumbleweed
30 #, no-wrap
31 msgid "2025-09-21"
32 msgstr "21 سبتمبر 2025"
33
34 #. type: TH
35 #: archlinux debian-unstable
36 #, no-wrap
37 msgid "Linux man-pages 6.18"
38 msgstr "صفحات دليل لينكس 6.18"
39
40 #. type: SH
41 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
42 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
43 #, no-wrap
44 msgid "NAME"
45 msgstr "الاسم"
46
47 #. type: Plain text
48 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
49 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
50 msgid ""
51 "getprotoent_r, getprotobyname_r, getprotobynumber_r - get protocol entry "
52 "(reentrant)"
53 msgstr ""
54 "getprotoent_r, getprotobyname_r, getprotobynumber_r - الحصول على مدخل "
55 "البروتوكول (قابل لإعادة الدخول)"
56
57 #. type: SH
58 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
59 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
60 #, no-wrap
61 msgid "LIBRARY"
62 msgstr "المكتبة"
63
64 #. type: Plain text
65 #: archlinux debian-unstable fedora-44 fedora-rawhide mageia-cauldron
66 #: opensuse-leap-16-1 opensuse-tumbleweed
67 msgid "Standard C library (I<libc>,\\ I<-lc>)"
68 msgstr "مكتبة سي المعيارية (I<libc>،\\ I<-lc>)"
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 "SYNOPSIS"
75 msgstr "موجز"
76
77 #. type: Plain text
78 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
79 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
80 #, no-wrap
81 msgid "B<#include E<lt>netdb.hE<gt>>\n"
82 msgstr "B<#include E<lt>netdb.hE<gt>>\n"
83
84 #. type: Plain text
85 #: archlinux debian-unstable mageia-cauldron opensuse-leap-16-1
86 #: opensuse-tumbleweed
87 #, no-wrap
88 msgid ""
89 "B<int getprotoent_r(>size_t size;\n"
90 "B< struct protoent *restrict >I<result_buf>B<,>\n"
91 "B< char >I<buf>B<[restrict >I<size>B<], size_t >I<size>B<,>\n"
92 "B< struct protoent **restrict >I<result>B<);>\n"
93 "B<int getprotobyname_r(>size_t size;\n"
94 "B< const char *restrict >I<name>B<,>\n"
95 "B< struct protoent *restrict >I<result_buf>B<,>\n"
96 "B< char >I<buf>B<[restrict >I<size>B<], size_t >I<size>B<,>\n"
97 "B< struct protoent **restrict >I<result>B<);>\n"
98 "B<int getprotobynumber_r(>size_t size;\n"
99 "B< int >I<proto>B<,>\n"
100 "B< struct protoent *restrict >I<result_buf>B<,>\n"
101 "B< char >I<buf>B<[restrict >I<size>B<], size_t >I<size>B<,>\n"
102 "B< struct protoent **restrict >I<result>B<);>\n"
103 msgstr ""
104 "B<int getprotoent_r(>size_t size;\n"
105 "B< struct protoent *restrict >I<result_buf>B<,>\n"
106 "B< char >I<buf>B<[restrict >I<size>B<], size_t >I<size>B<,>\n"
107 "B< struct protoent **restrict >I<result>B<);>\n"
108 "B<int getprotobyname_r(>size_t size;\n"
109 "B< const char *restrict >I<name>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 "B<int getprotobynumber_r(>size_t size;\n"
114 "B< int >I<proto>B<,>\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
119 #. type: Plain text
120 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
121 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
122 msgid ""
123 "Feature Test Macro Requirements for glibc (see B<feature_test_macros>(7)):"
124 msgstr ""
125 "متطلبات ماكروات اختبار الميزات لـ glibc (انظر B<feature_test_macros>(7)):"
126
127 #. type: Plain text
128 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
129 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
130 msgid "B<getprotoent_r>(), B<getprotobyname_r>(), B<getprotobynumber_r>():"
131 msgstr "B<getprotoent_r>(), B<getprotobyname_r>(), B<getprotobynumber_r>():"
132
133 #. type: Plain text
134 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
135 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
136 #, no-wrap
137 msgid ""
138 " Since glibc 2.19:\n"
139 " _DEFAULT_SOURCE\n"
140 " glibc 2.19 and earlier:\n"
141 " _BSD_SOURCE || _SVID_SOURCE\n"
142 msgstr ""
143 " منذ glibc 2.19:\n"
144 " _DEFAULT_SOURCE\n"
145 " glibc 2.19 وما قبله:\n"
146 " _BSD_SOURCE || _SVID_SOURCE\n"
147
148 #. type: SH
149 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
150 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
151 #, no-wrap
152 msgid "DESCRIPTION"
153 msgstr "الوصف"
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 ""
159 "The B<getprotoent_r>(), B<getprotobyname_r>(), and B<getprotobynumber_r>() "
160 "functions are the reentrant equivalents of, respectively, B<getprotoent>(3), "
161 "B<getprotobyname>(3), and B<getprotobynumber>(3). They differ in the way "
162 "that the I<protoent> structure is returned, and in the function calling "
163 "signature and return value. This manual page describes just the differences "
164 "from the nonreentrant functions."
165 msgstr ""
166 "الدوال B<getprotoent_r>() و B<getprotobyname_r>() و B<getprotobynumber_r>() "
167 "هي المكافئات القابلة لإعادة الدخول لـ B<getprotoent>(3) و "
168 "B<getprotobyname>(3) و B<getprotobynumber>(3) على التوالي. تختلف في طريقة "
169 "إرجاع بنية I<protoent>، وفي توقيع استدعاء الدالة وقيمة الإرجاع. تصف صفحة "
170 "الدليل هذه الاختلافات فقط عن الدوال غير القابلة لإعادة الدخول."
171
172 #. type: Plain text
173 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
174 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
175 msgid ""
176 "Instead of returning a pointer to a statically allocated I<protoent> "
177 "structure as the function result, these functions copy the structure into "
178 "the location pointed to by I<result_buf>."
179 msgstr ""
180 "بدلاً من إرجاع مؤشر إلى بنية I<protoent> مخصصة بشكل ثابت كنتيجة للدالة، تنسخ "
181 "هذه الدوال البنية إلى الموقع المشار إليه بواسطة I<result_buf>."
182
183 #. #-#-#-#-# archlinux: getprotoent_r.3.pot (PACKAGE VERSION) #-#-#-#-#
184 #. I can find no information on the required/recommended buffer size;
185 #. the nonreentrant functions use a 1024 byte buffer.
186 #. The 1024 byte value is also what the Solaris man page suggests. -- mtk
187 #. type: Plain text
188 #. #-#-#-#-# debian-unstable: getprotoent_r.3.pot (PACKAGE VERSION) #-#-#-#-#
189 #. I can find no information on the required/recommended buffer size;
190 #. the nonreentrant functions use a 1024 byte buffer.
191 #. The 1024 byte value is also what the Solaris man page suggests. -- mtk
192 #. type: Plain text
193 #. #-#-#-#-# fedora-44: getprotoent_r.3.pot (PACKAGE VERSION) #-#-#-#-#
194 #. I can find no information on the required/recommended buffer size;
195 #. the nonreentrant functions use a 1024 byte buffer.
196 #. The 1024 byte value is also what the Solaris man page suggests. -- mtk
197 #. type: Plain text
198 #. #-#-#-#-# fedora-rawhide: getprotoent_r.3.pot (PACKAGE VERSION) #-#-#-#-#
199 #. I can find no information on the required/recommended buffer size;
200 #. the nonreentrant functions use a 1024 byte buffer.
201 #. The 1024 byte value is also what the Solaris man page suggests. -- mtk
202 #. type: Plain text
203 #. #-#-#-#-# mageia-cauldron: getprotoent_r.3.pot (PACKAGE VERSION) #-#-#-#-#
204 #. I can find no information on the required/recommended buffer size;
205 #. the nonreentrant functions use a 1024 byte buffer.
206 #. The 1024 byte value is also what the Solaris man page suggests. -- mtk
207 #. type: Plain text
208 #. #-#-#-#-# opensuse-leap-16-1: 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 #. #-#-#-#-# opensuse-tumbleweed: 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 #: archlinux debian-unstable fedora-44 fedora-rawhide mageia-cauldron
219 #: opensuse-leap-16-1 opensuse-tumbleweed
220 msgid ""
221 "The I<buf> array is used to store the string fields pointed to by the "
222 "returned I<protoent> structure. (The nonreentrant functions allocate these "
223 "strings in static storage.) The size of this array is specified in "
224 "I<size>. If I<buf> is too small, the call fails with the error B<ERANGE>, "
225 "and the caller must try again with a larger buffer. (A buffer of size 1024 "
226 "bytes should be sufficient for most applications.)"
227 msgstr ""
228 "تُستخدم المصفوفة I<buf> لتخزين حقول سلسلة المحارف المشار إليها بواسطة بنية "
229 "I<protoent> المُرجعة. (تخصص الدوال غير القابلة لإعادة الدخول هذه السلاسل في "
230 "تخزين ثابت.) يُحدد حجم هذه المصفوفة في I<size>. إذا كانت I<buf> صغيرة جدًا، "
231 "يفشل الاستدعاء مع الخطأ B<ERANGE>، ويجب على المستدعي المحاولة مرة أخرى بمخزن "
232 "مؤقت أكبر. (يجب أن يكون مخزن مؤقت بحجم 1024 بايت كافيًا لمعظم التطبيقات.)"
233
234 #. type: Plain text
235 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
236 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
237 msgid ""
238 "If the function call successfully obtains a protocol record, then I<*result> "
239 "is set pointing to I<result_buf>; otherwise, I<*result> is set to NULL."
240 msgstr ""
241 "إذا حصل استدعاء الدالة بنجاح على سجل بروتوكول، فسيُضبط I<*result> ليشير إلى "
242 "I<result_buf>؛ وإلا، فسيُضبط I<*result> على NULL."
243
244 #. type: SH
245 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
246 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
247 #, no-wrap
248 msgid "RETURN VALUE"
249 msgstr "قيمة الإرجاع"
250
251 #. type: Plain text
252 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
253 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
254 msgid ""
255 "On success, these functions return 0. On error, they return one of the "
256 "positive error numbers listed in ERRORS."
257 msgstr ""
258 "تُعيد هذه الدوال 0 عند النجاح. وتُعيد أحد أرقام الأخطاء الموجبة المدرجة في قسم "
259 "ERRORS عند حدوث خطأ."
260
261 #. type: Plain text
262 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
263 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
264 msgid ""
265 "On error, record not found (B<getprotobyname_r>(), B<getprotobynumber_r>()), "
266 "or end of input (B<getprotoent_r>()) I<result> is set to NULL."
267 msgstr ""
268 "عند الخطأ، أو عدم العثور على السجل (B<getprotobyname_r>()، "
269 "B<getprotobynumber_r>())، أو نهاية الإدخال (B<getprotoent_r>())، يُضبط "
270 "I<result> على NULL."
271
272 #. type: SH
273 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
274 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
275 #, no-wrap
276 msgid "ERRORS"
277 msgstr "الأخطاء"
278
279 #. type: TP
280 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
281 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
282 #, no-wrap
283 msgid "B<ENOENT>"
284 msgstr "B<ENOENT>"
285
286 #. type: Plain text
287 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
288 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
289 msgid "(B<getprotoent_r>()) No more records in database."
290 msgstr "(B<getprotoent_r>()) لا مزيد من السجلات في قاعدة البيانات."
291
292 #. type: TP
293 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
294 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
295 #, no-wrap
296 msgid "B<ERANGE>"
297 msgstr "B<ERANGE>"
298
299 #. type: Plain text
300 #: archlinux debian-unstable fedora-44 fedora-rawhide mageia-cauldron
301 #: opensuse-leap-16-1 opensuse-tumbleweed
302 msgid ""
303 "I<buf> is too small. Try again with a larger buffer (and increased I<size>)."
304 msgstr ""
305 "المخزن المؤقت I<buf> صغير جدًا. حاول مرة أخرى بمخزن أكبر (وزيادة 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 "السمات"
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 "للاطلاع على شرح للمصطلحات المستخدمة في هذا القسم، انظر B<attributes>(7)."
321
322 #. type: tbl table
323 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
324 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
325 #, no-wrap
326 msgid "Interface"
327 msgstr "الواجهة"
328
329 #. type: tbl table
330 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
331 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
332 #, no-wrap
333 msgid "Attribute"
334 msgstr "السمة"
335
336 #. type: tbl table
337 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
338 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
339 #, no-wrap
340 msgid "Value"
341 msgstr "القيمة"
342
343 #. type: tbl table
344 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
345 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
346 #, no-wrap
347 msgid ".na\n"
348 msgstr ".na\n"
349
350 #. type: tbl table
351 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
352 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
353 #, no-wrap
354 msgid ".nh\n"
355 msgstr ".nh\n"
356
357 #. type: tbl table
358 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
359 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
360 #, no-wrap
361 msgid ""
362 "B<getprotoent_r>(),\n"
363 "B<getprotobyname_r>(),\n"
364 "B<getprotobynumber_r>()"
365 msgstr ""
366 "B<getprotoent_r>(),\n"
367 "B<getprotobyname_r>(),\n"
368 "B<getprotobynumber_r>()"
369
370 #. type: tbl table
371 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
372 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
373 #, no-wrap
374 msgid "Thread safety"
375 msgstr "سلامة الخيوط"
376
377 #. type: tbl table
378 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
379 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
380 #, no-wrap
381 msgid "MT-Safe locale"
382 msgstr "المنطقة (locale) آمنة لتعدد المسالك (MT-Safe)"
383
384 #. type: SH
385 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
386 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
387 #, no-wrap
388 msgid "VERSIONS"
389 msgstr "الإصدارات"
390
391 #. type: Plain text
392 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
393 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
394 msgid ""
395 "Functions with similar names exist on some other systems, though typically "
396 "with different calling signatures."
397 msgstr ""
398 "توجد دوال بأسماء مماثلة في بعض الأنظمة الأخرى، وإن كان ذلك عادةً بتواقيع "
399 "استدعاء مختلفة."
400
401 #. type: SH
402 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
403 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
404 #, no-wrap
405 msgid "STANDARDS"
406 msgstr "المعايير"
407
408 #. type: Plain text
409 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
410 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
411 msgid "GNU."
412 msgstr "GNU."
413
414 #. type: SH
415 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
416 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
417 #, no-wrap
418 msgid "EXAMPLES"
419 msgstr "أمثلة"
420
421 #. type: Plain text
422 #: archlinux debian-unstable fedora-44 fedora-rawhide mageia-cauldron
423 #: opensuse-leap-16-1 opensuse-tumbleweed
424 msgid ""
425 "The program below uses B<getprotobyname_r>() to retrieve the protocol "
426 "record for the protocol named in its first command-line argument. If a "
427 "second (integer) command-line argument is supplied, it is used as the "
428 "initial value for I<size>; if B<getprotobyname_r>() fails with the error "
429 "B<ERANGE>, the program retries with larger buffer sizes. The following "
430 "shell session shows a couple of sample runs:"
431 msgstr ""
432 "يستخدم البرنامج أدناه B<getprotobyname_r>() لاسترداد سجل البروتوكول "
433 "للبروتوكول المسمى في وسيط سطر الأوامر الأول. إذا تم توفير وسيط سطر أوامر ثانٍ "
434 "(عدد صحيح)، فسيُستخدم كقيمة مبدئية لـ I<size>؛ إذا فشل B<getprotobyname_r>() "
435 "مع الخطأ B<ERANGE>، يعيد البرنامج المحاولة بأحجام مخزن مؤقت أكبر. تُظهر جلسة "
436 "الصدفة التالية بعض عمليات التشغيل النموذجية:"
437
438 #. type: Plain text
439 #: archlinux debian-unstable fedora-44 fedora-rawhide mageia-cauldron
440 #: opensuse-leap-16-1 opensuse-tumbleweed
441 #, no-wrap
442 msgid ""
443 "$B< ./a.out tcp 1>\n"
444 "ERANGE! Retrying with larger buffer\n"
445 "getprotobyname_r() returned: 0 (success) (size=78)\n"
446 "p_name=tcp; p_proto=6; aliases=TCP\n"
447 "$B< ./a.out xxx 1>\n"
448 "ERANGE! Retrying with larger buffer\n"
449 "getprotobyname_r() returned: 0 (success) (size=100)\n"
450 "Call failed/record not found\n"
451 msgstr ""
452 "$B< ./a.out tcp 1>\n"
453 "ERANGE! Retrying with larger buffer\n"
454 "getprotobyname_r() returned: 0 (success) (size=78)\n"
455 "p_name=tcp; p_proto=6; aliases=TCP\n"
456 "$B< ./a.out xxx 1>\n"
457 "ERANGE! Retrying with larger buffer\n"
458 "getprotobyname_r() returned: 0 (success) (size=100)\n"
459 "Call failed/record not found\n"
460
461 #. type: SS
462 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
463 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
464 #, no-wrap
465 msgid "Program source"
466 msgstr "مصدر البرنامج"
467
468 #. type: Plain text
469 #: archlinux debian-unstable mageia-cauldron opensuse-leap-16-1
470 #: opensuse-tumbleweed
471 #, 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, s;\n"
487 " struct protoent result_buf;\n"
488 " struct protoent *result;\n"
489 " char buf[MAX_BUF];\n"
490 "\\&\n"
491 " if (argc E<lt> 2) {\n"
492 " printf(\"Usage: %s proto-name [size]\\[rs]n\", argv[0]);\n"
493 " exit(EXIT_FAILURE);\n"
494 " }\n"
495 "\\&\n"
496 " size = 1024;\n"
497 " if (argc E<gt> 2)\n"
498 " size = atoi(argv[2]);\n"
499 "\\&\n"
500 " if (size E<gt> MAX_BUF) {\n"
501 " printf(\"Exceeded buffer limit (%d)\\[rs]n\", MAX_BUF);\n"
502 " exit(EXIT_FAILURE);\n"
503 " }\n"
504 "\\&\n"
505 " erange_cnt = 0;\n"
506 " do {\n"
507 " s = getprotobyname_r(argv[1], &result_buf,\n"
508 " buf, size, &result);\n"
509 " if (s == ERANGE) {\n"
510 " if (erange_cnt == 0)\n"
511 " printf(\"ERANGE! Retrying with larger buffer\\[rs]n\");\n"
512 " erange_cnt++;\n"
513 "\\&\n"
514 " /* Increment a byte at a time so we can see exactly\n"
515 " what size buffer was required. */\n"
516 "\\&\n"
517 " size++;\n"
518 "\\&\n"
519 " if (size E<gt> MAX_BUF) {\n"
520 " printf(\"Exceeded buffer limit (%d)\\[rs]n\", MAX_BUF);\n"
521 " exit(EXIT_FAILURE);\n"
522 " }\n"
523 " }\n"
524 " } while (s == ERANGE);\n"
525 "\\&\n"
526 " printf(\"getprotobyname_r() returned: %s (size=%d)\\[rs]n\",\n"
527 " (s == 0) ? \"0 (success)\" : (s == ENOENT) ? \"ENOENT\" :\n"
528 " strerror(s), size);\n"
529 "\\&\n"
530 " if (s != 0 || result == NULL) {\n"
531 " printf(\"Call failed/record not found\\[rs]n\");\n"
532 " exit(EXIT_FAILURE);\n"
533 " }\n"
534 "\\&\n"
535 " printf(\"p_name=%s; p_proto=%d; aliases=\",\n"
536 " result_buf.p_name, result_buf.p_proto);\n"
537 " for (char **p = result_buf.p_aliases; *p != NULL; p++)\n"
538 " printf(\"%s \", *p);\n"
539 " printf(\"\\[rs]n\");\n"
540 "\\&\n"
541 " exit(EXIT_SUCCESS);\n"
542 "}\n"
543 msgstr ""
544 "#define _GNU_SOURCE\n"
545 "#include E<lt>ctype.hE<gt>\n"
546 "#include E<lt>errno.hE<gt>\n"
547 "#include E<lt>netdb.hE<gt>\n"
548 "#include E<lt>stdio.hE<gt>\n"
549 "#include E<lt>stdlib.hE<gt>\n"
550 "#include E<lt>string.hE<gt>\n"
551 "\\&\n"
552 "#define MAX_BUF 10000\n"
553 "\\&\n"
554 "int\n"
555 "main(int argc, char *argv[])\n"
556 "{\n"
557 " int size, erange_cnt, s;\n"
558 " struct protoent result_buf;\n"
559 " struct protoent *result;\n"
560 " char buf[MAX_BUF];\n"
561 "\\&\n"
562 " if (argc E<lt> 2) {\n"
563 " printf(\"Usage: %s proto-name [size]\\[rs]n\", argv[0]);\n"
564 " exit(EXIT_FAILURE);\n"
565 " }\n"
566 "\\&\n"
567 " size = 1024;\n"
568 " if (argc E<gt> 2)\n"
569 " size = atoi(argv[2]);\n"
570 "\\&\n"
571 " if (size E<gt> MAX_BUF) {\n"
572 " printf(\"Exceeded buffer limit (%d)\\[rs]n\", MAX_BUF);\n"
573 " exit(EXIT_FAILURE);\n"
574 " }\n"
575 "\\&\n"
576 " erange_cnt = 0;\n"
577 " do {\n"
578 " s = getprotobyname_r(argv[1], &result_buf,\n"
579 " buf, size, &result);\n"
580 " if (s == ERANGE) {\n"
581 " if (erange_cnt == 0)\n"
582 " printf(\"ERANGE! Retrying with larger buffer\\[rs]n\");\n"
583 " erange_cnt++;\n"
584 "\\&\n"
585 " /* Increment a byte at a time so we can see exactly\n"
586 " what size buffer was required. */\n"
587 "\\&\n"
588 " size++;\n"
589 "\\&\n"
590 " if (size E<gt> MAX_BUF) {\n"
591 " printf(\"Exceeded buffer limit (%d)\\[rs]n\", MAX_BUF);\n"
592 " exit(EXIT_FAILURE);\n"
593 " }\n"
594 " }\n"
595 " } while (s == ERANGE);\n"
596 "\\&\n"
597 " printf(\"getprotobyname_r() returned: %s (size=%d)\\[rs]n\",\n"
598 " (s == 0) ? \"0 (success)\" : (s == ENOENT) ? \"ENOENT\" :\n"
599 " strerror(s), size);\n"
600 "\\&\n"
601 " if (s != 0 || result == NULL) {\n"
602 " printf(\"Call failed/record not found\\[rs]n\");\n"
603 " exit(EXIT_FAILURE);\n"
604 " }\n"
605 "\\&\n"
606 " printf(\"p_name=%s; p_proto=%d; aliases=\",\n"
607 " result_buf.p_name, result_buf.p_proto);\n"
608 " for (char **p = result_buf.p_aliases; *p != NULL; p++)\n"
609 " printf(\"%s \", *p);\n"
610 " printf(\"\\[rs]n\");\n"
611 "\\&\n"
612 " exit(EXIT_SUCCESS);\n"
613 "}\n"
614
615 #. SRC END
616 #. type: SH
617 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
618 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
619 #, no-wrap
620 msgid "SEE ALSO"
621 msgstr "انظر أيضًا"
622
623 #. type: Plain text
624 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
625 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
626 msgid "B<getprotoent>(3), B<protocols>(5)"
627 msgstr "B<getprotoent>(3), B<protocols>(5)"
628
629 #. type: TH
630 #: debian-trixie
631 #, no-wrap
632 msgid "2024-06-15"
633 msgstr "15 يونيو 2024"
634
635 #. type: TH
636 #: debian-trixie
637 #, no-wrap
638 msgid "Linux man-pages 6.9.1"
639 msgstr "صفحات دليل لينكس 6.9.1"
640
641 #. type: Plain text
642 #: debian-trixie
643 msgid "Standard C library (I<libc>, I<-lc>)"
644 msgstr "مكتبة سي المعيارية (I<libc>، I<-lc>)"
645
646 #. type: Plain text
647 #: debian-trixie
648 #, no-wrap
649 msgid ""
650 "B<int getprotoent_r(struct protoent *restrict >I<result_buf>B<,>\n"
651 "B< char >I<buf>B<[restrict .>I<buflen>B<], size_t >I<buflen>B<,>\n"
652 "B< struct protoent **restrict >I<result>B<);>\n"
653 "B<int getprotobyname_r(const char *restrict >I<name>B<,>\n"
654 "B< struct protoent *restrict >I<result_buf>B<,>\n"
655 "B< char >I<buf>B<[restrict .>I<buflen>B<], size_t >I<buflen>B<,>\n"
656 "B< struct protoent **restrict >I<result>B<);>\n"
657 "B<int getprotobynumber_r(int >I<proto>B<,>\n"
658 "B< struct protoent *restrict >I<result_buf>B<,>\n"
659 "B< char >I<buf>B<[restrict .>I<buflen>B<], size_t >I<buflen>B<,>\n"
660 "B< struct protoent **restrict >I<result>B<);>\n"
661 msgstr ""
662 "B<int getprotoent_r(struct protoent *restrict >I<result_buf>B<,>\n"
663 "B< char >I<buf>B<[restrict .>I<buflen>B<], size_t >I<buflen>B<,>\n"
664 "B< struct protoent **restrict >I<result>B<);>\n"
665 "B<int getprotobyname_r(const char *restrict >I<name>B<,>\n"
666 "B< struct protoent *restrict >I<result_buf>B<,>\n"
667 "B< char >I<buf>B<[restrict .>I<buflen>B<], size_t >I<buflen>B<,>\n"
668 "B< struct protoent **restrict >I<result>B<);>\n"
669 "B<int getprotobynumber_r(int >I<proto>B<,>\n"
670 "B< struct protoent *restrict >I<result_buf>B<,>\n"
671 "B< char >I<buf>B<[restrict .>I<buflen>B<], size_t >I<buflen>B<,>\n"
672 "B< struct protoent **restrict >I<result>B<);>\n"
673
674 #. I can find no information on the required/recommended buffer size;
675 #. the nonreentrant functions use a 1024 byte buffer.
676 #. The 1024 byte value is also what the Solaris man page suggests. -- mtk
677 #. type: Plain text
678 #: debian-trixie
679 msgid ""
680 "The I<buf> array is used to store the string fields pointed to by the "
681 "returned I<protoent> structure. (The nonreentrant functions allocate these "
682 "strings in static storage.) The size of this array is specified in "
683 "I<buflen>. If I<buf> is too small, the call fails with the error B<ERANGE>, "
684 "and the caller must try again with a larger buffer. (A buffer of length "
685 "1024 bytes should be sufficient for most applications.)"
686 msgstr ""
687 "تُستخدم المصفوفة I<buf> لتخزين حقول السلاسل المحارف المشار إليها بواسطة بنية "
688 "I<protoent> المُرجعة. (تخصص الدوال غير القابلة لإعادة الدخول هذه السلاسل في "
689 "تخزين ثابت.) يُحدد حجم هذه المصفوفة في I<buflen>. إذا كانت I<buf> صغيرة جدًا، "
690 "يفشل الاستدعاء مع الخطأ B<ERANGE>، ويجب على المستدعي المحاولة مرة أخرى بمخزن "
691 "مؤقت أكبر. (يجب أن يكون مخزن مؤقت بطول 1024 بايت كافيًا لمعظم التطبيقات.)"
692
693 #. type: Plain text
694 #: debian-trixie
695 msgid ""
696 "I<buf> is too small. Try again with a larger buffer (and increased "
697 "I<buflen>)."
698 msgstr ""
699 "المخزن المؤقت I<buf> صغير جدًا. حاول مرة أخرى بمخزن أكبر (وزيادة I<buflen>)."
700
701 #. type: Plain text
702 #: debian-trixie
703 msgid ""
704 "The program below uses B<getprotobyname_r>() to retrieve the protocol "
705 "record for the protocol named in its first command-line argument. If a "
706 "second (integer) command-line argument is supplied, it is used as the "
707 "initial value for I<buflen>; if B<getprotobyname_r>() fails with the error "
708 "B<ERANGE>, the program retries with larger buffer sizes. The following "
709 "shell session shows a couple of sample runs:"
710 msgstr ""
711 "يستخدم البرنامج أدناه B<getprotobyname_r>() لاسترداد سجل البروتوكول "
712 "للبروتوكول المسمى في وسيط سطر الأوامر الأول. إذا تم توفير وسيط سطر أوامر ثانٍ "
713 "(عدد صحيح)، فسيُستخدم كقيمة مبدئية لـ I<buflen>؛ إذا فشل "
714 "B<getprotobyname_r>() مع الخطأ B<ERANGE>، يعيد البرنامج المحاولة بأحجام مخزن "
715 "مؤقت أكبر. تُظهر جلسة الصدفة التالية بعض عمليات التشغيل النموذجية:"
716
717 #. type: Plain text
718 #: debian-trixie
719 #, no-wrap
720 msgid ""
721 "$B< ./a.out tcp 1>\n"
722 "ERANGE! Retrying with larger buffer\n"
723 "getprotobyname_r() returned: 0 (success) (buflen=78)\n"
724 "p_name=tcp; p_proto=6; aliases=TCP\n"
725 "$B< ./a.out xxx 1>\n"
726 "ERANGE! Retrying with larger buffer\n"
727 "getprotobyname_r() returned: 0 (success) (buflen=100)\n"
728 "Call failed/record not found\n"
729 msgstr ""
730 "$B< ./a.out tcp 1>\n"
731 "ERANGE! Retrying with larger buffer\n"
732 "getprotobyname_r() returned: 0 (success) (buflen=78)\n"
733 "p_name=tcp; p_proto=6; aliases=TCP\n"
734 "$B< ./a.out xxx 1>\n"
735 "ERANGE! Retrying with larger buffer\n"
736 "getprotobyname_r() returned: 0 (success) (buflen=100)\n"
737 "Call failed/record not found\n"
738
739 #. type: Plain text
740 #: debian-trixie
741 #, no-wrap
742 msgid ""
743 "#define _GNU_SOURCE\n"
744 "#include E<lt>ctype.hE<gt>\n"
745 "#include E<lt>errno.hE<gt>\n"
746 "#include E<lt>netdb.hE<gt>\n"
747 "#include E<lt>stdio.hE<gt>\n"
748 "#include E<lt>stdlib.hE<gt>\n"
749 "#include E<lt>string.hE<gt>\n"
750 "\\&\n"
751 "#define MAX_BUF 10000\n"
752 "\\&\n"
753 "int\n"
754 "main(int argc, char *argv[])\n"
755 "{\n"
756 " int buflen, erange_cnt, s;\n"
757 " struct protoent result_buf;\n"
758 " struct protoent *result;\n"
759 " char buf[MAX_BUF];\n"
760 "\\&\n"
761 " if (argc E<lt> 2) {\n"
762 " printf(\"Usage: %s proto-name [buflen]\\[rs]n\", argv[0]);\n"
763 " exit(EXIT_FAILURE);\n"
764 " }\n"
765 "\\&\n"
766 " buflen = 1024;\n"
767 " if (argc E<gt> 2)\n"
768 " buflen = atoi(argv[2]);\n"
769 "\\&\n"
770 " if (buflen E<gt> MAX_BUF) {\n"
771 " printf(\"Exceeded buffer limit (%d)\\[rs]n\", MAX_BUF);\n"
772 " exit(EXIT_FAILURE);\n"
773 " }\n"
774 "\\&\n"
775 " erange_cnt = 0;\n"
776 " do {\n"
777 " s = getprotobyname_r(argv[1], &result_buf,\n"
778 " buf, buflen, &result);\n"
779 " if (s == ERANGE) {\n"
780 " if (erange_cnt == 0)\n"
781 " printf(\"ERANGE! Retrying with larger buffer\\[rs]n\");\n"
782 " erange_cnt++;\n"
783 "\\&\n"
784 " /* Increment a byte at a time so we can see exactly\n"
785 " what size buffer was required. */\n"
786 "\\&\n"
787 " buflen++;\n"
788 "\\&\n"
789 " if (buflen E<gt> MAX_BUF) {\n"
790 " printf(\"Exceeded buffer limit (%d)\\[rs]n\", MAX_BUF);\n"
791 " exit(EXIT_FAILURE);\n"
792 " }\n"
793 " }\n"
794 " } while (s == ERANGE);\n"
795 "\\&\n"
796 " printf(\"getprotobyname_r() returned: %s (buflen=%d)\\[rs]n\",\n"
797 " (s == 0) ? \"0 (success)\" : (s == ENOENT) ? \"ENOENT\" :\n"
798 " strerror(s), buflen);\n"
799 "\\&\n"
800 " if (s != 0 || result == NULL) {\n"
801 " printf(\"Call failed/record not found\\[rs]n\");\n"
802 " exit(EXIT_FAILURE);\n"
803 " }\n"
804 "\\&\n"
805 " printf(\"p_name=%s; p_proto=%d; aliases=\",\n"
806 " result_buf.p_name, result_buf.p_proto);\n"
807 " for (char **p = result_buf.p_aliases; *p != NULL; p++)\n"
808 " printf(\"%s \", *p);\n"
809 " printf(\"\\[rs]n\");\n"
810 "\\&\n"
811 " exit(EXIT_SUCCESS);\n"
812 "}\n"
813 msgstr ""
814 "#define _GNU_SOURCE\n"
815 "#include E<lt>ctype.hE<gt>\n"
816 "#include E<lt>errno.hE<gt>\n"
817 "#include E<lt>netdb.hE<gt>\n"
818 "#include E<lt>stdio.hE<gt>\n"
819 "#include E<lt>stdlib.hE<gt>\n"
820 "#include E<lt>string.hE<gt>\n"
821 "\\&\n"
822 "#define MAX_BUF 10000\n"
823 "\\&\n"
824 "int\n"
825 "main(int argc, char *argv[])\n"
826 "{\n"
827 " int buflen, erange_cnt, s;\n"
828 " struct protoent result_buf;\n"
829 " struct protoent *result;\n"
830 " char buf[MAX_BUF];\n"
831 "\\&\n"
832 " if (argc E<lt> 2) {\n"
833 " printf(\"Usage: %s proto-name [buflen]\\[rs]n\", argv[0]);\n"
834 " exit(EXIT_FAILURE);\n"
835 " }\n"
836 "\\&\n"
837 " buflen = 1024;\n"
838 " if (argc E<gt> 2)\n"
839 " buflen = atoi(argv[2]);\n"
840 "\\&\n"
841 " if (buflen E<gt> MAX_BUF) {\n"
842 " printf(\"Exceeded buffer limit (%d)\\[rs]n\", MAX_BUF);\n"
843 " exit(EXIT_FAILURE);\n"
844 " }\n"
845 "\\&\n"
846 " erange_cnt = 0;\n"
847 " do {\n"
848 " s = getprotobyname_r(argv[1], &result_buf,\n"
849 " buf, buflen, &result);\n"
850 " if (s == ERANGE) {\n"
851 " if (erange_cnt == 0)\n"
852 " printf(\"ERANGE! Retrying with larger buffer\\[rs]n\");\n"
853 " erange_cnt++;\n"
854 "\\&\n"
855 " /* Increment a byte at a time so we can see exactly\n"
856 " what size buffer was required. */\n"
857 "\\&\n"
858 " buflen++;\n"
859 "\\&\n"
860 " if (buflen E<gt> MAX_BUF) {\n"
861 " printf(\"Exceeded buffer limit (%d)\\[rs]n\", MAX_BUF);\n"
862 " exit(EXIT_FAILURE);\n"
863 " }\n"
864 " }\n"
865 " } while (s == ERANGE);\n"
866 "\\&\n"
867 " printf(\"getprotobyname_r() returned: %s (buflen=%d)\\[rs]n\",\n"
868 " (s == 0) ? \"0 (success)\" : (s == ENOENT) ? \"ENOENT\" :\n"
869 " strerror(s), buflen);\n"
870 "\\&\n"
871 " if (s != 0 || result == NULL) {\n"
872 " printf(\"Call failed/record not found\\[rs]n\");\n"
873 " exit(EXIT_FAILURE);\n"
874 " }\n"
875 "\\&\n"
876 " printf(\"p_name=%s; p_proto=%d; aliases=\",\n"
877 " result_buf.p_name, result_buf.p_proto);\n"
878 " for (char **p = result_buf.p_aliases; *p != NULL; p++)\n"
879 " printf(\"%s \", *p);\n"
880 " printf(\"\\[rs]n\");\n"
881 "\\&\n"
882 " exit(EXIT_SUCCESS);\n"
883 "}\n"
884
885 #. type: TH
886 #: fedora-44 fedora-rawhide
887 #, no-wrap
888 msgid "2024-12-24"
889 msgstr "24 ديسمبر 2024"
890
891 #. type: TH
892 #: fedora-44 fedora-rawhide
893 #, no-wrap
894 msgid "Linux man-pages 6.13"
895 msgstr "صفحات دليل لينكس 6.13"
896
897 #. type: Plain text
898 #: fedora-44 fedora-rawhide
899 #, no-wrap
900 msgid ""
901 "B<int getprotoent_r(struct protoent *restrict >I<result_buf>B<,>\n"
902 "B< char >I<buf>B<[restrict .>I<size>B<], size_t >I<size>B<,>\n"
903 "B< struct protoent **restrict >I<result>B<);>\n"
904 "B<int getprotobyname_r(const char *restrict >I<name>B<,>\n"
905 "B< struct protoent *restrict >I<result_buf>B<,>\n"
906 "B< char >I<buf>B<[restrict .>I<size>B<], size_t >I<size>B<,>\n"
907 "B< struct protoent **restrict >I<result>B<);>\n"
908 "B<int getprotobynumber_r(int >I<proto>B<,>\n"
909 "B< struct protoent *restrict >I<result_buf>B<,>\n"
910 "B< char >I<buf>B<[restrict .>I<size>B<], size_t >I<size>B<,>\n"
911 "B< struct protoent **restrict >I<result>B<);>\n"
912 msgstr ""
913 "B<int getprotoent_r(struct protoent *restrict >I<result_buf>B<,>\n"
914 "B< char >I<buf>B<[restrict .>I<size>B<], size_t >I<size>B<,>\n"
915 "B< struct protoent **restrict >I<result>B<);>\n"
916 "B<int getprotobyname_r(const char *restrict >I<name>B<,>\n"
917 "B< struct protoent *restrict >I<result_buf>B<,>\n"
918 "B< char >I<buf>B<[restrict .>I<size>B<], size_t >I<size>B<,>\n"
919 "B< struct protoent **restrict >I<result>B<);>\n"
920 "B<int getprotobynumber_r(int >I<proto>B<,>\n"
921 "B< struct protoent *restrict >I<result_buf>B<,>\n"
922 "B< char >I<buf>B<[restrict .>I<size>B<], size_t >I<size>B<,>\n"
923 "B< struct protoent **restrict >I<result>B<);>\n"
924
925 #. type: Plain text
926 #: fedora-44 fedora-rawhide
927 #, no-wrap
928 msgid ""
929 "#define _GNU_SOURCE\n"
930 "#include E<lt>ctype.hE<gt>\n"
931 "#include E<lt>errno.hE<gt>\n"
932 "#include E<lt>netdb.hE<gt>\n"
933 "#include E<lt>stdio.hE<gt>\n"
934 "#include E<lt>stdlib.hE<gt>\n"
935 "#include E<lt>string.hE<gt>\n"
936 "\\&\n"
937 "#define MAX_BUF 10000\n"
938 "\\&\n"
939 "int\n"
940 "main(int argc, char *argv[])\n"
941 "{\n"
942 " int size, erange_cnt, s;\n"
943 " struct protoent result_buf;\n"
944 " struct protoent *result;\n"
945 " char buf[MAX_BUF];\n"
946 "\\&\n"
947 " if (argc E<lt> 2) {\n"
948 " printf(\"Usage: %s proto-name [size]\\[rs]n\", argv[0]);\n"
949 " exit(EXIT_FAILURE);\n"
950 " }\n"
951 "\\&\n"
952 " size = 1024;\n"
953 " if (argc E<gt> 2)\n"
954 " size = atoi(argv[2]);\n"
955 "\\&\n"
956 " if (size E<gt> MAX_BUF) {\n"
957 " printf(\"Exceeded buffer limit (%d)\\[rs]n\", MAX_BUF);\n"
958 " exit(EXIT_FAILURE);\n"
959 " }\n"
960 "\\&\n"
961 " erange_cnt = 0;\n"
962 " do {\n"
963 " s = getprotobyname_r(argv[1], &result_buf,\n"
964 " buf, size, &result);\n"
965 " if (s == ERANGE) {\n"
966 " if (erange_cnt == 0)\n"
967 " printf(\"ERANGE! Retrying with larger buffer\\[rs]n\");\n"
968 " erange_cnt++;\n"
969 "\\&\n"
970 " /* Increment a byte at a time so we can see exactly\n"
971 " what size buffer was required. */\n"
972 "\\&\n"
973 " size++;\n"
974 "\\&\n"
975 " if (size E<gt> MAX_BUF) {\n"
976 " printf(\"Exceeded buffer limit (%d)\\[rs]n\", MAX_BUF);\n"
977 " exit(EXIT_FAILURE);\n"
978 " }\n"
979 " }\n"
980 " } while (s == ERANGE);\n"
981 "\\&\n"
982 " printf(\"getprotobyname_r() returned: %s (size=%d)\\[rs]n\",\n"
983 " (s == 0) ? \"0 (success)\" : (s == ENOENT) ? \"ENOENT\" :\n"
984 " strerror(s), size);\n"
985 "\\&\n"
986 " if (s != 0 || result == NULL) {\n"
987 " printf(\"Call failed/record not found\\[rs]n\");\n"
988 " exit(EXIT_FAILURE);\n"
989 " }\n"
990 "\\&\n"
991 " printf(\"p_name=%s; p_proto=%d; aliases=\",\n"
992 " result_buf.p_name, result_buf.p_proto);\n"
993 " for (char **p = result_buf.p_aliases; *p != NULL; p++)\n"
994 " printf(\"%s \", *p);\n"
995 " printf(\"\\[rs]n\");\n"
996 "\\&\n"
997 " exit(EXIT_SUCCESS);\n"
998 "}\n"
999 msgstr ""
1000 "#define _GNU_SOURCE\n"
1001 "#include E<lt>ctype.hE<gt>\n"
1002 "#include E<lt>errno.hE<gt>\n"
1003 "#include E<lt>netdb.hE<gt>\n"
1004 "#include E<lt>stdio.hE<gt>\n"
1005 "#include E<lt>stdlib.hE<gt>\n"
1006 "#include E<lt>string.hE<gt>\n"
1007 "\\&\n"
1008 "#define MAX_BUF 10000\n"
1009 "\\&\n"
1010 "int\n"
1011 "main(int argc, char *argv[])\n"
1012 "{\n"
1013 " int size, erange_cnt, s;\n"
1014 " struct protoent result_buf;\n"
1015 " struct protoent *result;\n"
1016 " char buf[MAX_BUF];\n"
1017 "\\&\n"
1018 " if (argc E<lt> 2) {\n"
1019 " printf(\"Usage: %s proto-name [size]\\[rs]n\", argv[0]);\n"
1020 " exit(EXIT_FAILURE);\n"
1021 " }\n"
1022 "\\&\n"
1023 " size = 1024;\n"
1024 " if (argc E<gt> 2)\n"
1025 " size = atoi(argv[2]);\n"
1026 "\\&\n"
1027 " if (size E<gt> MAX_BUF) {\n"
1028 " printf(\"Exceeded buffer limit (%d)\\[rs]n\", MAX_BUF);\n"
1029 " exit(EXIT_FAILURE);\n"
1030 " }\n"
1031 "\\&\n"
1032 " erange_cnt = 0;\n"
1033 " do {\n"
1034 " s = getprotobyname_r(argv[1], &result_buf,\n"
1035 " buf, size, &result);\n"
1036 " if (s == ERANGE) {\n"
1037 " if (erange_cnt == 0)\n"
1038 " printf(\"ERANGE! Retrying with larger buffer\\[rs]n\");\n"
1039 " erange_cnt++;\n"
1040 "\\&\n"
1041 " /* Increment a byte at a time so we can see exactly\n"
1042 " what size buffer was required. */\n"
1043 "\\&\n"
1044 " size++;\n"
1045 "\\&\n"
1046 " if (size E<gt> MAX_BUF) {\n"
1047 " printf(\"Exceeded buffer limit (%d)\\[rs]n\", MAX_BUF);\n"
1048 " exit(EXIT_FAILURE);\n"
1049 " }\n"
1050 " }\n"
1051 " } while (s == ERANGE);\n"
1052 "\\&\n"
1053 " printf(\"getprotobyname_r() returned: %s (size=%d)\\[rs]n\",\n"
1054 " (s == 0) ? \"0 (success)\" : (s == ENOENT) ? \"ENOENT\" :\n"
1055 " strerror(s), size);\n"
1056 "\\&\n"
1057 " if (s != 0 || result == NULL) {\n"
1058 " printf(\"Call failed/record not found\\[rs]n\");\n"
1059 " exit(EXIT_FAILURE);\n"
1060 " }\n"
1061 "\\&\n"
1062 " printf(\"p_name=%s; p_proto=%d; aliases=\",\n"
1063 " result_buf.p_name, result_buf.p_proto);\n"
1064 " for (char **p = result_buf.p_aliases; *p != NULL; p++)\n"
1065 " printf(\"%s \", *p);\n"
1066 " printf(\"\\[rs]n\");\n"
1067 "\\&\n"
1068 " exit(EXIT_SUCCESS);\n"
1069 "}\n"
1070
1071 #. type: TH
1072 #: mageia-cauldron
1073 #, no-wrap
1074 msgid "Linux man-pages 6.17"
1075 msgstr "صفحات دليل لينكس 6.17"
1076
1077 #. type: TH
1078 #: opensuse-leap-16-1 opensuse-tumbleweed
1079 #, no-wrap
1080 msgid "Linux man-pages (unreleased)"
1081 msgstr "صفحات دليل لينكس (لم تصدر بعد)"