]> pilppa.com Git - linux-2.6-omap-h63xx.git/commitdiff
[NETFILTER]: C99 initizalizers for NAT protocols
authorPatrick McHardy <kaber@trash.net>
Wed, 10 Aug 2005 02:36:53 +0000 (19:36 -0700)
committerDavid S. Miller <davem@sunset.davemloft.net>
Mon, 29 Aug 2005 22:33:34 +0000 (15:33 -0700)
Signed-off-by: Patrick McHardy <kaber@trash.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/ipv4/netfilter/ip_nat_proto_icmp.c
net/ipv4/netfilter/ip_nat_proto_tcp.c
net/ipv4/netfilter/ip_nat_proto_udp.c
net/ipv4/netfilter/ip_nat_proto_unknown.c

index 38fdfc2093c40ba9c667168d68ead66d387f0744..7ed2fdb534573f275f4d072b63dd90db4be4640d 100644 (file)
@@ -106,16 +106,18 @@ icmp_print_range(char *buffer, const struct ip_nat_range *range)
        else return 0;
 }
 
-struct ip_nat_protocol ip_nat_protocol_icmp
-= { "ICMP", IPPROTO_ICMP, THIS_MODULE,
-    icmp_manip_pkt,
-    icmp_in_range,
-    icmp_unique_tuple,
-    icmp_print,
-    icmp_print_range,
+struct ip_nat_protocol ip_nat_protocol_icmp = {
+       .name                   = "ICMP",
+       .protonum               = IPPROTO_ICMP,
+       .me                     = THIS_MODULE,
+       .manip_pkt              = icmp_manip_pkt,
+       .in_range               = icmp_in_range,
+       .unique_tuple           = icmp_unique_tuple,
+       .print                  = icmp_print,
+       .print_range            = icmp_print_range,
 #if defined(CONFIG_IP_NF_CONNTRACK_NETLINK) || \
     defined(CONFIG_IP_NF_CONNTRACK_NETLINK_MODULE)
-    ip_nat_port_range_to_nfattr,
-    ip_nat_port_nfattr_to_range,
+       .range_to_nfattr        = ip_nat_port_range_to_nfattr,
+       .nfattr_to_range        = ip_nat_port_nfattr_to_range,
 #endif
 };
index f03cd0f0c2bf6a563a751936afa3fb050cc413bf..6113a16af867d9594af35e7f6ceffc0b550b0a5b 100644 (file)
@@ -170,16 +170,18 @@ tcp_print_range(char *buffer, const struct ip_nat_range *range)
        else return 0;
 }
 
-struct ip_nat_protocol ip_nat_protocol_tcp
-= { "TCP", IPPROTO_TCP, THIS_MODULE,
-    tcp_manip_pkt,
-    tcp_in_range,
-    tcp_unique_tuple,
-    tcp_print,
-    tcp_print_range,
+struct ip_nat_protocol ip_nat_protocol_tcp = {
+       .name                   = "TCP",
+       .protonum               = IPPROTO_TCP,
+       .me                     = THIS_MODULE,
+       .manip_pkt              = tcp_manip_pkt,
+       .in_range               = tcp_in_range,
+       .unique_tuple           = tcp_unique_tuple,
+       .print                  = tcp_print,
+       .print_range            = tcp_print_range,
 #if defined(CONFIG_IP_NF_CONNTRACK_NETLINK) || \
     defined(CONFIG_IP_NF_CONNTRACK_NETLINK_MODULE)
-    ip_nat_port_range_to_nfattr,
-    ip_nat_port_nfattr_to_range,
+       .range_to_nfattr        = ip_nat_port_range_to_nfattr,
+       .nfattr_to_range        = ip_nat_port_nfattr_to_range,
 #endif
 };
index 7a4e66ecbc0a97e069536eaadb0680ad0a9ca3f3..689478e637a75e819338a0d254d0008d2e0e1cd5 100644 (file)
@@ -156,16 +156,18 @@ udp_print_range(char *buffer, const struct ip_nat_range *range)
        else return 0;
 }
 
-struct ip_nat_protocol ip_nat_protocol_udp
-= { "UDP", IPPROTO_UDP, THIS_MODULE,
-    udp_manip_pkt,
-    udp_in_range,
-    udp_unique_tuple,
-    udp_print,
-    udp_print_range,
+struct ip_nat_protocol ip_nat_protocol_udp = {
+       .name                   = "UDP",
+       .protonum               = IPPROTO_UDP,
+       .me                     = THIS_MODULE,
+       .manip_pkt              = udp_manip_pkt,
+       .in_range               = udp_in_range,
+       .unique_tuple           = udp_unique_tuple,
+       .print                  = udp_print,
+       .print_range            = udp_print_range,
 #if defined(CONFIG_IP_NF_CONNTRACK_NETLINK) || \
     defined(CONFIG_IP_NF_CONNTRACK_NETLINK_MODULE)
-    ip_nat_port_range_to_nfattr,
-    ip_nat_port_nfattr_to_range,
+       .range_to_nfattr        = ip_nat_port_range_to_nfattr,
+       .nfattr_to_range        = ip_nat_port_nfattr_to_range,
 #endif
 };
index 512d8f2fb824f64cc204961751edcef3f35bd35f..99bbef56f84e9ff346b856760e4db18319d3d78f 100644 (file)
@@ -61,10 +61,11 @@ unknown_print_range(char *buffer, const struct ip_nat_range *range)
 }
 
 struct ip_nat_protocol ip_nat_unknown_protocol = {
-       "unknown", 0, THIS_MODULE,
-       unknown_manip_pkt,
-       unknown_in_range,
-       unknown_unique_tuple,
-       unknown_print,
-       unknown_print_range
+       .name                   = "unknown",
+       .me                     = THIS_MODULE,
+       .manip_pkt              = unknown_manip_pkt,
+       .in_range               = unknown_in_range,
+       .unique_tuple           = unknown_unique_tuple,
+       .print                  = unknown_print,
+       .print_range            = unknown_print_range
 };