Debian Codegraph @

po/ar/man3/inet_net_pton.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:27+0200\n"
9 "PO-Revision-Date: 2026-06-02 19:27+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 "inet_net_pton"
25 msgstr "inet_net_pton"
26
27 #. type: TH
28 #: archlinux debian-unstable mageia-cauldron opensuse-leap-16-1
29 #: opensuse-tumbleweed
30 #, no-wrap
31 msgid "2026-02-08"
32 msgstr "8 فبراير 2026"
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 "inet_net_pton, inet_net_ntop - Internet network number conversion"
51 msgstr "inet_net_pton, inet_net_ntop - تحويل رقم شبكة الإنترنت"
52
53 #. type: SH
54 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
55 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
56 #, no-wrap
57 msgid "LIBRARY"
58 msgstr "المكتبة"
59
60 #. type: Plain text
61 #: archlinux debian-unstable fedora-44 fedora-rawhide mageia-cauldron
62 #: opensuse-leap-16-1 opensuse-tumbleweed
63 msgid "Resolver library (I<libresolv>,\\ I<-lresolv>)"
64 msgstr "مكتبة الحلّال (I<libresolv>،\\ I<-lresolv>)"
65
66 #. type: SH
67 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
68 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
69 #, no-wrap
70 msgid "SYNOPSIS"
71 msgstr "موجز"
72
73 #. type: Plain text
74 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
75 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
76 #, no-wrap
77 msgid "B<#include E<lt>arpa/inet.hE<gt>>\n"
78 msgstr "B<#include E<lt>arpa/inet.hE<gt>>\n"
79
80 #. type: Plain text
81 #: archlinux debian-unstable mageia-cauldron opensuse-leap-16-1
82 #: opensuse-tumbleweed
83 #, no-wrap
84 msgid ""
85 "B<int inet_net_pton(>size_t nsize;\n"
86 "B< int >I<af>B<, const char *>I<pres>B<,>\n"
87 "B< void >I<netp>B<[>I<nsize>B<], size_t >I<nsize>B<);>\n"
88 "B<char *inet_net_ntop(>int bits, size_t psize;\n"
89 "B< int >I<af>B<,>\n"
90 "B< const void >I<netp>B<[(>I<bits>B< - CHAR_BIT + 1) / CHAR_BIT],>\n"
91 "B< int >I<bits>B<,>\n"
92 "B< char >I<pres>B<[>I<psize>B<], size_t >I<psize>B<);>\n"
93 msgstr ""
94 "B<int inet_net_pton(>size_t nsize;\n"
95 "B< int >I<af>B<, const char *>I<pres>B<,>\n"
96 "B< void >I<netp>B<[>I<nsize>B<], size_t >I<nsize>B<);>\n"
97 "B<char *inet_net_ntop(>int bits, size_t psize;\n"
98 "B< int >I<af>B<,>\n"
99 "B< const void >I<netp>B<[(>I<bits>B< - CHAR_BIT + 1) / CHAR_BIT],>\n"
100 "B< int >I<bits>B<,>\n"
101 "B< char >I<pres>B<[>I<psize>B<], size_t >I<psize>B<);>\n"
102
103 #. type: Plain text
104 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
105 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
106 msgid ""
107 "Feature Test Macro Requirements for glibc (see B<feature_test_macros>(7)):"
108 msgstr ""
109 "متطلبات ماكروات اختبار الميزات لـ glibc (انظر B<feature_test_macros>(7)):"
110
111 #. type: Plain text
112 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
113 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
114 msgid "B<inet_net_pton>(), B<inet_net_ntop>():"
115 msgstr "B<inet_net_pton>(), B<inet_net_ntop>():"
116
117 #. type: Plain text
118 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
119 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
120 #, no-wrap
121 msgid ""
122 " Since glibc 2.20:\n"
123 " _DEFAULT_SOURCE\n"
124 " Before glibc 2.20:\n"
125 " _BSD_SOURCE || _SVID_SOURCE\n"
126 msgstr ""
127 " منذ glibc 2.20:\n"
128 " _DEFAULT_SOURCE\n"
129 " قبل glibc 2.20:\n"
130 " _BSD_SOURCE || _SVID_SOURCE\n"
131
132 #. type: SH
133 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
134 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
135 #, no-wrap
136 msgid "DESCRIPTION"
137 msgstr "الوصف"
138
139 #. type: Plain text
140 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
141 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
142 msgid ""
143 "These functions convert network numbers between presentation (i.e., "
144 "printable) format and network (i.e., binary) format."
145 msgstr ""
146 "تحوّل هاتان الدالتان أرقام الشبكة بين صيغة العرض (أي القابلة للطباعة) وصيغة "
147 "الشبكة (أي الثنائية)."
148
149 #. type: Plain text
150 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
151 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
152 msgid ""
153 "For both functions, I<af> specifies the address family for the conversion; "
154 "the only supported value is B<AF_INET>."
155 msgstr ""
156 "بالنسبة لكلتا الدالتين، يُحدد I<af> عائلة العنوان للتحويل؛ القيمة الوحيدة "
157 "المدعومة هي B<AF_INET>."
158
159 #. type: SS
160 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
161 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
162 #, no-wrap
163 msgid "inet_net_pton()"
164 msgstr "inet_net_pton()"
165
166 #. type: Plain text
167 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
168 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
169 msgid ""
170 "The B<inet_net_pton>() function converts I<pres>, a null-terminated string "
171 "containing an Internet network number in presentation format to network "
172 "format. The result of the conversion, which is in network byte order, is "
173 "placed in the buffer pointed to by I<netp>. (The I<netp> argument typically "
174 "points to an I<in_addr> structure.) The I<nsize> argument specifies the "
175 "number of bytes available in I<netp>."
176 msgstr ""
177 "تحوّل الدالة B<inet_net_pton>() سلسلة المحارف I<pres> المنتهية بقيمة خالية "
178 "والتي تحتوي على رقم شبكة إنترنت بصيغة العرض إلى صيغة الشبكة. تُوضع نتيجة "
179 "التحويل، والتي هي بترتيب بايت الشبكة، في المخزن المؤقت المشار إليه بواسطة "
180 "I<netp>. (يشير معامل I<netp> عادةً إلى بنية I<in_addr>.) يُحدد معامل I<nsize> "
181 "عدد البايتات المتاحة في I<netp>."
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 "On success, B<inet_net_pton>() returns the number of bits in the network "
188 "number field of the result placed in I<netp>. For a discussion of the input "
189 "presentation format and the return value, see NOTES."
190 msgstr ""
191 "عند النجاح، تُرجع B<inet_net_pton>() عدد البتات في حقل رقم الشبكة للنتيجة "
192 "الموضوعة في I<netp>. لمناقشة صيغة عرض الإدخال وقيمة الإرجاع، انظر الملاحظات."
193
194 #. type: Plain text
195 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
196 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
197 msgid ""
198 "I<Note>: the buffer pointed to by I<netp> should be zeroed out before "
199 "calling B<inet_net_pton>(), since the call writes only as many bytes as are "
200 "required for the network number (or as are explicitly specified by I<pres>), "
201 "which may be less than the number of bytes in a complete network address."
202 msgstr ""
203 "I<ملاحظة>: يجب تصفير المخزن المؤقت المشار إليه بواسطة I<netp> قبل استدعاء "
204 "B<inet_net_pton>()، لأن الاستدعاء يكتب فقط عدد البايتات المطلوبة لرقم الشبكة "
205 "(أو كما هو محدد صراحة بواسطة I<pres>)، والذي قد يكون أقل من عدد البايتات في "
206 "عنوان شبكة كامل."
207
208 #. type: SS
209 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
210 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
211 #, no-wrap
212 msgid "inet_net_ntop()"
213 msgstr "inet_net_ntop()"
214
215 #. type: Plain text
216 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
217 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
218 msgid ""
219 "The B<inet_net_ntop>() function converts the network number in the buffer "
220 "pointed to by I<netp> to presentation format; I<*netp> is interpreted as a "
221 "value in network byte order. The I<bits> argument specifies the number of "
222 "bits in the network number in I<*netp>."
223 msgstr ""
224 "تحوّل الدالة B<inet_net_ntop>() رقم الشبكة في المخزن المؤقت المشار إليه "
225 "بواسطة I<netp> إلى صيغة العرض؛ يُفسر I<*netp> كقيمة بترتيب بايت الشبكة. يُحدد "
226 "معامل I<bits> عدد البتات في رقم الشبكة في I<*netp>."
227
228 #. type: Plain text
229 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
230 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
231 msgid ""
232 "The null-terminated presentation-format string is placed in the buffer "
233 "pointed to by I<pres>. The I<psize> argument specifies the number of bytes "
234 "available in I<pres>. The presentation string is in CIDR format: a dotted-"
235 "decimal number representing the network address, followed by a slash, and "
236 "the size of the network number in bits."
237 msgstr ""
238 "تُوضع سلسلة المحارف بصيغة العرض المنتهية بقيمة خالية في المخزن المؤقت المشار "
239 "إليه بواسطة I<pres>. يُحدد معامل I<psize> عدد البايتات المتاحة في I<pres>. "
240 "سلسلة العرض تكون بصيغة CIDR: رقم عشري منقط يمثل عنوان الشبكة، متبوعًا بشرطة "
241 "مائلة، وحجم رقم الشبكة بالبتات."
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 "قيمة الإرجاع"
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, B<inet_net_pton>() returns the number of bits in the network "
255 "number. On error, it returns -1, and I<errno> is set to indicate the error."
256 msgstr ""
257 "عند النجاح، تُرجع B<inet_net_pton>() عدد البتات في رقم الشبكة. عند الخطأ، "
258 "تُرجع -1، ويُضبط I<errno> للإشارة إلى الخطأ."
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 success, B<inet_net_ntop>() returns I<pres>. On error, it returns NULL, "
265 "and I<errno> is set to indicate the error."
266 msgstr ""
267 "عند النجاح، تُرجع B<inet_net_ntop>() I<pres>. عند الخطأ، تُرجع NULL، ويُضبط "
268 "I<errno> للإشارة إلى الخطأ."
269
270 #. type: SH
271 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
272 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
273 #, no-wrap
274 msgid "ERRORS"
275 msgstr "الأخطاء"
276
277 #. type: TP
278 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
279 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
280 #, no-wrap
281 msgid "B<EAFNOSUPPORT>"
282 msgstr "B<EAFNOSUPPORT>"
283
284 #. type: Plain text
285 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
286 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
287 msgid "I<af> specified a value other than B<AF_INET>."
288 msgstr "حدد I<af> قيمة غير B<AF_INET>."
289
290 #. type: TP
291 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
292 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
293 #, no-wrap
294 msgid "B<EMSGSIZE>"
295 msgstr "B<EMSGSIZE>"
296
297 #. type: Plain text
298 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
299 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
300 msgid "The size of the output buffer was insufficient."
301 msgstr "كان حجم المخزن المؤقت للإخراج غير كافٍ."
302
303 #. type: TP
304 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
305 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
306 #, no-wrap
307 msgid "B<ENOENT>"
308 msgstr "B<ENOENT>"
309
310 #. type: Plain text
311 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
312 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
313 msgid "(B<inet_net_pton>()) I<pres> was not in correct presentation format."
314 msgstr "(B<inet_net_pton>()) لم يكن I<pres> بصيغة عرض صحيحة."
315
316 #. type: SH
317 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
318 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
319 #, no-wrap
320 msgid "STANDARDS"
321 msgstr "المعايير"
322
323 #. type: Plain text
324 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
325 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
326 msgid "None."
327 msgstr "لا شيء."
328
329 #. type: SH
330 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
331 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
332 #, no-wrap
333 msgid "NOTES"
334 msgstr "ملاحظات"
335
336 #. type: SS
337 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
338 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
339 #, no-wrap
340 msgid "Input presentation format for inet_net_pton()"
341 msgstr "صيغة عرض الإدخال لـ inet_net_pton()"
342
343 #. type: Plain text
344 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
345 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
346 msgid ""
347 "The network number may be specified either as a hexadecimal value or in "
348 "dotted-decimal notation."
349 msgstr "يمكن تحديد رقم الشبكة إما كقيمة ست عشرية أو بترميز عشري منقط."
350
351 #. If the hexadecimal string is short, the remaining nibbles are zeroed.
352 #. type: Plain text
353 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
354 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
355 msgid ""
356 "Hexadecimal values are indicated by an initial \"0x\" or \"0X\". The "
357 "hexadecimal digits populate the nibbles (half octets) of the network number "
358 "from left to right in network byte order."
359 msgstr ""
360 "تُشار إلى القيم الست عشرية ببادئة \"0x\" أو \"0X\". تملأ الأرقام الست عشرية "
361 "الأنصاف (نصف الثمانيات) من رقم الشبكة من اليسار إلى اليمين بترتيب بايتات "
362 "الشبكة."
363
364 #. type: Plain text
365 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
366 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
367 msgid ""
368 "In dotted-decimal notation, up to four octets are specified, as decimal "
369 "numbers separated by dots. Thus, any of the following forms are accepted:"
370 msgstr ""
371 "في الترميز العشري المنقط، يُحدد حتى أربع ثمانيات، كأرقام عشرية مفصولة بنقاط. "
372 "وبالتالي، تُقبل أي من الصيغ التالية:"
373
374 #. type: Plain text
375 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
376 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
377 #, no-wrap
378 msgid ""
379 "a.b.c.d\n"
380 "a.b.c\n"
381 "a.b\n"
382 "a\n"
383 msgstr ""
384 "a.b.c.d\n"
385 "a.b.c\n"
386 "a.b\n"
387 "a\n"
388
389 #. #-#-#-#-# archlinux: inet_net_pton.3.pot (PACKAGE VERSION) #-#-#-#-#
390 #. Reading other man pages, some other implementations treat
391 #. 'c' in a.b.c as a 16-bit number that populates right-most two bytes
392 #. 'b' in a.b as a 24-bit number that populates right-most three bytes
393 #. type: Plain text
394 #. #-#-#-#-# debian-trixie: inet_net_pton.3.pot (PACKAGE VERSION) #-#-#-#-#
395 #. Reading other man pages, some other implementations treat
396 #. 'c' in a.b.c as a 16-bit number that populates right-most two bytes
397 #. 'b' in a.b as a 24-bit number that populates right-most three bytes
398 #. type: Plain text
399 #. #-#-#-#-# debian-unstable: inet_net_pton.3.pot (PACKAGE VERSION) #-#-#-#-#
400 #. Reading other man pages, some other implementations treat
401 #. 'c' in a.b.c as a 16-bit number that populates right-most two bytes
402 #. 'b' in a.b as a 24-bit number that populates right-most three bytes
403 #. type: Plain text
404 #. #-#-#-#-# fedora-44: inet_net_pton.3.pot (PACKAGE VERSION) #-#-#-#-#
405 #. Reading other man pages, some other implementations treat
406 #. 'c' in a.b.c as a 16-bit number that populates right-most two bytes
407 #. 'b' in a.b as a 24-bit number that populates right-most three bytes
408 #. type: Plain text
409 #. #-#-#-#-# fedora-rawhide: inet_net_pton.3.pot (PACKAGE VERSION) #-#-#-#-#
410 #. Reading other man pages, some other implementations treat
411 #. 'c' in a.b.c as a 16-bit number that populates right-most two bytes
412 #. 'b' in a.b as a 24-bit number that populates right-most three bytes
413 #. type: Plain text
414 #. #-#-#-#-# mageia-cauldron: inet_net_pton.3.pot (PACKAGE VERSION) #-#-#-#-#
415 #. Reading other man pages, some other implementations treat
416 #. 'c' in a.b.c as a 16-bit number that populates right-most two bytes
417 #. 'b' in a.b as a 24-bit number that populates right-most three bytes
418 #. type: Plain text
419 #. #-#-#-#-# opensuse-leap-16-1: inet_net_pton.3.pot (PACKAGE VERSION) #-#-#-#-#
420 #. Reading other man pages, some other implementations treat
421 #. 'c' in a.b.c as a 16-bit number that populates right-most two bytes
422 #. 'b' in a.b as a 24-bit number that populates right-most three bytes
423 #. type: Plain text
424 #. #-#-#-#-# opensuse-tumbleweed: inet_net_pton.3.pot (PACKAGE VERSION) #-#-#-#-#
425 #. Reading other man pages, some other implementations treat
426 #. 'c' in a.b.c as a 16-bit number that populates right-most two bytes
427 #. 'b' in a.b as a 24-bit number that populates right-most three bytes
428 #. type: Plain text
429 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
430 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
431 msgid ""
432 "Each part is a number in the range 0 to 255 that populates one byte of the "
433 "resulting network number, going from left to right, in network-byte (big "
434 "endian) order. Where a part is omitted, the resulting byte in the network "
435 "number is zero."
436 msgstr ""
437 "كل جزء هو رقم في النطاق من 0 إلى 255 يملأ بايتًا واحدًا من رقم الشبكة الناتج، "
438 "متجهًا من اليسار إلى اليمين، بترتيب بايتات الشبكة (النظام الكبير). حيث يُحذف "
439 "جزء، يكون البايت الناتج في رقم الشبكة صفرًا."
440
441 #. type: Plain text
442 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
443 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
444 msgid ""
445 "For either hexadecimal or dotted-decimal format, the network number can "
446 "optionally be followed by a slash and a number in the range 0 to 32, which "
447 "specifies the size of the network number in bits."
448 msgstr ""
449 "بالنسبة للصيغة الست عشرية أو العشرية المنقطة، يمكن اختياريًا أن يتبع رقم "
450 "الشبكة بشرطة مائلة ورقم في النطاق من 0 إلى 32، والذي يحدد حجم رقم الشبكة "
451 "بالبتات."
452
453 #. type: SS
454 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
455 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
456 #, no-wrap
457 msgid "Return value of inet_net_pton()"
458 msgstr "قيمة إرجاع inet_net_pton()"
459
460 #. type: Plain text
461 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
462 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
463 msgid ""
464 "The return value of B<inet_net_pton>() is the number of bits in the network "
465 "number field. If the input presentation string terminates with a slash and "
466 "an explicit size value, then that size becomes the return value of "
467 "B<inet_net_pton>(). Otherwise, the return value, I<bits>, is inferred as "
468 "follows:"
469 msgstr ""
470 "قيمة إرجاع B<inet_net_pton>() هي عدد البتات في حقل رقم الشبكة. إذا انتهت "
471 "سلسلة العرض المدخلة بشرطة مائلة وقيمة حجم صريحة، فإن ذلك الحجم يصبح قيمة "
472 "إرجاع B<inet_net_pton>(). وإلا، يُستنتج قيمة الإرجاع، I<bits>، كالتالي:"
473
474 #. type: IP
475 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
476 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
477 #, no-wrap
478 msgid "\\[bu]"
479 msgstr "\\[bu]"
480
481 #. type: Plain text
482 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
483 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
484 msgid ""
485 "If the most significant byte of the network number is greater than or equal "
486 "to 240, then I<bits> is 32."
487 msgstr ""
488 "إذا كان البايت الأكثر دلالة من رقم الشبكة أكبر من أو يساوي 240، فإن I<bits> "
489 "هو 32."
490
491 #. type: Plain text
492 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
493 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
494 msgid ""
495 "Otherwise, if the most significant byte of the network number is greater "
496 "than or equal to 224, then I<bits> is 4."
497 msgstr ""
498 "وإلا، إذا كان البايت الأكثر دلالة من رقم الشبكة أكبر من أو يساوي 224، فإن "
499 "I<bits> هو 4."
500
501 #. type: Plain text
502 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
503 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
504 msgid ""
505 "Otherwise, if the most significant byte of the network number is greater "
506 "than or equal to 192, then I<bits> is 24."
507 msgstr ""
508 "وإلا، إذا كان البايت الأكثر دلالة من رقم الشبكة أكبر من أو يساوي 192، فإن "
509 "I<bits> هو 24."
510
511 #. type: Plain text
512 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
513 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
514 msgid ""
515 "Otherwise, if the most significant byte of the network number is greater "
516 "than or equal to 128, then I<bits> is 16."
517 msgstr ""
518 "وإلا، إذا كان البايت الأكثر دلالة من رقم الشبكة أكبر من أو يساوي 128، فإن "
519 "I<bits> هو 16."
520
521 #. type: Plain text
522 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
523 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
524 msgid "Otherwise, I<bits> is 8."
525 msgstr "وإلا، فإن I<bits> هو 8."
526
527 #. type: Plain text
528 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
529 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
530 msgid ""
531 "If the resulting I<bits> value from the above steps is greater than or equal "
532 "to 8, but the number of octets specified in the network number exceed "
533 "I<bits/8>, then I<bits> is set to 8 times the number of octets actually "
534 "specified."
535 msgstr ""
536 "إذا كانت قيمة I<bits> الناتجة من الخطوات أعلاه أكبر من أو تساوي 8، لكن عدد "
537 "الثمانيات المحدد في رقم الشبكة يتجاوز I<bits/8>، فإن I<bits> يُضبط على 8 "
538 "أضعاف عدد الثمانيات المحددة فعليًا."
539
540 #. type: SH
541 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
542 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
543 #, no-wrap
544 msgid "EXAMPLES"
545 msgstr "أمثلة"
546
547 #. type: Plain text
548 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
549 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
550 msgid ""
551 "The program below demonstrates the use of B<inet_net_pton>() and "
552 "B<inet_net_ntop>(). It uses B<inet_net_pton>() to convert the presentation "
553 "format network address provided in its first command-line argument to binary "
554 "form, displays the return value from B<inet_net_pton>(). It then uses "
555 "B<inet_net_ntop>() to convert the binary form back to presentation format, "
556 "and displays the resulting string."
557 msgstr ""
558 "يُظهر البرنامج أدناه استخدام B<inet_net_pton>() وB<inet_net_ntop>(). يستخدم "
559 "B<inet_net_pton>() لتحويل عنوان الشبكة بصيغة العرض المُقدم في وسيط سطر "
560 "الأوامر الأول إلى صيغة ثنائية، ويعرض قيمة الإرجاع من B<inet_net_pton>(). ثم "
561 "يستخدم B<inet_net_ntop>() لتحويل الصيغة الثنائية مرة أخرى إلى صيغة العرض، "
562 "ويعرض السلسلة الناتجة."
563
564 #. type: Plain text
565 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
566 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
567 msgid ""
568 "In order to demonstrate that B<inet_net_pton>() may not write to all bytes "
569 "of its I<netp> argument, the program allows an optional second command-line "
570 "argument, a number used to initialize the buffer before B<inet_net_pton>() "
571 "is called. As its final line of output, the program displays all of the "
572 "bytes of the buffer returned by B<inet_net_pton>() allowing the user to see "
573 "which bytes have not been touched by B<inet_net_pton>()."
574 msgstr ""
575 "لإظهار أن B<inet_net_pton>() قد لا يكتب إلى جميع بايتات وسيطه I<netp>، يسمح "
576 "البرنامج بوسيط سطر أوامر ثانٍ اختياري، وهو رقم يُستخدم لتهيئة المخزن المؤقت "
577 "قبل استدعاء B<inet_net_pton>(). كسطر إخراج أخير، يعرض البرنامج جميع بايتات "
578 "المخزن المؤقت التي أرجعها B<inet_net_pton()> مما يسمح للمستخدم برؤية أي "
579 "البايتات لم تُلمس بواسطة B<inet_net_pton>()."
580
581 #. type: Plain text
582 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
583 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
584 msgid ""
585 "An example run, showing that B<inet_net_pton>() infers the number of bits "
586 "in the network number:"
587 msgstr ""
588 "تشغيل مثال، يُظهر أن B<inet_net_pton>() يستنتج عدد البتات في رقم الشبكة:"
589
590 #. type: Plain text
591 #: archlinux debian-unstable mageia-cauldron opensuse-leap-16-1
592 #: opensuse-tumbleweed
593 #, no-wrap
594 msgid ""
595 "$B< ./a.out 193.168>;\n"
596 "inet_net_pton() returned: 24\n"
597 "inet_net_ntop() yielded: 193.168.0/24\n"
598 "Raw address: c1a80000\n"
599 msgstr ""
600 "$B< ./a.out 193.168>;\n"
601 "أرجع inet_net_pton(): 24\n"
602 "أنتج inet_net_ntop(): 193.168.0/24\n"
603 "العنوان الخام: c1a80000\n"
604
605 #. type: Plain text
606 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
607 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
608 msgid ""
609 "Demonstrate that B<inet_net_pton>() does not zero out unused bytes in its "
610 "result buffer:"
611 msgstr ""
612 "أظهر أن B<inet_net_pton>() لا يُصفّر البايتات غير المستخدمة في مخزنه الناتج:"
613
614 #. type: Plain text
615 #: archlinux debian-unstable mageia-cauldron opensuse-leap-16-1
616 #: opensuse-tumbleweed
617 #, no-wrap
618 msgid ""
619 "$B< ./a.out 193.168 0xffffffff>;\n"
620 "inet_net_pton() returned: 24\n"
621 "inet_net_ntop() yielded: 193.168.0/24\n"
622 "Raw address: c1a800ff\n"
623 msgstr ""
624 "$B< ./a.out 193.168 0xffffffff>;\n"
625 "أرجع inet_net_pton(): 24\n"
626 "أنتج inet_net_ntop(): 193.168.0/24\n"
627 "العنوان الخام: c1a800ff\n"
628
629 #. type: Plain text
630 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
631 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
632 msgid ""
633 "Demonstrate that B<inet_net_pton>() will widen the inferred size of the "
634 "network number, if the supplied number of bytes in the presentation string "
635 "exceeds the inferred value:"
636 msgstr ""
637 "أظهر أن B<inet_net_pton>() ستوسع الحجم المستنتج لرقم الشبكة، إذا تجاوز عدد "
638 "البايتات المقدمة في سلسلة العرض القيمة المستنتجة:"
639
640 #. type: Plain text
641 #: archlinux debian-unstable mageia-cauldron opensuse-leap-16-1
642 #: opensuse-tumbleweed
643 #, no-wrap
644 msgid ""
645 "$B< ./a.out 193.168.1.128>;\n"
646 "inet_net_pton() returned: 32\n"
647 "inet_net_ntop() yielded: 193.168.1.128/32\n"
648 "Raw address: c1a80180\n"
649 msgstr ""
650 "$B< ./a.out 193.168.1.128>;\n"
651 "inet_net_pton() returned: 32\n"
652 "inet_net_ntop() yielded: 193.168.1.128/32\n"
653 "Raw address: c1a80180\n"
654
655 #. type: Plain text
656 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
657 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
658 msgid ""
659 "Explicitly specifying the size of the network number overrides any inference "
660 "about its size (but any extra bytes that are explicitly specified will still "
661 "be used by B<inet_net_pton>(): to populate the result buffer):"
662 msgstr ""
663 "تجاوز تحديد حجم رقم الشبكة صراحةً أي استنتاج حول حجمه (ولكن أي بايتات إضافية "
664 "تم تحديدها صراحةً ستظل تُستخدم بواسطة B<inet_net_pton>(): لملء مخزن النتيجة):"
665
666 #. type: Plain text
667 #: archlinux debian-unstable mageia-cauldron opensuse-leap-16-1
668 #: opensuse-tumbleweed
669 #, no-wrap
670 msgid ""
671 "$B< ./a.out 193.168.1.128/24>;\n"
672 "inet_net_pton() returned: 24\n"
673 "inet_net_ntop() yielded: 193.168.1/24\n"
674 "Raw address: c1a80180\n"
675 msgstr ""
676 "$B< ./a.out 193.168.1.128/24>;\n"
677 "inet_net_pton() returned: 24\n"
678 "inet_net_ntop() yielded: 193.168.1/24\n"
679 "Raw address: c1a80180\n"
680
681 #. type: SS
682 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
683 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
684 #, no-wrap
685 msgid "Program source"
686 msgstr "مصدر البرنامج"
687
688 #. type: Plain text
689 #: archlinux debian-unstable mageia-cauldron opensuse-leap-16-1
690 #: opensuse-tumbleweed
691 #, no-wrap
692 msgid ""
693 "/* Link with \"-lresolv\" */\n"
694 "\\&\n"
695 "#include E<lt>arpa/inet.hE<gt>\n"
696 "#include E<lt>err.hE<gt>\n"
697 "#include E<lt>stdio.hE<gt>\n"
698 "#include E<lt>stdlib.hE<gt>\n"
699 "\\&\n"
700 "int\n"
701 "main(int argc, char *argv[])\n"
702 "{\n"
703 " char buf[100];\n"
704 " struct in_addr addr;\n"
705 " int bits;\n"
706 "\\&\n"
707 " if (argc E<lt> 2) {\n"
708 " fprintf(stderr,\n"
709 " \"Usage: %s presentation-form [addr-init-value]\\[rs]n\",\n"
710 " argv[0]);\n"
711 " exit(EXIT_FAILURE);\n"
712 " }\n"
713 "\\&\n"
714 " /* If argv[2] is supplied (a numeric value), use it to initialize\n"
715 " the output buffer given to inet_net_pton(), so that we can see\n"
716 " that inet_net_pton() initializes only those bytes needed for\n"
717 " the network number. If argv[2] is not supplied, then initialize\n"
718 " the buffer to zero (as is recommended practice). */\n"
719 "\\&\n"
720 " addr.s_addr = (argc E<gt> 2) ? strtod(argv[2], NULL) : 0;\n"
721 "\\&\n"
722 " /* Convert presentation network number in argv[1] to binary. */\n"
723 "\\&\n"
724 " bits = inet_net_pton(AF_INET, argv[1], &addr, sizeof(addr));\n"
725 " if (bits == -1)\n"
726 " err(EXIT_FAILURE, \"inet_net_ntop\");\n"
727 "\\&\n"
728 " printf(\"inet_net_pton() returned: %d\\[rs]n\", bits);\n"
729 "\\&\n"
730 " /* Convert binary format back to presentation, using \\[aq]bits\\[aq]\n"
731 " returned by inet_net_pton(). */\n"
732 "\\&\n"
733 " if (inet_net_ntop(AF_INET, &addr, bits, buf, sizeof(buf)) == NULL)\n"
734 " err(EXIT_FAILURE, \"inet_net_ntop\");\n"
735 "\\&\n"
736 " printf(\"inet_net_ntop() yielded: %s\\[rs]n\", buf);\n"
737 "\\&\n"
738 " /* Display \\[aq]addr\\[aq] in raw form (in network byte order), so we can\n"
739 " see bytes not displayed by inet_net_ntop(); some of those bytes\n"
740 " may not have been touched by inet_net_ntop(), and so will still\n"
741 " have any initial value that was specified in argv[2]. */\n"
742 "\\&\n"
743 " printf(\"Raw address: %x\\[rs]n\", htonl(addr.s_addr));\n"
744 "\\&\n"
745 " exit(EXIT_SUCCESS);\n"
746 "}\n"
747 msgstr ""
748 "/* Link with \"-lresolv\" */\n"
749 "\\&\n"
750 "#include E<lt>arpa/inet.hE<gt>\n"
751 "#include E<lt>err.hE<gt>\n"
752 "#include E<lt>stdio.hE<gt>\n"
753 "#include E<lt>stdlib.hE<gt>\n"
754 "\\&\n"
755 "int\n"
756 "main(int argc, char *argv[])\n"
757 "{\n"
758 " char buf[100];\n"
759 " struct in_addr addr;\n"
760 " int bits;\n"
761 "\\&\n"
762 " if (argc E<lt> 2) {\n"
763 " fprintf(stderr,\n"
764 " \"Usage: %s presentation-form [addr-init-value]\\[rs]n\",\n"
765 " argv[0]);\n"
766 " exit(EXIT_FAILURE);\n"
767 " }\n"
768 "\\&\n"
769 " /* If argv[2] is supplied (a numeric value), use it to initialize\n"
770 " the output buffer given to inet_net_pton(), so that we can see\n"
771 " that inet_net_pton() initializes only those bytes needed for\n"
772 " the network number. If argv[2] is not supplied, then initialize\n"
773 " the buffer to zero (as is recommended practice). */\n"
774 "\\&\n"
775 " addr.s_addr = (argc E<gt> 2) ? strtod(argv[2], NULL) : 0;\n"
776 "\\&\n"
777 " /* Convert presentation network number in argv[1] to binary. */\n"
778 "\\&\n"
779 " bits = inet_net_pton(AF_INET, argv[1], &addr, sizeof(addr));\n"
780 " if (bits == -1)\n"
781 " err(EXIT_FAILURE, \"inet_net_ntop\");\n"
782 "\\&\n"
783 " printf(\"inet_net_pton() returned: %d\\[rs]n\", bits);\n"
784 "\\&\n"
785 " /* Convert binary format back to presentation, using \\[aq]bits\\[aq]\n"
786 " returned by inet_net_pton(). */\n"
787 "\\&\n"
788 " if (inet_net_ntop(AF_INET, &addr, bits, buf, sizeof(buf)) == NULL)\n"
789 " err(EXIT_FAILURE, \"inet_net_ntop\");\n"
790 "\\&\n"
791 " printf(\"inet_net_ntop() yielded: %s\\[rs]n\", buf);\n"
792 "\\&\n"
793 " /* Display \\[aq]addr\\[aq] in raw form (in network byte order), so we can\n"
794 " see bytes not displayed by inet_net_ntop(); some of those bytes\n"
795 " may not have been touched by inet_net_ntop(), and so will still\n"
796 " have any initial value that was specified in argv[2]. */\n"
797 "\\&\n"
798 " printf(\"Raw address: %x\\[rs]n\", htonl(addr.s_addr));\n"
799 "\\&\n"
800 " exit(EXIT_SUCCESS);\n"
801 "}\n"
802
803 #. SRC END
804 #. type: SH
805 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
806 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
807 #, no-wrap
808 msgid "SEE ALSO"
809 msgstr "انظر أيضًا"
810
811 #. type: Plain text
812 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
813 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
814 msgid "B<inet>(3), B<networks>(5)"
815 msgstr "B<inet>(3), B<networks>(5)"
816
817 #. type: TH
818 #: debian-trixie
819 #, no-wrap
820 msgid "2024-06-15"
821 msgstr "15 يونيو 2024"
822
823 #. type: TH
824 #: debian-trixie
825 #, no-wrap
826 msgid "Linux man-pages 6.9.1"
827 msgstr "صفحات دليل لينكس 6.9.1"
828
829 #. type: Plain text
830 #: debian-trixie
831 msgid "Resolver library (I<libresolv>, I<-lresolv>)"
832 msgstr "مكتبة المحلل (I<libresolv>،‏ I<-lresolv>)"
833
834 #. type: Plain text
835 #: debian-trixie fedora-44 fedora-rawhide
836 #, no-wrap
837 msgid ""
838 "B<int inet_net_pton(int >I<af>B<, const char *>I<pres>B<,>\n"
839 "B< void >I<netp>B<[.>I<nsize>B<], size_t >I<nsize>B<);>\n"
840 "B<char *inet_net_ntop(int >I<af>B<,>\n"
841 "B< const void >I<netp>B<[(.>I<bits>B< - CHAR_BIT + 1) / CHAR_BIT],>\n"
842 "B< int >I<bits>B<,>\n"
843 "B< char >I<pres>B<[.>I<psize>B<], size_t >I<psize>B<);>\n"
844 msgstr ""
845 "B<int inet_net_pton(int >I<af>B<, const char *>I<pres>B<,>\n"
846 "B< void >I<netp>B<[.>I<nsize>B<], size_t >I<nsize>B<);>\n"
847 "B<char *inet_net_ntop(int >I<af>B<,>\n"
848 "B< const void >I<netp>B<[(.>I<bits>B< - CHAR_BIT + 1) / CHAR_BIT],>\n"
849 "B< int >I<bits>B<,>\n"
850 "B< char >I<pres>B<[.>I<psize>B<], size_t >I<psize>B<);>\n"
851
852 #. type: Plain text
853 #: debian-trixie fedora-44 fedora-rawhide
854 #, no-wrap
855 msgid ""
856 "$ B<./a.out 193.168>\n"
857 "inet_net_pton() returned: 24\n"
858 "inet_net_ntop() yielded: 193.168.0/24\n"
859 "Raw address: c1a80000\n"
860 msgstr ""
861 "$ B<./a.out 193.168>\n"
862 "inet_net_pton() returned: 24\n"
863 "inet_net_ntop() yielded: 193.168.0/24\n"
864 "Raw address: c1a80000\n"
865
866 #. type: Plain text
867 #: debian-trixie fedora-44 fedora-rawhide
868 #, no-wrap
869 msgid ""
870 "$ B<./a.out 193.168 0xffffffff>\n"
871 "inet_net_pton() returned: 24\n"
872 "inet_net_ntop() yielded: 193.168.0/24\n"
873 "Raw address: c1a800ff\n"
874 msgstr ""
875 "$ B<./a.out 193.168 0xffffffff>\n"
876 "inet_net_pton() returned: 24\n"
877 "inet_net_ntop() yielded: 193.168.0/24\n"
878 "Raw address: c1a800ff\n"
879
880 #. type: Plain text
881 #: debian-trixie fedora-44 fedora-rawhide
882 #, no-wrap
883 msgid ""
884 "$ B<./a.out 193.168.1.128>\n"
885 "inet_net_pton() returned: 32\n"
886 "inet_net_ntop() yielded: 193.168.1.128/32\n"
887 "Raw address: c1a80180\n"
888 msgstr ""
889 "$ B<./a.out 193.168.1.128>\n"
890 "inet_net_pton() returned: 32\n"
891 "inet_net_ntop() yielded: 193.168.1.128/32\n"
892 "Raw address: c1a80180\n"
893
894 #. type: Plain text
895 #: debian-trixie fedora-44 fedora-rawhide
896 #, no-wrap
897 msgid ""
898 "$ B<./a.out 193.168.1.128/24>\n"
899 "inet_net_pton() returned: 24\n"
900 "inet_net_ntop() yielded: 193.168.1/24\n"
901 "Raw address: c1a80180\n"
902 msgstr ""
903 "$ B<./a.out 193.168.1.128/24>\n"
904 "inet_net_pton() returned: 24\n"
905 "inet_net_ntop() yielded: 193.168.1/24\n"
906 "Raw address: c1a80180\n"
907
908 #. type: Plain text
909 #: debian-trixie fedora-44 fedora-rawhide
910 #, no-wrap
911 msgid ""
912 "/* Link with \"-lresolv\" */\n"
913 "\\&\n"
914 "#include E<lt>arpa/inet.hE<gt>\n"
915 "#include E<lt>stdio.hE<gt>\n"
916 "#include E<lt>stdlib.hE<gt>\n"
917 "\\&\n"
918 "#define errExit(msg) do { perror(msg); exit(EXIT_FAILURE); \\[rs]\n"
919 " } while (0)\n"
920 "\\&\n"
921 "int\n"
922 "main(int argc, char *argv[])\n"
923 "{\n"
924 " char buf[100];\n"
925 " struct in_addr addr;\n"
926 " int bits;\n"
927 "\\&\n"
928 " if (argc E<lt> 2) {\n"
929 " fprintf(stderr,\n"
930 " \"Usage: %s presentation-form [addr-init-value]\\[rs]n\",\n"
931 " argv[0]);\n"
932 " exit(EXIT_FAILURE);\n"
933 " }\n"
934 "\\&\n"
935 " /* If argv[2] is supplied (a numeric value), use it to initialize\n"
936 " the output buffer given to inet_net_pton(), so that we can see\n"
937 " that inet_net_pton() initializes only those bytes needed for\n"
938 " the network number. If argv[2] is not supplied, then initialize\n"
939 " the buffer to zero (as is recommended practice). */\n"
940 "\\&\n"
941 " addr.s_addr = (argc E<gt> 2) ? strtod(argv[2], NULL) : 0;\n"
942 "\\&\n"
943 " /* Convert presentation network number in argv[1] to binary. */\n"
944 "\\&\n"
945 " bits = inet_net_pton(AF_INET, argv[1], &addr, sizeof(addr));\n"
946 " if (bits == -1)\n"
947 " errExit(\"inet_net_ntop\");\n"
948 "\\&\n"
949 " printf(\"inet_net_pton() returned: %d\\[rs]n\", bits);\n"
950 "\\&\n"
951 " /* Convert binary format back to presentation, using \\[aq]bits\\[aq]\n"
952 " returned by inet_net_pton(). */\n"
953 "\\&\n"
954 " if (inet_net_ntop(AF_INET, &addr, bits, buf, sizeof(buf)) == NULL)\n"
955 " errExit(\"inet_net_ntop\");\n"
956 "\\&\n"
957 " printf(\"inet_net_ntop() yielded: %s\\[rs]n\", buf);\n"
958 "\\&\n"
959 " /* Display \\[aq]addr\\[aq] in raw form (in network byte order), so we can\n"
960 " see bytes not displayed by inet_net_ntop(); some of those bytes\n"
961 " may not have been touched by inet_net_ntop(), and so will still\n"
962 " have any initial value that was specified in argv[2]. */\n"
963 "\\&\n"
964 " printf(\"Raw address: %x\\[rs]n\", htonl(addr.s_addr));\n"
965 "\\&\n"
966 " exit(EXIT_SUCCESS);\n"
967 "}\n"
968 msgstr ""
969 "/* Link with \"-lresolv\" */\n"
970 "\\&\n"
971 "#include E<lt>arpa/inet.hE<gt>\n"
972 "#include E<lt>stdio.hE<gt>\n"
973 "#include E<lt>stdlib.hE<gt>\n"
974 "\\&\n"
975 "#define errExit(msg) do { perror(msg); exit(EXIT_FAILURE); \\[rs]\n"
976 " } while (0)\n"
977 "\\&\n"
978 "int\n"
979 "main(int argc, char *argv[])\n"
980 "{\n"
981 " char buf[100];\n"
982 " struct in_addr addr;\n"
983 " int bits;\n"
984 "\\&\n"
985 " if (argc E<lt> 2) {\n"
986 " fprintf(stderr,\n"
987 " \"Usage: %s presentation-form [addr-init-value]\\[rs]n\",\n"
988 " argv[0]);\n"
989 " exit(EXIT_FAILURE);\n"
990 " }\n"
991 "\\&\n"
992 " /* If argv[2] is supplied (a numeric value), use it to initialize\n"
993 " the output buffer given to inet_net_pton(), so that we can see\n"
994 " that inet_net_pton() initializes only those bytes needed for\n"
995 " the network number. If argv[2] is not supplied, then initialize\n"
996 " the buffer to zero (as is recommended practice). */\n"
997 "\\&\n"
998 " addr.s_addr = (argc E<gt> 2) ? strtod(argv[2], NULL) : 0;\n"
999 "\\&\n"
1000 " /* Convert presentation network number in argv[1] to binary. */\n"
1001 "\\&\n"
1002 " bits = inet_net_pton(AF_INET, argv[1], &addr, sizeof(addr));\n"
1003 " if (bits == -1)\n"
1004 " errExit(\"inet_net_ntop\");\n"
1005 "\\&\n"
1006 " printf(\"inet_net_pton() returned: %d\\[rs]n\", bits);\n"
1007 "\\&\n"
1008 " /* Convert binary format back to presentation, using \\[aq]bits\\[aq]\n"
1009 " returned by inet_net_pton(). */\n"
1010 "\\&\n"
1011 " if (inet_net_ntop(AF_INET, &addr, bits, buf, sizeof(buf)) == NULL)\n"
1012 " errExit(\"inet_net_ntop\");\n"
1013 "\\&\n"
1014 " printf(\"inet_net_ntop() yielded: %s\\[rs]n\", buf);\n"
1015 "\\&\n"
1016 " /* Display \\[aq]addr\\[aq] in raw form (in network byte order), so we can\n"
1017 " see bytes not displayed by inet_net_ntop(); some of those bytes\n"
1018 " may not have been touched by inet_net_ntop(), and so will still\n"
1019 " have any initial value that was specified in argv[2]. */\n"
1020 "\\&\n"
1021 " printf(\"Raw address: %x\\[rs]n\", htonl(addr.s_addr));\n"
1022 "\\&\n"
1023 " exit(EXIT_SUCCESS);\n"
1024 "}\n"
1025
1026 #. type: TH
1027 #: fedora-44 fedora-rawhide
1028 #, no-wrap
1029 msgid "2024-07-23"
1030 msgstr "23 يوليو 2024"
1031
1032 #. type: TH
1033 #: fedora-44 fedora-rawhide
1034 #, no-wrap
1035 msgid "Linux man-pages 6.13"
1036 msgstr "صفحات دليل لينكس 6.13"
1037
1038 #. type: TH
1039 #: mageia-cauldron
1040 #, no-wrap
1041 msgid "Linux man-pages 6.17"
1042 msgstr "صفحات دليل لينكس 6.17"
1043
1044 #. type: TH
1045 #: opensuse-leap-16-1 opensuse-tumbleweed
1046 #, no-wrap
1047 msgid "Linux man-pages (unreleased)"
1048 msgstr "صفحات دليل لينكس (لم تصدر بعد)"