Function xor_v4

Source
pub fn xor_v4(addr: Ipv4Addr) -> IpAddr
Expand description

ยงUnit Test

use faster_stun::attribute::address::*;
use std::net::{IpAddr, Ipv4Addr};

let source: Ipv4Addr = "192.168.0.107".parse().unwrap();

let xor: IpAddr = "225.186.164.41".parse().unwrap();

let addr = xor_v4(source);
assert_eq!(addr, xor);