netinfo.trunnel (546B)
1 // Warning: make sure these values are consistent with RESOLVED_TYPE_* 2 // constants in Tor code and numbers in Section 6.4 of tor-spec.txt. 3 4 const NETINFO_ADDR_TYPE_IPV4 = 4; 5 const NETINFO_ADDR_TYPE_IPV6 = 6; 6 7 struct netinfo_addr { 8 u8 addr_type; 9 u8 len; 10 union addr[addr_type] with length len { 11 NETINFO_ADDR_TYPE_IPV4: u32 ipv4; 12 NETINFO_ADDR_TYPE_IPV6: u8 ipv6[16]; 13 default: ignore; 14 }; 15 16 } 17 18 struct netinfo_cell { 19 u32 timestamp; 20 struct netinfo_addr other_addr; 21 u8 n_my_addrs; 22 struct netinfo_addr my_addrs[n_my_addrs]; 23 } 24