pub(super) fn bob_pings_alice_for_tun_like(config: &super::IpLayerConfig) -> Vec<u8> {
        let alice_ip = ip_v4(config.alice_subnet.addr);
        let bob_ip = ip_v4(config.bob_ip);
        packet::Buf::new(&mut ECHO_PAYLOAD.to_vec()[..], ..)
            .encapsulate(IcmpPacketBuilder::<Ipv4, &[u8], _>::new(
                bob_ip,
                alice_ip,
                IcmpUnusedCode,
                IcmpEchoRequest::new(ICMP_ID, ICMP_SEQNUM),
            ))
            .encapsulate(Ipv4PacketBuilder::new(bob_ip, alice_ip, 1, Ipv4Proto::Icmp))
            .serialize_vec_outer()
            .expect("serialization failed")
            .as_ref()
            .to_vec()
    }
/// Creates the ICMP bytes for bob pinging alice to use in TUN-like
/// examples.
Creates the ICMP bytes for bob pinging alice to use in TUN-like
examples.
Creates the ICMP bytes for bob pinging alice to use in TUN - like examples .
pub(super) fn bob_pings_alice_for_tun_like(config: &super::IpLayerConfig) -> Vec<u8> {
        let alice_ip = ip_v4(config.alice_subnet.addr);
        let bob_ip = ip_v4(config.bob_ip);
        packet::Buf::new(&mut ECHO_PAYLOAD.to_vec()[..], ..)
            .encapsulate(IcmpPacketBuilder::<Ipv4, &[u8], _>::new(
                bob_ip,
                alice_ip,
                IcmpUnusedCode,
                IcmpEchoRequest::new(ICMP_ID, ICMP_SEQNUM),
            ))
            .encapsulate(Ipv4PacketBuilder::new(bob_ip, alice_ip, 1, Ipv4Proto::Icmp))
            .serialize_vec_outer()
            .expect("serialization failed")
            .as_ref()
            .to_vec()
    }
pub ( super ) fn bob_pings_alice_for_tun_like ( config : & super :: IpLayerConfig ) -> Vec < u8 > { let alice_ip = ip_v4 ( config . alice_subnet . addr ) ; let bob_ip = ip_v4 ( config . bob_ip ) ; packet :: Buf :: new ( & mut ECHO_PAYLOAD . to_vec ( ) [ .. ] , .. ) . encapsulate ( IcmpPacketBuilder :: < Ipv4 , & [ u8 ] , _ > :: new ( bob_ip , alice_ip , IcmpUnusedCode , IcmpEchoRequest :: new ( ICMP_ID , ICMP_SEQNUM ) , ) ) . encapsulate ( Ipv4PacketBuilder :: new ( bob_ip , alice_ip , 1 , Ipv4Proto :: Icmp ) ) . serialize_vec_outer ( ) . expect ( " " ) . as_ref ( ) . to_vec ( ) }
Creates the ICMP bytes for bob pinging alice to use in TUN-like
examples.
Creates the ICMP bytes for bob pinging alice to use in TUN - like examples .
config
&super::IpLayerConfig
config
&super::IpLayerConfig