| 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:42+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 "sendmmsg" |
| 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 "sendmmsg - send multiple messages on a socket" |
| 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 "Standard C library (I<libc>,\\ I<-lc>)" |
| 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 "" |
| 77 |
"B<#define _GNU_SOURCE> /* See feature_test_macros(7) */\n" |
| 78 |
"B<#include E<lt>sys/socket.hE<gt>>\n" |
| 79 |
msgstr "" |
| 80 |
|
| 81 |
#. type: Plain text |
| 82 |
#: archlinux debian-unstable mageia-cauldron opensuse-leap-16-1 |
| 83 |
#: opensuse-tumbleweed |
| 84 |
#, no-wrap |
| 85 |
msgid "" |
| 86 |
"B<int sendmmsg(>unsigned int n;\n" |
| 87 |
"B< int >I<sockfd>B<, struct mmsghdr >I<msgvec>B<[>I<n>B<], unsigned int >I<n>B<,>\n" |
| 88 |
"B< int >I<flags>B<);>\n" |
| 89 |
msgstr "" |
| 90 |
|
| 91 |
#. type: SH |
| 92 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 93 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 94 |
#, no-wrap |
| 95 |
msgid "DESCRIPTION" |
| 96 |
msgstr "" |
| 97 |
|
| 98 |
#. See commit 228e548e602061b08ee8e8966f567c12aa079682 |
| 99 |
#. type: Plain text |
| 100 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 101 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 102 |
msgid "" |
| 103 |
"The B<sendmmsg>() system call is an extension of B<sendmsg>(2) that allows " |
| 104 |
"the caller to transmit multiple messages on a socket using a single system " |
| 105 |
"call. (This has performance benefits for some applications.)" |
| 106 |
msgstr "" |
| 107 |
|
| 108 |
#. type: Plain text |
| 109 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 110 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 111 |
msgid "" |
| 112 |
"The I<sockfd> argument is the file descriptor of the socket on which data is " |
| 113 |
"to be transmitted." |
| 114 |
msgstr "" |
| 115 |
|
| 116 |
#. type: Plain text |
| 117 |
#: archlinux debian-unstable fedora-44 fedora-rawhide mageia-cauldron |
| 118 |
#: opensuse-leap-16-1 opensuse-tumbleweed |
| 119 |
msgid "" |
| 120 |
"The I<msgvec> argument is a pointer to an array of I<mmsghdr> structures. " |
| 121 |
"The size of this array is specified in I<n>." |
| 122 |
msgstr "" |
| 123 |
|
| 124 |
#. type: Plain text |
| 125 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 126 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 127 |
msgid "The I<mmsghdr> structure is defined in I<E<lt>sys/socket.hE<gt>> as:" |
| 128 |
msgstr "" |
| 129 |
|
| 130 |
#. type: Plain text |
| 131 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 132 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 133 |
#, no-wrap |
| 134 |
msgid "" |
| 135 |
"struct mmsghdr {\n" |
| 136 |
" struct msghdr msg_hdr; /* Message header */\n" |
| 137 |
" unsigned int msg_len; /* Number of bytes transmitted */\n" |
| 138 |
"};\n" |
| 139 |
msgstr "" |
| 140 |
|
| 141 |
#. type: Plain text |
| 142 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 143 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 144 |
msgid "" |
| 145 |
"The I<msg_hdr> field is a I<msghdr> structure, as described in " |
| 146 |
"B<sendmsg>(2). The I<msg_len> field is used to return the number of bytes " |
| 147 |
"sent from the message in I<msg_hdr> (i.e., the same as the return value from " |
| 148 |
"a single B<sendmsg>(2) call)." |
| 149 |
msgstr "" |
| 150 |
|
| 151 |
#. type: Plain text |
| 152 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 153 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 154 |
msgid "" |
| 155 |
"The I<flags> argument contains flags ORed together. The flags are the same " |
| 156 |
"as for B<sendmsg>(2)." |
| 157 |
msgstr "" |
| 158 |
|
| 159 |
#. type: Plain text |
| 160 |
#: archlinux debian-unstable fedora-44 fedora-rawhide mageia-cauldron |
| 161 |
#: opensuse-leap-16-1 opensuse-tumbleweed |
| 162 |
msgid "" |
| 163 |
"A blocking B<sendmmsg>() call blocks until I<n> messages have been sent. A " |
| 164 |
"nonblocking call sends as many messages as possible (up to the limit " |
| 165 |
"specified by I<n>) and returns immediately." |
| 166 |
msgstr "" |
| 167 |
|
| 168 |
#. type: Plain text |
| 169 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 170 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 171 |
msgid "" |
| 172 |
"On return from B<sendmmsg>(), the I<msg_len> fields of successive elements " |
| 173 |
"of I<msgvec> are updated to contain the number of bytes transmitted from the " |
| 174 |
"corresponding I<msg_hdr>. The return value of the call indicates the number " |
| 175 |
"of elements of I<msgvec> that have been updated." |
| 176 |
msgstr "" |
| 177 |
|
| 178 |
#. type: SH |
| 179 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 180 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 181 |
#, no-wrap |
| 182 |
msgid "RETURN VALUE" |
| 183 |
msgstr "" |
| 184 |
|
| 185 |
#. type: Plain text |
| 186 |
#: archlinux debian-unstable fedora-44 fedora-rawhide mageia-cauldron |
| 187 |
#: opensuse-leap-16-1 opensuse-tumbleweed |
| 188 |
msgid "" |
| 189 |
"On success, B<sendmmsg>() returns the number of messages sent from " |
| 190 |
"I<msgvec>; if this is less than I<n>, the caller can retry with a further " |
| 191 |
"B<sendmmsg>() call to send the remaining messages." |
| 192 |
msgstr "" |
| 193 |
|
| 194 |
#. type: Plain text |
| 195 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 196 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 197 |
msgid "On error, -1 is returned, and I<errno> is set to indicate the error." |
| 198 |
msgstr "" |
| 199 |
|
| 200 |
#. type: SH |
| 201 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 202 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 203 |
#, no-wrap |
| 204 |
msgid "ERRORS" |
| 205 |
msgstr "" |
| 206 |
|
| 207 |
# |
| 208 |
#. #-#-#-#-# archlinux: sendmmsg.2.pot (PACKAGE VERSION) #-#-#-#-# |
| 209 |
#. commit 728ffb86f10873aaf4abd26dde691ee40ae731fe |
| 210 |
#. ...only return an error if no datagrams could be sent. |
| 211 |
#. If less than the requested number of messages were sent, the application |
| 212 |
#. must retry starting at the first failed one and if the problem is |
| 213 |
#. persistent the error will be returned. |
| 214 |
#. This matches the behavior of other syscalls like read/write - it |
| 215 |
#. is not an error if less than the requested number of elements are sent. |
| 216 |
#. type: Plain text |
| 217 |
#. #-#-#-#-# debian-trixie: sendmmsg.2.pot (PACKAGE VERSION) #-#-#-#-# |
| 218 |
#. commit 728ffb86f10873aaf4abd26dde691ee40ae731fe |
| 219 |
#. ... only return an error if no datagrams could be sent. |
| 220 |
#. If less than the requested number of messages were sent, the application |
| 221 |
#. must retry starting at the first failed one and if the problem is |
| 222 |
#. persistent the error will be returned. |
| 223 |
#. This matches the behavior of other syscalls like read/write - it |
| 224 |
#. is not an error if less than the requested number of elements are sent. |
| 225 |
#. type: Plain text |
| 226 |
#. #-#-#-#-# debian-unstable: sendmmsg.2.pot (PACKAGE VERSION) #-#-#-#-# |
| 227 |
#. commit 728ffb86f10873aaf4abd26dde691ee40ae731fe |
| 228 |
#. ...only return an error if no datagrams could be sent. |
| 229 |
#. If less than the requested number of messages were sent, the application |
| 230 |
#. must retry starting at the first failed one and if the problem is |
| 231 |
#. persistent the error will be returned. |
| 232 |
#. This matches the behavior of other syscalls like read/write - it |
| 233 |
#. is not an error if less than the requested number of elements are sent. |
| 234 |
#. type: Plain text |
| 235 |
#. #-#-#-#-# fedora-44: sendmmsg.2.pot (PACKAGE VERSION) #-#-#-#-# |
| 236 |
#. commit 728ffb86f10873aaf4abd26dde691ee40ae731fe |
| 237 |
#. ... only return an error if no datagrams could be sent. |
| 238 |
#. If less than the requested number of messages were sent, the application |
| 239 |
#. must retry starting at the first failed one and if the problem is |
| 240 |
#. persistent the error will be returned. |
| 241 |
#. This matches the behavior of other syscalls like read/write - it |
| 242 |
#. is not an error if less than the requested number of elements are sent. |
| 243 |
#. type: Plain text |
| 244 |
#. #-#-#-#-# fedora-rawhide: sendmmsg.2.pot (PACKAGE VERSION) #-#-#-#-# |
| 245 |
#. commit 728ffb86f10873aaf4abd26dde691ee40ae731fe |
| 246 |
#. ... only return an error if no datagrams could be sent. |
| 247 |
#. If less than the requested number of messages were sent, the application |
| 248 |
#. must retry starting at the first failed one and if the problem is |
| 249 |
#. persistent the error will be returned. |
| 250 |
#. This matches the behavior of other syscalls like read/write - it |
| 251 |
#. is not an error if less than the requested number of elements are sent. |
| 252 |
#. type: Plain text |
| 253 |
#. #-#-#-#-# mageia-cauldron: sendmmsg.2.pot (PACKAGE VERSION) #-#-#-#-# |
| 254 |
#. commit 728ffb86f10873aaf4abd26dde691ee40ae731fe |
| 255 |
#. ...only return an error if no datagrams could be sent. |
| 256 |
#. If less than the requested number of messages were sent, the application |
| 257 |
#. must retry starting at the first failed one and if the problem is |
| 258 |
#. persistent the error will be returned. |
| 259 |
#. This matches the behavior of other syscalls like read/write - it |
| 260 |
#. is not an error if less than the requested number of elements are sent. |
| 261 |
#. type: Plain text |
| 262 |
#. #-#-#-#-# opensuse-leap-16-1: sendmmsg.2.pot (PACKAGE VERSION) #-#-#-#-# |
| 263 |
#. commit 728ffb86f10873aaf4abd26dde691ee40ae731fe |
| 264 |
#. ...only return an error if no datagrams could be sent. |
| 265 |
#. If less than the requested number of messages were sent, the application |
| 266 |
#. must retry starting at the first failed one and if the problem is |
| 267 |
#. persistent the error will be returned. |
| 268 |
#. This matches the behavior of other syscalls like read/write - it |
| 269 |
#. is not an error if less than the requested number of elements are sent. |
| 270 |
#. type: Plain text |
| 271 |
#. #-#-#-#-# opensuse-tumbleweed: sendmmsg.2.pot (PACKAGE VERSION) #-#-#-#-# |
| 272 |
#. commit 728ffb86f10873aaf4abd26dde691ee40ae731fe |
| 273 |
#. ...only return an error if no datagrams could be sent. |
| 274 |
#. If less than the requested number of messages were sent, the application |
| 275 |
#. must retry starting at the first failed one and if the problem is |
| 276 |
#. persistent the error will be returned. |
| 277 |
#. This matches the behavior of other syscalls like read/write - it |
| 278 |
#. is not an error if less than the requested number of elements are sent. |
| 279 |
#. type: Plain text |
| 280 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 281 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 282 |
msgid "" |
| 283 |
"Errors are as for B<sendmsg>(2). An error is returned only if no datagrams " |
| 284 |
"could be sent. See also BUGS." |
| 285 |
msgstr "" |
| 286 |
|
| 287 |
#. type: SH |
| 288 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 289 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 290 |
#, no-wrap |
| 291 |
msgid "STANDARDS" |
| 292 |
msgstr "" |
| 293 |
|
| 294 |
#. type: Plain text |
| 295 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 296 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 297 |
msgid "Linux." |
| 298 |
msgstr "" |
| 299 |
|
| 300 |
#. type: SH |
| 301 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 302 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 303 |
#, no-wrap |
| 304 |
msgid "HISTORY" |
| 305 |
msgstr "" |
| 306 |
|
| 307 |
#. type: Plain text |
| 308 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 309 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 310 |
msgid "Linux 3.0, glibc 2.14." |
| 311 |
msgstr "" |
| 312 |
|
| 313 |
#. type: SH |
| 314 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 315 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 316 |
#, no-wrap |
| 317 |
msgid "NOTES" |
| 318 |
msgstr "" |
| 319 |
|
| 320 |
# |
| 321 |
# |
| 322 |
#. commit 98382f419f32d2c12d021943b87dea555677144b |
| 323 |
#. net: Cap number of elements for sendmmsg |
| 324 |
#. To limit the amount of time we can spend in sendmmsg, cap the |
| 325 |
#. number of elements to UIO_MAXIOV (currently 1024). |
| 326 |
#. For error handling an application using sendmmsg needs to retry at |
| 327 |
#. the first unsent message, so capping is simpler and requires less |
| 328 |
#. application logic than returning EINVAL. |
| 329 |
#. type: Plain text |
| 330 |
#: archlinux debian-unstable fedora-44 fedora-rawhide mageia-cauldron |
| 331 |
#: opensuse-leap-16-1 opensuse-tumbleweed |
| 332 |
msgid "The value specified in I<n> is capped to B<UIO_MAXIOV> (1024)." |
| 333 |
msgstr "" |
| 334 |
|
| 335 |
#. type: SH |
| 336 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 337 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 338 |
#, no-wrap |
| 339 |
msgid "BUGS" |
| 340 |
msgstr "" |
| 341 |
|
| 342 |
#. type: Plain text |
| 343 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 344 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 345 |
msgid "" |
| 346 |
"If an error occurs after at least one message has been sent, the call " |
| 347 |
"succeeds, and returns the number of messages sent. The error code is lost. " |
| 348 |
"The caller can retry the transmission, starting at the first failed message, " |
| 349 |
"but there is no guarantee that, if an error is returned, it will be the same " |
| 350 |
"as the one that was lost on the previous call." |
| 351 |
msgstr "" |
| 352 |
|
| 353 |
#. type: SH |
| 354 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 355 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 356 |
#, no-wrap |
| 357 |
msgid "EXAMPLES" |
| 358 |
msgstr "" |
| 359 |
|
| 360 |
#. type: Plain text |
| 361 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 362 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 363 |
msgid "" |
| 364 |
"The example below uses B<sendmmsg>() to send I<onetwo> and I<three> in two " |
| 365 |
"distinct UDP datagrams using one system call. The contents of the first " |
| 366 |
"datagram originates from a pair of buffers." |
| 367 |
msgstr "" |
| 368 |
|
| 369 |
#. type: Plain text |
| 370 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 371 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 372 |
#, no-wrap |
| 373 |
msgid "" |
| 374 |
"#define _GNU_SOURCE\n" |
| 375 |
"#include E<lt>arpa/inet.hE<gt>\n" |
| 376 |
"#include E<lt>netinet/in.hE<gt>\n" |
| 377 |
"#include E<lt>stdio.hE<gt>\n" |
| 378 |
"#include E<lt>stdlib.hE<gt>\n" |
| 379 |
"#include E<lt>string.hE<gt>\n" |
| 380 |
"#include E<lt>sys/socket.hE<gt>\n" |
| 381 |
"#include E<lt>sys/types.hE<gt>\n" |
| 382 |
"\\&\n" |
| 383 |
"int\n" |
| 384 |
"main(void)\n" |
| 385 |
"{\n" |
| 386 |
" int retval;\n" |
| 387 |
" int sockfd;\n" |
| 388 |
" struct iovec msg1[2], msg2;\n" |
| 389 |
" struct mmsghdr msg[2];\n" |
| 390 |
" struct sockaddr_in addr;\n" |
| 391 |
"\\&\n" |
| 392 |
" sockfd = socket(AF_INET, SOCK_DGRAM, 0);\n" |
| 393 |
" if (sockfd == -1) {\n" |
| 394 |
" perror(\"socket()\");\n" |
| 395 |
" exit(EXIT_FAILURE);\n" |
| 396 |
" }\n" |
| 397 |
"\\&\n" |
| 398 |
" addr.sin_family = AF_INET;\n" |
| 399 |
" addr.sin_addr.s_addr = htonl(INADDR_LOOPBACK);\n" |
| 400 |
" addr.sin_port = htons(1234);\n" |
| 401 |
" if (connect(sockfd, (struct sockaddr *) &addr, sizeof(addr)) == -1) {\n" |
| 402 |
" perror(\"connect()\");\n" |
| 403 |
" exit(EXIT_FAILURE);\n" |
| 404 |
" }\n" |
| 405 |
"\\&\n" |
| 406 |
" memset(msg1, 0, sizeof(msg1));\n" |
| 407 |
" msg1[0].iov_base = \"one\";\n" |
| 408 |
" msg1[0].iov_len = 3;\n" |
| 409 |
" msg1[1].iov_base = \"two\";\n" |
| 410 |
" msg1[1].iov_len = 3;\n" |
| 411 |
"\\&\n" |
| 412 |
" memset(&msg2, 0, sizeof(msg2));\n" |
| 413 |
" msg2.iov_base = \"three\";\n" |
| 414 |
" msg2.iov_len = 5;\n" |
| 415 |
"\\&\n" |
| 416 |
" memset(msg, 0, sizeof(msg));\n" |
| 417 |
" msg[0].msg_hdr.msg_iov = msg1;\n" |
| 418 |
" msg[0].msg_hdr.msg_iovlen = 2;\n" |
| 419 |
"\\&\n" |
| 420 |
" msg[1].msg_hdr.msg_iov = &msg2;\n" |
| 421 |
" msg[1].msg_hdr.msg_iovlen = 1;\n" |
| 422 |
"\\&\n" |
| 423 |
" retval = sendmmsg(sockfd, msg, 2, 0);\n" |
| 424 |
" if (retval == -1)\n" |
| 425 |
" perror(\"sendmmsg()\");\n" |
| 426 |
" else\n" |
| 427 |
" printf(\"%d messages sent\\[rs]n\", retval);\n" |
| 428 |
"\\&\n" |
| 429 |
" exit(0);\n" |
| 430 |
"}\n" |
| 431 |
msgstr "" |
| 432 |
|
| 433 |
#. SRC END |
| 434 |
#. type: SH |
| 435 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 436 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 437 |
#, no-wrap |
| 438 |
msgid "SEE ALSO" |
| 439 |
msgstr "" |
| 440 |
|
| 441 |
#. type: Plain text |
| 442 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 443 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 444 |
msgid "B<recvmmsg>(2), B<sendmsg>(2), B<socket>(2), B<socket>(7)" |
| 445 |
msgstr "" |
| 446 |
|
| 447 |
#. type: TH |
| 448 |
#: debian-trixie |
| 449 |
#, no-wrap |
| 450 |
msgid "2024-06-15" |
| 451 |
msgstr "" |
| 452 |
|
| 453 |
#. type: TH |
| 454 |
#: debian-trixie |
| 455 |
#, no-wrap |
| 456 |
msgid "Linux man-pages 6.9.1" |
| 457 |
msgstr "" |
| 458 |
|
| 459 |
#. type: Plain text |
| 460 |
#: debian-trixie |
| 461 |
msgid "Standard C library (I<libc>, I<-lc>)" |
| 462 |
msgstr "" |
| 463 |
|
| 464 |
#. type: Plain text |
| 465 |
#: debian-trixie |
| 466 |
#, no-wrap |
| 467 |
msgid "" |
| 468 |
"B<int sendmmsg(int >I<sockfd>B<, struct mmsghdr *>I<msgvec>B<, unsigned int >I<vlen>B<,>\n" |
| 469 |
"B< int >I<flags>B<);>\n" |
| 470 |
msgstr "" |
| 471 |
|
| 472 |
#. type: Plain text |
| 473 |
#: debian-trixie |
| 474 |
msgid "" |
| 475 |
"The I<msgvec> argument is a pointer to an array of I<mmsghdr> structures. " |
| 476 |
"The size of this array is specified in I<vlen>." |
| 477 |
msgstr "" |
| 478 |
|
| 479 |
#. type: Plain text |
| 480 |
#: debian-trixie |
| 481 |
msgid "" |
| 482 |
"A blocking B<sendmmsg>() call blocks until I<vlen> messages have been " |
| 483 |
"sent. A nonblocking call sends as many messages as possible (up to the " |
| 484 |
"limit specified by I<vlen>) and returns immediately." |
| 485 |
msgstr "" |
| 486 |
|
| 487 |
#. type: Plain text |
| 488 |
#: debian-trixie |
| 489 |
msgid "" |
| 490 |
"On success, B<sendmmsg>() returns the number of messages sent from " |
| 491 |
"I<msgvec>; if this is less than I<vlen>, the caller can retry with a further " |
| 492 |
"B<sendmmsg>() call to send the remaining messages." |
| 493 |
msgstr "" |
| 494 |
|
| 495 |
# |
| 496 |
# |
| 497 |
#. commit 98382f419f32d2c12d021943b87dea555677144b |
| 498 |
#. net: Cap number of elements for sendmmsg |
| 499 |
#. To limit the amount of time we can spend in sendmmsg, cap the |
| 500 |
#. number of elements to UIO_MAXIOV (currently 1024). |
| 501 |
#. For error handling an application using sendmmsg needs to retry at |
| 502 |
#. the first unsent message, so capping is simpler and requires less |
| 503 |
#. application logic than returning EINVAL. |
| 504 |
#. type: Plain text |
| 505 |
#: debian-trixie |
| 506 |
msgid "The value specified in I<vlen> is capped to B<UIO_MAXIOV> (1024)." |
| 507 |
msgstr "" |
| 508 |
|
| 509 |
#. type: TH |
| 510 |
#: fedora-44 fedora-rawhide |
| 511 |
#, no-wrap |
| 512 |
msgid "2024-11-17" |
| 513 |
msgstr "" |
| 514 |
|
| 515 |
#. type: TH |
| 516 |
#: fedora-44 fedora-rawhide |
| 517 |
#, no-wrap |
| 518 |
msgid "Linux man-pages 6.13" |
| 519 |
msgstr "" |
| 520 |
|
| 521 |
#. type: Plain text |
| 522 |
#: fedora-44 fedora-rawhide |
| 523 |
#, no-wrap |
| 524 |
msgid "" |
| 525 |
"B<int sendmmsg(int >I<sockfd>B<, struct mmsghdr >I<msgvec>B<[.>I<n>B<], unsigned int >I<n>B<,>\n" |
| 526 |
"B< int >I<flags>B<);>\n" |
| 527 |
msgstr "" |
| 528 |
|
| 529 |
#. type: TH |
| 530 |
#: mageia-cauldron |
| 531 |
#, no-wrap |
| 532 |
msgid "Linux man-pages 6.17" |
| 533 |
msgstr "" |
| 534 |
|
| 535 |
#. type: TH |
| 536 |
#: opensuse-leap-16-1 opensuse-tumbleweed |
| 537 |
#, no-wrap |
| 538 |
msgid "Linux man-pages (unreleased)" |
| 539 |
msgstr "" |