| 1 |
# SOME DESCRIPTIVE TITLE |
| 2 |
# Copyright (C) YEAR Free Software Foundation, Inc. |
| 3 |
# This file is distributed under the same license as the PACKAGE package. |
| 4 |
# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR. |
| 5 |
# |
| 6 |
#, fuzzy |
| 7 |
msgid "" |
| 8 |
msgstr "" |
| 9 |
"Project-Id-Version: PACKAGE VERSION\n" |
| 10 |
"POT-Creation-Date: 2026-06-05 06:27+0200\n" |
| 11 |
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" |
| 12 |
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n" |
| 13 |
"Language-Team: LANGUAGE <[email protected]>\n" |
| 14 |
"Language: \n" |
| 15 |
"MIME-Version: 1.0\n" |
| 16 |
"Content-Type: text/plain; charset=UTF-8\n" |
| 17 |
"Content-Transfer-Encoding: 8bit\n" |
| 18 |
|
| 19 |
#. type: TH |
| 20 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 21 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 22 |
#, no-wrap |
| 23 |
msgid "inet_net_pton" |
| 24 |
msgstr "" |
| 25 |
|
| 26 |
#. type: TH |
| 27 |
#: archlinux debian-unstable mageia-cauldron opensuse-leap-16-1 |
| 28 |
#: opensuse-tumbleweed |
| 29 |
#, no-wrap |
| 30 |
msgid "2026-02-08" |
| 31 |
msgstr "" |
| 32 |
|
| 33 |
#. type: TH |
| 34 |
#: archlinux debian-unstable |
| 35 |
#, no-wrap |
| 36 |
msgid "Linux man-pages 6.18" |
| 37 |
msgstr "" |
| 38 |
|
| 39 |
#. type: SH |
| 40 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 41 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 42 |
#, no-wrap |
| 43 |
msgid "NAME" |
| 44 |
msgstr "" |
| 45 |
|
| 46 |
#. type: Plain text |
| 47 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 48 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 49 |
msgid "inet_net_pton, inet_net_ntop - Internet network number conversion" |
| 50 |
msgstr "" |
| 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 "LIBRARY" |
| 57 |
msgstr "" |
| 58 |
|
| 59 |
#. type: Plain text |
| 60 |
#: archlinux debian-unstable fedora-44 fedora-rawhide mageia-cauldron |
| 61 |
#: opensuse-leap-16-1 opensuse-tumbleweed |
| 62 |
msgid "Resolver library (I<libresolv>,\\ I<-lresolv>)" |
| 63 |
msgstr "" |
| 64 |
|
| 65 |
#. type: SH |
| 66 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 67 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 68 |
#, no-wrap |
| 69 |
msgid "SYNOPSIS" |
| 70 |
msgstr "" |
| 71 |
|
| 72 |
#. type: Plain text |
| 73 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 74 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 75 |
#, no-wrap |
| 76 |
msgid "B<#include E<lt>arpa/inet.hE<gt>>\n" |
| 77 |
msgstr "" |
| 78 |
|
| 79 |
#. type: Plain text |
| 80 |
#: archlinux debian-unstable mageia-cauldron opensuse-leap-16-1 |
| 81 |
#: opensuse-tumbleweed |
| 82 |
#, no-wrap |
| 83 |
msgid "" |
| 84 |
"B<int inet_net_pton(>size_t nsize;\n" |
| 85 |
"B< int >I<af>B<, const char *>I<pres>B<,>\n" |
| 86 |
"B< void >I<netp>B<[>I<nsize>B<], size_t >I<nsize>B<);>\n" |
| 87 |
"B<char *inet_net_ntop(>int bits, size_t psize;\n" |
| 88 |
"B< int >I<af>B<,>\n" |
| 89 |
"B< const void >I<netp>B<[(>I<bits>B< - CHAR_BIT + 1) / CHAR_BIT],>\n" |
| 90 |
"B< int >I<bits>B<,>\n" |
| 91 |
"B< char >I<pres>B<[>I<psize>B<], size_t >I<psize>B<);>\n" |
| 92 |
msgstr "" |
| 93 |
|
| 94 |
#. type: Plain text |
| 95 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 96 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 97 |
msgid "" |
| 98 |
"Feature Test Macro Requirements for glibc (see B<feature_test_macros>(7)):" |
| 99 |
msgstr "" |
| 100 |
|
| 101 |
#. type: Plain text |
| 102 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 103 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 104 |
msgid "B<inet_net_pton>(), B<inet_net_ntop>():" |
| 105 |
msgstr "" |
| 106 |
|
| 107 |
#. type: Plain text |
| 108 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 109 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 110 |
#, no-wrap |
| 111 |
msgid "" |
| 112 |
" Since glibc 2.20:\n" |
| 113 |
" _DEFAULT_SOURCE\n" |
| 114 |
" Before glibc 2.20:\n" |
| 115 |
" _BSD_SOURCE || _SVID_SOURCE\n" |
| 116 |
msgstr "" |
| 117 |
|
| 118 |
#. type: SH |
| 119 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 120 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 121 |
#, no-wrap |
| 122 |
msgid "DESCRIPTION" |
| 123 |
msgstr "" |
| 124 |
|
| 125 |
#. type: Plain text |
| 126 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 127 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 128 |
msgid "" |
| 129 |
"These functions convert network numbers between presentation (i.e., " |
| 130 |
"printable) format and network (i.e., binary) format." |
| 131 |
msgstr "" |
| 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 |
msgid "" |
| 137 |
"For both functions, I<af> specifies the address family for the conversion; " |
| 138 |
"the only supported value is B<AF_INET>." |
| 139 |
msgstr "" |
| 140 |
|
| 141 |
#. type: SS |
| 142 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 143 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 144 |
#, no-wrap |
| 145 |
msgid "inet_net_pton()" |
| 146 |
msgstr "" |
| 147 |
|
| 148 |
#. type: Plain text |
| 149 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 150 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 151 |
msgid "" |
| 152 |
"The B<inet_net_pton>() function converts I<pres>, a null-terminated string " |
| 153 |
"containing an Internet network number in presentation format to network " |
| 154 |
"format. The result of the conversion, which is in network byte order, is " |
| 155 |
"placed in the buffer pointed to by I<netp>. (The I<netp> argument typically " |
| 156 |
"points to an I<in_addr> structure.) The I<nsize> argument specifies the " |
| 157 |
"number of bytes available in I<netp>." |
| 158 |
msgstr "" |
| 159 |
|
| 160 |
#. type: Plain text |
| 161 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 162 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 163 |
msgid "" |
| 164 |
"On success, B<inet_net_pton>() returns the number of bits in the network " |
| 165 |
"number field of the result placed in I<netp>. For a discussion of the input " |
| 166 |
"presentation format and the return value, see NOTES." |
| 167 |
msgstr "" |
| 168 |
|
| 169 |
#. type: Plain text |
| 170 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 171 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 172 |
msgid "" |
| 173 |
"I<Note>: the buffer pointed to by I<netp> should be zeroed out before " |
| 174 |
"calling B<inet_net_pton>(), since the call writes only as many bytes as are " |
| 175 |
"required for the network number (or as are explicitly specified by I<pres>), " |
| 176 |
"which may be less than the number of bytes in a complete network address." |
| 177 |
msgstr "" |
| 178 |
|
| 179 |
#. type: SS |
| 180 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 181 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 182 |
#, no-wrap |
| 183 |
msgid "inet_net_ntop()" |
| 184 |
msgstr "" |
| 185 |
|
| 186 |
#. type: Plain text |
| 187 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 188 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 189 |
msgid "" |
| 190 |
"The B<inet_net_ntop>() function converts the network number in the buffer " |
| 191 |
"pointed to by I<netp> to presentation format; I<*netp> is interpreted as a " |
| 192 |
"value in network byte order. The I<bits> argument specifies the number of " |
| 193 |
"bits in the network number in I<*netp>." |
| 194 |
msgstr "" |
| 195 |
|
| 196 |
#. type: Plain text |
| 197 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 198 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 199 |
msgid "" |
| 200 |
"The null-terminated presentation-format string is placed in the buffer " |
| 201 |
"pointed to by I<pres>. The I<psize> argument specifies the number of bytes " |
| 202 |
"available in I<pres>. The presentation string is in CIDR format: a dotted-" |
| 203 |
"decimal number representing the network address, followed by a slash, and " |
| 204 |
"the size of the network number in bits." |
| 205 |
msgstr "" |
| 206 |
|
| 207 |
#. type: SH |
| 208 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 209 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 210 |
#, no-wrap |
| 211 |
msgid "RETURN VALUE" |
| 212 |
msgstr "" |
| 213 |
|
| 214 |
#. type: Plain text |
| 215 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 216 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 217 |
msgid "" |
| 218 |
"On success, B<inet_net_pton>() returns the number of bits in the network " |
| 219 |
"number. On error, it returns -1, and I<errno> is set to indicate the error." |
| 220 |
msgstr "" |
| 221 |
|
| 222 |
#. type: Plain text |
| 223 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 224 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 225 |
msgid "" |
| 226 |
"On success, B<inet_net_ntop>() returns I<pres>. On error, it returns NULL, " |
| 227 |
"and I<errno> is set to indicate the error." |
| 228 |
msgstr "" |
| 229 |
|
| 230 |
#. type: SH |
| 231 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 232 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 233 |
#, no-wrap |
| 234 |
msgid "ERRORS" |
| 235 |
msgstr "" |
| 236 |
|
| 237 |
#. type: TP |
| 238 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 239 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 240 |
#, no-wrap |
| 241 |
msgid "B<EAFNOSUPPORT>" |
| 242 |
msgstr "" |
| 243 |
|
| 244 |
#. type: Plain text |
| 245 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 246 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 247 |
msgid "I<af> specified a value other than B<AF_INET>." |
| 248 |
msgstr "" |
| 249 |
|
| 250 |
#. type: TP |
| 251 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 252 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 253 |
#, no-wrap |
| 254 |
msgid "B<EMSGSIZE>" |
| 255 |
msgstr "" |
| 256 |
|
| 257 |
#. type: Plain text |
| 258 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 259 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 260 |
msgid "The size of the output buffer was insufficient." |
| 261 |
msgstr "" |
| 262 |
|
| 263 |
#. type: TP |
| 264 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 265 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 266 |
#, no-wrap |
| 267 |
msgid "B<ENOENT>" |
| 268 |
msgstr "" |
| 269 |
|
| 270 |
#. type: Plain text |
| 271 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 272 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 273 |
msgid "(B<inet_net_pton>()) I<pres> was not in correct presentation format." |
| 274 |
msgstr "" |
| 275 |
|
| 276 |
#. type: SH |
| 277 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 278 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 279 |
#, no-wrap |
| 280 |
msgid "STANDARDS" |
| 281 |
msgstr "" |
| 282 |
|
| 283 |
#. type: Plain text |
| 284 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 285 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 286 |
msgid "None." |
| 287 |
msgstr "" |
| 288 |
|
| 289 |
#. type: SH |
| 290 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 291 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 292 |
#, no-wrap |
| 293 |
msgid "NOTES" |
| 294 |
msgstr "" |
| 295 |
|
| 296 |
#. type: SS |
| 297 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 298 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 299 |
#, no-wrap |
| 300 |
msgid "Input presentation format for inet_net_pton()" |
| 301 |
msgstr "" |
| 302 |
|
| 303 |
#. type: Plain text |
| 304 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 305 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 306 |
msgid "" |
| 307 |
"The network number may be specified either as a hexadecimal value or in " |
| 308 |
"dotted-decimal notation." |
| 309 |
msgstr "" |
| 310 |
|
| 311 |
#. If the hexadecimal string is short, the remaining nibbles are zeroed. |
| 312 |
#. type: Plain text |
| 313 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 314 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 315 |
msgid "" |
| 316 |
"Hexadecimal values are indicated by an initial \"0x\" or \"0X\". The " |
| 317 |
"hexadecimal digits populate the nibbles (half octets) of the network number " |
| 318 |
"from left to right in network byte order." |
| 319 |
msgstr "" |
| 320 |
|
| 321 |
#. type: Plain text |
| 322 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 323 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 324 |
msgid "" |
| 325 |
"In dotted-decimal notation, up to four octets are specified, as decimal " |
| 326 |
"numbers separated by dots. Thus, any of the following forms are accepted:" |
| 327 |
msgstr "" |
| 328 |
|
| 329 |
#. type: Plain text |
| 330 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 331 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 332 |
#, no-wrap |
| 333 |
msgid "" |
| 334 |
"a.b.c.d\n" |
| 335 |
"a.b.c\n" |
| 336 |
"a.b\n" |
| 337 |
"a\n" |
| 338 |
msgstr "" |
| 339 |
|
| 340 |
#. #-#-#-#-# archlinux: inet_net_pton.3.pot (PACKAGE VERSION) #-#-#-#-# |
| 341 |
#. Reading other man pages, some other implementations treat |
| 342 |
#. 'c' in a.b.c as a 16-bit number that populates right-most two bytes |
| 343 |
#. 'b' in a.b as a 24-bit number that populates right-most three bytes |
| 344 |
#. type: Plain text |
| 345 |
#. #-#-#-#-# debian-trixie: inet_net_pton.3.pot (PACKAGE VERSION) #-#-#-#-# |
| 346 |
#. Reading other man pages, some other implementations treat |
| 347 |
#. 'c' in a.b.c as a 16-bit number that populates right-most two bytes |
| 348 |
#. 'b' in a.b as a 24-bit number that populates right-most three bytes |
| 349 |
#. type: Plain text |
| 350 |
#. #-#-#-#-# debian-unstable: inet_net_pton.3.pot (PACKAGE VERSION) #-#-#-#-# |
| 351 |
#. Reading other man pages, some other implementations treat |
| 352 |
#. 'c' in a.b.c as a 16-bit number that populates right-most two bytes |
| 353 |
#. 'b' in a.b as a 24-bit number that populates right-most three bytes |
| 354 |
#. type: Plain text |
| 355 |
#. #-#-#-#-# fedora-44: inet_net_pton.3.pot (PACKAGE VERSION) #-#-#-#-# |
| 356 |
#. Reading other man pages, some other implementations treat |
| 357 |
#. 'c' in a.b.c as a 16-bit number that populates right-most two bytes |
| 358 |
#. 'b' in a.b as a 24-bit number that populates right-most three bytes |
| 359 |
#. type: Plain text |
| 360 |
#. #-#-#-#-# fedora-rawhide: inet_net_pton.3.pot (PACKAGE VERSION) #-#-#-#-# |
| 361 |
#. Reading other man pages, some other implementations treat |
| 362 |
#. 'c' in a.b.c as a 16-bit number that populates right-most two bytes |
| 363 |
#. 'b' in a.b as a 24-bit number that populates right-most three bytes |
| 364 |
#. type: Plain text |
| 365 |
#. #-#-#-#-# mageia-cauldron: inet_net_pton.3.pot (PACKAGE VERSION) #-#-#-#-# |
| 366 |
#. Reading other man pages, some other implementations treat |
| 367 |
#. 'c' in a.b.c as a 16-bit number that populates right-most two bytes |
| 368 |
#. 'b' in a.b as a 24-bit number that populates right-most three bytes |
| 369 |
#. type: Plain text |
| 370 |
#. #-#-#-#-# opensuse-leap-16-1: inet_net_pton.3.pot (PACKAGE VERSION) #-#-#-#-# |
| 371 |
#. Reading other man pages, some other implementations treat |
| 372 |
#. 'c' in a.b.c as a 16-bit number that populates right-most two bytes |
| 373 |
#. 'b' in a.b as a 24-bit number that populates right-most three bytes |
| 374 |
#. type: Plain text |
| 375 |
#. #-#-#-#-# opensuse-tumbleweed: inet_net_pton.3.pot (PACKAGE VERSION) #-#-#-#-# |
| 376 |
#. Reading other man pages, some other implementations treat |
| 377 |
#. 'c' in a.b.c as a 16-bit number that populates right-most two bytes |
| 378 |
#. 'b' in a.b as a 24-bit number that populates right-most three bytes |
| 379 |
#. type: Plain text |
| 380 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 381 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 382 |
msgid "" |
| 383 |
"Each part is a number in the range 0 to 255 that populates one byte of the " |
| 384 |
"resulting network number, going from left to right, in network-byte (big " |
| 385 |
"endian) order. Where a part is omitted, the resulting byte in the network " |
| 386 |
"number is zero." |
| 387 |
msgstr "" |
| 388 |
|
| 389 |
#. type: Plain text |
| 390 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 391 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 392 |
msgid "" |
| 393 |
"For either hexadecimal or dotted-decimal format, the network number can " |
| 394 |
"optionally be followed by a slash and a number in the range 0 to 32, which " |
| 395 |
"specifies the size of the network number in bits." |
| 396 |
msgstr "" |
| 397 |
|
| 398 |
#. type: SS |
| 399 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 400 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 401 |
#, no-wrap |
| 402 |
msgid "Return value of inet_net_pton()" |
| 403 |
msgstr "" |
| 404 |
|
| 405 |
#. type: Plain text |
| 406 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 407 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 408 |
msgid "" |
| 409 |
"The return value of B<inet_net_pton>() is the number of bits in the network " |
| 410 |
"number field. If the input presentation string terminates with a slash and " |
| 411 |
"an explicit size value, then that size becomes the return value of " |
| 412 |
"B<inet_net_pton>(). Otherwise, the return value, I<bits>, is inferred as " |
| 413 |
"follows:" |
| 414 |
msgstr "" |
| 415 |
|
| 416 |
#. type: IP |
| 417 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 418 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 419 |
#, no-wrap |
| 420 |
msgid "\\[bu]" |
| 421 |
msgstr "" |
| 422 |
|
| 423 |
#. type: Plain text |
| 424 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 425 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 426 |
msgid "" |
| 427 |
"If the most significant byte of the network number is greater than or equal " |
| 428 |
"to 240, then I<bits> is 32." |
| 429 |
msgstr "" |
| 430 |
|
| 431 |
#. type: Plain text |
| 432 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 433 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 434 |
msgid "" |
| 435 |
"Otherwise, if the most significant byte of the network number is greater " |
| 436 |
"than or equal to 224, then I<bits> is 4." |
| 437 |
msgstr "" |
| 438 |
|
| 439 |
#. type: Plain text |
| 440 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 441 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 442 |
msgid "" |
| 443 |
"Otherwise, if the most significant byte of the network number is greater " |
| 444 |
"than or equal to 192, then I<bits> is 24." |
| 445 |
msgstr "" |
| 446 |
|
| 447 |
#. type: Plain text |
| 448 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 449 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 450 |
msgid "" |
| 451 |
"Otherwise, if the most significant byte of the network number is greater " |
| 452 |
"than or equal to 128, then I<bits> is 16." |
| 453 |
msgstr "" |
| 454 |
|
| 455 |
#. type: Plain text |
| 456 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 457 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 458 |
msgid "Otherwise, I<bits> is 8." |
| 459 |
msgstr "" |
| 460 |
|
| 461 |
#. type: Plain text |
| 462 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 463 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 464 |
msgid "" |
| 465 |
"If the resulting I<bits> value from the above steps is greater than or equal " |
| 466 |
"to 8, but the number of octets specified in the network number exceed I<bits/" |
| 467 |
"8>, then I<bits> is set to 8 times the number of octets actually specified." |
| 468 |
msgstr "" |
| 469 |
|
| 470 |
#. type: SH |
| 471 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 472 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 473 |
#, no-wrap |
| 474 |
msgid "EXAMPLES" |
| 475 |
msgstr "" |
| 476 |
|
| 477 |
#. type: Plain text |
| 478 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 479 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 480 |
msgid "" |
| 481 |
"The program below demonstrates the use of B<inet_net_pton>() and " |
| 482 |
"B<inet_net_ntop>(). It uses B<inet_net_pton>() to convert the presentation " |
| 483 |
"format network address provided in its first command-line argument to binary " |
| 484 |
"form, displays the return value from B<inet_net_pton>(). It then uses " |
| 485 |
"B<inet_net_ntop>() to convert the binary form back to presentation format, " |
| 486 |
"and displays the resulting string." |
| 487 |
msgstr "" |
| 488 |
|
| 489 |
#. type: Plain text |
| 490 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 491 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 492 |
msgid "" |
| 493 |
"In order to demonstrate that B<inet_net_pton>() may not write to all bytes " |
| 494 |
"of its I<netp> argument, the program allows an optional second command-line " |
| 495 |
"argument, a number used to initialize the buffer before B<inet_net_pton>() " |
| 496 |
"is called. As its final line of output, the program displays all of the " |
| 497 |
"bytes of the buffer returned by B<inet_net_pton>() allowing the user to see " |
| 498 |
"which bytes have not been touched by B<inet_net_pton>()." |
| 499 |
msgstr "" |
| 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 |
"An example run, showing that B<inet_net_pton>() infers the number of bits " |
| 506 |
"in the network number:" |
| 507 |
msgstr "" |
| 508 |
|
| 509 |
#. type: Plain text |
| 510 |
#: archlinux debian-unstable mageia-cauldron opensuse-leap-16-1 |
| 511 |
#: opensuse-tumbleweed |
| 512 |
#, no-wrap |
| 513 |
msgid "" |
| 514 |
"$B< ./a.out 193.168>;\n" |
| 515 |
"inet_net_pton() returned: 24\n" |
| 516 |
"inet_net_ntop() yielded: 193.168.0/24\n" |
| 517 |
"Raw address: c1a80000\n" |
| 518 |
msgstr "" |
| 519 |
|
| 520 |
#. type: Plain text |
| 521 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 522 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 523 |
msgid "" |
| 524 |
"Demonstrate that B<inet_net_pton>() does not zero out unused bytes in its " |
| 525 |
"result buffer:" |
| 526 |
msgstr "" |
| 527 |
|
| 528 |
#. type: Plain text |
| 529 |
#: archlinux debian-unstable mageia-cauldron opensuse-leap-16-1 |
| 530 |
#: opensuse-tumbleweed |
| 531 |
#, no-wrap |
| 532 |
msgid "" |
| 533 |
"$B< ./a.out 193.168 0xffffffff>;\n" |
| 534 |
"inet_net_pton() returned: 24\n" |
| 535 |
"inet_net_ntop() yielded: 193.168.0/24\n" |
| 536 |
"Raw address: c1a800ff\n" |
| 537 |
msgstr "" |
| 538 |
|
| 539 |
#. type: Plain text |
| 540 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 541 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 542 |
msgid "" |
| 543 |
"Demonstrate that B<inet_net_pton>() will widen the inferred size of the " |
| 544 |
"network number, if the supplied number of bytes in the presentation string " |
| 545 |
"exceeds the inferred value:" |
| 546 |
msgstr "" |
| 547 |
|
| 548 |
#. type: Plain text |
| 549 |
#: archlinux debian-unstable mageia-cauldron opensuse-leap-16-1 |
| 550 |
#: opensuse-tumbleweed |
| 551 |
#, no-wrap |
| 552 |
msgid "" |
| 553 |
"$B< ./a.out 193.168.1.128>;\n" |
| 554 |
"inet_net_pton() returned: 32\n" |
| 555 |
"inet_net_ntop() yielded: 193.168.1.128/32\n" |
| 556 |
"Raw address: c1a80180\n" |
| 557 |
msgstr "" |
| 558 |
|
| 559 |
#. type: Plain text |
| 560 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 561 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 562 |
msgid "" |
| 563 |
"Explicitly specifying the size of the network number overrides any inference " |
| 564 |
"about its size (but any extra bytes that are explicitly specified will still " |
| 565 |
"be used by B<inet_net_pton>(): to populate the result buffer):" |
| 566 |
msgstr "" |
| 567 |
|
| 568 |
#. type: Plain text |
| 569 |
#: archlinux debian-unstable mageia-cauldron opensuse-leap-16-1 |
| 570 |
#: opensuse-tumbleweed |
| 571 |
#, no-wrap |
| 572 |
msgid "" |
| 573 |
"$B< ./a.out 193.168.1.128/24>;\n" |
| 574 |
"inet_net_pton() returned: 24\n" |
| 575 |
"inet_net_ntop() yielded: 193.168.1/24\n" |
| 576 |
"Raw address: c1a80180\n" |
| 577 |
msgstr "" |
| 578 |
|
| 579 |
#. type: SS |
| 580 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 581 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 582 |
#, no-wrap |
| 583 |
msgid "Program source" |
| 584 |
msgstr "" |
| 585 |
|
| 586 |
#. type: Plain text |
| 587 |
#: archlinux debian-unstable mageia-cauldron opensuse-leap-16-1 |
| 588 |
#: opensuse-tumbleweed |
| 589 |
#, no-wrap |
| 590 |
msgid "" |
| 591 |
"/* Link with \"-lresolv\" */\n" |
| 592 |
"\\&\n" |
| 593 |
"#include E<lt>arpa/inet.hE<gt>\n" |
| 594 |
"#include E<lt>err.hE<gt>\n" |
| 595 |
"#include E<lt>stdio.hE<gt>\n" |
| 596 |
"#include E<lt>stdlib.hE<gt>\n" |
| 597 |
"\\&\n" |
| 598 |
"int\n" |
| 599 |
"main(int argc, char *argv[])\n" |
| 600 |
"{\n" |
| 601 |
" char buf[100];\n" |
| 602 |
" struct in_addr addr;\n" |
| 603 |
" int bits;\n" |
| 604 |
"\\&\n" |
| 605 |
" if (argc E<lt> 2) {\n" |
| 606 |
" fprintf(stderr,\n" |
| 607 |
" \"Usage: %s presentation-form [addr-init-value]\\[rs]n\",\n" |
| 608 |
" argv[0]);\n" |
| 609 |
" exit(EXIT_FAILURE);\n" |
| 610 |
" }\n" |
| 611 |
"\\&\n" |
| 612 |
" /* If argv[2] is supplied (a numeric value), use it to initialize\n" |
| 613 |
" the output buffer given to inet_net_pton(), so that we can see\n" |
| 614 |
" that inet_net_pton() initializes only those bytes needed for\n" |
| 615 |
" the network number. If argv[2] is not supplied, then initialize\n" |
| 616 |
" the buffer to zero (as is recommended practice). */\n" |
| 617 |
"\\&\n" |
| 618 |
" addr.s_addr = (argc E<gt> 2) ? strtod(argv[2], NULL) : 0;\n" |
| 619 |
"\\&\n" |
| 620 |
" /* Convert presentation network number in argv[1] to binary. */\n" |
| 621 |
"\\&\n" |
| 622 |
" bits = inet_net_pton(AF_INET, argv[1], &addr, sizeof(addr));\n" |
| 623 |
" if (bits == -1)\n" |
| 624 |
" err(EXIT_FAILURE, \"inet_net_ntop\");\n" |
| 625 |
"\\&\n" |
| 626 |
" printf(\"inet_net_pton() returned: %d\\[rs]n\", bits);\n" |
| 627 |
"\\&\n" |
| 628 |
" /* Convert binary format back to presentation, using \\[aq]bits\\[aq]\n" |
| 629 |
" returned by inet_net_pton(). */\n" |
| 630 |
"\\&\n" |
| 631 |
" if (inet_net_ntop(AF_INET, &addr, bits, buf, sizeof(buf)) == NULL)\n" |
| 632 |
" err(EXIT_FAILURE, \"inet_net_ntop\");\n" |
| 633 |
"\\&\n" |
| 634 |
" printf(\"inet_net_ntop() yielded: %s\\[rs]n\", buf);\n" |
| 635 |
"\\&\n" |
| 636 |
" /* Display \\[aq]addr\\[aq] in raw form (in network byte order), so we can\n" |
| 637 |
" see bytes not displayed by inet_net_ntop(); some of those bytes\n" |
| 638 |
" may not have been touched by inet_net_ntop(), and so will still\n" |
| 639 |
" have any initial value that was specified in argv[2]. */\n" |
| 640 |
"\\&\n" |
| 641 |
" printf(\"Raw address: %x\\[rs]n\", htonl(addr.s_addr));\n" |
| 642 |
"\\&\n" |
| 643 |
" exit(EXIT_SUCCESS);\n" |
| 644 |
"}\n" |
| 645 |
msgstr "" |
| 646 |
|
| 647 |
#. SRC END |
| 648 |
#. type: SH |
| 649 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 650 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 651 |
#, no-wrap |
| 652 |
msgid "SEE ALSO" |
| 653 |
msgstr "" |
| 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 "B<inet>(3), B<networks>(5)" |
| 659 |
msgstr "" |
| 660 |
|
| 661 |
#. type: TH |
| 662 |
#: debian-trixie |
| 663 |
#, no-wrap |
| 664 |
msgid "2024-06-15" |
| 665 |
msgstr "" |
| 666 |
|
| 667 |
#. type: TH |
| 668 |
#: debian-trixie |
| 669 |
#, no-wrap |
| 670 |
msgid "Linux man-pages 6.9.1" |
| 671 |
msgstr "" |
| 672 |
|
| 673 |
#. type: Plain text |
| 674 |
#: debian-trixie |
| 675 |
msgid "Resolver library (I<libresolv>, I<-lresolv>)" |
| 676 |
msgstr "" |
| 677 |
|
| 678 |
#. type: Plain text |
| 679 |
#: debian-trixie fedora-44 fedora-rawhide |
| 680 |
#, no-wrap |
| 681 |
msgid "" |
| 682 |
"B<int inet_net_pton(int >I<af>B<, const char *>I<pres>B<,>\n" |
| 683 |
"B< void >I<netp>B<[.>I<nsize>B<], size_t >I<nsize>B<);>\n" |
| 684 |
"B<char *inet_net_ntop(int >I<af>B<,>\n" |
| 685 |
"B< const void >I<netp>B<[(.>I<bits>B< - CHAR_BIT + 1) / CHAR_BIT],>\n" |
| 686 |
"B< int >I<bits>B<,>\n" |
| 687 |
"B< char >I<pres>B<[.>I<psize>B<], size_t >I<psize>B<);>\n" |
| 688 |
msgstr "" |
| 689 |
|
| 690 |
#. type: Plain text |
| 691 |
#: debian-trixie fedora-44 fedora-rawhide |
| 692 |
#, no-wrap |
| 693 |
msgid "" |
| 694 |
"$ B<./a.out 193.168>\n" |
| 695 |
"inet_net_pton() returned: 24\n" |
| 696 |
"inet_net_ntop() yielded: 193.168.0/24\n" |
| 697 |
"Raw address: c1a80000\n" |
| 698 |
msgstr "" |
| 699 |
|
| 700 |
#. type: Plain text |
| 701 |
#: debian-trixie fedora-44 fedora-rawhide |
| 702 |
#, no-wrap |
| 703 |
msgid "" |
| 704 |
"$ B<./a.out 193.168 0xffffffff>\n" |
| 705 |
"inet_net_pton() returned: 24\n" |
| 706 |
"inet_net_ntop() yielded: 193.168.0/24\n" |
| 707 |
"Raw address: c1a800ff\n" |
| 708 |
msgstr "" |
| 709 |
|
| 710 |
#. type: Plain text |
| 711 |
#: debian-trixie fedora-44 fedora-rawhide |
| 712 |
#, no-wrap |
| 713 |
msgid "" |
| 714 |
"$ B<./a.out 193.168.1.128>\n" |
| 715 |
"inet_net_pton() returned: 32\n" |
| 716 |
"inet_net_ntop() yielded: 193.168.1.128/32\n" |
| 717 |
"Raw address: c1a80180\n" |
| 718 |
msgstr "" |
| 719 |
|
| 720 |
#. type: Plain text |
| 721 |
#: debian-trixie fedora-44 fedora-rawhide |
| 722 |
#, no-wrap |
| 723 |
msgid "" |
| 724 |
"$ B<./a.out 193.168.1.128/24>\n" |
| 725 |
"inet_net_pton() returned: 24\n" |
| 726 |
"inet_net_ntop() yielded: 193.168.1/24\n" |
| 727 |
"Raw address: c1a80180\n" |
| 728 |
msgstr "" |
| 729 |
|
| 730 |
#. type: Plain text |
| 731 |
#: debian-trixie fedora-44 fedora-rawhide |
| 732 |
#, no-wrap |
| 733 |
msgid "" |
| 734 |
"/* Link with \"-lresolv\" */\n" |
| 735 |
"\\&\n" |
| 736 |
"#include E<lt>arpa/inet.hE<gt>\n" |
| 737 |
"#include E<lt>stdio.hE<gt>\n" |
| 738 |
"#include E<lt>stdlib.hE<gt>\n" |
| 739 |
"\\&\n" |
| 740 |
"#define errExit(msg) do { perror(msg); exit(EXIT_FAILURE); \\[rs]\n" |
| 741 |
" } while (0)\n" |
| 742 |
"\\&\n" |
| 743 |
"int\n" |
| 744 |
"main(int argc, char *argv[])\n" |
| 745 |
"{\n" |
| 746 |
" char buf[100];\n" |
| 747 |
" struct in_addr addr;\n" |
| 748 |
" int bits;\n" |
| 749 |
"\\&\n" |
| 750 |
" if (argc E<lt> 2) {\n" |
| 751 |
" fprintf(stderr,\n" |
| 752 |
" \"Usage: %s presentation-form [addr-init-value]\\[rs]n\",\n" |
| 753 |
" argv[0]);\n" |
| 754 |
" exit(EXIT_FAILURE);\n" |
| 755 |
" }\n" |
| 756 |
"\\&\n" |
| 757 |
" /* If argv[2] is supplied (a numeric value), use it to initialize\n" |
| 758 |
" the output buffer given to inet_net_pton(), so that we can see\n" |
| 759 |
" that inet_net_pton() initializes only those bytes needed for\n" |
| 760 |
" the network number. If argv[2] is not supplied, then initialize\n" |
| 761 |
" the buffer to zero (as is recommended practice). */\n" |
| 762 |
"\\&\n" |
| 763 |
" addr.s_addr = (argc E<gt> 2) ? strtod(argv[2], NULL) : 0;\n" |
| 764 |
"\\&\n" |
| 765 |
" /* Convert presentation network number in argv[1] to binary. */\n" |
| 766 |
"\\&\n" |
| 767 |
" bits = inet_net_pton(AF_INET, argv[1], &addr, sizeof(addr));\n" |
| 768 |
" if (bits == -1)\n" |
| 769 |
" errExit(\"inet_net_ntop\");\n" |
| 770 |
"\\&\n" |
| 771 |
" printf(\"inet_net_pton() returned: %d\\[rs]n\", bits);\n" |
| 772 |
"\\&\n" |
| 773 |
" /* Convert binary format back to presentation, using \\[aq]bits\\[aq]\n" |
| 774 |
" returned by inet_net_pton(). */\n" |
| 775 |
"\\&\n" |
| 776 |
" if (inet_net_ntop(AF_INET, &addr, bits, buf, sizeof(buf)) == NULL)\n" |
| 777 |
" errExit(\"inet_net_ntop\");\n" |
| 778 |
"\\&\n" |
| 779 |
" printf(\"inet_net_ntop() yielded: %s\\[rs]n\", buf);\n" |
| 780 |
"\\&\n" |
| 781 |
" /* Display \\[aq]addr\\[aq] in raw form (in network byte order), so we can\n" |
| 782 |
" see bytes not displayed by inet_net_ntop(); some of those bytes\n" |
| 783 |
" may not have been touched by inet_net_ntop(), and so will still\n" |
| 784 |
" have any initial value that was specified in argv[2]. */\n" |
| 785 |
"\\&\n" |
| 786 |
" printf(\"Raw address: %x\\[rs]n\", htonl(addr.s_addr));\n" |
| 787 |
"\\&\n" |
| 788 |
" exit(EXIT_SUCCESS);\n" |
| 789 |
"}\n" |
| 790 |
msgstr "" |
| 791 |
|
| 792 |
#. type: TH |
| 793 |
#: fedora-44 fedora-rawhide |
| 794 |
#, no-wrap |
| 795 |
msgid "2024-07-23" |
| 796 |
msgstr "" |
| 797 |
|
| 798 |
#. type: TH |
| 799 |
#: fedora-44 fedora-rawhide |
| 800 |
#, no-wrap |
| 801 |
msgid "Linux man-pages 6.13" |
| 802 |
msgstr "" |
| 803 |
|
| 804 |
#. type: TH |
| 805 |
#: mageia-cauldron |
| 806 |
#, no-wrap |
| 807 |
msgid "Linux man-pages 6.17" |
| 808 |
msgstr "" |
| 809 |
|
| 810 |
#. type: TH |
| 811 |
#: opensuse-leap-16-1 opensuse-tumbleweed |
| 812 |
#, no-wrap |
| 813 |
msgid "Linux man-pages (unreleased)" |
| 814 |
msgstr "" |