parse_packet_pruned_projected

Function parse_packet_pruned_projected 

Source
pub fn parse_packet_pruned_projected<'a>(
    registry: &ProtocolRegistry,
    link_type: u16,
    data: &'a [u8],
    required: &HashSet<String>,
    projections: &HashMap<String, HashSet<String>>,
) -> Vec<(&'static str, ParseResult<'a>)>
Expand description

Parse a packet with both protocol pruning and field projection.

This combines the benefits of both optimizations:

  • Protocol pruning skips parsing protocols not needed for the query
  • Field projection only extracts needed fields within parsed protocols

§Arguments

  • registry - Protocol registry containing parser definitions
  • link_type - Link layer type (e.g., 1 for Ethernet)
  • data - Raw packet bytes
  • required - Set of protocol names needed for the query (for pruning)
  • projections - Per-protocol field projections

§Returns

Vector of (protocol_name, parse_result) pairs.