Changed to new fashion (print_mac, named fields...)
authorgborowiak <gborowiak>
Sun, 7 Sep 2003 21:03:26 +0000 (21:03 +0000)
committergborowiak <gborowiak>
Sun, 7 Sep 2003 21:03:26 +0000 (21:03 +0000)
extensions/ebt_among.c

index df98b9a..16502b2 100644 (file)
@@ -281,7 +281,7 @@ static void wormhash_printout(const struct ebt_mac_wormhash *wh)
                offset = wh->table[i];
                while (offset) {
                        p = (const struct ebt_mac_wormhash_tuple*)((const char*)wh + offset);
-                       printf("%s", ether_ntoa((const struct ether_addr *)(((const char*)&p->cmp[0]) + 2)));
+                       print_mac(((const char*)&p->cmp[0]) + 2);
                        if (p->ip) {
                                ip = (unsigned char*)&p->ip;
                                printf("=%u.%u.%u.%u", ip[0], ip[1], ip[2], ip[3]);
@@ -340,15 +340,15 @@ static int compare(const struct ebt_entry_match *m1,
 
 static struct ebt_u_match among_match =
 {
-       EBT_AMONG_MATCH,
-       sizeof(struct ebt_among_info),
-       print_help,
-       init,
-       parse,
-       final_check,
-       print,
-       compare,
-       opts
+       .name           = EBT_AMONG_MATCH,
+       .size           = sizeof(struct ebt_among_info),
+       .help           = print_help,
+       .init           = init,
+       .parse          = parse,
+       .final_check    = final_check,
+       .print          = print,
+       .compare        = compare,
+       .extra_ops      = opts,
 };
 
 static void _init(void) __attribute__ ((constructor));