fn discover_ipv4_addr(target: IpAddr) -> TraceResult<IpAddr> {
    let socket = socket2::Socket::new(Domain::IPV4, Type::DGRAM, Some(Protocol::UDP))?;
    socket.connect(&SockAddr::from(SocketAddr::new(
        target,
        DEFAULT_TARGET_PORT,
    )))?;
    Ok(socket.local_addr()?.as_socket().req()?.ip())
}
/// Discover the local `IpAddr::V4` that will be used for the target `IpAddr`.
///
/// This is needed so we can can compute checksums for outgoing `TCP` packets.
///
/// Note that no packets are transmitted by this method.
Discover the local `IpAddr::V4` that will be used for the target `IpAddr`.
This is needed so we can can compute checksums for outgoing `TCP` packets.

Note that no packets are transmitted by this method.
Discover the local ` IpAddr :: V4 ` that will be used for the target ` IpAddr ` . This is needed so we can can compute checksums for outgoing ` TCP ` packets . Note that no packets are transmitted by this method .
fn discover_ipv4_addr(target: IpAddr) -> TraceResult<IpAddr> {
    let socket = socket2::Socket::new(Domain::IPV4, Type::DGRAM, Some(Protocol::UDP))?;
    socket.connect(&SockAddr::from(SocketAddr::new(
        target,
        DEFAULT_TARGET_PORT,
    )))?;
    Ok(socket.local_addr()?.as_socket().req()?.ip())
}
fn discover_ipv4_addr ( target : IpAddr ) -> TraceResult < IpAddr > { let socket = socket2 :: Socket :: new ( Domain :: IPV4 , Type :: DGRAM , Some ( Protocol :: UDP ) ) ? ; socket . connect ( & SockAddr :: from ( SocketAddr :: new ( target , DEFAULT_TARGET_PORT , ) ) ) ? ; Ok ( socket . local_addr ( ) ? . as_socket ( ) . req ( ) ? . ip ( ) ) }
Discover the local `IpAddr::V4` that will be used for the target `IpAddr`.
Discover the local ` IpAddr :: V4 ` that will be used for the target ` IpAddr ` .
target
IpAddr