diff options
author | Pablo Neira Ayuso <pablo@netfilter.org> | 2012-07-14 15:39:20 +0200 |
---|---|---|
committer | Pablo Neira Ayuso <pablo@netfilter.org> | 2012-07-14 15:39:23 +0200 |
commit | a96166c24eaac1c91bed4815c09e91733409d888 (patch) | |
tree | 90de529c4328b2c7d85076dae9f41437ede7f997 /include/xtables.h.in | |
parent | 7e2b63603fef2253b463ad33395520297cfe8378 (diff) |
libxtables: add xtables_ip[6]mask_to_cidr
This patch adds generic functions to return the mask in CIDR
notation whenever is possible.
This patch also simplifies xtables_ip[6]mask_to_numeric, that
now use these new two functions.
This patch also bumps libxtables_vcurrent and libxtables_vage
since we added a couple new interfaces (thanks to Jan Engelhardt
for his little reminder on this).
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
Diffstat (limited to 'include/xtables.h.in')
-rw-r--r-- | include/xtables.h.in | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/include/xtables.h.in b/include/xtables.h.in index 28e29337..db69c03b 100644 --- a/include/xtables.h.in +++ b/include/xtables.h.in @@ -442,6 +442,7 @@ extern const char *xtables_ipaddr_to_anyname(const struct in_addr *); extern const char *xtables_ipmask_to_numeric(const struct in_addr *); extern struct in_addr *xtables_numeric_to_ipaddr(const char *); extern struct in_addr *xtables_numeric_to_ipmask(const char *); +extern int xtables_ipmask_to_cidr(const struct in_addr *); extern void xtables_ipparse_any(const char *, struct in_addr **, struct in_addr *, unsigned int *); extern void xtables_ipparse_multiple(const char *, struct in_addr **, @@ -451,6 +452,7 @@ extern struct in6_addr *xtables_numeric_to_ip6addr(const char *); extern const char *xtables_ip6addr_to_numeric(const struct in6_addr *); extern const char *xtables_ip6addr_to_anyname(const struct in6_addr *); extern const char *xtables_ip6mask_to_numeric(const struct in6_addr *); +extern int xtables_ip6mask_to_cidr(const struct in6_addr *); extern void xtables_ip6parse_any(const char *, struct in6_addr **, struct in6_addr *, unsigned int *); extern void xtables_ip6parse_multiple(const char *, struct in6_addr **, |