# Russian translation of manpages # This file is distributed under the same license as the manpages-l10n package. # Copyright © of this file: # Azamat Hackimov , 2014. # Dmitriy S. Seregin , 2013. # Dmitry Bolkhovskikh , 2017. # Katrin Kutepova , 2018. # Yuri Kozlov , 2011-2019. # Иван Павлов , 2017. msgid "" msgstr "" "Project-Id-Version: manpages-l10n\n" "POT-Creation-Date: 2024-06-01 05:45+0200\n" "PO-Revision-Date: 2019-10-05 07:56+0300\n" "Last-Translator: Yuri Kozlov \n" "Language-Team: Russian \n" "Language: ru\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "Plural-Forms: nplurals=4; plural=(n%10==1 && n%100!=11 ? 0 : n%10>=2 && n" "%10<=4 && (n%100<12 || n%100>14) ? 1 : n%10==0 || (n%10>=5 && n%10<=9) || (n" "%100>=11 && n%100<=14)? 2 : 3);\n" "X-Generator: Lokalize 2.0\n" #. type: TH #: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide #: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed #, no-wrap msgid "CMSG" msgstr "CMSG" #. type: TH #: archlinux debian-unstable opensuse-tumbleweed #, no-wrap msgid "2024-05-02" msgstr "2 мая 2024 г." #. type: TH #: archlinux debian-unstable #, fuzzy, no-wrap #| msgid "Linux man-pages 6.7" msgid "Linux man-pages 6.8" msgstr "Linux man-pages 6.7" #. type: SH #: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide #: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed #, no-wrap msgid "NAME" msgstr "ИМЯ" #. type: Plain text #: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide #: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed msgid "" "CMSG_ALIGN, CMSG_SPACE, CMSG_NXTHDR, CMSG_FIRSTHDR - access ancillary data" msgstr "" "CMSG_ALIGN, CMSG_SPACE, CMSG_NXTHDR, CMSG_FIRSTHDR - доступ к " "вспомогательным данным" #. type: SH #: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide #: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed #, no-wrap msgid "LIBRARY" msgstr "" #. type: Plain text #: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide #: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed msgid "Standard C library (I, I<-lc>)" msgstr "" #. type: SH #: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide #: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed #, no-wrap msgid "SYNOPSIS" msgstr "СИНТАКСИС" #. type: Plain text #: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide #: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed #, no-wrap msgid "B<#include Esys/socket.hE>\n" msgstr "B<#include Esys/socket.hE>\n" #. type: Plain text #: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide #: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed #, fuzzy, no-wrap #| msgid "" #| "B<#include Esys/socket.hE>\n" #| "BIB<);>\n" #| "BIB< ,>\n" #| "B< struct cmsghdr *>cmsgB<);>\n" #| "BIB<);>\n" #| "BIB<);>\n" #| "BIB<);>\n" #| "BIB<);>\n" msgid "" "BIB<);>\n" "BIB<,>\n" "B< struct cmsghdr *>cmsgB<);>\n" "BIB<);>\n" "BIB<);>\n" "BIB<);>\n" "BIB<);>\n" msgstr "" "B<#include Esys/socket.hE>\n" "BIB<);>\n" "BIB< ,>\n" "B< struct cmsghdr *>cmsgB<);>\n" "BIB<);>\n" "BIB<);>\n" "BIB<);>\n" "BIB<);>\n" #. type: SH #: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide #: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed #, no-wrap msgid "DESCRIPTION" msgstr "ОПИСАНИЕ" #. type: Plain text #: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide #: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed msgid "" "These macros are used to create and access control messages (also called " "ancillary data) that are not a part of the socket payload. This control " "information may include the interface the packet was received on, various " "rarely used header fields, an extended error description, a set of file " "descriptors, or UNIX credentials. For instance, control messages can be " "used to send additional header fields such as IP options. Ancillary data is " "sent by calling B(2) and received by calling B(2). See " "their manual pages for more information." msgstr "" "Эти макросы используются для создания сообщений контроля доступа (также " "называемых вспомогательными данными), которые не являются частью полезной " "нагрузки сокета. Эта управляющая информация может содержать интерфейс, с " "которого получен пакет, различные редко используемые поля заголовков и " "расширенное описание ошибок, наборы файловых дескрипторов или параметров " "доступа (credentials) UNIX. Например, управляющие сообщения могут быть " "использованы для отправки дополнительных полей заголовков, таких, как " "параметры IP. Вспомогательные данные посылаются с помощью вызова " "B(2) и принимаются посредством вызова B(2). Более полная " "информация приведена в их справочных страницах." #. type: Plain text #: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide #: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed msgid "" "Ancillary data is a sequence of I structures with appended data. " "See the specific protocol man pages for the available control message " "types. The maximum ancillary buffer size allowed per socket can be set " "using I; see B(7)." msgstr "" "Вспомогательные данные представляют собой последовательность структур " "I с присоединёнными к ней данными. Возможные типы управляющих " "сообщений смотрите в соответствующих страницах протоколов. Максимально " "возможный размер буфера вспомогательных данных одного сокета можно " "установить через I; смотрите B(7)." #. type: Plain text #: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide #: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed msgid "The I structure is defined as follows:" msgstr "Структура I определена следующим образом:" #. type: Plain text #: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide #: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed #, no-wrap msgid "" "struct cmsghdr {\n" " size_t cmsg_len; /* Data byte count, including header\n" " (type is socklen_t in POSIX) */\n" " int cmsg_level; /* Originating protocol */\n" " int cmsg_type; /* Protocol-specific type */\n" "/* followed by\n" " unsigned char cmsg_data[]; */\n" "};\n" msgstr "" "struct cmsghdr {\n" " size_t cmsg_len; /* счетчик байтов данных с заголовком\n" " (тип — socklen_t в POSIX) */\n" " int cmsg_level; /* начальный протокол */\n" " int cmsg_type; /* тип, зависящий от протокола */\n" "/* после\n" " unsigned char cmsg_data[]; */\n" "};\n" #. type: Plain text #: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide #: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed msgid "" "The sequence of I structures should never be accessed directly. " "Instead, use only the following macros:" msgstr "" "К последовательности структур I нельзя обращаться напрямую. Для " "этого используйте следующие макросы:" #. type: TP #: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide #: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed #, no-wrap msgid "B()" msgstr "" #. type: Plain text #: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide #: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed #, fuzzy #| msgid "" #| "B() returns a pointer to the first I in the " #| "ancillary data buffer associated with the passed I. It returns " #| "NULL if there isn't enough space for a I in the buffer." msgid "" "returns a pointer to the first I in the ancillary data buffer " "associated with the passed I. It returns NULL if there isn't enough " "space for a I in the buffer." msgstr "" "Макрос B() возвращает указатель на первый I в буфере " "вспомогательных данных, связанных с переданным I. Он возвращает " "NULL, если в буфере недостаточно места для I." #. #-#-#-#-# archlinux: cmsg.3.pot (PACKAGE VERSION) #-#-#-#-# #. type: TQ #. #-#-#-#-# debian-bookworm: cmsg.3.pot (PACKAGE VERSION) #-#-#-#-# #. type: TP #. #-#-#-#-# debian-unstable: cmsg.3.pot (PACKAGE VERSION) #-#-#-#-# #. type: TQ #. #-#-#-#-# fedora-40: cmsg.3.pot (PACKAGE VERSION) #-#-#-#-# #. type: TQ #. #-#-#-#-# fedora-rawhide: cmsg.3.pot (PACKAGE VERSION) #-#-#-#-# #. type: TQ #. #-#-#-#-# mageia-cauldron: cmsg.3.pot (PACKAGE VERSION) #-#-#-#-# #. type: TQ #. #-#-#-#-# opensuse-leap-15-6: cmsg.3.pot (PACKAGE VERSION) #-#-#-#-# #. type: TQ #. #-#-#-#-# opensuse-tumbleweed: cmsg.3.pot (PACKAGE VERSION) #-#-#-#-# #. type: TQ #: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide #: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed #, no-wrap msgid "B()" msgstr "" #. type: Plain text #: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide #: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed #, fuzzy #| msgid "" #| "B() returns the next valid I after the passed " #| "I. It returns NULL when there isn't enough space left in the " #| "buffer." msgid "" "returns the next valid I after the passed I. It returns " "NULL when there isn't enough space left in the buffer." msgstr "" "Макрос B() возвращает следующее значение I после " "переданного I. Он возвращает NULL, если в буфере недостаточно места." #. type: Plain text #: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide #: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed msgid "" "When initializing a buffer that will contain a series of I " "structures (e.g., to be sent with B(2)), that buffer should first " "be zero-initialized to ensure the correct operation of B()." msgstr "" "Для правильной работы B() при инициализации буфера, который " "будет содержать набор структур I (например, для отправки с помощью " "B(2)), его необходимо заполнять нулями." #. type: TP #: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide #: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed #, no-wrap msgid "B()," msgstr "" #. type: Plain text #: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide #: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed #, fuzzy #| msgid "" #| "B(), given a length, returns it including the required " #| "alignment. This is a constant expression." msgid "" "given a length, returns it including the required alignment. This is a " "constant expression." msgstr "" "Макрос B() возвращает длину, учитывая необходимое выравнивание. " "Это постоянное выражение." #. type: TP #: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide #: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed #, fuzzy, no-wrap #| msgid "B" msgid "B()" msgstr "B" #. type: Plain text #: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide #: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed #, fuzzy #| msgid "" #| "B() returns the number of bytes an ancillary element with " #| "payload of the passed data length occupies. This is a constant " #| "expression." msgid "" "returns the number of bytes an ancillary element with payload of the passed " "data length occupies. This is a constant expression." msgstr "" "Макрос B() возвращает количество байт, которое занимает " "вспомогательный элемент с полезной нагрузкой переданных данных. Это " "постоянное выражение." #. #-#-#-#-# archlinux: cmsg.3.pot (PACKAGE VERSION) #-#-#-#-# #. type: TQ #. #-#-#-#-# debian-bookworm: cmsg.3.pot (PACKAGE VERSION) #-#-#-#-# #. type: TP #. #-#-#-#-# debian-unstable: cmsg.3.pot (PACKAGE VERSION) #-#-#-#-# #. type: TQ #. #-#-#-#-# fedora-40: cmsg.3.pot (PACKAGE VERSION) #-#-#-#-# #. type: TQ #. #-#-#-#-# fedora-rawhide: cmsg.3.pot (PACKAGE VERSION) #-#-#-#-# #. type: TQ #. #-#-#-#-# mageia-cauldron: cmsg.3.pot (PACKAGE VERSION) #-#-#-#-# #. type: TQ #. #-#-#-#-# opensuse-leap-15-6: cmsg.3.pot (PACKAGE VERSION) #-#-#-#-# #. type: TQ #. #-#-#-#-# opensuse-tumbleweed: cmsg.3.pot (PACKAGE VERSION) #-#-#-#-# #. type: TQ #: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide #: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed #, no-wrap msgid "B()" msgstr "" #. type: Plain text #: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide #: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed msgid "" "returns a pointer to the data portion of a I. The pointer returned " "cannot be assumed to be suitably aligned for accessing arbitrary payload " "data types. Applications should not cast it to a pointer type matching the " "payload, but should instead use B(3) to copy data to or from a " "suitably declared object." msgstr "" #. #-#-#-#-# archlinux: cmsg.3.pot (PACKAGE VERSION) #-#-#-#-# #. type: TQ #. #-#-#-#-# debian-bookworm: cmsg.3.pot (PACKAGE VERSION) #-#-#-#-# #. type: TP #. #-#-#-#-# debian-unstable: cmsg.3.pot (PACKAGE VERSION) #-#-#-#-# #. type: TQ #. #-#-#-#-# fedora-40: cmsg.3.pot (PACKAGE VERSION) #-#-#-#-# #. type: TQ #. #-#-#-#-# fedora-rawhide: cmsg.3.pot (PACKAGE VERSION) #-#-#-#-# #. type: TQ #. #-#-#-#-# mageia-cauldron: cmsg.3.pot (PACKAGE VERSION) #-#-#-#-# #. type: TQ #. #-#-#-#-# opensuse-leap-15-6: cmsg.3.pot (PACKAGE VERSION) #-#-#-#-# #. type: TQ #. #-#-#-#-# opensuse-tumbleweed: cmsg.3.pot (PACKAGE VERSION) #-#-#-#-# #. type: TQ #: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide #: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed #, fuzzy, no-wrap #| msgid "B" msgid "B()" msgstr "B" #. type: Plain text #: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide #: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed #, fuzzy #| msgid "" #| "B() returns the value to store in the I member of " #| "the I structure, taking into account any necessary alignment. " #| "It takes the data length as an argument. This is a constant expression." msgid "" "returns the value to store in the I member of the I " "structure, taking into account any necessary alignment. It takes the data " "length as an argument. This is a constant expression." msgstr "" "Макрос B возвращает значение, хранящееся в поле I " "структуры I с учётом необходимого выравнивания. Он принимает " "значение объёма данных в качестве аргумента. Это постоянное выражение." #. type: Plain text #: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide #: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed msgid "" "To create ancillary data, first initialize the I member of " "the I with the length of the control message buffer. Use " "B() on the I to get the first control message and " "B() to get all subsequent ones. In each control message, " "initialize I (with B()), the other I header " "fields, and the data portion using B(). Finally, the " "I field of the I should be set to the sum of the " "B() of the length of all control messages in the buffer. For " "more information on the I, see B(2)." msgstr "" "Чтобы создать вспомогательные данные, сначала инициализируйте элемент " "I структуры I, указав длину буфера управляющего " "сообщения. Запустите B() со структурой I для " "получения первого управляющего сообщения и B() для получения " "последующих. Для каждого управляющего сообщения инициализируйте I " "(с помощью B()) и другие поля заголовка I, а также часть " "для данных (с помощью B()). В результате значение поля " "I структуры I будет равно сумме B() для " "длин всех управляющих сообщений в буфере. Дополнительная информация о " "I находится в B(2)." #. type: SH #: archlinux debian-unstable fedora-40 fedora-rawhide mageia-cauldron #: opensuse-leap-15-6 opensuse-tumbleweed #, no-wrap msgid "VERSIONS" msgstr "ВЕРСИИ" #. type: Plain text #: archlinux debian-unstable fedora-40 fedora-rawhide mageia-cauldron #: opensuse-leap-15-6 opensuse-tumbleweed #, fuzzy #| msgid "" #| "For portability, ancillary data should be accessed using only the macros " #| "described here. B() is a Linux extension and should not be " #| "used in portable programs." msgid "" "For portability, ancillary data should be accessed using only the macros " "described here." msgstr "" "В целях переносимости вспомогательные данные могут быть доступны только с " "помощью макросов, описанных здесь. B() — это расширение Linux, " "поэтому оно не должно быть использовано в переносимых программах." #. type: Plain text #: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide #: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed msgid "" "In Linux, B(), B(), and B() are constant " "expressions (assuming their argument is constant), meaning that these values " "can be used to declare the size of global variables. This may not be " "portable, however." msgstr "" "В Linux B(), B() и B() — это постоянные " "выражения (вне зависимости от переданных аргументов), то есть эти значения " "можно использовать для объявления размера глобальных переменных. Но это " "также сделает программу непереносимой на другие платформы." #. type: SH #: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide #: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed #, no-wrap msgid "STANDARDS" msgstr "СТАНДАРТЫ" #. type: Plain text #: archlinux debian-unstable fedora-40 fedora-rawhide mageia-cauldron #: opensuse-leap-15-6 opensuse-tumbleweed msgid "POSIX.1-2008." msgstr "POSIX.1-2008." #. type: TQ #: archlinux debian-unstable fedora-40 fedora-rawhide mageia-cauldron #: opensuse-leap-15-6 opensuse-tumbleweed #, fuzzy, no-wrap #| msgid "B" msgid "B()" msgstr "B" #. type: Plain text #: archlinux debian-unstable fedora-40 fedora-rawhide mageia-cauldron #: opensuse-leap-15-6 opensuse-tumbleweed msgid "Linux." msgstr "Linux." #. type: SH #: archlinux debian-unstable fedora-40 fedora-rawhide mageia-cauldron #: opensuse-leap-15-6 opensuse-tumbleweed #, no-wrap msgid "HISTORY" msgstr "ИСТОРИЯ" #. type: Plain text #: archlinux debian-unstable fedora-40 fedora-rawhide mageia-cauldron #: opensuse-leap-15-6 opensuse-tumbleweed #, fuzzy #| msgid "" #| "This ancillary data model conforms to the POSIX.1g draft, 4.4BSD-Lite, " #| "the IPv6 advanced API described in RFC\\ 2292 and SUSv2. " #| "B() is a Linux extension." msgid "" "This ancillary data model conforms to the POSIX.1g draft, 4.4BSD-Lite, the " "IPv6 advanced API described in RFC\\ 2292 and SUSv2." msgstr "" "Эта модель вспомогательных данных соответствует черновому варианту POSIX.1g, " "4.4BSD-Lite, расширению IPv6 API, описанному в RFC\\ 2292, и SUSv2. " "B() — это расширение Linux." #. https://www.austingroupbugs.net/view.php?id=978#c3242 #. type: Plain text #: archlinux debian-unstable fedora-40 fedora-rawhide mageia-cauldron #: opensuse-leap-15-6 opensuse-tumbleweed msgid "" "B() and B() will be included in the next POSIX " "release (Issue 8)." msgstr "" #. type: SH #: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide #: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed #, no-wrap msgid "EXAMPLES" msgstr "ПРИМЕРЫ" #. type: Plain text #: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide #: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed msgid "" "This code looks for the B option in a received ancillary buffer:" msgstr "" "Данный код ищет параметр B в буфере с полученными вспомогательными " "данными:" #. type: Plain text #: archlinux debian-unstable fedora-40 fedora-rawhide mageia-cauldron #: opensuse-tumbleweed #, fuzzy, no-wrap #| msgid "" #| "for (cmsg = CMSG_FIRSTHDR(&msgh); cmsg != NULL;\n" #| " cmsg = CMSG_NXTHDR(&msgh, cmsg)) {\n" #| " if (cmsg-Ecmsg_level == IPPROTO_IP\n" #| " && cmsg-Ecmsg_type == IP_TTL) {\n" #| " ttlptr = (int *) CMSG_DATA(cmsg);\n" #| " received_ttl = *ttlptr;\n" #| " break;\n" #| " }\n" #| "}\n" msgid "" "struct msghdr msgh;\n" "struct cmsghdr *cmsg;\n" "int received_ttl;\n" "\\&\n" "/* Receive auxiliary data in msgh */\n" "\\&\n" "for (cmsg = CMSG_FIRSTHDR(&msgh); cmsg != NULL;\n" " cmsg = CMSG_NXTHDR(&msgh, cmsg)) {\n" " if (cmsg-Ecmsg_level == IPPROTO_IP\n" " && cmsg-Ecmsg_type == IP_TTL) {\n" " memcpy(&receive_ttl, CMSG_DATA(cmsg), sizeof(received_ttl));\n" " break;\n" " }\n" "}\n" "\\&\n" "if (cmsg == NULL) {\n" " /* Error: IP_TTL not enabled or small buffer or I/O error */\n" "}\n" msgstr "" "for (cmsg = CMSG_FIRSTHDR(&msgh); cmsg != NULL;\n" " cmsg = CMSG_NXTHDR(&msgh, cmsg)) {\n" " if (cmsg-Ecmsg_level == IPPROTO_IP\n" " && cmsg-Ecmsg_type == IP_TTL) {\n" " ttlptr = (int *) CMSG_DATA(cmsg);\n" " received_ttl = *ttlptr;\n" " break;\n" " }\n" "}\n" #. type: Plain text #: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide #: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed msgid "" "The code below passes an array of file descriptors over a UNIX domain socket " "using B:" msgstr "" "Данный код передаёт массив файловых дескрипторов через доменный сокет UNIX, " "используя B:" #. type: Plain text #: archlinux debian-unstable fedora-40 fedora-rawhide mageia-cauldron #: opensuse-tumbleweed #, fuzzy, no-wrap #| msgid "" #| "struct msghdr msg = { 0 };\n" #| "struct cmsghdr *cmsg;\n" #| "int myfds[NUM_FD]; /* Contains the file descriptors to pass */\n" #| "char iobuf[1];\n" #| "struct iovec io = {\n" #| " .iov_base = iobuf,\n" #| " .iov_len = sizeof(iobuf)\n" #| "};\n" #| "union { /* Ancillary data buffer, wrapped in a union\n" #| " in order to ensure it is suitably aligned */\n" #| " char buf[CMSG_SPACE(sizeof(myfds))];\n" #| " struct cmsghdr align;\n" #| "} u;\n" msgid "" "struct msghdr msg = { 0 };\n" "struct cmsghdr *cmsg;\n" "int myfds[NUM_FD]; /* Contains the file descriptors to pass */\n" "char iobuf[1];\n" "struct iovec io = {\n" " .iov_base = iobuf,\n" " .iov_len = sizeof(iobuf)\n" "};\n" "union { /* Ancillary data buffer, wrapped in a union\n" " in order to ensure it is suitably aligned */\n" " char buf[CMSG_SPACE(sizeof(myfds))];\n" " struct cmsghdr align;\n" "} u;\n" "\\&\n" "msg.msg_iov = &io;\n" "msg.msg_iovlen = 1;\n" "msg.msg_control = u.buf;\n" "msg.msg_controllen = sizeof(u.buf);\n" "cmsg = CMSG_FIRSTHDR(&msg);\n" "cmsg-Ecmsg_level = SOL_SOCKET;\n" "cmsg-Ecmsg_type = SCM_RIGHTS;\n" "cmsg-Ecmsg_len = CMSG_LEN(sizeof(myfds));\n" "memcpy(CMSG_DATA(cmsg), myfds, sizeof(myfds));\n" msgstr "" "struct msghdr msg = { 0 };\n" "struct cmsghdr *cmsg;\n" "int myfds[NUM_FD]; /* содержит дескрипторы файлов для передачи */\n" "char iobuf[1];\n" "struct iovec io = {\n" " .iov_base = iobuf,\n" " .iov_len = sizeof(iobuf)\n" "};\n" "union { /* буфер вспомогательных данных, обёрнутый в union,\n" " чтобы точно получить нужное выравнивание */\n" " char buf[CMSG_SPACE(sizeof(myfds))];\n" " struct cmsghdr align;\n" "} u;\n" #. type: Plain text #: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide #: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed #, fuzzy #| msgid "" #| "The code below passes an array of file descriptors over a UNIX domain " #| "socket using B:" msgid "" "For a complete code example that shows passing of file descriptors over a " "UNIX domain socket, see B(2)." msgstr "" "Данный код передаёт массив файловых дескрипторов через доменный сокет UNIX, " "используя B:" #. type: SH #: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide #: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed #, no-wrap msgid "SEE ALSO" msgstr "СМОТРИТЕ ТАКЖЕ" #. type: Plain text #: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide #: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed msgid "B(2), B(2)" msgstr "B(2), B(2)" #. type: Plain text #: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide #: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed msgid "RFC\\ 2292" msgstr "RFC\\ 2292" #. type: TH #: debian-bookworm #, no-wrap msgid "2022-10-29" msgstr "29 октября 2022 г." #. type: TH #: debian-bookworm #, no-wrap msgid "Linux man-pages 6.03" msgstr "Linux man-pages 6.03" #. https://www.austingroupbugs.net/view.php?id=978#c3242 #. type: Plain text #: debian-bookworm #, fuzzy #| msgid "" #| "This ancillary data model conforms to the POSIX.1g draft, 4.4BSD-Lite, " #| "the IPv6 advanced API described in RFC\\ 2292 and SUSv2. " #| "B() is a Linux extension." msgid "" "This ancillary data model conforms to the POSIX.1g draft, 4.4BSD-Lite, the " "IPv6 advanced API described in RFC\\ 2292 and SUSv2. B(), " "B(), and B() are specified in POSIX.1-2008. " "B() and B() will be included in the next POSIX " "release (Issue 8)." msgstr "" "Эта модель вспомогательных данных соответствует черновому варианту POSIX.1g, " "4.4BSD-Lite, расширению IPv6 API, описанному в RFC\\ 2292, и SUSv2. " "B() — это расширение Linux." #. type: Plain text #: debian-bookworm msgid "B() is a Linux extension." msgstr "" #. type: SH #: debian-bookworm #, no-wrap msgid "NOTES" msgstr "ПРИМЕЧАНИЯ" #. type: Plain text #: debian-bookworm msgid "" "For portability, ancillary data should be accessed using only the macros " "described here. B() is a Linux extension and should not be " "used in portable programs." msgstr "" "В целях переносимости вспомогательные данные могут быть доступны только с " "помощью макросов, описанных здесь. B() — это расширение Linux, " "поэтому оно не должно быть использовано в переносимых программах." #. type: Plain text #: debian-bookworm opensuse-leap-15-6 #, fuzzy, no-wrap #| msgid "" #| "struct msghdr msgh;\n" #| "struct cmsghdr *cmsg;\n" #| "int *ttlptr;\n" #| "int received_ttl;\n" msgid "" "struct msghdr msgh;\n" "struct cmsghdr *cmsg;\n" "int received_ttl;\n" msgstr "" "struct msghdr msgh;\n" "struct cmsghdr *cmsg;\n" "int *ttlptr;\n" "int received_ttl;\n" #. type: Plain text #: debian-bookworm opensuse-leap-15-6 #, no-wrap msgid "/* Receive auxiliary data in msgh */\n" msgstr "/* приём вспомогательных данных в msgh */\n" #. type: Plain text #: debian-bookworm opensuse-leap-15-6 #, fuzzy, no-wrap #| msgid "" #| "for (cmsg = CMSG_FIRSTHDR(&msgh); cmsg != NULL;\n" #| " cmsg = CMSG_NXTHDR(&msgh, cmsg)) {\n" #| " if (cmsg-Ecmsg_level == IPPROTO_IP\n" #| " && cmsg-Ecmsg_type == IP_TTL) {\n" #| " ttlptr = (int *) CMSG_DATA(cmsg);\n" #| " received_ttl = *ttlptr;\n" #| " break;\n" #| " }\n" #| "}\n" msgid "" "for (cmsg = CMSG_FIRSTHDR(&msgh); cmsg != NULL;\n" " cmsg = CMSG_NXTHDR(&msgh, cmsg)) {\n" " if (cmsg-Ecmsg_level == IPPROTO_IP\n" " && cmsg-Ecmsg_type == IP_TTL) {\n" " memcpy(&receive_ttl, CMSG_DATA(cmsg), sizeof(received_ttl));\n" " break;\n" " }\n" "}\n" msgstr "" "for (cmsg = CMSG_FIRSTHDR(&msgh); cmsg != NULL;\n" " cmsg = CMSG_NXTHDR(&msgh, cmsg)) {\n" " if (cmsg-Ecmsg_level == IPPROTO_IP\n" " && cmsg-Ecmsg_type == IP_TTL) {\n" " ttlptr = (int *) CMSG_DATA(cmsg);\n" " received_ttl = *ttlptr;\n" " break;\n" " }\n" "}\n" #. type: Plain text #: debian-bookworm opensuse-leap-15-6 #, no-wrap msgid "" "if (cmsg == NULL) {\n" " /* Error: IP_TTL not enabled or small buffer or I/O error */\n" "}\n" msgstr "" "if (cmsg == NULL) {\n" " /* Ошибка: не включён IP_TTL, мал буфер или ошибка ввода-вывода */\n" "}\n" #. type: Plain text #: debian-bookworm opensuse-leap-15-6 #, no-wrap msgid "" "struct msghdr msg = { 0 };\n" "struct cmsghdr *cmsg;\n" "int myfds[NUM_FD]; /* Contains the file descriptors to pass */\n" "char iobuf[1];\n" "struct iovec io = {\n" " .iov_base = iobuf,\n" " .iov_len = sizeof(iobuf)\n" "};\n" "union { /* Ancillary data buffer, wrapped in a union\n" " in order to ensure it is suitably aligned */\n" " char buf[CMSG_SPACE(sizeof(myfds))];\n" " struct cmsghdr align;\n" "} u;\n" msgstr "" "struct msghdr msg = { 0 };\n" "struct cmsghdr *cmsg;\n" "int myfds[NUM_FD]; /* содержит дескрипторы файлов для передачи */\n" "char iobuf[1];\n" "struct iovec io = {\n" " .iov_base = iobuf,\n" " .iov_len = sizeof(iobuf)\n" "};\n" "union { /* буфер вспомогательных данных, обёрнутый в union,\n" " чтобы точно получить нужное выравнивание */\n" " char buf[CMSG_SPACE(sizeof(myfds))];\n" " struct cmsghdr align;\n" "} u;\n" #. type: Plain text #: debian-bookworm opensuse-leap-15-6 #, fuzzy, no-wrap #| msgid "" #| "msg.msg_iov = &io;\n" #| "msg.msg_iovlen = 1;\n" #| "msg.msg_control = u.buf;\n" #| "msg.msg_controllen = sizeof(u.buf);\n" #| "cmsg = CMSG_FIRSTHDR(&msg);\n" #| "cmsg-Ecmsg_level = SOL_SOCKET;\n" #| "cmsg-Ecmsg_type = SCM_RIGHTS;\n" #| "cmsg-Ecmsg_len = CMSG_LEN(sizeof(int) * NUM_FD);\n" #| "memcpy(CMSG_DATA(cmsg), myfds, NUM_FD * sizeof(int));\n" msgid "" "msg.msg_iov = &io;\n" "msg.msg_iovlen = 1;\n" "msg.msg_control = u.buf;\n" "msg.msg_controllen = sizeof(u.buf);\n" "cmsg = CMSG_FIRSTHDR(&msg);\n" "cmsg-Ecmsg_level = SOL_SOCKET;\n" "cmsg-Ecmsg_type = SCM_RIGHTS;\n" "cmsg-Ecmsg_len = CMSG_LEN(sizeof(myfds));\n" "memcpy(CMSG_DATA(cmsg), myfds, sizeof(myfds));\n" msgstr "" "msg.msg_iov = &io;\n" "msg.msg_iovlen = 1;\n" "msg.msg_control = u.buf;\n" "msg.msg_controllen = sizeof(u.buf);\n" "cmsg = CMSG_FIRSTHDR(&msg);\n" "cmsg-Ecmsg_level = SOL_SOCKET;\n" "cmsg-Ecmsg_type = SCM_RIGHTS;\n" "cmsg-Ecmsg_len = CMSG_LEN(sizeof(int) * NUM_FD);\n" "memcpy(CMSG_DATA(cmsg), myfds, NUM_FD * sizeof(int));\n" #. type: TH #: fedora-40 fedora-rawhide mageia-cauldron #, no-wrap msgid "2023-10-31" msgstr "31 октября 2023 г." #. type: TH #: fedora-40 mageia-cauldron #, no-wrap msgid "Linux man-pages 6.06" msgstr "Linux man-pages 6.06" #. type: TH #: fedora-rawhide #, no-wrap msgid "Linux man-pages 6.7" msgstr "Linux man-pages 6.7" #. type: TH #: opensuse-leap-15-6 #, no-wrap msgid "2023-03-30" msgstr "30 марта 2023 г." #. type: TH #: opensuse-leap-15-6 #, no-wrap msgid "Linux man-pages 6.04" msgstr "Linux man-pages 6.04" #. type: TH #: opensuse-tumbleweed #, fuzzy, no-wrap #| msgid "Linux man-pages 6.7" msgid "Linux man-pages (unreleased)" msgstr "Linux man-pages 6.7"