diff options
author | rl1987 <rl1987@sdf.lonestar.org> | 2018-12-16 10:05:35 +0200 |
---|---|---|
committer | rl1987 <rl1987@sdf.lonestar.org> | 2018-12-16 10:05:35 +0200 |
commit | 3bec371d04b291ec0351f01eeafdc842ea2a51d6 (patch) | |
tree | 318d8329b9d5b224dbee1afb380a6a369f231062 /src/trunnel/netinfo.trunnel | |
parent | bdf6540edf5b9d3d45214393412b8fe7e42da5ca (diff) | |
download | tor-3bec371d04b291ec0351f01eeafdc842ea2a51d6.tar.gz tor-3bec371d04b291ec0351f01eeafdc842ea2a51d6.zip |
Refrain from hardcoding address length and type in netinfo.trunnel
Diffstat (limited to 'src/trunnel/netinfo.trunnel')
-rw-r--r-- | src/trunnel/netinfo.trunnel | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/trunnel/netinfo.trunnel b/src/trunnel/netinfo.trunnel index 21afcd136e..83c3a9e40f 100644 --- a/src/trunnel/netinfo.trunnel +++ b/src/trunnel/netinfo.trunnel @@ -5,14 +5,14 @@ const NETINFO_ADDR_TYPE_IPV4 = 4; const NETINFO_ADDR_TYPE_IPV6 = 6; struct netinfo_addr { - u8 addr_type IN [NETINFO_ADDR_TYPE_IPV4, NETINFO_ADDR_TYPE_IPV6]; - u8 len IN [4, 16]; + u8 addr_type; + u8 len; union addr[addr_type] { NETINFO_ADDR_TYPE_IPV4: u32 ipv4; NETINFO_ADDR_TYPE_IPV6: u8 ipv6[16]; default: fail; }; - + } struct netinfo_cell { |