Merge branch 'bug29693_040_radical_squashed' into maint-0.4.0
[tor.git] / src / trunnel / netinfo.trunnel
blob2c4b7a759117e683ed994eaa060844f5e66d63fe
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.
4 const NETINFO_ADDR_TYPE_IPV4 = 4;
5 const NETINFO_ADDR_TYPE_IPV6 = 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   };
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];