diff options
Diffstat (limited to 'po/ru/man2/recvmmsg.2.po')
-rw-r--r-- | po/ru/man2/recvmmsg.2.po | 750 |
1 files changed, 750 insertions, 0 deletions
diff --git a/po/ru/man2/recvmmsg.2.po b/po/ru/man2/recvmmsg.2.po new file mode 100644 index 00000000..e9d0ae4f --- /dev/null +++ b/po/ru/man2/recvmmsg.2.po @@ -0,0 +1,750 @@ +# Russian translation of manpages +# This file is distributed under the same license as the manpages-l10n package. +# Copyright © of this file: +# aereiae <aereiae@gmail.com>, 2014. +# Azamat Hackimov <azamat.hackimov@gmail.com>, 2013-2014, 2016. +# Dmitriy S. Seregin <dseregin@59.ru>, 2013. +# Katrin Kutepova <blackkatelv@gmail.com>, 2018. +# Lockal <lockalsash@gmail.com>, 2013. +# Yuri Kozlov <yuray@komyakino.ru>, 2011-2019. +# Баринов Владимир, 2016. +# Иван Павлов <pavia00@gmail.com>, 2017,2019. +msgid "" +msgstr "" +"Project-Id-Version: manpages-l10n\n" +"POT-Creation-Date: 2024-03-01 17:05+0100\n" +"PO-Revision-Date: 2019-10-06 09:20+0300\n" +"Last-Translator: Yuri Kozlov <yuray@komyakino.ru>\n" +"Language-Team: Russian <man-pages-ru-talks@lists.sourceforge.net>\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 "recvmmsg" +msgstr "recvmmsg" + +#. type: TH +#: archlinux fedora-40 fedora-rawhide mageia-cauldron +#, no-wrap +msgid "2023-10-31" +msgstr "31 октября 2023 г." + +#. type: TH +#: archlinux fedora-40 fedora-rawhide mageia-cauldron +#, no-wrap +msgid "Linux man-pages 6.06" +msgstr "Linux man-pages 6.06" + +#. 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 "recvmmsg - receive multiple messages on a socket" +msgstr "recvmmsg - получает несколько сообщений из сокета" + +#. 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<libc>, 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<#define _GNU_SOURCE> /* See feature_test_macros(7) */\n" +"B<#include E<lt>sys/socket.hE<gt>>\n" +msgstr "" +"B<#define _GNU_SOURCE> /* Смотрите feature_test_macros(7) */\n" +"B<#include E<lt>sys/socket.hE<gt>>\n" + +#. type: Plain text +#: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide +#: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed +#, no-wrap +msgid "" +"B<int recvmmsg(int >I<sockfd>B<, struct mmsghdr *>I<msgvec>B<, unsigned int >I<vlen>B<,>\n" +"B< int >I<flags>B<, struct timespec *>I<timeout>B<);>\n" +msgstr "" +"B<int recvmmsg(int >I<sockfd>B<, struct mmsghdr *>I<msgvec>B<, unsigned int >I<vlen>B<,>\n" +"B< int >I<flags>B<, struct timespec *>I<timeout>B<);>\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 "" +"The B<recvmmsg>() system call is an extension of B<recvmsg>(2) that allows " +"the caller to receive multiple messages from a socket using a single system " +"call. (This has performance benefits for some applications.) A further " +"extension over B<recvmsg>(2) is support for a timeout on the receive " +"operation." +msgstr "" +"Системный вызов B<recvmmsg>() является расширенной версией B<recvmsg>(2), " +"позволяя вызывающему получать несколько сообщений из сокета, используя " +"только один системный вызов (в некоторых приложениях это позволяет получить " +"выигрыш в производительности). Ещё одно улучшение B<recvmsg>(2) — настройка " +"времени ожидания для операции получения." + +#. type: Plain text +#: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide +#: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed +msgid "" +"The I<sockfd> argument is the file descriptor of the socket to receive data " +"from." +msgstr "" +"Аргумент I<sockfd> представляет собой файловый дескриптор сокета приёма " +"данных." + +#. type: Plain text +#: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide +#: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed +msgid "" +"The I<msgvec> argument is a pointer to an array of I<mmsghdr> structures. " +"The size of this array is specified in I<vlen>." +msgstr "" +"Аргумент I<msgvec> является указателем на массив структур I<mmsghdr>. Размер " +"этого массива указывается в I<vlen>." + +#. type: Plain text +#: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide +#: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed +msgid "The I<mmsghdr> structure is defined in I<E<lt>sys/socket.hE<gt>> as:" +msgstr "" +"Структура I<mmsghdr> определена в I<E<lt>sys/socket.hE<gt>> следующим " +"образом:" + +#. type: Plain text +#: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide +#: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed +#, no-wrap +msgid "" +"struct mmsghdr {\n" +" struct msghdr msg_hdr; /* Message header */\n" +" unsigned int msg_len; /* Number of received bytes for header */\n" +"};\n" +msgstr "" +"struct mmsghdr {\n" +" struct msghdr msg_hdr; /* Заголовок сообщения */\n" +" unsigned int msg_len; /* Количество полученных байт\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 I<msg_hdr> field is a I<msghdr> structure, as described in " +"B<recvmsg>(2). The I<msg_len> field is the number of bytes returned for the " +"message in the entry. This field has the same value as the return value of " +"a single B<recvmsg>(2) on the header." +msgstr "" +"Поле I<msg_hdr> представляет собой структуру I<msghdr>, которая описана в " +"B<recvmsg>(2). В поле I<msg_len> содержится количество байт возвращаемого " +"сообщения в записи. Это поле имеет такое же значение, что и возвращаемое " +"значение одиночного вызова B<recvmsg>(2) в заголовке." + +#. type: Plain text +#: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide +#: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed +msgid "" +"The I<flags> argument contains flags ORed together. The flags are the same " +"as documented for B<recvmsg>(2), with the following addition:" +msgstr "" +"Аргумент I<flags> содержит объединённые с помощью OR флаги. Флаги те же, что " +"и у B<recvmsg>(2), но со следующим дополнением:" + +#. type: TP +#: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide +#: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed +#, no-wrap +msgid "B<MSG_WAITFORONE> (since Linux 2.6.34)" +msgstr "B<MSG_WAITFORONE> (начиная с Linux 2.6.34)" + +#. type: Plain text +#: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide +#: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed +msgid "Turns on B<MSG_DONTWAIT> after the first message has been received." +msgstr "Включить B<MSG_DONTWAIT> после получения первого сообщения." + +#. type: Plain text +#: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide +#: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed +msgid "" +"The I<timeout> argument points to a I<struct timespec> (see " +"B<clock_gettime>(2)) defining a timeout (seconds plus nanoseconds) for the " +"receive operation (I<but see BUGS!>). (This interval will be rounded up to " +"the system clock granularity, and kernel scheduling delays mean that the " +"blocking interval may overrun by a small amount.) If I<timeout> is NULL, " +"then the operation blocks indefinitely." +msgstr "" +"Аргумент I<timeout> указывает на I<struct timespec> (смотрите " +"B<clock_gettime>(2)), задающую время ожидания (в секундах и наносекундах) " +"операции приёма (I<но смотрите ДЕФЕКТЫ!>; (этот интервал будет округлён до " +"точности системных часов, и из-за задержек планировщика ядра интервал " +"блокировки может быть немного больше). Если I<timeout> равно NULL, то " +"операция блокируется на неопределённое время." + +#. type: Plain text +#: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide +#: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed +msgid "" +"A blocking B<recvmmsg>() call blocks until I<vlen> messages have been " +"received or until the timeout expires. A nonblocking call reads as many " +"messages as are available (up to the limit specified by I<vlen>) and " +"returns immediately." +msgstr "" +"Блокирование вызова B<recvmmsg>() происходит до тех пор, пока не будет " +"получено I<vlen> сообщений или не истечёт интервал блокировки. Неблокирующий " +"вызов читает все доступные сообщения (максимальное количество указано в " +"I<vlen>) и сразу завершает работу." + +#. type: Plain text +#: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide +#: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed +msgid "" +"On return from B<recvmmsg>(), successive elements of I<msgvec> are updated " +"to contain information about each received message: I<msg_len> contains the " +"size of the received message; the subfields of I<msg_hdr> are updated as " +"described in B<recvmsg>(2). The return value of the call indicates the " +"number of elements of I<msgvec> that have been updated." +msgstr "" +"При выходе из B<recvmmsg>() последующие элементы I<msgvec> обновляются " +"информацией о каждом полученном сообщении: в I<msg_len> содержится размер " +"принятого сообщения; подполя I<msg_hdr> обновляются согласно описанию в " +"B<recvmsg>(2). Возвращаемое значение вызова означает количество обновлённых " +"элементов I<msgvec>." + +#. type: SH +#: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide +#: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed +#, no-wrap +msgid "RETURN VALUE" +msgstr "ВОЗВРАЩАЕМОЕ ЗНАЧЕНИЕ" + +#. type: Plain text +#: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide +#: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed +msgid "" +"On success, B<recvmmsg>() returns the number of messages received in " +"I<msgvec>; on error, -1 is returned, and I<errno> is set to indicate the " +"error." +msgstr "" +"При успешном выполнении B<recvmmsg>() возвращает количество принятых в " +"I<msgvec> сообщений; при ошибке возвращается -1 и в I<errno> устанавливается " +"код ошибки." + +#. type: SH +#: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide +#: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed +#, no-wrap +msgid "ERRORS" +msgstr "ОШИБКИ" + +#. type: Plain text +#: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide +#: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed +msgid "" +"Errors are as for B<recvmsg>(2). In addition, the following error can occur:" +msgstr "" +"Возникают те же ошибки что и для B<recvmsg>(2). Кроме этого, случается " +"следующая ошибка:" + +#. type: TP +#: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide +#: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed +#, no-wrap +msgid "B<EINVAL>" +msgstr "B<EINVAL>" + +#. type: Plain text +#: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide +#: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed +msgid "I<timeout> is invalid." +msgstr "Значение I<timeout> неверно." + +#. type: Plain text +#: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide +#: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed +msgid "See also BUGS." +msgstr "Также смотрите ДЕФЕКТЫ." + +#. 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 "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 "Since glibc 2.12:" +msgid "Linux 2.6.33, glibc 2.12." +msgstr "Начиная с glibc 2.12:" + +#. type: SH +#: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide +#: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed +#, no-wrap +msgid "BUGS" +msgstr "ДЕФЕКТЫ" + +#. FIXME . https://bugzilla.kernel.org/show_bug.cgi?id=75371 +#. http://thread.gmane.org/gmane.linux.man/5677 +#. type: Plain text +#: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide +#: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed +msgid "" +"The I<timeout> argument does not work as intended. The timeout is checked " +"only after the receipt of each datagram, so that if up to I<vlen-1> " +"datagrams are received before the timeout expires, but then no further " +"datagrams are received, the call will block forever." +msgstr "" +"Аргумент I<timeout> работает не так, как планировалось. Время ожидания " +"проверяется только после приёма каждой дейтаграммы, поэтому, если до " +"истечения срока будет получено до I<vlen-1> дейтаграмм, но затем дейтаграммы " +"не поступят, то вызов заблокируется навсегда." + +#. type: Plain text +#: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide +#: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed +msgid "" +"If an error occurs after at least one message has been received, the call " +"succeeds, and returns the number of messages received. The error code is " +"expected to be returned on a subsequent call to B<recvmmsg>(). In the " +"current implementation, however, the error code can be overwritten in the " +"meantime by an unrelated network event on a socket, for example an incoming " +"ICMP packet." +msgstr "" +"Если ошибка возникает после получения хотя бы одного сообщения, то вызов " +"выполняется успешно и возвращается количество полученных сообщений. Код " +"ошибки будет возвращён следующим вызовом B<recvmmsg>(). Однако в текущей " +"реализации код ошибки может перезаписаться при возникновении в тоже время " +"события, не связанного с сетью, например, из-за поступившего пакета ICMP." + +#. 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 "" +"The following program uses B<recvmmsg>() to receive multiple messages on a " +"socket and stores them in multiple buffers. The call returns if all buffers " +"are filled or if the timeout specified has expired." +msgstr "" +"Следующая программа использует B<recvmmsg>() для получения нескольких " +"сообщений через сокет и сохранения их в несколько буферов. Вызов завершается " +"при заполнении всех буферов, либо по окончании заданного временного " +"интервала." + +#. type: Plain text +#: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide +#: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed +msgid "" +"The following snippet periodically generates UDP datagrams containing a " +"random number:" +msgstr "" +"Следующий отрывок периодически генерирует датаграммы UDP с произвольным " +"номером внутри:" + +#. type: Plain text +#: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide +#: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed +#, no-wrap +msgid "" +"$B< while true; do echo $RANDOM E<gt> /dev/udp/127.0.0.1/1234;>\n" +"B<sleep 0.25; done>\n" +msgstr "" +"$B< while true; do echo $RANDOM E<gt> /dev/udp/127.0.0.1/1234;>\n" +"B<sleep 0.25; done>\n" + +#. type: Plain text +#: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide +#: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed +msgid "" +"These datagrams are read by the example application, which can give the " +"following output:" +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< ./a.out>\n" +"5 messages received\n" +"1 11782\n" +"2 11345\n" +"3 304\n" +"4 13514\n" +"5 28421\n" +msgstr "" +"$B< ./a.out>\n" +"5 сообщений получено\n" +"1 11782\n" +"2 11345\n" +"3 304\n" +"4 13514\n" +"5 28421\n" + +#. type: SS +#: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide +#: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed +#, no-wrap +msgid "Program source" +msgstr "Исходный код программы" + +#. type: Plain text +#: archlinux debian-unstable fedora-40 fedora-rawhide mageia-cauldron +#: opensuse-tumbleweed +#, no-wrap +msgid "" +"#define _GNU_SOURCE\n" +"#include E<lt>arpa/inet.hE<gt>\n" +"#include E<lt>netinet/in.hE<gt>\n" +"#include E<lt>stdio.hE<gt>\n" +"#include E<lt>stdlib.hE<gt>\n" +"#include E<lt>string.hE<gt>\n" +"#include E<lt>sys/socket.hE<gt>\n" +"#include E<lt>time.hE<gt>\n" +"\\&\n" +"int\n" +"main(void)\n" +"{\n" +"#define VLEN 10\n" +"#define BUFSIZE 200\n" +"#define TIMEOUT 1\n" +" int sockfd, retval;\n" +" char bufs[VLEN][BUFSIZE+1];\n" +" struct iovec iovecs[VLEN];\n" +" struct mmsghdr msgs[VLEN];\n" +" struct timespec timeout;\n" +" struct sockaddr_in addr;\n" +"\\&\n" +" sockfd = socket(AF_INET, SOCK_DGRAM, 0);\n" +" if (sockfd == -1) {\n" +" perror(\"socket()\");\n" +" exit(EXIT_FAILURE);\n" +" }\n" +"\\&\n" +" addr.sin_family = AF_INET;\n" +" addr.sin_addr.s_addr = htonl(INADDR_LOOPBACK);\n" +" addr.sin_port = htons(1234);\n" +" if (bind(sockfd, (struct sockaddr *) &addr, sizeof(addr)) == -1) {\n" +" perror(\"bind()\");\n" +" exit(EXIT_FAILURE);\n" +" }\n" +"\\&\n" +" memset(msgs, 0, sizeof(msgs));\n" +" for (size_t i = 0; i E<lt> VLEN; i++) {\n" +" iovecs[i].iov_base = bufs[i];\n" +" iovecs[i].iov_len = BUFSIZE;\n" +" msgs[i].msg_hdr.msg_iov = &iovecs[i];\n" +" msgs[i].msg_hdr.msg_iovlen = 1;\n" +" }\n" +"\\&\n" +" timeout.tv_sec = TIMEOUT;\n" +" timeout.tv_nsec = 0;\n" +"\\&\n" +" retval = recvmmsg(sockfd, msgs, VLEN, 0, &timeout);\n" +" if (retval == -1) {\n" +" perror(\"recvmmsg()\");\n" +" exit(EXIT_FAILURE);\n" +" }\n" +"\\&\n" +" printf(\"%d messages received\\en\", retval);\n" +" for (size_t i = 0; i E<lt> retval; i++) {\n" +" bufs[i][msgs[i].msg_len] = 0;\n" +" printf(\"%zu %s\", i+1, bufs[i]);\n" +" }\n" +" exit(EXIT_SUCCESS);\n" +"}\n" +msgstr "" + +#. SRC END +#. 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<clock_gettime>(2), B<recvmsg>(2), B<sendmmsg>(2), B<sendmsg>(2), " +"B<socket>(2), B<socket>(7)" +msgstr "" +"B<clock_gettime>(2), B<recvmsg>(2), B<sendmmsg>(2), B<sendmsg>(2), " +"B<socket>(2), B<socket>(7)" + +#. type: TH +#: debian-bookworm +#, no-wrap +msgid "2022-12-04" +msgstr "4 декабря 2022 г." + +#. type: TH +#: debian-bookworm +#, no-wrap +msgid "Linux man-pages 6.03" +msgstr "Linux man-pages 6.03" + +#. type: SH +#: debian-bookworm +#, no-wrap +msgid "VERSIONS" +msgstr "ВЕРСИИ" + +#. type: Plain text +#: debian-bookworm +#, fuzzy +#| msgid "" +#| "The B<recvmmsg>() system call was added in Linux 2.6.33. Support in " +#| "glibc was added in version 2.12." +msgid "" +"The B<recvmmsg>() system call was added in Linux 2.6.33. Support in glibc " +"was added in glibc 2.12." +msgstr "" +"Системный вызов B<recvmmsg>() был добавлен в Linux 2.6.33. Поддержка в glibc " +"появилась в версии 2.12." + +#. type: Plain text +#: debian-bookworm +msgid "B<recvmmsg>() is Linux-specific." +msgstr "Вызов B<recvmmsg>() есть только в Linux." + +#. type: Plain text +#: debian-bookworm opensuse-leap-15-6 +#, no-wrap +msgid "" +"#define _GNU_SOURCE\n" +"#include E<lt>arpa/inet.hE<gt>\n" +"#include E<lt>netinet/in.hE<gt>\n" +"#include E<lt>stdio.hE<gt>\n" +"#include E<lt>stdlib.hE<gt>\n" +"#include E<lt>string.hE<gt>\n" +"#include E<lt>sys/socket.hE<gt>\n" +"#include E<lt>time.hE<gt>\n" +msgstr "" +"#define _GNU_SOURCE\n" +"#include E<lt>arpa/inet.hE<gt>\n" +"#include E<lt>netinet/in.hE<gt>\n" +"#include E<lt>stdio.hE<gt>\n" +"#include E<lt>stdlib.hE<gt>\n" +"#include E<lt>string.hE<gt>\n" +"#include E<lt>sys/socket.hE<gt>\n" +"#include E<lt>time.hE<gt>\n" + +#. type: Plain text +#: debian-bookworm opensuse-leap-15-6 +#, no-wrap +msgid "" +"int\n" +"main(void)\n" +"{\n" +"#define VLEN 10\n" +"#define BUFSIZE 200\n" +"#define TIMEOUT 1\n" +" int sockfd, retval;\n" +" char bufs[VLEN][BUFSIZE+1];\n" +" struct iovec iovecs[VLEN];\n" +" struct mmsghdr msgs[VLEN];\n" +" struct timespec timeout;\n" +" struct sockaddr_in addr;\n" +msgstr "" +"int\n" +"main(void)\n" +"{\n" +"#define VLEN 10\n" +"#define BUFSIZE 200\n" +"#define TIMEOUT 1\n" +" int sockfd, retval;\n" +" char bufs[VLEN][BUFSIZE+1];\n" +" struct iovec iovecs[VLEN];\n" +" struct mmsghdr msgs[VLEN];\n" +" struct timespec timeout;\n" +" struct sockaddr_in addr;\n" + +#. type: Plain text +#: debian-bookworm opensuse-leap-15-6 +#, no-wrap +msgid "" +" sockfd = socket(AF_INET, SOCK_DGRAM, 0);\n" +" if (sockfd == -1) {\n" +" perror(\"socket()\");\n" +" exit(EXIT_FAILURE);\n" +" }\n" +msgstr "" +" sockfd = socket(AF_INET, SOCK_DGRAM, 0);\n" +" if (sockfd == -1) {\n" +" perror(\"socket()\");\n" +" exit(EXIT_FAILURE);\n" +" }\n" + +#. type: Plain text +#: debian-bookworm opensuse-leap-15-6 +#, no-wrap +msgid "" +" addr.sin_family = AF_INET;\n" +" addr.sin_addr.s_addr = htonl(INADDR_LOOPBACK);\n" +" addr.sin_port = htons(1234);\n" +" if (bind(sockfd, (struct sockaddr *) &addr, sizeof(addr)) == -1) {\n" +" perror(\"bind()\");\n" +" exit(EXIT_FAILURE);\n" +" }\n" +msgstr "" +" addr.sin_family = AF_INET;\n" +" addr.sin_addr.s_addr = htonl(INADDR_LOOPBACK);\n" +" addr.sin_port = htons(1234);\n" +" if (bind(sockfd, (struct sockaddr *) &addr, sizeof(addr)) == -1) {\n" +" perror(\"bind()\");\n" +" exit(EXIT_FAILURE);\n" +" }\n" + +#. type: Plain text +#: debian-bookworm opensuse-leap-15-6 +#, no-wrap +msgid "" +" memset(msgs, 0, sizeof(msgs));\n" +" for (size_t i = 0; i E<lt> VLEN; i++) {\n" +" iovecs[i].iov_base = bufs[i];\n" +" iovecs[i].iov_len = BUFSIZE;\n" +" msgs[i].msg_hdr.msg_iov = &iovecs[i];\n" +" msgs[i].msg_hdr.msg_iovlen = 1;\n" +" }\n" +msgstr "" +" memset(msgs, 0, sizeof(msgs));\n" +" for (size_t i = 0; i E<lt> VLEN; i++) {\n" +" iovecs[i].iov_base = bufs[i];\n" +" iovecs[i].iov_len = BUFSIZE;\n" +" msgs[i].msg_hdr.msg_iov = &iovecs[i];\n" +" msgs[i].msg_hdr.msg_iovlen = 1;\n" +" }\n" + +#. type: Plain text +#: debian-bookworm opensuse-leap-15-6 +#, no-wrap +msgid "" +" timeout.tv_sec = TIMEOUT;\n" +" timeout.tv_nsec = 0;\n" +msgstr "" +" timeout.tv_sec = TIMEOUT;\n" +" timeout.tv_nsec = 0;\n" + +#. type: Plain text +#: debian-bookworm opensuse-leap-15-6 +#, no-wrap +msgid "" +" retval = recvmmsg(sockfd, msgs, VLEN, 0, &timeout);\n" +" if (retval == -1) {\n" +" perror(\"recvmmsg()\");\n" +" exit(EXIT_FAILURE);\n" +" }\n" +msgstr "" +" retval = recvmmsg(sockfd, msgs, VLEN, 0, &timeout);\n" +" if (retval == -1) {\n" +" perror(\"recvmmsg()\");\n" +" exit(EXIT_FAILURE);\n" +" }\n" + +#. type: Plain text +#: debian-bookworm opensuse-leap-15-6 +#, no-wrap +msgid "" +" printf(\"%d messages received\\en\", retval);\n" +" for (size_t i = 0; i E<lt> retval; i++) {\n" +" bufs[i][msgs[i].msg_len] = 0;\n" +" printf(\"%zu %s\", i+1, bufs[i]);\n" +" }\n" +" exit(EXIT_SUCCESS);\n" +"}\n" +msgstr "" +" printf(\"%d messages received\\en\", retval);\n" +" for (size_t i = 0; i E<lt> retval; i++) {\n" +" bufs[i][msgs[i].msg_len] = 0;\n" +" printf(\"%zu %s\", i+1, bufs[i]);\n" +" }\n" +" exit(EXIT_SUCCESS);\n" +"}\n" + +#. type: TH +#: debian-unstable opensuse-tumbleweed +#, no-wrap +msgid "2023-05-03" +msgstr "3 мая 2023 г." + +#. type: TH +#: debian-unstable opensuse-tumbleweed +#, no-wrap +msgid "Linux man-pages 6.05.01" +msgstr "Linux man-pages 6.05.01" + +#. 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" |