pub trait SourceDestLayer<T> {
// Required methods
fn source(&self) -> Option<T>;
fn dest(&self) -> Option<T>;
}Expand description
Trait for extracting source and destination fields from packet headers.
This trait provides a generic interface for accessing source and destination information from different types of network headers, regardless of whether they contain IP addresses, ports, or other address types.
§Type Parameters
T- The type of address/port information to extract (e.g., Ipv4Addr, Ipv6Addr, u16)