aboutsummaryrefslogtreecommitdiffstats
path: root/net/ipv4
diff options
context:
space:
mode:
authorPatrick McHardy <kaber@trash.net>2005-08-09 22:36:53 -0400
committerDavid S. Miller <davem@sunset.davemloft.net>2005-08-29 18:33:34 -0400
commit373ac73595491b7c1f2f10cb37e9b7bae6901227 (patch)
treef5b3cb508fd9b2c63aa2c24d3dafc37c2c18941f /net/ipv4
parent86e65da9c1fc6fb421b9f796b597b3eced6b55ab (diff)
[NETFILTER]: C99 initizalizers for NAT protocols
Signed-off-by: Patrick McHardy <kaber@trash.net> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/ipv4')
-rw-r--r--net/ipv4/netfilter/ip_nat_proto_icmp.c20
-rw-r--r--net/ipv4/netfilter/ip_nat_proto_tcp.c20
-rw-r--r--net/ipv4/netfilter/ip_nat_proto_udp.c20
-rw-r--r--net/ipv4/netfilter/ip_nat_proto_unknown.c13
4 files changed, 40 insertions, 33 deletions
diff --git a/net/ipv4/netfilter/ip_nat_proto_icmp.c b/net/ipv4/netfilter/ip_nat_proto_icmp.c
index 38fdfc2093c4..7ed2fdb53457 100644
--- a/net/ipv4/netfilter/ip_nat_proto_icmp.c
+++ b/net/ipv4/netfilter/ip_nat_proto_icmp.c
@@ -106,16 +106,18 @@ icmp_print_range(char *buffer, const struct ip_nat_range *range)
106 else return 0; 106 else return 0;
107} 107}
108 108
109struct ip_nat_protocol ip_nat_protocol_icmp 109struct ip_nat_protocol ip_nat_protocol_icmp = {
110= { "ICMP", IPPROTO_ICMP, THIS_MODULE, 110 .name = "ICMP",
111 icmp_manip_pkt, 111 .protonum = IPPROTO_ICMP,
112 icmp_in_range, 112 .me = THIS_MODULE,
113 icmp_unique_tuple, 113 .manip_pkt = icmp_manip_pkt,
114 icmp_print, 114 .in_range = icmp_in_range,
115 icmp_print_range, 115 .unique_tuple = icmp_unique_tuple,
116 .print = icmp_print,
117 .print_range = icmp_print_range,
116#if defined(CONFIG_IP_NF_CONNTRACK_NETLINK) || \ 118#if defined(CONFIG_IP_NF_CONNTRACK_NETLINK) || \
117 defined(CONFIG_IP_NF_CONNTRACK_NETLINK_MODULE) 119 defined(CONFIG_IP_NF_CONNTRACK_NETLINK_MODULE)
118 ip_nat_port_range_to_nfattr, 120 .range_to_nfattr = ip_nat_port_range_to_nfattr,
119 ip_nat_port_nfattr_to_range, 121 .nfattr_to_range = ip_nat_port_nfattr_to_range,
120#endif 122#endif
121}; 123};
diff --git a/net/ipv4/netfilter/ip_nat_proto_tcp.c b/net/ipv4/netfilter/ip_nat_proto_tcp.c
index f03cd0f0c2bf..6113a16af867 100644
--- a/net/ipv4/netfilter/ip_nat_proto_tcp.c
+++ b/net/ipv4/netfilter/ip_nat_proto_tcp.c
@@ -170,16 +170,18 @@ tcp_print_range(char *buffer, const struct ip_nat_range *range)
170 else return 0; 170 else return 0;
171} 171}
172 172
173struct ip_nat_protocol ip_nat_protocol_tcp 173struct ip_nat_protocol ip_nat_protocol_tcp = {
174= { "TCP", IPPROTO_TCP, THIS_MODULE, 174 .name = "TCP",
175 tcp_manip_pkt, 175 .protonum = IPPROTO_TCP,
176 tcp_in_range, 176 .me = THIS_MODULE,
177 tcp_unique_tuple, 177 .manip_pkt = tcp_manip_pkt,
178 tcp_print, 178 .in_range = tcp_in_range,
179 tcp_print_range, 179 .unique_tuple = tcp_unique_tuple,
180 .print = tcp_print,
181 .print_range = tcp_print_range,
180#if defined(CONFIG_IP_NF_CONNTRACK_NETLINK) || \ 182#if defined(CONFIG_IP_NF_CONNTRACK_NETLINK) || \
181 defined(CONFIG_IP_NF_CONNTRACK_NETLINK_MODULE) 183 defined(CONFIG_IP_NF_CONNTRACK_NETLINK_MODULE)
182 ip_nat_port_range_to_nfattr, 184 .range_to_nfattr = ip_nat_port_range_to_nfattr,
183 ip_nat_port_nfattr_to_range, 185 .nfattr_to_range = ip_nat_port_nfattr_to_range,
184#endif 186#endif
185}; 187};
diff --git a/net/ipv4/netfilter/ip_nat_proto_udp.c b/net/ipv4/netfilter/ip_nat_proto_udp.c
index 7a4e66ecbc0a..689478e637a7 100644
--- a/net/ipv4/netfilter/ip_nat_proto_udp.c
+++ b/net/ipv4/netfilter/ip_nat_proto_udp.c
@@ -156,16 +156,18 @@ udp_print_range(char *buffer, const struct ip_nat_range *range)
156 else return 0; 156 else return 0;
157} 157}
158 158
159struct ip_nat_protocol ip_nat_protocol_udp 159struct ip_nat_protocol ip_nat_protocol_udp = {
160= { "UDP", IPPROTO_UDP, THIS_MODULE, 160 .name = "UDP",
161 udp_manip_pkt, 161 .protonum = IPPROTO_UDP,
162 udp_in_range, 162 .me = THIS_MODULE,
163 udp_unique_tuple, 163 .manip_pkt = udp_manip_pkt,
164 udp_print, 164 .in_range = udp_in_range,
165 udp_print_range, 165 .unique_tuple = udp_unique_tuple,
166 .print = udp_print,
167 .print_range = udp_print_range,
166#if defined(CONFIG_IP_NF_CONNTRACK_NETLINK) || \ 168#if defined(CONFIG_IP_NF_CONNTRACK_NETLINK) || \
167 defined(CONFIG_IP_NF_CONNTRACK_NETLINK_MODULE) 169 defined(CONFIG_IP_NF_CONNTRACK_NETLINK_MODULE)
168 ip_nat_port_range_to_nfattr, 170 .range_to_nfattr = ip_nat_port_range_to_nfattr,
169 ip_nat_port_nfattr_to_range, 171 .nfattr_to_range = ip_nat_port_nfattr_to_range,
170#endif 172#endif
171}; 173};
diff --git a/net/ipv4/netfilter/ip_nat_proto_unknown.c b/net/ipv4/netfilter/ip_nat_proto_unknown.c
index 512d8f2fb824..99bbef56f84e 100644
--- a/net/ipv4/netfilter/ip_nat_proto_unknown.c
+++ b/net/ipv4/netfilter/ip_nat_proto_unknown.c
@@ -61,10 +61,11 @@ unknown_print_range(char *buffer, const struct ip_nat_range *range)
61} 61}
62 62
63struct ip_nat_protocol ip_nat_unknown_protocol = { 63struct ip_nat_protocol ip_nat_unknown_protocol = {
64 "unknown", 0, THIS_MODULE, 64 .name = "unknown",
65 unknown_manip_pkt, 65 .me = THIS_MODULE,
66 unknown_in_range, 66 .manip_pkt = unknown_manip_pkt,
67 unknown_unique_tuple, 67 .in_range = unknown_in_range,
68 unknown_print, 68 .unique_tuple = unknown_unique_tuple,
69 unknown_print_range 69 .print = unknown_print,
70 .print_range = unknown_print_range
70}; 71};