aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@woody.linux-foundation.org>2007-05-11 12:10:19 -0400
committerLinus Torvalds <torvalds@woody.linux-foundation.org>2007-05-11 12:10:19 -0400
commitee54d2d87a8158d14434c1a3274bd7f713105836 (patch)
treecd3e1f6fc0a7fc920e4153c01f35ff7bd92d79da /include
parentbf61f8d357e5d71d74a3ca3be3cce52bf1a2c01a (diff)
parentda0dd231436ba7e81789e93dd933d7a275e1709d (diff)
Merge master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6
* master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6: (31 commits) [NETFILTER]: xt_conntrack: add compat support [NETFILTER]: iptable_raw: ignore short packets sent by SOCK_RAW sockets [NETFILTER]: iptable_{filter,mangle}: more descriptive "happy cracking" message [NETFILTER]: nf_nat: Clears helper private area when NATing [NETFILTER]: ctnetlink: clear helper area and handle unchanged helper [NETFILTER]: nf_conntrack: Removes unused destroy operation of l3proto [NETFILTER]: nf_conntrack: Removes duplicated declarations [NETFILTER]: nf_nat: remove unused argument of function allocating binding [NETFILTER]: Clean up table initialization [NET_SCHED]: Avoid requeue warning on dev_deactivate [NET_SCHED]: Reread dev->qdisc for NETDEV_TX_OK [NET_SCHED]: Rationalise return value of qdisc_restart [NET]: Fix dev->qdisc race for NETDEV_TX_LOCKED case [UDP]: Fix AF-specific references in AF-agnostic code. [IrDA]: KingSun/DonShine USB IrDA dongle support. [IPV6] ROUTE: Assign rt6i_idev for ip6_{prohibit,blk_hole}_entry. [IPV6]: Do no rely on skb->dst before it is assigned. [IPV6]: Send ICMPv6 error on scope violations. [SCTP]: Do not include ABORT chunk header in the notification. [SCTP]: Correctly copy addresses in sctp_copy_laddrs ...
Diffstat (limited to 'include')
-rw-r--r--include/linux/netdevice.h2
-rw-r--r--include/linux/netfilter/x_tables.h8
-rw-r--r--include/linux/netfilter_arp/arp_tables.h41
-rw-r--r--include/linux/netfilter_ipv4/ip_tables.h22
-rw-r--r--include/linux/netfilter_ipv6/ip6_tables.h22
-rw-r--r--include/net/netfilter/nf_conntrack.h7
-rw-r--r--include/net/netfilter/nf_conntrack_l3proto.h3
-rw-r--r--include/net/netfilter/nf_nat_rule.h11
-rw-r--r--include/net/udp.h9
-rw-r--r--include/net/udplite.h2
10 files changed, 107 insertions, 20 deletions
diff --git a/include/linux/netdevice.h b/include/linux/netdevice.h
index 30446222b3..f671cd2f13 100644
--- a/include/linux/netdevice.h
+++ b/include/linux/netdevice.h
@@ -467,6 +467,8 @@ struct net_device
467 /* device index hash chain */ 467 /* device index hash chain */
468 struct hlist_node index_hlist; 468 struct hlist_node index_hlist;
469 469
470 struct net_device *link_watch_next;
471
470 /* register/unregister state machine */ 472 /* register/unregister state machine */
471 enum { NETREG_UNINITIALIZED=0, 473 enum { NETREG_UNINITIALIZED=0,
472 NETREG_REGISTERED, /* completed register_netdevice */ 474 NETREG_REGISTERED, /* completed register_netdevice */
diff --git a/include/linux/netfilter/x_tables.h b/include/linux/netfilter/x_tables.h
index 022edfa97e..7e733a6ba4 100644
--- a/include/linux/netfilter/x_tables.h
+++ b/include/linux/netfilter/x_tables.h
@@ -54,6 +54,14 @@ struct xt_entry_target
54 unsigned char data[0]; 54 unsigned char data[0];
55}; 55};
56 56
57#define XT_TARGET_INIT(__name, __size) \
58{ \
59 .target.u.user = { \
60 .target_size = XT_ALIGN(__size), \
61 .name = __name, \
62 }, \
63}
64
57struct xt_standard_target 65struct xt_standard_target
58{ 66{
59 struct xt_entry_target target; 67 struct xt_entry_target target;
diff --git a/include/linux/netfilter_arp/arp_tables.h b/include/linux/netfilter_arp/arp_tables.h
index 24c8786d12..584cd1b18f 100644
--- a/include/linux/netfilter_arp/arp_tables.h
+++ b/include/linux/netfilter_arp/arp_tables.h
@@ -238,6 +238,47 @@ static __inline__ struct arpt_entry_target *arpt_get_target(struct arpt_entry *e
238 */ 238 */
239#ifdef __KERNEL__ 239#ifdef __KERNEL__
240 240
241/* Standard entry. */
242struct arpt_standard
243{
244 struct arpt_entry entry;
245 struct arpt_standard_target target;
246};
247
248struct arpt_error_target
249{
250 struct arpt_entry_target target;
251 char errorname[ARPT_FUNCTION_MAXNAMELEN];
252};
253
254struct arpt_error
255{
256 struct arpt_entry entry;
257 struct arpt_error_target target;
258};
259
260#define ARPT_ENTRY_INIT(__size) \
261{ \
262 .target_offset = sizeof(struct arpt_entry), \
263 .next_offset = (__size), \
264}
265
266#define ARPT_STANDARD_INIT(__verdict) \
267{ \
268 .entry = ARPT_ENTRY_INIT(sizeof(struct arpt_standard)), \
269 .target = XT_TARGET_INIT(ARPT_STANDARD_TARGET, \
270 sizeof(struct arpt_standard_target)), \
271 .target.verdict = -(__verdict) - 1, \
272}
273
274#define ARPT_ERROR_INIT \
275{ \
276 .entry = ARPT_ENTRY_INIT(sizeof(struct arpt_error)), \
277 .target = XT_TARGET_INIT(ARPT_ERROR_TARGET, \
278 sizeof(struct arpt_error_target)), \
279 .target.errorname = "ERROR", \
280}
281
241#define arpt_register_target(tgt) \ 282#define arpt_register_target(tgt) \
242({ (tgt)->family = NF_ARP; \ 283({ (tgt)->family = NF_ARP; \
243 xt_register_target(tgt); }) 284 xt_register_target(tgt); })
diff --git a/include/linux/netfilter_ipv4/ip_tables.h b/include/linux/netfilter_ipv4/ip_tables.h
index 9527296595..2f46dd728e 100644
--- a/include/linux/netfilter_ipv4/ip_tables.h
+++ b/include/linux/netfilter_ipv4/ip_tables.h
@@ -295,6 +295,28 @@ struct ipt_error
295 struct ipt_error_target target; 295 struct ipt_error_target target;
296}; 296};
297 297
298#define IPT_ENTRY_INIT(__size) \
299{ \
300 .target_offset = sizeof(struct ipt_entry), \
301 .next_offset = (__size), \
302}
303
304#define IPT_STANDARD_INIT(__verdict) \
305{ \
306 .entry = IPT_ENTRY_INIT(sizeof(struct ipt_standard)), \
307 .target = XT_TARGET_INIT(IPT_STANDARD_TARGET, \
308 sizeof(struct xt_standard_target)), \
309 .target.verdict = -(__verdict) - 1, \
310}
311
312#define IPT_ERROR_INIT \
313{ \
314 .entry = IPT_ENTRY_INIT(sizeof(struct ipt_error)), \
315 .target = XT_TARGET_INIT(IPT_ERROR_TARGET, \
316 sizeof(struct ipt_error_target)), \
317 .target.errorname = "ERROR", \
318}
319
298extern unsigned int ipt_do_table(struct sk_buff **pskb, 320extern unsigned int ipt_do_table(struct sk_buff **pskb,
299 unsigned int hook, 321 unsigned int hook,
300 const struct net_device *in, 322 const struct net_device *in,
diff --git a/include/linux/netfilter_ipv6/ip6_tables.h b/include/linux/netfilter_ipv6/ip6_tables.h
index 61aa10412f..4686f8342c 100644
--- a/include/linux/netfilter_ipv6/ip6_tables.h
+++ b/include/linux/netfilter_ipv6/ip6_tables.h
@@ -123,6 +123,28 @@ struct ip6t_error
123 struct ip6t_error_target target; 123 struct ip6t_error_target target;
124}; 124};
125 125
126#define IP6T_ENTRY_INIT(__size) \
127{ \
128 .target_offset = sizeof(struct ip6t_entry), \
129 .next_offset = (__size), \
130}
131
132#define IP6T_STANDARD_INIT(__verdict) \
133{ \
134 .entry = IP6T_ENTRY_INIT(sizeof(struct ip6t_standard)), \
135 .target = XT_TARGET_INIT(IP6T_STANDARD_TARGET, \
136 sizeof(struct ip6t_standard_target)), \
137 .target.verdict = -(__verdict) - 1, \
138}
139
140#define IP6T_ERROR_INIT \
141{ \
142 .entry = IP6T_ENTRY_INIT(sizeof(struct ip6t_error)), \
143 .target = XT_TARGET_INIT(IP6T_ERROR_TARGET, \
144 sizeof(struct ip6t_error_target)), \
145 .target.errorname = "ERROR", \
146}
147
126/* 148/*
127 * New IP firewall options for [gs]etsockopt at the RAW IP level. 149 * New IP firewall options for [gs]etsockopt at the RAW IP level.
128 * Unlike BSD Linux inherits IP options so you don't have to use 150 * Unlike BSD Linux inherits IP options so you don't have to use
diff --git a/include/net/netfilter/nf_conntrack.h b/include/net/netfilter/nf_conntrack.h
index 1c6b8bd09b..4732432f8e 100644
--- a/include/net/netfilter/nf_conntrack.h
+++ b/include/net/netfilter/nf_conntrack.h
@@ -183,13 +183,6 @@ extern void nf_conntrack_hash_insert(struct nf_conn *ct);
183 183
184extern void nf_conntrack_flush(void); 184extern void nf_conntrack_flush(void);
185 185
186extern struct nf_conntrack_helper *
187nf_ct_helper_find_get( const struct nf_conntrack_tuple *tuple);
188extern void nf_ct_helper_put(struct nf_conntrack_helper *helper);
189
190extern struct nf_conntrack_helper *
191__nf_conntrack_helper_find_byname(const char *name);
192
193extern int nf_ct_invert_tuplepr(struct nf_conntrack_tuple *inverse, 186extern int nf_ct_invert_tuplepr(struct nf_conntrack_tuple *inverse,
194 const struct nf_conntrack_tuple *orig); 187 const struct nf_conntrack_tuple *orig);
195 188
diff --git a/include/net/netfilter/nf_conntrack_l3proto.h b/include/net/netfilter/nf_conntrack_l3proto.h
index f32f714e5d..96a58d8e1d 100644
--- a/include/net/netfilter/nf_conntrack_l3proto.h
+++ b/include/net/netfilter/nf_conntrack_l3proto.h
@@ -56,9 +56,6 @@ struct nf_conntrack_l3proto
56 */ 56 */
57 int (*new)(struct nf_conn *conntrack, const struct sk_buff *skb); 57 int (*new)(struct nf_conn *conntrack, const struct sk_buff *skb);
58 58
59 /* Called when a conntrack entry is destroyed */
60 void (*destroy)(struct nf_conn *conntrack);
61
62 /* 59 /*
63 * Called before tracking. 60 * Called before tracking.
64 * *dataoff: offset of protocol header (TCP, UDP,...) in *pskb 61 * *dataoff: offset of protocol header (TCP, UDP,...) in *pskb
diff --git a/include/net/netfilter/nf_nat_rule.h b/include/net/netfilter/nf_nat_rule.h
index e76565459a..f9743187d5 100644
--- a/include/net/netfilter/nf_nat_rule.h
+++ b/include/net/netfilter/nf_nat_rule.h
@@ -10,16 +10,11 @@ extern int nf_nat_rule_find(struct sk_buff **pskb,
10 unsigned int hooknum, 10 unsigned int hooknum,
11 const struct net_device *in, 11 const struct net_device *in,
12 const struct net_device *out, 12 const struct net_device *out,
13 struct nf_conn *ct, 13 struct nf_conn *ct);
14 struct nf_nat_info *info);
15 14
16extern unsigned int 15extern unsigned int
17alloc_null_binding(struct nf_conn *ct, 16alloc_null_binding(struct nf_conn *ct, unsigned int hooknum);
18 struct nf_nat_info *info,
19 unsigned int hooknum);
20 17
21extern unsigned int 18extern unsigned int
22alloc_null_binding_confirmed(struct nf_conn *ct, 19alloc_null_binding_confirmed(struct nf_conn *ct, unsigned int hooknum);
23 struct nf_nat_info *info,
24 unsigned int hooknum);
25#endif /* _NF_NAT_RULE_H */ 20#endif /* _NF_NAT_RULE_H */
diff --git a/include/net/udp.h b/include/net/udp.h
index 98755ebaf1..496f89d45c 100644
--- a/include/net/udp.h
+++ b/include/net/udp.h
@@ -119,9 +119,16 @@ static inline void udp_lib_close(struct sock *sk, long timeout)
119} 119}
120 120
121 121
122struct udp_get_port_ops {
123 int (*saddr_cmp)(const struct sock *sk1, const struct sock *sk2);
124 int (*saddr_any)(const struct sock *sk);
125 unsigned int (*hash_port_and_rcv_saddr)(__u16 port,
126 const struct sock *sk);
127};
128
122/* net/ipv4/udp.c */ 129/* net/ipv4/udp.c */
123extern int udp_get_port(struct sock *sk, unsigned short snum, 130extern int udp_get_port(struct sock *sk, unsigned short snum,
124 int (*saddr_cmp)(const struct sock *, const struct sock *)); 131 const struct udp_get_port_ops *ops);
125extern void udp_err(struct sk_buff *, u32); 132extern void udp_err(struct sk_buff *, u32);
126 133
127extern int udp_sendmsg(struct kiocb *iocb, struct sock *sk, 134extern int udp_sendmsg(struct kiocb *iocb, struct sock *sk,
diff --git a/include/net/udplite.h b/include/net/udplite.h
index 635b0eafca..50b4b424d1 100644
--- a/include/net/udplite.h
+++ b/include/net/udplite.h
@@ -120,5 +120,5 @@ static inline __wsum udplite_csum_outgoing(struct sock *sk, struct sk_buff *skb)
120 120
121extern void udplite4_register(void); 121extern void udplite4_register(void);
122extern int udplite_get_port(struct sock *sk, unsigned short snum, 122extern int udplite_get_port(struct sock *sk, unsigned short snum,
123 int (*scmp)(const struct sock *, const struct sock *)); 123 const struct udp_get_port_ops *ops);
124#endif /* _UDPLITE_H */ 124#endif /* _UDPLITE_H */