pub fn send_probe(
config: &OutboundConfig,
dst: &Address,
session_id: u32,
socket: &Socket,
limiter: &mut DirectRateLimiter<LeakyBucket>,
is_discovery: bool,
packet_buffer: &mut Vec<u8>,
) -> (u32, u32)Expand description
Sends probes to the specified destination using the provided measurement configuration. This function constructs the appropriate packet based on the measurement type and sends it through the provided socket.
§Arguments
config- The outbound configuration containing worker details and settings.dst- The destination address to which the probes will be sent.session_id- 16-bit session ID encoded in the probe (ICMP/DNS-A only)socket- Raw socket to send packets.limiter- A rate limit bucket to control the sending rate of packets.is_discovery- A boolean indicating whether the probes are for discovery purposes.
§Returns
A tuple containing the number of successfully sent packets and the number of failed sends.