C99 initializers
authorBart De Schuymer <bdschuym@pandora.be>
Sat, 30 Aug 2003 16:20:19 +0000 (16:20 +0000)
committerBart De Schuymer <bdschuym@pandora.be>
Sat, 30 Aug 2003 16:20:19 +0000 (16:20 +0000)
16 files changed:
extensions/ebt_802_3.c
extensions/ebt_arp.c
extensions/ebt_arpreply.c
extensions/ebt_ip.c
extensions/ebt_log.c
extensions/ebt_mark.c
extensions/ebt_mark_m.c
extensions/ebt_nat.c
extensions/ebt_pkttype.c
extensions/ebt_redirect.c
extensions/ebt_standard.c
extensions/ebt_stp.c
extensions/ebt_vlan.c
extensions/ebtable_broute.c
extensions/ebtable_filter.c
extensions/ebtable_nat.c

index 953a115..52b05aa 100644 (file)
@@ -127,15 +127,15 @@ static int compare(const struct ebt_entry_match *m1,
 
 static struct ebt_u_match _802_3_match = 
 {
-       EBT_802_3_MATCH,
-       sizeof(struct ebt_802_3_info),
-       print_help,
-       init,
-       parse,
-       final_check,
-       print,
-       compare,
-       opts
+       .name           = EBT_802_3_MATCH,
+       .size           = sizeof(struct ebt_802_3_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));
index 47eeaf1..7b00b78 100644 (file)
@@ -350,15 +350,15 @@ static int compare(const struct ebt_entry_match *m1,
 
 static struct ebt_u_match arp_match =
 {
-       EBT_ARP_MATCH,
-       sizeof(struct ebt_arp_info),
-       print_help,
-       init,
-       parse,
-       final_check,
-       print,
-       compare,
-       opts
+       .name           = EBT_ARP_MATCH,
+       .size           = sizeof(struct ebt_arp_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));
index 0cbc630..7e5f113 100644 (file)
@@ -114,15 +114,15 @@ static int compare(const struct ebt_entry_target *t1,
 
 static struct ebt_u_target arpreply_target =
 {
-       EBT_ARPREPLY_TARGET,
-       sizeof(struct ebt_arpreply_info),
-       print_help,
-       init,
-       parse,
-       final_check,
-       print,
-       compare,
-       opts
+       .name           = EBT_ARPREPLY_TARGET,
+       .size           = sizeof(struct ebt_arpreply_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));
index 1e1504c..b836bae 100644 (file)
@@ -457,15 +457,15 @@ static int compare(const struct ebt_entry_match *m1,
 
 static struct ebt_u_match ip_match =
 {
-       EBT_IP_MATCH,
-       sizeof(struct ebt_ip_info),
-       print_help,
-       init,
-       parse,
-       final_check,
-       print,
-       compare,
-       opts
+       .name           = EBT_IP_MATCH,
+       .size           = sizeof(struct ebt_ip_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));
index 3c2409f..2892348 100644 (file)
@@ -176,15 +176,15 @@ static int compare(const struct ebt_entry_watcher *w1,
 
 static struct ebt_u_watcher log_watcher =
 {
-       EBT_LOG_WATCHER,
-       sizeof(struct ebt_log_info),
-       print_help,
-       init,
-       parse,
-       final_check,
-       print,
-       compare,
-       opts
+       .name           = EBT_LOG_WATCHER,
+       .size           = sizeof(struct ebt_log_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));
index 8696348..6fa26f8 100644 (file)
@@ -102,15 +102,15 @@ static int compare(const struct ebt_entry_target *t1,
 
 static struct ebt_u_target mark_target =
 {
-       EBT_MARK_TARGET,
-       sizeof(struct ebt_mark_t_info),
-       print_help,
-       init,
-       parse,
-       final_check,
-       print,
-       compare,
-       opts
+       .name           = EBT_MARK_TARGET,
+       .size           = sizeof(struct ebt_mark_t_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));
index 4fdc41d..0d14d76 100644 (file)
@@ -104,15 +104,15 @@ static int compare(const struct ebt_entry_match *m1,
 
 static struct ebt_u_match mark_match =
 {
-       EBT_MARK_MATCH,
-       sizeof(struct ebt_mark_m_info),
-       print_help,
-       init,
-       parse,
-       final_check,
-       print,
-       compare,
-       opts
+       .name           = EBT_MARK_MATCH,
+       .size           = sizeof(struct ebt_mark_m_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));
index 8c682fb..04c6f0f 100644 (file)
@@ -183,28 +183,28 @@ static int compare(const struct ebt_entry_target *t1,
 
 static struct ebt_u_target snat_target =
 {
-       EBT_SNAT_TARGET,
-       sizeof(struct ebt_nat_info),
-       print_help_s,
-       init_s,
-       parse_s,
-       final_check_s,
-       print_s,
-       compare,
-       opts_s,
+       .name           = EBT_SNAT_TARGET,
+       .size           = sizeof(struct ebt_nat_info),
+       .help           = print_help_s,
+       .init           = init_s,
+       .parse          = parse_s,
+       .final_check    = final_check_s,
+       .print          = print_s,
+       .compare        = compare,
+       .extra_ops      = opts_s,
 };
 
 static struct ebt_u_target dnat_target =
 {
-       EBT_DNAT_TARGET,
-       sizeof(struct ebt_nat_info),
-       print_help_d,
-       init_d,
-       parse_d,
-       final_check_d,
-       print_d,
-       compare,
-       opts_d
+       .name           = EBT_DNAT_TARGET,
+       .size           = sizeof(struct ebt_nat_info),
+       .help           = print_help_d,
+       .init           = init_d,
+       .parse          = parse_d,
+       .final_check    = final_check_d,
+       .print          = print_d,
+       .compare        = compare,
+       .extra_ops      = opts_d,
 };
 
 static void _init(void) __attribute__ ((constructor));
index e129996..73f6e62 100644 (file)
@@ -118,15 +118,15 @@ static int compare(const struct ebt_entry_match *m1,
 
 static struct ebt_u_match pkttype_match =
 {
-       EBT_PKTTYPE_MATCH,
-       sizeof(struct ebt_pkttype_info),
-       print_help,
-       init,
-       parse,
-       final_check,
-       print,
-       compare,
-       opts
+       .name           = EBT_PKTTYPE_MATCH,
+       .size           = sizeof(struct ebt_pkttype_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));
index d74d46d..432e58d 100644 (file)
@@ -88,15 +88,15 @@ static int compare(const struct ebt_entry_target *t1,
 
 static struct ebt_u_target redirect_target =
 {
-       EBT_REDIRECT_TARGET,
-       sizeof(struct ebt_redirect_info),
-       print_help,
-       init,
-       parse,
-       final_check,
-       print,
-       compare,
-       opts
+       .name           = EBT_REDIRECT_TARGET,
+       .size           = sizeof(struct ebt_redirect_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));
index cd34b56..6a260eb 100644 (file)
@@ -66,15 +66,16 @@ static int compare(const struct ebt_entry_target *t1,
 
 static struct ebt_u_target standard =
 {
-       EBT_STANDARD_TARGET,
-       sizeof(struct ebt_standard_target) - sizeof(struct ebt_entry_target),
-       print_help,
-       init,
-       parse,
-       final_check,
-       print,
-       compare,
-       opts
+       .name           = EBT_STANDARD_TARGET,
+       .size           = sizeof(struct ebt_standard_target) -
+                         sizeof(struct ebt_entry_target),
+       .help           = print_help,
+       .init           = init,
+       .parse          = parse,
+       .final_check    = final_check,
+       .print          = print,
+       .compare        = compare,
+       .extra_ops      = opts,
 };
 
 static void _init(void) __attribute__ ((constructor));
index 8e02605..391b89e 100644 (file)
@@ -298,15 +298,15 @@ static int compare(const struct ebt_entry_match *m1,
 
 static struct ebt_u_match stp_match =
 {
-       EBT_STP_MATCH,
-       sizeof(struct ebt_stp_info),
-       print_help,
-       init,
-       parse,
-       final_check,
-       print,
-       compare,
-       opts
+       .name           = EBT_STP_MATCH,
+       .size           = sizeof(struct ebt_stp_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));
index f7bec62..198f537 100644 (file)
@@ -307,15 +307,15 @@ compare(const struct ebt_entry_match *vlan1,
 }
 
 static struct ebt_u_match vlan_match = {
-       EBT_VLAN_MATCH,
-       sizeof(struct ebt_vlan_info),
-       print_help,
-       init,
-       parse,
-       final_check,
-       print,
-       compare,
-       opts
+       .name           = EBT_VLAN_MATCH,
+       .size           = sizeof(struct ebt_vlan_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));
index 8549e5b..155d9ce 100644 (file)
@@ -11,10 +11,8 @@ static void print_help(char **hn)
 static struct
 ebt_u_table table =
 {
-       "broute",
-       NULL,
-       print_help,
-       NULL
+       .name           = "broute",
+       .help           = print_help,
 };
 
 static void _init(void) __attribute__ ((constructor));
index 22915a7..724198c 100644 (file)
@@ -17,10 +17,8 @@ static void print_help(char **hn)
 
 static struct ebt_u_table table =
 {
-       "filter",
-       NULL,
-       print_help,
-       NULL
+       .name           = "filter",
+       .help           = print_help,
 };
 
 static void _init(void) __attribute__ ((constructor));
index b811c32..7998e7d 100644 (file)
@@ -18,10 +18,8 @@ static void print_help(char **hn)
 static struct
 ebt_u_table table =
 {
-       "nat",
-       NULL,
-       print_help,
-       NULL
+       .name           = "nat",
+       .help           = print_help,
 };
 
 static void _init(void) __attribute__ ((constructor));