Function create_icmp

Source
pub fn create_icmp(
    origin: &Origin,
    dst: &Address,
    worker_id: u32,
    measurement_id: u32,
    info_url: &str,
) -> Vec<u8> 
Expand description

Creates a ping packet to send.

§Arguments

  • ‘origin’ - the source address and ICMP identifier (dst port) we use for our probes

  • ‘dst’ - the destination address for the ping packet

  • ‘worker_id’ - the unique worker ID of this worker

  • ‘measurement_id’ - the unique ID of the current measurement

  • ‘info_url’ - URL to encode in packet payload (e.g., opt-out URL)

§Returns

A ping packet (including the IP header) as a byte vector.