--- ../patch-o-matic-ng/patchlets/ACCOUNT/iptables/extensions/libipt_ACCOUNT.c.orig 2007-12-14 10:42:16.000000000 +0100 +++ ../patch-o-matic-ng/patchlets/ACCOUNT/iptables/extensions/libipt_ACCOUNT.c 2008-03-13 23:36:21.000000000 +0100 @@ -30,14 +30,12 @@ /* Initialize the target. */ static void -init(struct ipt_entry_target *t, unsigned int *nfcache) +init(struct xt_entry_target *t) { struct ipt_acc_info *accountinfo = (struct ipt_acc_info *)t->data; accountinfo->table_nr = -1; - /* Can't cache this */ - *nfcache |= NFC_UNKNOWN; } #define IPT_ACCOUNT_OPT_ADDR 0x01 @@ -47,8 +45,8 @@ ate an option */ static int parse(int c, char **argv, int invert, unsigned int *flags, - const struct ipt_entry *entry, - struct ipt_entry_target **target) + const void *entry, + struct xt_entry_target **target) { struct ipt_acc_info *accountinfo = (struct ipt_acc_info *)(*target)->data; struct in_addr *addrs = NULL, mask; @@ -65,7 +63,7 @@ opts[0].name); //loginfo->level = parse_level(optarg); - parse_hostnetworkmask(optarg, &addrs, &mask, &naddrs); + ipparse_hostnetworkmask(optarg, &addrs, &mask, &naddrs); if (naddrs > 1) exit_error(PARAMETER_PROBLEM, "multiple IP addresses not allowed"); @@ -108,8 +106,8 @@ opts[0].name, opts[1].name); } -static void print_it(const struct ipt_ip *ip, - const struct ipt_entry_target *target, char do_prefix) +static void print_it(const void *ip, + const struct xt_entry_target *target, char do_prefix) { const struct ipt_acc_info *accountinfo = (const struct ipt_acc_info *)target->data; @@ -123,12 +121,11 @@ printf("--"); printf("%s ", opts[0].name); - a.s_addr = accountinfo->net_ip; - printf("%s", addr_to_dotted(&a)); + a.s_addr = accountinfo->net_ip; + printf("%s", ipaddr_to_numeric(&a)); a.s_addr = accountinfo->net_mask; - printf("%s", mask_to_dotted(&a)); + printf("%s", ipmask_to_numeric(&a)); - printf(" "); if (do_prefix) printf("--"); @@ -137,8 +134,8 @@ /* Prints out the targinfo. */ static void -print(const struct ipt_ip *ip, - const struct ipt_entry_target *target, +print(const void *ip, + const struct xt_entry_target *target, int numeric) { print_it (ip, target, 0); @@ -146,13 +143,13 @@ /* Saves the union ipt_targinfo in parsable form to stdout. */ static void -save(const struct ipt_ip *ip, const struct ipt_entry_target *target) +save(const void *ip, const struct xt_entry_target *target) { print_it(ip, target, 1); } static -struct iptables_target account +struct xtables_target account = { .next = NULL, .name = "ACCOUNT",