diff options
author | Gert Doering <gert@greenie.muc.de> | 2014-12-27 21:59:43 +0100 |
---|---|---|
committer | Gert Doering <gert@greenie.muc.de> | 2015-03-08 20:18:25 +0100 |
commit | ec2fbf374f018366c18644d271cd4d793d04244b (patch) | |
tree | e43d0537b6077d1784d8a4290551988908f053d0 /src/openvpn/route.h | |
parent | e8562d5531277ee4dd7c517ef68e87af077ac948 (diff) | |
download | openvpn-ec2fbf374f018366c18644d271cd4d793d04244b.tar.gz openvpn-ec2fbf374f018366c18644d271cd4d793d04244b.tar.xz openvpn-ec2fbf374f018366c18644d271cd4d793d04244b.zip |
Remove count_netmask_bits(), convert users to use netmask_to_netbits2()
The previous Linux/iproute2 code converted binary netmasks to string
representation (print_in_addr_t()), just to immediately scanf() it back
to binary to count bits. netmask_to_netbits2() directly works on the
in_addr_t.
Signed-off-by: Gert Doering <gert@greenie.muc.de>
Acked-by: Steffan Karger <steffan.karger@fox-it.com>
Message-Id: <1419713983-16272-1-git-send-email-gert@greenie.muc.de>
URL: http://article.gmane.org/gmane.network.openvpn.devel/9360
Diffstat (limited to 'src/openvpn/route.h')
-rw-r--r-- | src/openvpn/route.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/src/openvpn/route.h b/src/openvpn/route.h index f3c0150..3cec08d 100644 --- a/src/openvpn/route.h +++ b/src/openvpn/route.h @@ -305,6 +305,7 @@ static inline bool test_routes (const struct route_list *rl, const struct tuntap #endif bool netmask_to_netbits (const in_addr_t network, const in_addr_t netmask, int *netbits); +int netmask_to_netbits2 (in_addr_t netmask); static inline in_addr_t netbits_to_netmask (const int netbits) |