Skip to main content

create_tcp_trace

Function create_tcp_trace 

Source
pub fn create_tcp_trace(
    src: &Address,
    dst: &Address,
    sport: u16,
    dport: u16,
    seq: u32,
    ttl: u8,
    info_url: Option<&str>,
) -> Vec<u8> 
Expand description

Creates a TCP (Paris) traceroute probe packet.

Encodes the following information in the seq and ack fields.

  • Bits 31-22: worker_id (10 bits, up to 1024 workers)
  • Bits 21-14: TTL (8 bits)
  • Bits 13-0: timestamp in milliseconds (14 bits)

§Arguments

  • src - source address
  • dst - destination address
  • sport - configured source port
  • dport - configured destination port
  • seq - encoded identity (worker_id + ttl + timestamp); written to both seq and ack
  • ttl - time-to-live / hop limit
  • info_url - optional URL encoded in payload