xdp_util/lib.rs
1//!
2//! # XDP Utility Library
3//!
4//! This module provides utility functions and helpers for XDP socket operations, networking,
5//! and packet processing. It includes routines for interacting with netlink, handling packet
6//! headers, managing routing information, working with XDP programs, and retrieving MAC
7//! addresses by interface index. The utilities facilitate low-level networking tasks and
8//! abstract common operations needed by other XDP modules.
9//!
10
11pub mod mac_by_ifindex;
12pub mod netlink;
13pub mod packet;
14pub mod router;
15pub mod xdp_prog;
16
17pub use mac_by_ifindex::mac_by_ifindex;
18pub use netlink::{
19 find_default_gateway, get_ipv4_address, get_ipv4_routes, get_links, get_neighbors, netlink,
20};
21pub use packet::write_udp_header_for;
22pub use router::{Ipv4Route, Neighbor, NextHop, Router};
23pub use xdp_prog::{OwnedXdpProg, xdp_attach_program, xdp_features};