summaryrefslogtreecommitdiffstats
path: root/extensions/libipt_NETMAP.c
diff options
context:
space:
mode:
authorPatrick McHardy <kaber@trash.net>2009-02-09 18:58:45 +0100
committerPatrick McHardy <kaber@trash.net>2009-02-09 18:58:45 +0100
commit300e2909ba4714abc6093cba0ed860708282bd3e (patch)
tree545c79c9fcbe036db503e50a3643acb3d5ff088d /extensions/libipt_NETMAP.c
parent9cfc59f71f83ee97c4513fd340acf1e45073562b (diff)
parent1eb619f3a0508d62847c311e69a09f4a8534c4df (diff)
Merge branch 'master' of git://dev.medozas.de/iptables
Diffstat (limited to 'extensions/libipt_NETMAP.c')
-rw-r--r--extensions/libipt_NETMAP.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/extensions/libipt_NETMAP.c b/extensions/libipt_NETMAP.c
index f6c688df..9949c99b 100644
--- a/extensions/libipt_NETMAP.c
+++ b/extensions/libipt_NETMAP.c
@@ -75,21 +75,21 @@ parse_to(char *arg, struct ip_nat_range *range)
if (slash)
*slash = '\0';
- ip = numeric_to_ipaddr(arg);
+ ip = xtables_numeric_to_ipaddr(arg);
if (!ip)
exit_error(PARAMETER_PROBLEM, "Bad IP address `%s'\n",
arg);
range->min_ip = ip->s_addr;
if (slash) {
if (strchr(slash+1, '.')) {
- ip = numeric_to_ipmask(slash+1);
+ ip = xtables_numeric_to_ipmask(slash+1);
if (!ip)
exit_error(PARAMETER_PROBLEM, "Bad netmask `%s'\n",
slash+1);
netmask = ip->s_addr;
}
else {
- if (string_to_number(slash+1, 0, 32, &bits) == -1)
+ if (!xtables_strtoui(slash+1, NULL, &bits, 0, 32))
exit_error(PARAMETER_PROBLEM, "Bad netmask `%s'\n",
slash+1);
netmask = bits2netmask(bits);
@@ -118,7 +118,7 @@ static int NETMAP_parse(int c, char **argv, int invert, unsigned int *flags,
switch (c) {
case '1':
- if (check_inverse(optarg, &invert, NULL, 0))
+ if (xtables_check_inverse(optarg, &invert, NULL, 0))
exit_error(PARAMETER_PROBLEM,
"Unexpected `!' after --%s", NETMAP_opts[0].name);
@@ -148,11 +148,11 @@ static void NETMAP_print(const void *ip, const struct xt_entry_target *target,
int bits;
a.s_addr = r->min_ip;
- printf("%s", ipaddr_to_numeric(&a));
+ printf("%s", xtables_ipaddr_to_numeric(&a));
a.s_addr = ~(r->min_ip ^ r->max_ip);
bits = netmask2bits(a.s_addr);
if (bits < 0)
- printf("/%s", ipaddr_to_numeric(&a));
+ printf("/%s", xtables_ipaddr_to_numeric(&a));
else
printf("/%d", bits);
}