iptables-1.3.2-20050720
[iptables.git] / extensions / libipt_state.c
index 3662d94..acafe9a 100644 (file)
@@ -28,14 +28,6 @@ static struct option opts[] = {
        {0}
 };
 
-/* Initialize the match. */
-static void
-init(struct ipt_entry_match *m, unsigned int *nfcache)
-{
-       /* Can't cache this */
-       *nfcache |= NFC_UNKNOWN;
-}
-
 static int
 parse_state(const char *state, size_t strlen, struct ipt_state_info *sinfo)
 {
@@ -151,20 +143,18 @@ static void save(const struct ipt_ip *ip, const struct ipt_entry_match *match)
        print_state(sinfo->statemask);
 }
 
-static
-struct iptables_match state
-= { NULL,
-    "state",
-    IPTABLES_VERSION,
-    IPT_ALIGN(sizeof(struct ipt_state_info)),
-    IPT_ALIGN(sizeof(struct ipt_state_info)),
-    &help,
-    &init,
-    &parse,
-    &final_check,
-    &print,
-    &save,
-    opts
+static struct iptables_match state = { 
+       .next           = NULL,
+       .name           = "state",
+       .version        = IPTABLES_VERSION,
+       .size           = IPT_ALIGN(sizeof(struct ipt_state_info)),
+       .userspacesize  = IPT_ALIGN(sizeof(struct ipt_state_info)),
+       .help           = &help,
+       .parse          = &parse,
+       .final_check    = &final_check,
+       .print          = &print,
+       .save           = &save,
+       .extra_opts     = opts
 };
 
 void _init(void)