summaryrefslogtreecommitdiffstats
path: root/extensions/libipt_ecn.c
diff options
context:
space:
mode:
authorStephane Ouellette <ouellettes@videotron.ca>2003-04-11 08:20:01 +0000
committerJoszef Kadlecsik <kadlec@blackhole.kfki.hu>2003-04-11 08:20:01 +0000
commitfb7ed72f53b4d1cf645cc7529a6dc68e2a7ecd26 (patch)
tree2fd32ee5ec72aa527fd89330cc464c514213fdd8 /extensions/libipt_ecn.c
parentedad9bb71861e807462285331f96f46288cd8b26 (diff)
unused print_dscp removed, structures converted to C99 (Stephane Ouellette)
Diffstat (limited to 'extensions/libipt_ecn.c')
-rw-r--r--extensions/libipt_ecn.c40
1 files changed, 15 insertions, 25 deletions
diff --git a/extensions/libipt_ecn.c b/extensions/libipt_ecn.c
index 7dcee2c8..d7b7f3b1 100644
--- a/extensions/libipt_ecn.c
+++ b/extensions/libipt_ecn.c
@@ -32,10 +32,10 @@ static void help(void)
}
static struct option opts[] = {
- { "ecn-tcp-cwr", 0, 0, 'F' },
- { "ecn-tcp-ece", 0, 0, 'G' },
- { "ecn-ip-ect", 1, 0, 'H' },
- { 0 }
+ { .name = "ecn-tcp-cwr", .has_arg = 0, .flag = 0, .val = 'F' },
+ { .name = "ecn-tcp-ece", .has_arg = 0, .flag = 0, .val = 'G' },
+ { .name = "ecn-ip-ect", .has_arg = 1, .flag = 0, .val = 'H' },
+ { .name = 0 }
};
static int
@@ -100,15 +100,6 @@ final_check(unsigned int flags)
"ECN match: some option required");
}
-static void
-print_dscp(u_int8_t dscp, int invert, int numeric)
-{
- if (invert)
- fputc('!', stdout);
-
- printf("0x%02x ", dscp);
-}
-
/* Prints out the matchinfo. */
static void
print(const struct ipt_ip *ip,
@@ -167,18 +158,17 @@ save(const struct ipt_ip *ip, const struct ipt_entry_match *match)
static
struct iptables_match ecn
-= { NULL,
- "ecn",
- IPTABLES_VERSION,
- IPT_ALIGN(sizeof(struct ipt_ecn_info)),
- IPT_ALIGN(sizeof(struct ipt_ecn_info)),
- &help,
- &init,
- &parse,
- &final_check,
- &print,
- &save,
- opts
+= { .name = "ecn",
+ .version = IPTABLES_VERSION,
+ .size = IPT_ALIGN(sizeof(struct ipt_ecn_info)),
+ .userspacesize = IPT_ALIGN(sizeof(struct ipt_ecn_info)),
+ .help = &help,
+ .init = &init,
+ .parse = &parse,
+ .final_check = &final_check,
+ .print = &print,
+ .save = &save,
+ .extra_opts = opts
};
void _init(void)