diff options
author | Jan Moskyto Matejka <mq@ucw.cz> | 2015-12-18 11:57:38 +0100 |
---|---|---|
committer | Ondrej Zajicek (work) <santiago@crfreenet.org> | 2015-12-20 13:47:39 +0100 |
commit | 7fd4143eadd5af6e1ad7825d7d7506ad021bf1ad (patch) | |
tree | b16f93737a5bda12b6677a5ad3f45cf5b1c13c30 /lib/net.c | |
parent | 9656dce72eead158e6da3ad560720bb0addfe7e2 (diff) |
Integrated address print lengths
Minor changes by Ondrej Santiago Zajicek
Diffstat (limited to 'lib/net.c')
-rw-r--r-- | lib/net.c | 7 |
1 files changed, 7 insertions, 0 deletions
@@ -18,6 +18,13 @@ const u8 net_max_prefix_length[] = { [NET_VPN6] = IP4_MAX_PREFIX_LENGTH }; +const u16 net_max_text_length[] = { + [NET_IP4] = 18, /* "255.255.255.255/32" */ + [NET_IP6] = 43, /* "ffff:ffff:ffff:ffff:ffff:ffff:ffff:ffff/128" */ + [NET_VPN4] = 40, /* "4294967296:4294967296 255.255.255.255/32" */ + [NET_VPN6] = 65, /* "4294967296:4294967296 ffff:ffff:ffff:ffff:ffff:ffff:ffff:ffff/128" */ +}; + int net_format(const net_addr *N, char *buf, int buflen) |