Skip to main content

extract_key

Function extract_key 

Source
pub fn extract_key(
    packet: &Packet,
) -> Result<(CanonicalKey, FlowDirection), FlowError>
Expand description

Extract a canonical key and direction from a parsed packet.

Reads the IP layer (IPv4 or IPv6) for addresses and protocol number, and the transport layer (TCP or UDP) for ports. For ICMP and other protocols without ports, ports are set to 0.