netinfo.trunnel 546 B

123456789101112131415161718192021222324
  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. const NETINFO_ADDR_TYPE_IPV4 = 4;
  4. const NETINFO_ADDR_TYPE_IPV6 = 6;
  5. struct netinfo_addr {
  6. u8 addr_type;
  7. u8 len;
  8. union addr[addr_type] with length len {
  9. NETINFO_ADDR_TYPE_IPV4: u32 ipv4;
  10. NETINFO_ADDR_TYPE_IPV6: u8 ipv6[16];
  11. default: ignore;
  12. };
  13. }
  14. struct netinfo_cell {
  15. u32 timestamp;
  16. struct netinfo_addr other_addr;
  17. u8 n_my_addrs;
  18. struct netinfo_addr my_addrs[n_my_addrs];
  19. }