1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
//! `sendmmsg` batch syscall backend - fast Linux, ~10M pps.
//!
//! Uses `AF_INET` raw sockets with `sendmmsg()` to batch up to 1024 packets
//! per syscall, reducing overhead by ~1000x vs individual `sendto()`.
//!
//! Also uses `recvmmsg()` for batched packet reception.
//!
//! # Requirements
//! - Linux only (`sendmmsg` is Linux-specific)
//! - `CAP_NET_RAW` or root
//! - Feature: `sendmmsg-backend`
#[cfg(all(target_os = "linux", feature = "sendmmsg-backend"))]
mod inner {
use std::mem::MaybeUninit;
use std::net::Ipv4Addr;
use std::os::fd::RawFd;
use crate::engine::{rate_limiter_from_pps, EngineConfig, EngineError, EngineStats, PacketEngine, RxPacket};
use crate::packet::{RawPacket, offsets};
use crate::stats_window::PpsTracker;
/// Maximum packets per `sendmmsg` call.
const BATCH_SIZE: usize = 1024;
/// Raw socket wrapper for `sendmmsg`-based packet I/O.
///
/// `tx_fd`/`rx_fd` are owned raw descriptors closed explicitly in `Drop`.
/// An earlier version also held a bound `UdpSocket` "to keep the fds alive",
/// but that socket had its own unrelated descriptor and did nothing for the
/// raw fds; worse, its bind on a failure path returned early and leaked the
/// two raw fds. It has been removed.
pub struct SendmmsgEngine {
tx_fd: RawFd,
rx_fd: RawFd,
// Stored so tests / diagnostics can inspect the bound
// configuration; not read in the hot path.
#[allow(dead_code)]
config: EngineConfig,
tx_stats: PpsTracker,
rx_stats: PpsTracker,
rate_limiter: Option<ratelimit::TokenBucket>,
}
impl SendmmsgEngine {
/// Create a new `sendmmsg` engine with `AF_INET` + `SOCK_RAW`.
pub fn new(config: EngineConfig) -> Result<Self, EngineError> {
// Create raw socket for TCP (protocol 6)
let tx_fd = unsafe {
libc::socket(libc::AF_INET, libc::SOCK_RAW, libc::IPPROTO_TCP)
};
if tx_fd < 0 {
return Err(EngineError::PermissionDenied(
"failed to create SOCK_RAW socket".into(),
));
}
// Enable IP_HDRINCL - we provide our own IP header
let one: libc::c_int = 1;
let ret = unsafe {
libc::setsockopt(
tx_fd,
libc::IPPROTO_IP,
libc::IP_HDRINCL,
&one as *const _ as *const libc::c_void,
std::mem::size_of::<libc::c_int>() as libc::socklen_t,
)
};
if ret < 0 {
unsafe { libc::close(tx_fd); }
return Err(EngineError::Io(std::io::Error::last_os_error()));
}
// Create a separate RX socket
let rx_fd = unsafe {
libc::socket(libc::AF_INET, libc::SOCK_RAW, libc::IPPROTO_TCP)
};
if rx_fd < 0 {
unsafe { libc::close(tx_fd); }
return Err(EngineError::PermissionDenied(
"failed to create RX SOCK_RAW socket".into(),
));
}
// Set RX socket to non-blocking
unsafe {
let flags = libc::fcntl(rx_fd, libc::F_GETFL);
libc::fcntl(rx_fd, libc::F_SETFL, flags | libc::O_NONBLOCK);
}
Ok(Self {
tx_fd,
rx_fd,
rate_limiter: rate_limiter_from_pps(config.rate_pps),
config,
tx_stats: PpsTracker::new(),
rx_stats: PpsTracker::new(),
})
}
}
impl Drop for SendmmsgEngine {
fn drop(&mut self) {
unsafe {
libc::close(self.tx_fd);
libc::close(self.rx_fd);
}
}
}
impl PacketEngine for SendmmsgEngine {
fn tx_batch(&self, packets: &[RawPacket]) -> Result<usize, EngineError> {
let mut total_sent = 0usize;
let mut addrs: Vec<libc::sockaddr_in> = Vec::with_capacity(BATCH_SIZE);
let mut iovecs: Vec<libc::iovec> = Vec::with_capacity(BATCH_SIZE);
for (i, pkt) in packets.iter().enumerate() {
if pkt.len < 40 {
self.tx_stats.record_drop(1);
continue;
}
if let Some(ref bucket) = self.rate_limiter {
if !bucket.try_acquire() {
// No token: drop this packet and all remaining, then flush.
self.tx_stats.record_drop((packets.len() - i) as u64);
break;
}
}
let dst_ip = u32::from_be_bytes([
pkt.buf[offsets::IP_DST],
pkt.buf[offsets::IP_DST + 1],
pkt.buf[offsets::IP_DST + 2],
pkt.buf[offsets::IP_DST + 3],
]);
addrs.push(libc::sockaddr_in {
sin_family: libc::AF_INET as u16,
sin_port: 0,
sin_addr: libc::in_addr { s_addr: dst_ip.to_be() },
sin_zero: [0; 8],
});
iovecs.push(libc::iovec {
iov_base: pkt.buf.as_ptr() as *mut libc::c_void,
// Clamped: `len` is a public field, so a caller can set it
// past the buffer. An unclamped `iov_len` would make the
// kernel transmit memory beyond `buf` (an info leak on the
// wire), not merely panic.
iov_len: pkt.clamped_len(),
});
// Flush the batch when it reaches the syscall batch size.
if iovecs.len() >= BATCH_SIZE {
total_sent += self.send_batch(&mut addrs, &mut iovecs)?;
}
}
// Flush any remaining packets.
if !iovecs.is_empty() {
total_sent += self.send_batch(&mut addrs, &mut iovecs)?;
}
Ok(total_sent)
}
fn rx_batch(&self, buf: &mut [RxPacket]) -> Result<usize, EngineError> {
// Batched reception via recvmmsg(): up to RX_BATCH_CAP
// packets per syscall instead of one recv() per packet.
// At 1M+ pps the per-packet syscall path is the actual
// bottleneck - this drop alone collapses ~1000x of
// syscall overhead into a single ring traversal.
const RX_BATCH_CAP: usize = 256;
const PKT_CAP: usize = 65_536;
let want = buf.len().min(RX_BATCH_CAP);
if want == 0 {
return Ok(0);
}
// Reusable per-thread slot storage. The 256 * 64 KiB (= 16 MiB)
// slot buffer was previously allocated on EVERY rx_batch call
// (Law 7: per-call heap churn on the hot RX path). It cannot be a
// reusable `&mut self` field: PacketEngine::rx_batch takes `&self`
// and SendmmsgEngine is Sync (shared across threads), and a Mutex
// would serialize the hot path. A thread-local reuses the buffer
// per calling thread with zero per-call allocation and no
// contention; it is grown once to RX_BATCH_CAP and retained.
// iovecs/msgs stay per-call (only KiB) because they hold raw
// pointers into this buffer that must be rebuilt each call.
thread_local! {
static RX_PKT_BUFS: std::cell::RefCell<Vec<MaybeUninit<[u8; PKT_CAP]>>> =
const { std::cell::RefCell::new(Vec::new()) };
}
RX_PKT_BUFS.with(|cell| {
let mut pkt_bufs = cell.borrow_mut();
let have = pkt_bufs.len();
if have < RX_BATCH_CAP {
pkt_bufs.reserve(RX_BATCH_CAP - have);
// SAFETY: `MaybeUninit<T>` carries no initialisation
// invariant, so growing the Vec to its capacity without
// initialising the elements is sound (unlike `set_len` on
// `Vec<[u8; N]>`, which claims the uninitialised bytes are
// valid `u8`s and is UB). The kernel fills each slot via
// `recvmmsg`; the read loop views only the `msg_len` bytes.
unsafe {
pkt_bufs.set_len(RX_BATCH_CAP);
}
}
self.rx_batch_into(buf, &mut pkt_bufs[..want])
})
}
fn stats(&self) -> EngineStats {
EngineStats {
tx_packets: self.tx_stats.total(),
rx_packets: self.rx_stats.total(),
tx_drops: self.tx_stats.drops(),
rx_drops: self.rx_stats.drops(),
tx_pps: self.tx_stats.snapshot_pps(),
rx_pps: self.rx_stats.snapshot_pps(),
}
}
fn name(&self) -> &'static str {
"sendmmsg"
}
}
impl SendmmsgEngine {
/// Build `mmsghdr` array from `addrs`/`iovecs` and call `sendmmsg`.
/// Resets the input vectors so they can be reused.
fn send_batch(
&self,
addrs: &mut Vec<libc::sockaddr_in>,
iovecs: &mut Vec<libc::iovec>,
) -> Result<usize, EngineError> {
let mut msgs: Vec<libc::mmsghdr> = Vec::with_capacity(iovecs.len());
for i in 0..iovecs.len() {
msgs.push(libc::mmsghdr {
msg_hdr: libc::msghdr {
msg_name: &mut addrs[i] as *mut _ as *mut libc::c_void,
msg_namelen: std::mem::size_of::<libc::sockaddr_in>() as u32,
msg_iov: &mut iovecs[i],
msg_iovlen: 1,
msg_control: std::ptr::null_mut(),
msg_controllen: 0,
msg_flags: 0,
},
msg_len: 0,
});
}
let sent = unsafe {
libc::sendmmsg(
self.tx_fd,
msgs.as_mut_ptr(),
msgs.len() as u32,
0,
)
};
let count = iovecs.len();
addrs.clear();
iovecs.clear();
if sent > 0 {
let sent = sent as usize;
self.tx_stats.record(sent as u64);
if sent < count {
self.tx_stats.record_drop((count - sent) as u64);
}
Ok(sent)
} else {
self.tx_stats.record_drop(count as u64);
Ok(0)
}
}
/// Fill `buf` from the RX socket via `recvmmsg`, using the caller's
/// reusable `pkt_bufs` slot storage (one 64 KiB slot per index). Split
/// out of `rx_batch` so the thread-local slot buffer's lifetime is
/// owned by the wrapper while the syscall + parse logic stays a plain
/// method operating on a borrowed slice.
fn rx_batch_into(
&self,
buf: &mut [RxPacket],
pkt_bufs: &mut [MaybeUninit<[u8; 65_536]>],
) -> Result<usize, EngineError> {
const PKT_CAP: usize = 65_536;
let want = pkt_bufs.len();
// Per-call iovec/mmsghdr arrays (KiB). They hold raw pointers into
// `pkt_bufs`, so they are rebuilt every call.
let mut iovecs: Vec<libc::iovec> = Vec::with_capacity(want);
let mut msgs: Vec<libc::mmsghdr> = Vec::with_capacity(want);
for i in 0..want {
iovecs.push(libc::iovec {
iov_base: pkt_bufs[i].as_mut_ptr().cast::<libc::c_void>(),
iov_len: PKT_CAP,
});
}
for i in 0..want {
msgs.push(libc::mmsghdr {
msg_hdr: libc::msghdr {
msg_name: std::ptr::null_mut(),
msg_namelen: 0,
msg_iov: &mut iovecs[i],
msg_iovlen: 1,
msg_control: std::ptr::null_mut(),
msg_controllen: 0,
msg_flags: 0,
},
msg_len: 0,
});
}
let n_recv = unsafe {
libc::recvmmsg(
self.rx_fd,
msgs.as_mut_ptr(),
msgs.len() as u32,
libc::MSG_DONTWAIT,
std::ptr::null_mut(),
)
};
// recvmmsg returns -1 on error. The old `n_recv <= 0 => Ok(0)`
// silently reported a REAL socket failure (EBADF, ENOTCONN, EFAULT,
// ...) as "0 packets received", hiding the error from the caller
// (Law 10). Classify by errno instead: EAGAIN/EINTR is the legitimate
// non-blocking "no data this round" case (Ok(0)); anything else is a
// genuine failure that must surface.
let errno = if n_recv < 0 {
std::io::Error::last_os_error()
.raw_os_error()
.unwrap_or(libc::EIO)
} else {
0
};
let n_recv_usize = classify_recvmmsg(n_recv as isize, errno)?;
if n_recv_usize == 0 {
return Ok(0);
}
let mut received = 0usize;
for i in 0..n_recv_usize {
let n = msgs[i].msg_len as usize;
if n < 40 {
continue; // Too short for IP + TCP
}
// SAFETY: `recvmmsg` wrote `msg_len` (== n) bytes into this
// slot's buffer, so exactly the first `n` bytes are initialised.
// We view only those; slots >= n_recv_usize are never read.
let pkt_buf: &[u8] =
unsafe { std::slice::from_raw_parts(pkt_bufs[i].as_ptr().cast::<u8>(), n) };
let Some(rx) = parse_rx_packet(pkt_buf) else {
continue;
};
buf[received] = rx;
received += 1;
}
self.rx_stats.record(received as u64);
Ok(received)
}
}
/// Parse one captured IP + TCP frame into an [`RxPacket`].
///
/// Returns `None` for frames that are too short, have an invalid IHL, have
/// a malformed TCP data offset, or exceed [`crate::packet::MAX_PACKET_SIZE`]
/// (the last used to be emitted with `packet` silently replaced by an empty
/// default, handing callers a bodyless "received" packet).
fn parse_rx_packet(pkt_buf: &[u8]) -> Option<RxPacket> {
let n = pkt_buf.len();
if n < 40 {
return None; // Too short for IP + TCP
}
// Parse IP header. Check IPv4 version, IHL, and IP total length.
let version = pkt_buf[0] >> 4;
if version != 4 {
return None;
}
let ihl = (pkt_buf[0] & 0x0F) as usize * 4;
if ihl < 20 || n < ihl + 20 {
return None;
}
let ip_total_len = u16::from_be_bytes([pkt_buf[2], pkt_buf[3]]) as usize;
if ip_total_len < ihl + 20 || ip_total_len < ihl || ip_total_len > n {
return None;
}
if pkt_buf[9] != 6 {
return None; // Protocol must be TCP (6)
}
let src_ip = Ipv4Addr::new(pkt_buf[12], pkt_buf[13], pkt_buf[14], pkt_buf[15]);
let ttl = pkt_buf[8];
// Parse TCP header
let tcp = &pkt_buf[ihl..];
let src_port = u16::from_be_bytes([tcp[0], tcp[1]]);
let dst_port = u16::from_be_bytes([tcp[2], tcp[3]]);
let seq_num = u32::from_be_bytes([tcp[4], tcp[5], tcp[6], tcp[7]]);
let ack_num = u32::from_be_bytes([tcp[8], tcp[9], tcp[10], tcp[11]]);
let tcp_data_offset = ((tcp[12] >> 4) as usize) * 4;
let tcp_flags = tcp[13];
let window = u16::from_be_bytes([tcp[14], tcp[15]]);
let payload_start = ihl + tcp_data_offset;
// A TCP data offset below the 20-byte minimum (or past the captured
// length) is malformed. Without this guard the payload slice would
// overlap the TCP header (offset < 20) and hand callers header bytes
// as payload. Skip the packet like the other malformed-header guards
// above and like the pnet backend's identical check.
if tcp_data_offset < 20 || payload_start > n {
return None;
}
let payload = if n > payload_start {
pkt_buf[payload_start..n].to_vec()
} else {
Vec::new()
};
let raw_packet = RawPacket::from_bytes(pkt_buf)?;
Some(RxPacket {
packet: raw_packet,
src_ip,
src_port,
dst_port,
tcp_flags,
ack_num,
seq_num,
ttl,
window,
payload,
})
}
/// Classify a `recvmmsg` return value into a received-packet count or a
/// surfaced error. Single owner of the errno decision (ONE-PLACE):
/// - `n_recv >= 0`: that many packets were received.
/// - `n_recv < 0` with EAGAIN/EWOULDBLOCK/EINTR: the legitimate non-blocking
/// "no data ready this round" case, reported as 0 packets.
/// - `n_recv < 0` with any other errno: a genuine recv failure that must
/// surface as `EngineError::Io`, never be swallowed as 0 packets (Law 10).
///
/// On Linux `EWOULDBLOCK == EAGAIN`, so matching `EAGAIN` covers both.
fn classify_recvmmsg(n_recv: isize, errno: i32) -> Result<usize, EngineError> {
if n_recv >= 0 {
return Ok(usize::try_from(n_recv).unwrap_or(0));
}
match errno {
libc::EAGAIN | libc::EINTR => Ok(0),
other => Err(EngineError::Io(std::io::Error::from_raw_os_error(other))),
}
}
// Safety: the raw fds are only accessed through synchronized methods
unsafe impl Send for SendmmsgEngine {}
unsafe impl Sync for SendmmsgEngine {}
#[cfg(test)]
mod tests {
use super::{classify_recvmmsg, parse_rx_packet};
use crate::engine::EngineError;
/// Build a minimal valid 40-byte IP + TCP frame (no payload).
fn syn_frame() -> Vec<u8> {
let mut f = vec![0u8; 40];
f[0] = 0x45; // IPv4, IHL 5
f[2..4].copy_from_slice(&40u16.to_be_bytes()); // total len = 40
f[8] = 64; // TTL
f[9] = 6; // Protocol TCP
f[12..16].copy_from_slice(&[192, 0, 2, 1]); // src IP
f[20..22].copy_from_slice(&48000u16.to_be_bytes()); // src port
f[22..24].copy_from_slice(&80u16.to_be_bytes()); // dst port
f[32] = 0x50; // TCP data offset 5 (20 bytes)
f[33] = 0x12; // SYN+ACK
f
}
#[test]
fn genuine_recvmmsg_error_surfaces_instead_of_reporting_zero_packets() {
// EBADF is a real failure. The old `n_recv <= 0 => Ok(0)` reported it
// as an empty batch; it must now surface as EngineError::Io(EBADF).
let err = classify_recvmmsg(-1, libc::EBADF)
.expect_err("a genuine recv error must surface, not read as 0 packets");
match err {
EngineError::Io(io) => assert_eq!(
io.raw_os_error(),
Some(libc::EBADF),
"the underlying errno must be preserved"
),
other => panic!("expected EngineError::Io, got {other:?}"),
}
}
#[test]
fn eagain_is_the_legitimate_non_blocking_empty_case() {
// A non-blocking socket with no data ready returns EAGAIN; that is
// "0 packets this round", NOT an error to surface.
assert_eq!(
classify_recvmmsg(-1, libc::EAGAIN).expect("EAGAIN is not a failure"),
0
);
assert_eq!(
classify_recvmmsg(-1, libc::EINTR).expect("EINTR is retry-able, not a failure"),
0
);
}
#[test]
fn positive_return_is_the_received_packet_count() {
assert_eq!(classify_recvmmsg(7, 0).expect("success"), 7);
assert_eq!(classify_recvmmsg(0, 0).expect("zero success"), 0);
}
/// Regression: a TCP data offset below 20 must not leak header bytes
/// as payload.
///
/// Before the guard, a malformed frame with a data offset of 0..20
/// produced `payload = frame[ihl + offset..]`, which starts INSIDE the
/// TCP header and hands callers raw header bytes mislabeled as payload.
/// Such frames are now skipped like the other malformed-header cases
/// (and like the pnet backend's identical check).
#[test]
fn malformed_tcp_data_offset_below_minimum_is_skipped() {
let mut f = syn_frame();
f[32] = 0x10; // data offset 1 word = 4 bytes, below the 20-byte minimum
assert!(parse_rx_packet(&f).is_none());
// Boundary twin: exactly 20 bytes (5 words) is the minimum legal
// offset and must parse.
let mut ok = syn_frame();
ok[32] = 0x50;
assert!(parse_rx_packet(&ok).is_some());
}
/// Regression: a TCP data offset pointing past the captured frame must
/// be skipped, not clamped into a phantom payload.
#[test]
fn tcp_data_offset_past_frame_end_is_skipped() {
let mut f = syn_frame();
f[32] = 0xF0; // data offset 15 words = 60 bytes, past the 40-byte frame
assert!(parse_rx_packet(&f).is_none());
}
/// A well-formed frame parses with exact field values and an empty
/// payload.
#[test]
fn well_formed_frame_parses_exact_fields() {
let rx = parse_rx_packet(&syn_frame()).expect("valid frame parses");
assert_eq!(rx.src_ip, std::net::Ipv4Addr::new(192, 0, 2, 1));
assert_eq!(rx.src_port, 48000);
assert_eq!(rx.dst_port, 80);
assert_eq!(rx.ttl, 64);
assert_eq!(rx.tcp_flags, 0x12);
assert!(rx.payload.is_empty());
assert_eq!(rx.packet.len, 40);
}
/// Payload bytes after a legal data offset round-trip exactly.
#[test]
fn payload_after_legal_offset_round_trips() {
let mut f = syn_frame();
f.extend_from_slice(&[0xDE, 0xAD, 0xBE, 0xEF]);
let rx = parse_rx_packet(&f).expect("frame with payload parses");
assert_eq!(rx.payload, vec![0xDE, 0xAD, 0xBE, 0xEF]);
}
#[test]
fn parse_rejects_non_ipv4_version() {
let mut f = syn_frame();
f[0] = 0x65; // Version 6, IHL 5
assert!(parse_rx_packet(&f).is_none());
}
#[test]
fn parse_rejects_non_tcp_protocol() {
let mut f = syn_frame();
f[9] = 17; // UDP protocol
assert!(parse_rx_packet(&f).is_none());
}
#[test]
fn parse_rejects_ip_total_len_below_header_plus_tcp() {
let mut f = syn_frame();
f[2..4].copy_from_slice(&39u16.to_be_bytes()); // total len 39 < ihl (20) + tcp (20)
assert!(parse_rx_packet(&f).is_none());
}
#[test]
fn parse_rejects_truncated_ip_total_len() {
let mut f = syn_frame();
f[2..4].copy_from_slice(&60u16.to_be_bytes()); // total len 60 > captured len 40
assert!(parse_rx_packet(&f).is_none());
}
}
// Safety: the raw fds are only accessed through synchronized methods
}
#[cfg(all(target_os = "linux", feature = "sendmmsg-backend"))]
pub use inner::SendmmsgEngine;