| 1 |
# Russian translation of manpages |
| 2 |
# This file is distributed under the same license as the manpages-l10n package. |
| 3 |
# Copyright © of this file: |
| 4 |
# Azamat Hackimov <[email protected]>, 2013-2014, 2017. |
| 5 |
# Dmitry Bolkhovskikh <[email protected]>, 2017. |
| 6 |
# Vladislav <[email protected]>, 2015. |
| 7 |
# Yuri Kozlov <[email protected]>, 2011-2019. |
| 8 |
# Иван Павлов <[email protected]>, 2017, 2019. |
| 9 |
msgid "" |
| 10 |
msgstr "" |
| 11 |
"Project-Id-Version: manpages-l10n\n" |
| 12 |
"POT-Creation-Date: 2026-05-01 04:28+0200\n" |
| 13 |
"PO-Revision-Date: 2024-12-21 19:50+0300\n" |
| 14 |
"Last-Translator: Yuri Kozlov <[email protected]>\n" |
| 15 |
"Language-Team: Russian <[email protected]>\n" |
| 16 |
"Language: ru\n" |
| 17 |
"MIME-Version: 1.0\n" |
| 18 |
"Content-Type: text/plain; charset=UTF-8\n" |
| 19 |
"Content-Transfer-Encoding: 8bit\n" |
| 20 |
"Plural-Forms: nplurals=4; plural=(n%10==1 && n%100!=11 ? 0 : n%10>=2 && " |
| 21 |
"n%10<=4 && (n%100<12 || n%100>14) ? 1 : n%10==0 || (n%10>=5 && n%10<=9) || " |
| 22 |
"(n%100>=11 && n%100<=14)? 2 : 3);\n" |
| 23 |
"X-Generator: Lokalize 2.0\n" |
| 24 |
|
| 25 |
#. type: TH |
| 26 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 27 |
#: mageia-cauldron |
| 28 |
#, no-wrap |
| 29 |
msgid "getifaddrs" |
| 30 |
msgstr "" |
| 31 |
|
| 32 |
#. type: TH |
| 33 |
#: archlinux debian-unstable mageia-cauldron |
| 34 |
#, no-wrap |
| 35 |
msgid "2026-02-08" |
| 36 |
msgstr "8 февраля 2026 г." |
| 37 |
|
| 38 |
#. type: TH |
| 39 |
#: archlinux debian-unstable |
| 40 |
#, fuzzy, no-wrap |
| 41 |
#| msgid "Linux man-pages 6.17" |
| 42 |
msgid "Linux man-pages 6.18" |
| 43 |
msgstr "Справочные страницы Linux 6.17" |
| 44 |
|
| 45 |
#. type: SH |
| 46 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 47 |
#: mageia-cauldron |
| 48 |
#, no-wrap |
| 49 |
msgid "NAME" |
| 50 |
msgstr "НАИМЕНОВАНИЕ" |
| 51 |
|
| 52 |
#. type: Plain text |
| 53 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 54 |
#: mageia-cauldron |
| 55 |
msgid "getifaddrs, freeifaddrs - get interface addresses" |
| 56 |
msgstr "getifaddrs, freeifaddrs - возвращают адреса интерфейса" |
| 57 |
|
| 58 |
#. type: SH |
| 59 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 60 |
#: mageia-cauldron |
| 61 |
#, no-wrap |
| 62 |
msgid "LIBRARY" |
| 63 |
msgstr "БИБЛИОТЕКА" |
| 64 |
|
| 65 |
#. type: Plain text |
| 66 |
#: archlinux debian-unstable fedora-44 fedora-rawhide mageia-cauldron |
| 67 |
msgid "Standard C library (I<libc>,\\ I<-lc>)" |
| 68 |
msgstr "Стандартная библиотека языка C (I<libc>,\\ I<-lc>)" |
| 69 |
|
| 70 |
#. type: SH |
| 71 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 72 |
#: mageia-cauldron |
| 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 |
| 80 |
#, no-wrap |
| 81 |
msgid "" |
| 82 |
"B<#include E<lt>sys/types.hE<gt>>\n" |
| 83 |
"B<#include E<lt>ifaddrs.hE<gt>>\n" |
| 84 |
msgstr "" |
| 85 |
"B<#include E<lt>sys/types.hE<gt>>\n" |
| 86 |
"B<#include E<lt>ifaddrs.hE<gt>>\n" |
| 87 |
|
| 88 |
#. type: Plain text |
| 89 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 90 |
#: mageia-cauldron |
| 91 |
#, fuzzy, no-wrap |
| 92 |
#| msgid "B<int getifaddrs(struct ifaddrs **>I<ifap>B<);>\n" |
| 93 |
msgid "" |
| 94 |
"B<int getifaddrs(struct ifaddrs **>I<ifap>B<);>\n" |
| 95 |
"B<void freeifaddrs(struct ifaddrs *>I<ifa>B<);>\n" |
| 96 |
msgstr "B<int getifaddrs(struct ifaddrs **>I<ifap>B<);>\n" |
| 97 |
|
| 98 |
#. type: SH |
| 99 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 100 |
#: mageia-cauldron |
| 101 |
#, no-wrap |
| 102 |
msgid "DESCRIPTION" |
| 103 |
msgstr "ОПИСАНИЕ" |
| 104 |
|
| 105 |
#. type: Plain text |
| 106 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 107 |
#: mageia-cauldron |
| 108 |
msgid "" |
| 109 |
"The B<getifaddrs>() function creates a linked list of structures describing " |
| 110 |
"the network interfaces of the local system, and stores the address of the " |
| 111 |
"first item of the list in I<*ifap>. The list consists of I<ifaddrs> " |
| 112 |
"structures, defined as follows:" |
| 113 |
msgstr "" |
| 114 |
"Функция B<getifaddrs>() создаёт связный список структур, описывающих сетевые " |
| 115 |
"интерфейсы локальной системы, и сохраняет адрес первого элемента списка в " |
| 116 |
"I<*ifap>. Список состоит из структур I<ifaddrs>:" |
| 117 |
|
| 118 |
#. type: Plain text |
| 119 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 120 |
#: mageia-cauldron |
| 121 |
#, no-wrap |
| 122 |
msgid "" |
| 123 |
"struct ifaddrs {\n" |
| 124 |
" struct ifaddrs *ifa_next; /* Next item in list */\n" |
| 125 |
" char *ifa_name; /* Name of interface */\n" |
| 126 |
" unsigned int ifa_flags; /* Flags from SIOCGIFFLAGS */\n" |
| 127 |
" struct sockaddr *ifa_addr; /* Address of interface */\n" |
| 128 |
" struct sockaddr *ifa_netmask; /* Netmask of interface */\n" |
| 129 |
" union {\n" |
| 130 |
" struct sockaddr *ifu_broadaddr;\n" |
| 131 |
" /* Broadcast address of interface */\n" |
| 132 |
" struct sockaddr *ifu_dstaddr;\n" |
| 133 |
" /* Point-to-point destination address */\n" |
| 134 |
" } ifa_ifu;\n" |
| 135 |
"#define ifa_broadaddr ifa_ifu.ifu_broadaddr\n" |
| 136 |
"#define ifa_dstaddr ifa_ifu.ifu_dstaddr\n" |
| 137 |
" void *ifa_data; /* Address-specific data */\n" |
| 138 |
"};\n" |
| 139 |
msgstr "" |
| 140 |
"struct ifaddrs {\n" |
| 141 |
" struct ifaddrs *ifa_next; /* след. элемент в списке */\n" |
| 142 |
" char *ifa_name; /* имя интерфейса */\n" |
| 143 |
" unsigned int ifa_flags; /* флаги из SIOCGIFFLAGS */\n" |
| 144 |
" struct sockaddr *ifa_addr; /* адрес интерфейса */\n" |
| 145 |
" struct sockaddr *ifa_netmask; /* сетевая маска интерфейса */\n" |
| 146 |
" union {\n" |
| 147 |
" struct sockaddr *ifu_broadaddr;\n" |
| 148 |
" /* широковещательный адрес интерфейса */\n" |
| 149 |
" struct sockaddr *ifu_dstaddr;\n" |
| 150 |
" /* адрес назначения точка-точка */\n" |
| 151 |
" } ifa_ifu;\n" |
| 152 |
"#define ifa_broadaddr ifa_ifu.ifu_broadaddr\n" |
| 153 |
"#define ifa_dstaddr ifa_ifu.ifu_dstaddr\n" |
| 154 |
" void *ifa_data; /* спец. данные для адреса */\n" |
| 155 |
"};\n" |
| 156 |
|
| 157 |
#. type: Plain text |
| 158 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 159 |
#: mageia-cauldron |
| 160 |
msgid "" |
| 161 |
"The I<ifa_next> field contains a pointer to the next structure on the list, " |
| 162 |
"or NULL if this is the last item of the list." |
| 163 |
msgstr "" |
| 164 |
"В поле I<ifa_next> содержится указатель на следующую структуру в списке или " |
| 165 |
"NULL, если это последний элемент в списке." |
| 166 |
|
| 167 |
#. The constant |
| 168 |
#. .B IF NAMESIZE |
| 169 |
#. indicates the maximum length of this field. |
| 170 |
#. type: Plain text |
| 171 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 172 |
#: mageia-cauldron |
| 173 |
msgid "The I<ifa_name> points to the null-terminated interface name." |
| 174 |
msgstr "Поле I<ifa_name> указывает на имя интерфейса (заканчивающееся null)." |
| 175 |
|
| 176 |
#. type: Plain text |
| 177 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 178 |
#: mageia-cauldron |
| 179 |
msgid "" |
| 180 |
"The I<ifa_flags> field contains the interface flags, as returned by the " |
| 181 |
"B<SIOCGIFFLAGS> B<ioctl>(2) operation (see B<netdevice>(7) for a list of " |
| 182 |
"these flags)." |
| 183 |
msgstr "" |
| 184 |
"В поле I<ifa_flags> содержатся флаги интерфейса, полученные операцией " |
| 185 |
"B<SIOCGIFFLAGS> B<ioctl>(2) (список флагов приведён в B<netdevice>(7))." |
| 186 |
|
| 187 |
#. type: Plain text |
| 188 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 189 |
#: mageia-cauldron |
| 190 |
msgid "" |
| 191 |
"The I<ifa_addr> field points to a structure containing the interface " |
| 192 |
"address. (The I<sa_family> subfield should be consulted to determine the " |
| 193 |
"format of the address structure.) This field may contain a null pointer." |
| 194 |
msgstr "" |
| 195 |
"Поле I<ifa_addr> указывает на структуру, содержащую адрес интерфейса (для " |
| 196 |
"определения формата структуры адреса обратитесь к подполю I<sa_family>). Это " |
| 197 |
"поле может содержать указатель null." |
| 198 |
|
| 199 |
#. type: Plain text |
| 200 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 201 |
#: mageia-cauldron |
| 202 |
msgid "" |
| 203 |
"The I<ifa_netmask> field points to a structure containing the netmask " |
| 204 |
"associated with I<ifa_addr>, if applicable for the address family. This " |
| 205 |
"field may contain a null pointer." |
| 206 |
msgstr "" |
| 207 |
"Поле I<ifa_netmask> указывает на структуру, содержащую маску сети для " |
| 208 |
"I<ifa_addr> (если она используется в адресном семействе). Это поле может " |
| 209 |
"содержать указатель null." |
| 210 |
|
| 211 |
#. type: Plain text |
| 212 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 213 |
#: mageia-cauldron |
| 214 |
msgid "" |
| 215 |
"Depending on whether the bit B<IFF_BROADCAST> or B<IFF_POINTOPOINT> is set " |
| 216 |
"in I<ifa_flags> (only one can be set at a time), either I<ifa_broadaddr> " |
| 217 |
"will contain the broadcast address associated with I<ifa_addr> (if " |
| 218 |
"applicable for the address family) or I<ifa_dstaddr> will contain the " |
| 219 |
"destination address of the point-to-point interface." |
| 220 |
msgstr "" |
| 221 |
"В зависимости от наличия флага B<IFF_BROADCAST> или B<IFF_POINTOPOINT> в " |
| 222 |
"I<ifa_flags> (может быть установлен какой-то один), в I<ifa_broadaddr> будет " |
| 223 |
"содержаться широковещательный адрес I<ifa_addr> (если он используется в " |
| 224 |
"адресном семействе) или I<ifa_dstaddr> будет содержать адрес назначения " |
| 225 |
"интерфейса типа точка-точка." |
| 226 |
|
| 227 |
#. type: Plain text |
| 228 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 229 |
#: mageia-cauldron |
| 230 |
msgid "" |
| 231 |
"The I<ifa_data> field points to a buffer containing address-family-specific " |
| 232 |
"data; this field may be NULL if there is no such data for this interface." |
| 233 |
msgstr "" |
| 234 |
"Поле I<ifa_data> указывает на буфер, содержащий данные, присущие адресному " |
| 235 |
"семейству; это поле может быть равно NULL, если данных для этого интерфейса " |
| 236 |
"нет." |
| 237 |
|
| 238 |
#. type: Plain text |
| 239 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 240 |
#: mageia-cauldron |
| 241 |
msgid "" |
| 242 |
"The data returned by B<getifaddrs>() is dynamically allocated and should be " |
| 243 |
"freed using B<freeifaddrs>() when no longer needed." |
| 244 |
msgstr "" |
| 245 |
"Память под структуру данных, возвращаемая B<getifaddrs>(), выделяется " |
| 246 |
"динамически и должна освобождаться с помощью B<freeifaddrs>(), когда больше " |
| 247 |
"не нужна." |
| 248 |
|
| 249 |
#. type: SH |
| 250 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 251 |
#: mageia-cauldron |
| 252 |
#, no-wrap |
| 253 |
msgid "RETURN VALUE" |
| 254 |
msgstr "ВОЗВРАЩАЕМОЕ ЗНАЧЕНИЕ" |
| 255 |
|
| 256 |
#. type: Plain text |
| 257 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 258 |
#: mageia-cauldron |
| 259 |
#, fuzzy |
| 260 |
#| msgid "" |
| 261 |
#| "On success, B<sethostid>() returns 0; on error, -1 is returned, and " |
| 262 |
#| "I<errno> is set to indicate the error." |
| 263 |
msgid "" |
| 264 |
"On success, B<getifaddrs>() returns zero; on error, -1 is returned, and " |
| 265 |
"I<errno> is set to indicate the error." |
| 266 |
msgstr "" |
| 267 |
"При успешном выполнении B<sethostid>() возвращает 0; при ошибке — -1, а в " |
| 268 |
"I<errno> задаётся код ошибки." |
| 269 |
|
| 270 |
#. type: SH |
| 271 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 272 |
#: mageia-cauldron |
| 273 |
#, no-wrap |
| 274 |
msgid "ERRORS" |
| 275 |
msgstr "ОШИБКИ" |
| 276 |
|
| 277 |
#. type: Plain text |
| 278 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 279 |
#: mageia-cauldron |
| 280 |
msgid "" |
| 281 |
"B<getifaddrs>() may fail and set I<errno> for any of the errors specified " |
| 282 |
"for B<socket>(2), B<bind>(2), B<getsockname>(2), B<recvmsg>(2), " |
| 283 |
"B<sendto>(2), B<malloc>(3), or B<realloc>(3)." |
| 284 |
msgstr "" |
| 285 |
"Функция B<getifaddrs>() может завершиться с ошибками и назначить переменной " |
| 286 |
"I<errno> значения, перечисленные в B<socket>(2), B<bind>(2), " |
| 287 |
"B<getsockname>(2), B<recvmsg>(2), B<sendto>(2), B<malloc>(3) или " |
| 288 |
"B<realloc>(3)." |
| 289 |
|
| 290 |
#. type: SH |
| 291 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 292 |
#: mageia-cauldron |
| 293 |
#, no-wrap |
| 294 |
msgid "ATTRIBUTES" |
| 295 |
msgstr "АТРИБУТЫ" |
| 296 |
|
| 297 |
#. type: Plain text |
| 298 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 299 |
#: mageia-cauldron |
| 300 |
msgid "" |
| 301 |
"For an explanation of the terms used in this section, see B<attributes>(7)." |
| 302 |
msgstr "Описание терминов данного раздела смотрите в B<attributes>(7)." |
| 303 |
|
| 304 |
#. type: tbl table |
| 305 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 306 |
#: mageia-cauldron |
| 307 |
#, no-wrap |
| 308 |
msgid "Interface" |
| 309 |
msgstr "Интерфейс" |
| 310 |
|
| 311 |
#. type: tbl table |
| 312 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 313 |
#: mageia-cauldron |
| 314 |
#, no-wrap |
| 315 |
msgid "Attribute" |
| 316 |
msgstr "Атрибут" |
| 317 |
|
| 318 |
#. type: tbl table |
| 319 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 320 |
#: mageia-cauldron |
| 321 |
#, no-wrap |
| 322 |
msgid "Value" |
| 323 |
msgstr "Значение" |
| 324 |
|
| 325 |
#. type: tbl table |
| 326 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 327 |
#: mageia-cauldron |
| 328 |
#, no-wrap |
| 329 |
msgid ".na\n" |
| 330 |
msgstr ".na\n" |
| 331 |
|
| 332 |
#. type: tbl table |
| 333 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 334 |
#: mageia-cauldron |
| 335 |
#, no-wrap |
| 336 |
msgid ".nh\n" |
| 337 |
msgstr ".nh\n" |
| 338 |
|
| 339 |
#. type: tbl table |
| 340 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 341 |
#: mageia-cauldron |
| 342 |
#, no-wrap |
| 343 |
msgid "" |
| 344 |
"B<getifaddrs>(),\n" |
| 345 |
"B<freeifaddrs>()" |
| 346 |
msgstr "" |
| 347 |
"B<getifaddrs>(),\n" |
| 348 |
"B<freeifaddrs>()" |
| 349 |
|
| 350 |
#. type: tbl table |
| 351 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 352 |
#: mageia-cauldron |
| 353 |
#, no-wrap |
| 354 |
msgid "Thread safety" |
| 355 |
msgstr "Безвредность в нитях" |
| 356 |
|
| 357 |
#. type: tbl table |
| 358 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 359 |
#: mageia-cauldron |
| 360 |
#, no-wrap |
| 361 |
msgid "MT-Safe" |
| 362 |
msgstr "MT-Safe" |
| 363 |
|
| 364 |
#. type: SH |
| 365 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 366 |
#: mageia-cauldron |
| 367 |
#, no-wrap |
| 368 |
msgid "STANDARDS" |
| 369 |
msgstr "СТАНДАРТЫ" |
| 370 |
|
| 371 |
#. type: Plain text |
| 372 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 373 |
#: mageia-cauldron |
| 374 |
msgid "None." |
| 375 |
msgstr "Отсутствуют." |
| 376 |
|
| 377 |
#. type: SH |
| 378 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 379 |
#: mageia-cauldron |
| 380 |
#, no-wrap |
| 381 |
msgid "HISTORY" |
| 382 |
msgstr "ИСТОРИЯ" |
| 383 |
|
| 384 |
#. , but the BSD-derived documentation generally |
| 385 |
#. appears to be confused and obsolete on this point. |
| 386 |
#. i.e., commonly it still says one of them will be NULL, even if |
| 387 |
#. the ifa_ifu union is already present |
| 388 |
#. type: Plain text |
| 389 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 390 |
#: mageia-cauldron |
| 391 |
#, fuzzy |
| 392 |
#| msgid "" |
| 393 |
#| "Not in POSIX.1. This function first appeared in BSDi and is present on " |
| 394 |
#| "the BSD systems, but with slightly different semantics documented\\" |
| 395 |
#| "(emreturning one entry per interface, not per address. This means " |
| 396 |
#| "I<ifa_addr> and other fields can actually be NULL if the interface has no " |
| 397 |
#| "address, and no link-level address is returned if the interface has an IP " |
| 398 |
#| "address assigned. Also, the way of choosing either I<ifa_broadaddr> or " |
| 399 |
#| "I<ifa_dstaddr> differs on various systems." |
| 400 |
msgid "" |
| 401 |
"This function first appeared in BSDi and is present on the BSD systems, but " |
| 402 |
"with slightly different semantics documented\\[em]returning one entry per " |
| 403 |
"interface, not per address. This means I<ifa_addr> and other fields can " |
| 404 |
"actually be NULL if the interface has no address, and no link-level address " |
| 405 |
"is returned if the interface has an IP address assigned. Also, the way of " |
| 406 |
"choosing either I<ifa_broadaddr> or I<ifa_dstaddr> differs on various " |
| 407 |
"systems." |
| 408 |
msgstr "" |
| 409 |
"Нет в POSIX.1. Данная функция впервые появилась в BSDi и существует в " |
| 410 |
"системах BSD, но со слегка другой семантикой — возвращается одна запись на " |
| 411 |
"интерфейс, а не на адрес. Это означает, что I<ifa_addr> и другие поля могут " |
| 412 |
"быть равны NULL, если интерфейс не имеет адресов, и адрес канального уровня " |
| 413 |
"не возвращается, если интерфейсу назначен IP-адрес. Также в разных системах " |
| 414 |
"различается способ выбора между I<ifa_broadaddr> и I<ifa_dstaddr>." |
| 415 |
|
| 416 |
#. type: Plain text |
| 417 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 418 |
#: mageia-cauldron |
| 419 |
#, fuzzy |
| 420 |
#| msgid "" |
| 421 |
#| "The B<getifaddrs>() function first appeared in glibc 2.3, but before " |
| 422 |
#| "glibc 2.3.3, the implementation supported only IPv4 addresses; IPv6 " |
| 423 |
#| "support was added in glibc 2.3.3. Support of address families other than " |
| 424 |
#| "IPv4 is available only on kernels that support netlink." |
| 425 |
msgid "" |
| 426 |
"B<getifaddrs>() first appeared in glibc 2.3, but before glibc 2.3.3, the " |
| 427 |
"implementation supported only IPv4 addresses; IPv6 support was added in " |
| 428 |
"glibc 2.3.3. Support of address families other than IPv4 is available only " |
| 429 |
"on kernels that support netlink." |
| 430 |
msgstr "" |
| 431 |
"Впервые функция B<getifaddrs>() появилась в glibc 2.3, но до glibc 2.3.3 " |
| 432 |
"реализация поддерживала только интерфейсы с адресами IPv4; поддержка IPv6 " |
| 433 |
"добавлена в glibc 2.3.3. Поддержка семейств адресов не IPv4 доступна только " |
| 434 |
"в ядрах, поддерживающих netlink." |
| 435 |
|
| 436 |
#. type: SH |
| 437 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 438 |
#: mageia-cauldron |
| 439 |
#, no-wrap |
| 440 |
msgid "NOTES" |
| 441 |
msgstr "ПРИМЕЧАНИЯ" |
| 442 |
|
| 443 |
#. type: Plain text |
| 444 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 445 |
#: mageia-cauldron |
| 446 |
msgid "" |
| 447 |
"The addresses returned on Linux will usually be the IPv4 and IPv6 addresses " |
| 448 |
"assigned to the interface, but also one B<AF_PACKET> address per interface " |
| 449 |
"containing lower-level details about the interface and its physical layer. " |
| 450 |
"In this case, the I<ifa_data> field may contain a pointer to a I<struct " |
| 451 |
"rtnl_link_stats>, defined in I<E<lt>linux/if_link.hE<gt>> (in Linux 2.4 and " |
| 452 |
"earlier, I<struct net_device_stats>, defined in I<E<lt>linux/" |
| 453 |
"netdevice.hE<gt>>), which contains various interface attributes and " |
| 454 |
"statistics." |
| 455 |
msgstr "" |
| 456 |
"Адреса, возвращаемые в Linux, обычно, являются адресами IPv4 и IPv6, " |
| 457 |
"назначенными интерфейсу, но также есть один адрес B<AF_PACKET> на интерфейс, " |
| 458 |
"содержащий канальные настройки интерфейса и его физический уровень. В этом " |
| 459 |
"случае поле I<ifa_data> может содержать указатель на I<struct " |
| 460 |
"rtnl_link_stats>, определённую в I<E<lt>linux/if_link.hE<gt>> (в Linux 2.4 и " |
| 461 |
"ранее — I<struct net_device_stats>, определена в I<E<lt>linux/" |
| 462 |
"netdevice.hE<gt>>), которая содержит различные атрибуты интерфейса и " |
| 463 |
"статистику." |
| 464 |
|
| 465 |
#. type: SH |
| 466 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 467 |
#: mageia-cauldron |
| 468 |
#, no-wrap |
| 469 |
msgid "EXAMPLES" |
| 470 |
msgstr "ПРИМЕРЫ" |
| 471 |
|
| 472 |
#. type: Plain text |
| 473 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 474 |
#: mageia-cauldron |
| 475 |
msgid "" |
| 476 |
"The program below demonstrates the use of B<getifaddrs>(), B<freeifaddrs>(), " |
| 477 |
"and B<getnameinfo>(3). Here is what we see when running this program on one " |
| 478 |
"system:" |
| 479 |
msgstr "" |
| 480 |
"В программе, показанной далее, демонстрируется использование " |
| 481 |
"B<getifaddrs>(), B<freeifaddrs>(), и B<getnameinfo>(3). Вот результат " |
| 482 |
"запуска этой программы:" |
| 483 |
|
| 484 |
#. type: Plain text |
| 485 |
#: archlinux debian-unstable mageia-cauldron |
| 486 |
#, fuzzy, no-wrap |
| 487 |
#| msgid "" |
| 488 |
#| "$ B<./a.out>\n" |
| 489 |
#| "lo AF_PACKET (17)\n" |
| 490 |
#| " tx_packets = 524; rx_packets = 524\n" |
| 491 |
#| " tx_bytes = 38788; rx_bytes = 38788\n" |
| 492 |
#| "wlp3s0 AF_PACKET (17)\n" |
| 493 |
#| " tx_packets = 108391; rx_packets = 130245\n" |
| 494 |
#| " tx_bytes = 30420659; rx_bytes = 94230014\n" |
| 495 |
#| "em1 AF_PACKET (17)\n" |
| 496 |
#| " tx_packets = 0; rx_packets = 0\n" |
| 497 |
#| " tx_bytes = 0; rx_bytes = 0\n" |
| 498 |
#| "lo AF_INET (2)\n" |
| 499 |
#| " address: E<lt>127.0.0.1E<gt>\n" |
| 500 |
#| "wlp3s0 AF_INET (2)\n" |
| 501 |
#| " address: E<lt>192.168.235.137E<gt>\n" |
| 502 |
#| "lo AF_INET6 (10)\n" |
| 503 |
#| " address: E<lt>::1E<gt>\n" |
| 504 |
#| "wlp3s0 AF_INET6 (10)\n" |
| 505 |
#| " address: E<lt>fe80::7ee9:d3ff:fef5:1a91%wlp3s0E<gt>\n" |
| 506 |
msgid "" |
| 507 |
"$B< ./a.out>;\n" |
| 508 |
"lo AF_PACKET (17)\n" |
| 509 |
" tx_packets = 524; rx_packets = 524\n" |
| 510 |
" tx_bytes = 38788; rx_bytes = 38788\n" |
| 511 |
"wlp3s0 AF_PACKET (17)\n" |
| 512 |
" tx_packets = 108391; rx_packets = 130245\n" |
| 513 |
" tx_bytes = 30420659; rx_bytes = 94230014\n" |
| 514 |
"em1 AF_PACKET (17)\n" |
| 515 |
" tx_packets = 0; rx_packets = 0\n" |
| 516 |
" tx_bytes = 0; rx_bytes = 0\n" |
| 517 |
"lo AF_INET (2)\n" |
| 518 |
" address: E<lt>127.0.0.1E<gt>\n" |
| 519 |
"wlp3s0 AF_INET (2)\n" |
| 520 |
" address: E<lt>192.168.235.137E<gt>\n" |
| 521 |
"lo AF_INET6 (10)\n" |
| 522 |
" address: E<lt>::1E<gt>\n" |
| 523 |
"wlp3s0 AF_INET6 (10)\n" |
| 524 |
" address: E<lt>fe80::7ee9:d3ff:fef5:1a91%wlp3s0E<gt>\n" |
| 525 |
msgstr "" |
| 526 |
"$ B<./a.out>\n" |
| 527 |
"lo AF_PACKET (17)\n" |
| 528 |
" tx_packets = 524; rx_packets = 524\n" |
| 529 |
" tx_bytes = 38788; rx_bytes = 38788\n" |
| 530 |
"wlp3s0 AF_PACKET (17)\n" |
| 531 |
" tx_packets = 108391; rx_packets = 130245\n" |
| 532 |
" tx_bytes = 30420659; rx_bytes = 94230014\n" |
| 533 |
"em1 AF_PACKET (17)\n" |
| 534 |
" tx_packets = 0; rx_packets = 0\n" |
| 535 |
" tx_bytes = 0; rx_bytes = 0\n" |
| 536 |
"lo AF_INET (2)\n" |
| 537 |
" адрес: E<lt>127.0.0.1E<gt>\n" |
| 538 |
"wlp3s0 AF_INET (2)\n" |
| 539 |
" адрес: E<lt>192.168.235.137E<gt>\n" |
| 540 |
"lo AF_INET6 (10)\n" |
| 541 |
" адрес: E<lt>::1E<gt>\n" |
| 542 |
"wlp3s0 AF_INET6 (10)\n" |
| 543 |
" адрес: E<lt>fe80::7ee9:d3ff:fef5:1a91%wlp3s0E<gt>\n" |
| 544 |
|
| 545 |
#. type: SS |
| 546 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 547 |
#: mageia-cauldron |
| 548 |
#, no-wrap |
| 549 |
msgid "Program source" |
| 550 |
msgstr "Исходный код программы" |
| 551 |
|
| 552 |
#. type: Plain text |
| 553 |
#: archlinux debian-unstable mageia-cauldron |
| 554 |
#, no-wrap |
| 555 |
msgid "" |
| 556 |
"#define _GNU_SOURCE /* To get defns of NI_MAXSERV and NI_MAXHOST */\n" |
| 557 |
"#include E<lt>arpa/inet.hE<gt>\n" |
| 558 |
"#include E<lt>sys/socket.hE<gt>\n" |
| 559 |
"#include E<lt>netdb.hE<gt>\n" |
| 560 |
"#include E<lt>ifaddrs.hE<gt>\n" |
| 561 |
"#include E<lt>stdio.hE<gt>\n" |
| 562 |
"#include E<lt>stdlib.hE<gt>\n" |
| 563 |
"#include E<lt>unistd.hE<gt>\n" |
| 564 |
"#include E<lt>linux/if_link.hE<gt>\n" |
| 565 |
"\\&\n" |
| 566 |
"int main(int argc, char *argv[])\n" |
| 567 |
"{\n" |
| 568 |
" struct ifaddrs *ifaddr;\n" |
| 569 |
" int family, s;\n" |
| 570 |
" char host[NI_MAXHOST];\n" |
| 571 |
"\\&\n" |
| 572 |
" if (getifaddrs(&ifaddr) == -1) {\n" |
| 573 |
" perror(\"getifaddrs\");\n" |
| 574 |
" exit(EXIT_FAILURE);\n" |
| 575 |
" }\n" |
| 576 |
"\\&\n" |
| 577 |
" /* Walk through linked list, maintaining head pointer so we\n" |
| 578 |
" can free list later. */\n" |
| 579 |
"\\&\n" |
| 580 |
" for (struct ifaddrs *ifa = ifaddr; ifa != NULL;\n" |
| 581 |
" ifa = ifa-E<gt>ifa_next) {\n" |
| 582 |
" if (ifa-E<gt>ifa_addr == NULL)\n" |
| 583 |
" continue;\n" |
| 584 |
"\\&\n" |
| 585 |
" family = ifa-E<gt>ifa_addr-E<gt>sa_family;\n" |
| 586 |
"\\&\n" |
| 587 |
" /* Display interface name and family (including symbolic\n" |
| 588 |
" form of the latter for the common families). */\n" |
| 589 |
"\\&\n" |
| 590 |
" printf(\"%-8s %s (%d)\\[rs]n\",\n" |
| 591 |
" ifa-E<gt>ifa_name,\n" |
| 592 |
" (family == AF_PACKET) ? \"AF_PACKET\" :\n" |
| 593 |
" (family == AF_INET) ? \"AF_INET\" :\n" |
| 594 |
" (family == AF_INET6) ? \"AF_INET6\" : \"???\",\n" |
| 595 |
" family);\n" |
| 596 |
"\\&\n" |
| 597 |
" /* For an AF_INET* interface address, display the address. */\n" |
| 598 |
"\\&\n" |
| 599 |
" if (family == AF_INET || family == AF_INET6) {\n" |
| 600 |
" s = getnameinfo(ifa-E<gt>ifa_addr,\n" |
| 601 |
" (family == AF_INET) ? sizeof(struct sockaddr_in) :\n" |
| 602 |
" sizeof(struct sockaddr_in6),\n" |
| 603 |
" host, NI_MAXHOST,\n" |
| 604 |
" NULL, 0, NI_NUMERICHOST);\n" |
| 605 |
" if (s != 0) {\n" |
| 606 |
" printf(\"getnameinfo() failed: %s\\[rs]n\", gai_strerror(s));\n" |
| 607 |
" exit(EXIT_FAILURE);\n" |
| 608 |
" }\n" |
| 609 |
"\\&\n" |
| 610 |
" printf(\"\\[rs]t\\[rs]taddress: E<lt>%sE<gt>\\[rs]n\", host);\n" |
| 611 |
"\\&\n" |
| 612 |
" } else if (family == AF_PACKET && ifa-E<gt>ifa_data != NULL) {\n" |
| 613 |
" struct rtnl_link_stats *stats = ifa-E<gt>ifa_data;\n" |
| 614 |
"\\&\n" |
| 615 |
" printf(\"\\[rs]t\\[rs]ttx_packets = %10u; rx_packets = %10u\\[rs]n\"\n" |
| 616 |
" \"\\[rs]t\\[rs]ttx_bytes = %10u; rx_bytes = %10u\\[rs]n\",\n" |
| 617 |
" stats-E<gt>tx_packets, stats-E<gt>rx_packets,\n" |
| 618 |
" stats-E<gt>tx_bytes, stats-E<gt>rx_bytes);\n" |
| 619 |
" }\n" |
| 620 |
" }\n" |
| 621 |
"\\&\n" |
| 622 |
" freeifaddrs(ifaddr);\n" |
| 623 |
" exit(EXIT_SUCCESS);\n" |
| 624 |
"}\n" |
| 625 |
msgstr "" |
| 626 |
|
| 627 |
#. type: SH |
| 628 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 629 |
#: mageia-cauldron |
| 630 |
#, no-wrap |
| 631 |
msgid "SEE ALSO" |
| 632 |
msgstr "СМОТРИТЕ ТАКЖЕ" |
| 633 |
|
| 634 |
#. type: Plain text |
| 635 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 636 |
#: mageia-cauldron |
| 637 |
msgid "" |
| 638 |
"B<bind>(2), B<getsockname>(2), B<socket>(2), B<packet>(7), B<ifconfig>(8)" |
| 639 |
msgstr "" |
| 640 |
"B<bind>(2), B<getsockname>(2), B<socket>(2), B<packet>(7), B<ifconfig>(8)" |
| 641 |
|
| 642 |
#. type: TH |
| 643 |
#: debian-trixie |
| 644 |
#, no-wrap |
| 645 |
msgid "2024-06-15" |
| 646 |
msgstr "15 июня 2024 г." |
| 647 |
|
| 648 |
#. type: TH |
| 649 |
#: debian-trixie |
| 650 |
#, no-wrap |
| 651 |
msgid "Linux man-pages 6.9.1" |
| 652 |
msgstr "Страницы руководства Linux 6.9.1" |
| 653 |
|
| 654 |
#. type: Plain text |
| 655 |
#: debian-trixie |
| 656 |
msgid "Standard C library (I<libc>, I<-lc>)" |
| 657 |
msgstr "Стандартная библиотека языка C (I<libc>, I<-lc>)" |
| 658 |
|
| 659 |
#. type: Plain text |
| 660 |
#: debian-trixie fedora-44 fedora-rawhide |
| 661 |
#, no-wrap |
| 662 |
msgid "" |
| 663 |
"$ B<./a.out>\n" |
| 664 |
"lo AF_PACKET (17)\n" |
| 665 |
" tx_packets = 524; rx_packets = 524\n" |
| 666 |
" tx_bytes = 38788; rx_bytes = 38788\n" |
| 667 |
"wlp3s0 AF_PACKET (17)\n" |
| 668 |
" tx_packets = 108391; rx_packets = 130245\n" |
| 669 |
" tx_bytes = 30420659; rx_bytes = 94230014\n" |
| 670 |
"em1 AF_PACKET (17)\n" |
| 671 |
" tx_packets = 0; rx_packets = 0\n" |
| 672 |
" tx_bytes = 0; rx_bytes = 0\n" |
| 673 |
"lo AF_INET (2)\n" |
| 674 |
" address: E<lt>127.0.0.1E<gt>\n" |
| 675 |
"wlp3s0 AF_INET (2)\n" |
| 676 |
" address: E<lt>192.168.235.137E<gt>\n" |
| 677 |
"lo AF_INET6 (10)\n" |
| 678 |
" address: E<lt>::1E<gt>\n" |
| 679 |
"wlp3s0 AF_INET6 (10)\n" |
| 680 |
" address: E<lt>fe80::7ee9:d3ff:fef5:1a91%wlp3s0E<gt>\n" |
| 681 |
msgstr "" |
| 682 |
"$ B<./a.out>\n" |
| 683 |
"lo AF_PACKET (17)\n" |
| 684 |
" tx_packets = 524; rx_packets = 524\n" |
| 685 |
" tx_bytes = 38788; rx_bytes = 38788\n" |
| 686 |
"wlp3s0 AF_PACKET (17)\n" |
| 687 |
" tx_packets = 108391; rx_packets = 130245\n" |
| 688 |
" tx_bytes = 30420659; rx_bytes = 94230014\n" |
| 689 |
"em1 AF_PACKET (17)\n" |
| 690 |
" tx_packets = 0; rx_packets = 0\n" |
| 691 |
" tx_bytes = 0; rx_bytes = 0\n" |
| 692 |
"lo AF_INET (2)\n" |
| 693 |
" адрес: E<lt>127.0.0.1E<gt>\n" |
| 694 |
"wlp3s0 AF_INET (2)\n" |
| 695 |
" адрес: E<lt>192.168.235.137E<gt>\n" |
| 696 |
"lo AF_INET6 (10)\n" |
| 697 |
" адрес: E<lt>::1E<gt>\n" |
| 698 |
"wlp3s0 AF_INET6 (10)\n" |
| 699 |
" адрес: E<lt>fe80::7ee9:d3ff:fef5:1a91%wlp3s0E<gt>\n" |
| 700 |
|
| 701 |
#. type: Plain text |
| 702 |
#: debian-trixie fedora-44 fedora-rawhide |
| 703 |
#, no-wrap |
| 704 |
msgid "" |
| 705 |
"#define _GNU_SOURCE /* To get defns of NI_MAXSERV and NI_MAXHOST */\n" |
| 706 |
"#include E<lt>arpa/inet.hE<gt>\n" |
| 707 |
"#include E<lt>sys/socket.hE<gt>\n" |
| 708 |
"#include E<lt>netdb.hE<gt>\n" |
| 709 |
"#include E<lt>ifaddrs.hE<gt>\n" |
| 710 |
"#include E<lt>stdio.hE<gt>\n" |
| 711 |
"#include E<lt>stdlib.hE<gt>\n" |
| 712 |
"#include E<lt>unistd.hE<gt>\n" |
| 713 |
"#include E<lt>linux/if_link.hE<gt>\n" |
| 714 |
"\\&\n" |
| 715 |
"int main(int argc, char *argv[])\n" |
| 716 |
"{\n" |
| 717 |
" struct ifaddrs *ifaddr;\n" |
| 718 |
" int family, s;\n" |
| 719 |
" char host[NI_MAXHOST];\n" |
| 720 |
"\\&\n" |
| 721 |
" if (getifaddrs(&ifaddr) == -1) {\n" |
| 722 |
" perror(\"getifaddrs\");\n" |
| 723 |
" exit(EXIT_FAILURE);\n" |
| 724 |
" }\n" |
| 725 |
"\\&\n" |
| 726 |
" /* Walk through linked list, maintaining head pointer so we\n" |
| 727 |
" can free list later. */\n" |
| 728 |
"\\&\n" |
| 729 |
" for (struct ifaddrs *ifa = ifaddr; ifa != NULL;\n" |
| 730 |
" ifa = ifa-E<gt>ifa_next) {\n" |
| 731 |
" if (ifa-E<gt>ifa_addr == NULL)\n" |
| 732 |
" continue;\n" |
| 733 |
"\\&\n" |
| 734 |
" family = ifa-E<gt>ifa_addr-E<gt>sa_family;\n" |
| 735 |
"\\&\n" |
| 736 |
" /* Display interface name and family (including symbolic\n" |
| 737 |
" form of the latter for the common families). */\n" |
| 738 |
"\\&\n" |
| 739 |
" printf(\"%-8s %s (%d)\\[rs]n\",\n" |
| 740 |
" ifa-E<gt>ifa_name,\n" |
| 741 |
" (family == AF_PACKET) ? \"AF_PACKET\" :\n" |
| 742 |
" (family == AF_INET) ? \"AF_INET\" :\n" |
| 743 |
" (family == AF_INET6) ? \"AF_INET6\" : \"???\",\n" |
| 744 |
" family);\n" |
| 745 |
"\\&\n" |
| 746 |
" /* For an AF_INET* interface address, display the address. */\n" |
| 747 |
"\\&\n" |
| 748 |
" if (family == AF_INET || family == AF_INET6) {\n" |
| 749 |
" s = getnameinfo(ifa-E<gt>ifa_addr,\n" |
| 750 |
" (family == AF_INET) ? sizeof(struct sockaddr_in) :\n" |
| 751 |
" sizeof(struct sockaddr_in6),\n" |
| 752 |
" host, NI_MAXHOST,\n" |
| 753 |
" NULL, 0, NI_NUMERICHOST);\n" |
| 754 |
" if (s != 0) {\n" |
| 755 |
" printf(\"getnameinfo() failed: %s\\[rs]n\", gai_strerror(s));\n" |
| 756 |
" exit(EXIT_FAILURE);\n" |
| 757 |
" }\n" |
| 758 |
"\\&\n" |
| 759 |
" printf(\"\\[rs]t\\[rs]taddress: E<lt>%sE<gt>\\[rs]n\", host);\n" |
| 760 |
"\\&\n" |
| 761 |
" } else if (family == AF_PACKET && ifa-E<gt>ifa_data != NULL) {\n" |
| 762 |
" struct rtnl_link_stats *stats = ifa-E<gt>ifa_data;\n" |
| 763 |
"\\&\n" |
| 764 |
" printf(\"\\[rs]t\\[rs]ttx_packets = %10u; rx_packets = %10u\\[rs]n\"\n" |
| 765 |
" \"\\[rs]t\\[rs]ttx_bytes = %10u; rx_bytes = %10u\\[rs]n\",\n" |
| 766 |
" stats-E<gt>tx_packets, stats-E<gt>rx_packets,\n" |
| 767 |
" stats-E<gt>tx_bytes, stats-E<gt>rx_bytes);\n" |
| 768 |
" }\n" |
| 769 |
" }\n" |
| 770 |
"\\&\n" |
| 771 |
" freeifaddrs(ifaddr);\n" |
| 772 |
" exit(EXIT_SUCCESS);\n" |
| 773 |
"}\n" |
| 774 |
msgstr "" |
| 775 |
|
| 776 |
#. type: TH |
| 777 |
#: fedora-44 fedora-rawhide |
| 778 |
#, no-wrap |
| 779 |
msgid "2024-07-23" |
| 780 |
msgstr "23 июля 2024 г." |
| 781 |
|
| 782 |
#. type: TH |
| 783 |
#: fedora-44 fedora-rawhide |
| 784 |
#, no-wrap |
| 785 |
msgid "Linux man-pages 6.13" |
| 786 |
msgstr "Страницы руководства Linux 6.13" |
| 787 |
|
| 788 |
#. type: TH |
| 789 |
#: mageia-cauldron |
| 790 |
#, no-wrap |
| 791 |
msgid "Linux man-pages 6.17" |
| 792 |
msgstr "Страницы руководства Linux 6.17" |