#include <fastmm/net/xdp_datagram_source.hpp>
◆ XdpDatagramSource() [1/3]
| fastmm::net::XdpDatagramSource::XdpDatagramSource |
( |
| ) |
|
|
default |
◆ ~XdpDatagramSource()
| fastmm::net::XdpDatagramSource::~XdpDatagramSource |
( |
| ) |
|
|
inline |
◆ XdpDatagramSource() [2/3]
◆ XdpDatagramSource() [3/3]
◆ operator=() [1/2]
◆ operator=() [2/2]
◆ open()
| int fastmm::net::XdpDatagramSource::open |
( |
const XdpConfig & |
cfg | ) |
|
Returns 0 or -errno; error() explains.
Fails with -EPERM and the setcap command when capabilities are missing, -ENOSYS before Linux 5.11, -EBUSY when an interface already has an XDP program. Never falls back to the kernel backend.
◆ close()
| void fastmm::net::XdpDatagramSource::close |
( |
| ) |
|
|
noexcept |
◆ error()
| const std::string & fastmm::net::XdpDatagramSource::error |
( |
| ) |
const |
|
inlinenoexcept |
◆ warnings()
| std::span< const std::string > fastmm::net::XdpDatagramSource::warnings |
( |
| ) |
const |
|
inlinenoexcept |
Busy-poll options the kernel refused at open (the sockets poll from user space without them).
◆ poll()
template<class H >
| std::size_t fastmm::net::XdpDatagramSource::poll |
( |
H && |
handler | ) |
|
|
inlinenoexcept |
Delivers up to batch datagrams per socket; returns the number delivered.
◆ fds()
| std::span< const int > fastmm::net::XdpDatagramSource::fds |
( |
| ) |
const |
|
inlinenoexcept |
XDP socket fds, readable when their RX ring has descriptors (adaptive mode waits on them).
◆ refresh_stats()
| int fastmm::net::XdpDatagramSource::refresh_stats |
( |
| ) |
|
|
noexcept |
Reads XDP_STATISTICS and the fallback counters (system calls; not for the hot loop).
◆ stats()
| const XdpStats & fastmm::net::XdpDatagramSource::stats |
( |
| ) |
const |
|
inlinenoexcept |
◆ socket_stats()
| std::span< const XdpSocketStats > fastmm::net::XdpDatagramSource::socket_stats |
( |
| ) |
const |
|
inlinenoexcept |
◆ interfaces()
| std::span< const XdpInterfaceStatus > fastmm::net::XdpDatagramSource::interfaces |
( |
| ) |
const |
|
inlinenoexcept |
◆ filter()
| XdpFilter & fastmm::net::XdpDatagramSource::filter |
( |
std::size_t |
i | ) |
|
|
inlinenoexcept |
The filter of interfaces()[i] (tests run BPF_PROG_TEST_RUN on the attached program).