aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
Diffstat (limited to 'include')
-rw-r--r--include/asm-alpha/socket.h2
-rw-r--r--include/asm-arm/socket.h2
-rw-r--r--include/asm-avr32/socket.h2
-rw-r--r--include/asm-blackfin/socket.h3
-rw-r--r--include/asm-cris/socket.h2
-rw-r--r--include/asm-frv/socket.h2
-rw-r--r--include/asm-h8300/socket.h2
-rw-r--r--include/asm-ia64/socket.h2
-rw-r--r--include/asm-m32r/socket.h2
-rw-r--r--include/asm-m68k/socket.h2
-rw-r--r--include/asm-mips/socket.h2
-rw-r--r--include/asm-parisc/socket.h2
-rw-r--r--include/asm-powerpc/socket.h2
-rw-r--r--include/asm-s390/socket.h2
-rw-r--r--include/asm-sh/socket.h2
-rw-r--r--include/asm-sparc/socket.h2
-rw-r--r--include/asm-sparc64/socket.h1
-rw-r--r--include/asm-v850/socket.h2
-rw-r--r--include/asm-x86/socket.h2
-rw-r--r--include/asm-xtensa/socket.h2
-rw-r--r--include/linux/inetdevice.h2
-rw-r--r--include/linux/input.h2
-rw-r--r--include/linux/ipv6.h12
-rw-r--r--include/linux/netdevice.h4
-rw-r--r--include/linux/netfilter/nf_conntrack_pptp.h2
-rw-r--r--include/linux/netfilter/nf_conntrack_sip.h6
-rw-r--r--include/linux/netfilter/x_tables.h28
-rw-r--r--include/linux/netfilter/xt_conntrack.h30
-rw-r--r--include/linux/netfilter/xt_hashlimit.h37
-rw-r--r--include/linux/netfilter/xt_owner.h4
-rw-r--r--include/linux/netfilter_arp/arp_tables.h5
-rw-r--r--include/linux/netfilter_ipv4/ip_tables.h5
-rw-r--r--include/linux/netfilter_ipv6/ip6_tables.h5
-rw-r--r--include/linux/netlink.h2
-rw-r--r--include/linux/pfkeyv2.h6
-rw-r--r--include/linux/pkt_cls.h50
-rw-r--r--include/linux/pkt_sched.h5
-rw-r--r--include/linux/rfkill.h2
-rw-r--r--include/linux/skbuff.h3
-rw-r--r--include/linux/snmp.h3
-rw-r--r--include/linux/sysctl.h4
-rw-r--r--include/linux/types.h2
-rw-r--r--include/linux/usb/rndis_host.h274
-rw-r--r--include/linux/usb/usbnet.h214
-rw-r--r--include/linux/xfrm.h8
-rw-r--r--include/net/arp.h8
-rw-r--r--include/net/esp.h54
-rw-r--r--include/net/inet6_hashtables.h17
-rw-r--r--include/net/inet_hashtables.h55
-rw-r--r--include/net/ip_fib.h4
-rw-r--r--include/net/net_namespace.h4
-rw-r--r--include/net/netfilter/nf_conntrack.h15
-rw-r--r--include/net/netfilter/nf_conntrack_core.h6
-rw-r--r--include/net/netfilter/nf_conntrack_expect.h2
-rw-r--r--include/net/netfilter/nf_conntrack_helper.h4
-rw-r--r--include/net/netfilter/nf_conntrack_l3proto.h4
-rw-r--r--include/net/netfilter/nf_conntrack_l4proto.h25
-rw-r--r--include/net/netfilter/nf_conntrack_tuple.h17
-rw-r--r--include/net/netfilter/nf_log.h2
-rw-r--r--include/net/netns/ipv4.h6
-rw-r--r--include/net/netns/ipv6.h5
-rw-r--r--include/net/netns/x_tables.h10
-rw-r--r--include/net/pkt_cls.h6
-rw-r--r--include/net/raw.h5
-rw-r--r--include/net/route.h3
-rw-r--r--include/net/sock.h2
-rw-r--r--include/net/xfrm.h16
67 files changed, 844 insertions, 181 deletions
diff --git a/include/asm-alpha/socket.h b/include/asm-alpha/socket.h
index 1fede7f92860..08c979319929 100644
--- a/include/asm-alpha/socket.h
+++ b/include/asm-alpha/socket.h
@@ -60,4 +60,6 @@
60#define SO_SECURITY_ENCRYPTION_TRANSPORT 20 60#define SO_SECURITY_ENCRYPTION_TRANSPORT 20
61#define SO_SECURITY_ENCRYPTION_NETWORK 21 61#define SO_SECURITY_ENCRYPTION_NETWORK 21
62 62
63#define SO_MARK 36
64
63#endif /* _ASM_SOCKET_H */ 65#endif /* _ASM_SOCKET_H */
diff --git a/include/asm-arm/socket.h b/include/asm-arm/socket.h
index 65a1a64bf934..6817be9573a6 100644
--- a/include/asm-arm/socket.h
+++ b/include/asm-arm/socket.h
@@ -52,4 +52,6 @@
52#define SO_TIMESTAMPNS 35 52#define SO_TIMESTAMPNS 35
53#define SCM_TIMESTAMPNS SO_TIMESTAMPNS 53#define SCM_TIMESTAMPNS SO_TIMESTAMPNS
54 54
55#define SO_MARK 36
56
55#endif /* _ASM_SOCKET_H */ 57#endif /* _ASM_SOCKET_H */
diff --git a/include/asm-avr32/socket.h b/include/asm-avr32/socket.h
index a0d0507a5034..35863f260929 100644
--- a/include/asm-avr32/socket.h
+++ b/include/asm-avr32/socket.h
@@ -52,4 +52,6 @@
52#define SO_TIMESTAMPNS 35 52#define SO_TIMESTAMPNS 35
53#define SCM_TIMESTAMPNS SO_TIMESTAMPNS 53#define SCM_TIMESTAMPNS SO_TIMESTAMPNS
54 54
55#define SO_MARK 36
56
55#endif /* __ASM_AVR32_SOCKET_H */ 57#endif /* __ASM_AVR32_SOCKET_H */
diff --git a/include/asm-blackfin/socket.h b/include/asm-blackfin/socket.h
index 5213c9652186..2ca702e44d47 100644
--- a/include/asm-blackfin/socket.h
+++ b/include/asm-blackfin/socket.h
@@ -50,4 +50,7 @@
50#define SO_PASSSEC 34 50#define SO_PASSSEC 34
51#define SO_TIMESTAMPNS 35 51#define SO_TIMESTAMPNS 35
52#define SCM_TIMESTAMPNS SO_TIMESTAMPNS 52#define SCM_TIMESTAMPNS SO_TIMESTAMPNS
53
54#define SO_MARK 36
55
53#endif /* _ASM_SOCKET_H */ 56#endif /* _ASM_SOCKET_H */
diff --git a/include/asm-cris/socket.h b/include/asm-cris/socket.h
index 5b18dfdf1748..9df0ca82f5de 100644
--- a/include/asm-cris/socket.h
+++ b/include/asm-cris/socket.h
@@ -54,6 +54,8 @@
54#define SO_TIMESTAMPNS 35 54#define SO_TIMESTAMPNS 35
55#define SCM_TIMESTAMPNS SO_TIMESTAMPNS 55#define SCM_TIMESTAMPNS SO_TIMESTAMPNS
56 56
57#define SO_MARK 36
58
57#endif /* _ASM_SOCKET_H */ 59#endif /* _ASM_SOCKET_H */
58 60
59 61
diff --git a/include/asm-frv/socket.h b/include/asm-frv/socket.h
index a823befd11dd..e51ca67b9356 100644
--- a/include/asm-frv/socket.h
+++ b/include/asm-frv/socket.h
@@ -52,5 +52,7 @@
52#define SO_TIMESTAMPNS 35 52#define SO_TIMESTAMPNS 35
53#define SCM_TIMESTAMPNS SO_TIMESTAMPNS 53#define SCM_TIMESTAMPNS SO_TIMESTAMPNS
54 54
55#define SO_MARK 36
56
55#endif /* _ASM_SOCKET_H */ 57#endif /* _ASM_SOCKET_H */
56 58
diff --git a/include/asm-h8300/socket.h b/include/asm-h8300/socket.h
index 39911d8c9684..da2520dbf254 100644
--- a/include/asm-h8300/socket.h
+++ b/include/asm-h8300/socket.h
@@ -52,4 +52,6 @@
52#define SO_TIMESTAMPNS 35 52#define SO_TIMESTAMPNS 35
53#define SCM_TIMESTAMPNS SO_TIMESTAMPNS 53#define SCM_TIMESTAMPNS SO_TIMESTAMPNS
54 54
55#define SO_MARK 36
56
55#endif /* _ASM_SOCKET_H */ 57#endif /* _ASM_SOCKET_H */
diff --git a/include/asm-ia64/socket.h b/include/asm-ia64/socket.h
index 9e42ce43cfbe..d5ef0aa3e312 100644
--- a/include/asm-ia64/socket.h
+++ b/include/asm-ia64/socket.h
@@ -61,4 +61,6 @@
61#define SO_TIMESTAMPNS 35 61#define SO_TIMESTAMPNS 35
62#define SCM_TIMESTAMPNS SO_TIMESTAMPNS 62#define SCM_TIMESTAMPNS SO_TIMESTAMPNS
63 63
64#define SO_MARK 36
65
64#endif /* _ASM_IA64_SOCKET_H */ 66#endif /* _ASM_IA64_SOCKET_H */
diff --git a/include/asm-m32r/socket.h b/include/asm-m32r/socket.h
index 793d5d30c850..9a0e20012224 100644
--- a/include/asm-m32r/socket.h
+++ b/include/asm-m32r/socket.h
@@ -52,4 +52,6 @@
52#define SO_TIMESTAMPNS 35 52#define SO_TIMESTAMPNS 35
53#define SCM_TIMESTAMPNS SO_TIMESTAMPNS 53#define SCM_TIMESTAMPNS SO_TIMESTAMPNS
54 54
55#define SO_MARK 36
56
55#endif /* _ASM_M32R_SOCKET_H */ 57#endif /* _ASM_M32R_SOCKET_H */
diff --git a/include/asm-m68k/socket.h b/include/asm-m68k/socket.h
index 6d21b90863ad..dbc64e92c41a 100644
--- a/include/asm-m68k/socket.h
+++ b/include/asm-m68k/socket.h
@@ -52,4 +52,6 @@
52#define SO_TIMESTAMPNS 35 52#define SO_TIMESTAMPNS 35
53#define SCM_TIMESTAMPNS SO_TIMESTAMPNS 53#define SCM_TIMESTAMPNS SO_TIMESTAMPNS
54 54
55#define SO_MARK 36
56
55#endif /* _ASM_SOCKET_H */ 57#endif /* _ASM_SOCKET_H */
diff --git a/include/asm-mips/socket.h b/include/asm-mips/socket.h
index 95945689b1c6..63f60254d308 100644
--- a/include/asm-mips/socket.h
+++ b/include/asm-mips/socket.h
@@ -73,6 +73,8 @@ To add: #define SO_REUSEPORT 0x0200 /* Allow local address and port reuse. */
73#define SO_TIMESTAMPNS 35 73#define SO_TIMESTAMPNS 35
74#define SCM_TIMESTAMPNS SO_TIMESTAMPNS 74#define SCM_TIMESTAMPNS SO_TIMESTAMPNS
75 75
76#define SO_MARK 36
77
76#ifdef __KERNEL__ 78#ifdef __KERNEL__
77 79
78/** sock_type - Socket types 80/** sock_type - Socket types
diff --git a/include/asm-parisc/socket.h b/include/asm-parisc/socket.h
index 99e868f6a8f5..69a7a0d30b02 100644
--- a/include/asm-parisc/socket.h
+++ b/include/asm-parisc/socket.h
@@ -52,4 +52,6 @@
52#define SO_PEERSEC 0x401d 52#define SO_PEERSEC 0x401d
53#define SO_PASSSEC 0x401e 53#define SO_PASSSEC 0x401e
54 54
55#define SO_MARK 0x401f
56
55#endif /* _ASM_SOCKET_H */ 57#endif /* _ASM_SOCKET_H */
diff --git a/include/asm-powerpc/socket.h b/include/asm-powerpc/socket.h
index 403e9fde2eb5..f5a4e168e498 100644
--- a/include/asm-powerpc/socket.h
+++ b/include/asm-powerpc/socket.h
@@ -59,4 +59,6 @@
59#define SO_TIMESTAMPNS 35 59#define SO_TIMESTAMPNS 35
60#define SCM_TIMESTAMPNS SO_TIMESTAMPNS 60#define SCM_TIMESTAMPNS SO_TIMESTAMPNS
61 61
62#define SO_MARK 36
63
62#endif /* _ASM_POWERPC_SOCKET_H */ 64#endif /* _ASM_POWERPC_SOCKET_H */
diff --git a/include/asm-s390/socket.h b/include/asm-s390/socket.h
index 1161ebe3dec9..c786ab623b2d 100644
--- a/include/asm-s390/socket.h
+++ b/include/asm-s390/socket.h
@@ -60,4 +60,6 @@
60#define SO_TIMESTAMPNS 35 60#define SO_TIMESTAMPNS 35
61#define SCM_TIMESTAMPNS SO_TIMESTAMPNS 61#define SCM_TIMESTAMPNS SO_TIMESTAMPNS
62 62
63#define SO_MARK 36
64
63#endif /* _ASM_SOCKET_H */ 65#endif /* _ASM_SOCKET_H */
diff --git a/include/asm-sh/socket.h b/include/asm-sh/socket.h
index c48d6fc9da38..6d4bf6512959 100644
--- a/include/asm-sh/socket.h
+++ b/include/asm-sh/socket.h
@@ -52,4 +52,6 @@
52#define SO_TIMESTAMPNS 35 52#define SO_TIMESTAMPNS 35
53#define SCM_TIMESTAMPNS SO_TIMESTAMPNS 53#define SCM_TIMESTAMPNS SO_TIMESTAMPNS
54 54
55#define SO_MARK 36
56
55#endif /* __ASM_SH_SOCKET_H */ 57#endif /* __ASM_SH_SOCKET_H */
diff --git a/include/asm-sparc/socket.h b/include/asm-sparc/socket.h
index 7c1423997cf0..2e2bd0b7c8e3 100644
--- a/include/asm-sparc/socket.h
+++ b/include/asm-sparc/socket.h
@@ -52,6 +52,8 @@
52#define SO_TIMESTAMPNS 0x0021 52#define SO_TIMESTAMPNS 0x0021
53#define SCM_TIMESTAMPNS SO_TIMESTAMPNS 53#define SCM_TIMESTAMPNS SO_TIMESTAMPNS
54 54
55#define SO_MARK 0x0022
56
55/* Security levels - as per NRL IPv6 - don't actually do anything */ 57/* Security levels - as per NRL IPv6 - don't actually do anything */
56#define SO_SECURITY_AUTHENTICATION 0x5001 58#define SO_SECURITY_AUTHENTICATION 0x5001
57#define SO_SECURITY_ENCRYPTION_TRANSPORT 0x5002 59#define SO_SECURITY_ENCRYPTION_TRANSPORT 0x5002
diff --git a/include/asm-sparc64/socket.h b/include/asm-sparc64/socket.h
index 986441dcb8f0..44a625af6e31 100644
--- a/include/asm-sparc64/socket.h
+++ b/include/asm-sparc64/socket.h
@@ -57,4 +57,5 @@
57#define SO_SECURITY_ENCRYPTION_TRANSPORT 0x5002 57#define SO_SECURITY_ENCRYPTION_TRANSPORT 0x5002
58#define SO_SECURITY_ENCRYPTION_NETWORK 0x5004 58#define SO_SECURITY_ENCRYPTION_NETWORK 0x5004
59 59
60#define SO_MARK 0x0022
60#endif /* _ASM_SOCKET_H */ 61#endif /* _ASM_SOCKET_H */
diff --git a/include/asm-v850/socket.h b/include/asm-v850/socket.h
index a4c2493b025f..e199a2bf12aa 100644
--- a/include/asm-v850/socket.h
+++ b/include/asm-v850/socket.h
@@ -52,4 +52,6 @@
52#define SO_TIMESTAMPNS 35 52#define SO_TIMESTAMPNS 35
53#define SCM_TIMESTAMPNS SO_TIMESTAMPNS 53#define SCM_TIMESTAMPNS SO_TIMESTAMPNS
54 54
55#define SO_MARK 36
56
55#endif /* __V850_SOCKET_H__ */ 57#endif /* __V850_SOCKET_H__ */
diff --git a/include/asm-x86/socket.h b/include/asm-x86/socket.h
index 99ca648b94c5..80af9c4ccad7 100644
--- a/include/asm-x86/socket.h
+++ b/include/asm-x86/socket.h
@@ -52,4 +52,6 @@
52#define SO_TIMESTAMPNS 35 52#define SO_TIMESTAMPNS 35
53#define SCM_TIMESTAMPNS SO_TIMESTAMPNS 53#define SCM_TIMESTAMPNS SO_TIMESTAMPNS
54 54
55#define SO_MARK 36
56
55#endif /* _ASM_SOCKET_H */ 57#endif /* _ASM_SOCKET_H */
diff --git a/include/asm-xtensa/socket.h b/include/asm-xtensa/socket.h
index 1f5aeacb9da2..6100682b1da2 100644
--- a/include/asm-xtensa/socket.h
+++ b/include/asm-xtensa/socket.h
@@ -63,4 +63,6 @@
63#define SO_TIMESTAMPNS 35 63#define SO_TIMESTAMPNS 35
64#define SCM_TIMESTAMPNS SO_TIMESTAMPNS 64#define SCM_TIMESTAMPNS SO_TIMESTAMPNS
65 65
66#define SO_MARK 36
67
66#endif /* _XTENSA_SOCKET_H */ 68#endif /* _XTENSA_SOCKET_H */
diff --git a/include/linux/inetdevice.h b/include/linux/inetdevice.h
index 8d9eaaebded7..fc4e3db649e8 100644
--- a/include/linux/inetdevice.h
+++ b/include/linux/inetdevice.h
@@ -17,8 +17,6 @@ struct ipv4_devconf
17 DECLARE_BITMAP(state, __NET_IPV4_CONF_MAX - 1); 17 DECLARE_BITMAP(state, __NET_IPV4_CONF_MAX - 1);
18}; 18};
19 19
20extern struct ipv4_devconf ipv4_devconf;
21
22struct in_device 20struct in_device
23{ 21{
24 struct net_device *dev; 22 struct net_device *dev;
diff --git a/include/linux/input.h b/include/linux/input.h
index 2075d6da2a31..056a17a4f34f 100644
--- a/include/linux/input.h
+++ b/include/linux/input.h
@@ -371,6 +371,8 @@ struct input_absinfo {
371#define KEY_BRIGHTNESS_ZERO 244 /* brightness off, use ambient */ 371#define KEY_BRIGHTNESS_ZERO 244 /* brightness off, use ambient */
372#define KEY_DISPLAY_OFF 245 /* display device to off state */ 372#define KEY_DISPLAY_OFF 245 /* display device to off state */
373 373
374#define KEY_WIMAX 246
375
374#define BTN_MISC 0x100 376#define BTN_MISC 0x100
375#define BTN_0 0x100 377#define BTN_0 0x100
376#define BTN_1 0x101 378#define BTN_1 0x101
diff --git a/include/linux/ipv6.h b/include/linux/ipv6.h
index 5d35a4cc3bff..4aaefc349a4b 100644
--- a/include/linux/ipv6.h
+++ b/include/linux/ipv6.h
@@ -457,14 +457,22 @@ static inline struct raw6_sock *raw6_sk(const struct sock *sk)
457#define inet_v6_ipv6only(__sk) 0 457#define inet_v6_ipv6only(__sk) 0
458#endif /* defined(CONFIG_IPV6) || defined(CONFIG_IPV6_MODULE) */ 458#endif /* defined(CONFIG_IPV6) || defined(CONFIG_IPV6_MODULE) */
459 459
460#define INET6_MATCH(__sk, __hash, __saddr, __daddr, __ports, __dif)\ 460#define INET6_MATCH(__sk, __net, __hash, __saddr, __daddr, __ports, __dif)\
461 (((__sk)->sk_hash == (__hash)) && \ 461 (((__sk)->sk_hash == (__hash)) && ((__sk)->sk_net == (__net)) && \
462 ((*((__portpair *)&(inet_sk(__sk)->dport))) == (__ports)) && \ 462 ((*((__portpair *)&(inet_sk(__sk)->dport))) == (__ports)) && \
463 ((__sk)->sk_family == AF_INET6) && \ 463 ((__sk)->sk_family == AF_INET6) && \
464 ipv6_addr_equal(&inet6_sk(__sk)->daddr, (__saddr)) && \ 464 ipv6_addr_equal(&inet6_sk(__sk)->daddr, (__saddr)) && \
465 ipv6_addr_equal(&inet6_sk(__sk)->rcv_saddr, (__daddr)) && \ 465 ipv6_addr_equal(&inet6_sk(__sk)->rcv_saddr, (__daddr)) && \
466 (!((__sk)->sk_bound_dev_if) || ((__sk)->sk_bound_dev_if == (__dif)))) 466 (!((__sk)->sk_bound_dev_if) || ((__sk)->sk_bound_dev_if == (__dif))))
467 467
468#define INET6_TW_MATCH(__sk, __net, __hash, __saddr, __daddr, __ports, __dif) \
469 (((__sk)->sk_hash == (__hash)) && ((__sk)->sk_net == (__net)) && \
470 (*((__portpair *)&(inet_twsk(__sk)->tw_dport)) == (__ports)) && \
471 ((__sk)->sk_family == PF_INET6) && \
472 (ipv6_addr_equal(&inet6_twsk(__sk)->tw_v6_daddr, (__saddr))) && \
473 (ipv6_addr_equal(&inet6_twsk(__sk)->tw_v6_rcv_saddr, (__daddr))) && \
474 (!((__sk)->sk_bound_dev_if) || ((__sk)->sk_bound_dev_if == (__dif))))
475
468#endif /* __KERNEL__ */ 476#endif /* __KERNEL__ */
469 477
470#endif /* _IPV6_H */ 478#endif /* _IPV6_H */
diff --git a/include/linux/netdevice.h b/include/linux/netdevice.h
index b0813c3286b1..047d432bde55 100644
--- a/include/linux/netdevice.h
+++ b/include/linux/netdevice.h
@@ -1414,12 +1414,16 @@ extern void dev_set_rx_mode(struct net_device *dev);
1414extern void __dev_set_rx_mode(struct net_device *dev); 1414extern void __dev_set_rx_mode(struct net_device *dev);
1415extern int dev_unicast_delete(struct net_device *dev, void *addr, int alen); 1415extern int dev_unicast_delete(struct net_device *dev, void *addr, int alen);
1416extern int dev_unicast_add(struct net_device *dev, void *addr, int alen); 1416extern int dev_unicast_add(struct net_device *dev, void *addr, int alen);
1417extern int dev_unicast_sync(struct net_device *to, struct net_device *from);
1418extern void dev_unicast_unsync(struct net_device *to, struct net_device *from);
1417extern int dev_mc_delete(struct net_device *dev, void *addr, int alen, int all); 1419extern int dev_mc_delete(struct net_device *dev, void *addr, int alen, int all);
1418extern int dev_mc_add(struct net_device *dev, void *addr, int alen, int newonly); 1420extern int dev_mc_add(struct net_device *dev, void *addr, int alen, int newonly);
1419extern int dev_mc_sync(struct net_device *to, struct net_device *from); 1421extern int dev_mc_sync(struct net_device *to, struct net_device *from);
1420extern void dev_mc_unsync(struct net_device *to, struct net_device *from); 1422extern void dev_mc_unsync(struct net_device *to, struct net_device *from);
1421extern int __dev_addr_delete(struct dev_addr_list **list, int *count, void *addr, int alen, int all); 1423extern int __dev_addr_delete(struct dev_addr_list **list, int *count, void *addr, int alen, int all);
1422extern int __dev_addr_add(struct dev_addr_list **list, int *count, void *addr, int alen, int newonly); 1424extern int __dev_addr_add(struct dev_addr_list **list, int *count, void *addr, int alen, int newonly);
1425extern int __dev_addr_sync(struct dev_addr_list **to, int *to_count, struct dev_addr_list **from, int *from_count);
1426extern void __dev_addr_unsync(struct dev_addr_list **to, int *to_count, struct dev_addr_list **from, int *from_count);
1423extern void dev_set_promiscuity(struct net_device *dev, int inc); 1427extern void dev_set_promiscuity(struct net_device *dev, int inc);
1424extern void dev_set_allmulti(struct net_device *dev, int inc); 1428extern void dev_set_allmulti(struct net_device *dev, int inc);
1425extern void netdev_state_change(struct net_device *dev); 1429extern void netdev_state_change(struct net_device *dev);
diff --git a/include/linux/netfilter/nf_conntrack_pptp.h b/include/linux/netfilter/nf_conntrack_pptp.h
index 23435496d24a..3bbde0c3a8a6 100644
--- a/include/linux/netfilter/nf_conntrack_pptp.h
+++ b/include/linux/netfilter/nf_conntrack_pptp.h
@@ -4,7 +4,7 @@
4 4
5#include <linux/netfilter/nf_conntrack_common.h> 5#include <linux/netfilter/nf_conntrack_common.h>
6 6
7extern const char *pptp_msg_name[]; 7extern const char *const pptp_msg_name[];
8 8
9/* state of the control session */ 9/* state of the control session */
10enum pptp_ctrlsess_state { 10enum pptp_ctrlsess_state {
diff --git a/include/linux/netfilter/nf_conntrack_sip.h b/include/linux/netfilter/nf_conntrack_sip.h
index 9fff19779bd5..8e5ce1ca7bfc 100644
--- a/include/linux/netfilter/nf_conntrack_sip.h
+++ b/include/linux/netfilter/nf_conntrack_sip.h
@@ -30,9 +30,9 @@ extern unsigned int (*nf_nat_sdp_hook)(struct sk_buff *skb,
30 struct nf_conntrack_expect *exp, 30 struct nf_conntrack_expect *exp,
31 const char *dptr); 31 const char *dptr);
32 32
33extern int ct_sip_get_info(struct nf_conn *ct, const char *dptr, size_t dlen, 33extern int ct_sip_get_info(const struct nf_conn *ct, const char *dptr,
34 unsigned int *matchoff, unsigned int *matchlen, 34 size_t dlen, unsigned int *matchoff,
35 enum sip_header_pos pos); 35 unsigned int *matchlen, enum sip_header_pos pos);
36extern int ct_sip_lnlen(const char *line, const char *limit); 36extern int ct_sip_lnlen(const char *line, const char *limit);
37extern const char *ct_sip_search(const char *needle, const char *haystack, 37extern const char *ct_sip_search(const char *needle, const char *haystack,
38 size_t needle_len, size_t haystack_len, 38 size_t needle_len, size_t haystack_len,
diff --git a/include/linux/netfilter/x_tables.h b/include/linux/netfilter/x_tables.h
index b99ede51318a..b2c62cc618f5 100644
--- a/include/linux/netfilter/x_tables.h
+++ b/include/linux/netfilter/x_tables.h
@@ -214,7 +214,7 @@ struct xt_match
214 /* Free to use by each match */ 214 /* Free to use by each match */
215 unsigned long data; 215 unsigned long data;
216 216
217 char *table; 217 const char *table;
218 unsigned int matchsize; 218 unsigned int matchsize;
219 unsigned int compatsize; 219 unsigned int compatsize;
220 unsigned int hooks; 220 unsigned int hooks;
@@ -261,7 +261,7 @@ struct xt_target
261 /* Set this to THIS_MODULE if you are a module, otherwise NULL */ 261 /* Set this to THIS_MODULE if you are a module, otherwise NULL */
262 struct module *me; 262 struct module *me;
263 263
264 char *table; 264 const char *table;
265 unsigned int targetsize; 265 unsigned int targetsize;
266 unsigned int compatsize; 266 unsigned int compatsize;
267 unsigned int hooks; 267 unsigned int hooks;
@@ -277,7 +277,7 @@ struct xt_table
277 struct list_head list; 277 struct list_head list;
278 278
279 /* A unique name... */ 279 /* A unique name... */
280 char name[XT_TABLE_MAXNAMELEN]; 280 const char name[XT_TABLE_MAXNAMELEN];
281 281
282 /* What hooks you will enter on */ 282 /* What hooks you will enter on */
283 unsigned int valid_hooks; 283 unsigned int valid_hooks;
@@ -335,9 +335,10 @@ extern int xt_check_target(const struct xt_target *target, unsigned short family
335 unsigned int size, const char *table, unsigned int hook, 335 unsigned int size, const char *table, unsigned int hook,
336 unsigned short proto, int inv_proto); 336 unsigned short proto, int inv_proto);
337 337
338extern int xt_register_table(struct xt_table *table, 338extern struct xt_table *xt_register_table(struct net *net,
339 struct xt_table_info *bootstrap, 339 struct xt_table *table,
340 struct xt_table_info *newinfo); 340 struct xt_table_info *bootstrap,
341 struct xt_table_info *newinfo);
341extern void *xt_unregister_table(struct xt_table *table); 342extern void *xt_unregister_table(struct xt_table *table);
342 343
343extern struct xt_table_info *xt_replace_table(struct xt_table *table, 344extern struct xt_table_info *xt_replace_table(struct xt_table *table,
@@ -352,11 +353,12 @@ extern struct xt_target *xt_request_find_target(int af, const char *name,
352extern int xt_find_revision(int af, const char *name, u8 revision, int target, 353extern int xt_find_revision(int af, const char *name, u8 revision, int target,
353 int *err); 354 int *err);
354 355
355extern struct xt_table *xt_find_table_lock(int af, const char *name); 356extern struct xt_table *xt_find_table_lock(struct net *net, int af,
357 const char *name);
356extern void xt_table_unlock(struct xt_table *t); 358extern void xt_table_unlock(struct xt_table *t);
357 359
358extern int xt_proto_init(int af); 360extern int xt_proto_init(struct net *net, int af);
359extern void xt_proto_fini(int af); 361extern void xt_proto_fini(struct net *net, int af);
360 362
361extern struct xt_table_info *xt_alloc_table_info(unsigned int size); 363extern struct xt_table_info *xt_alloc_table_info(unsigned int size);
362extern void xt_free_table_info(struct xt_table_info *info); 364extern void xt_free_table_info(struct xt_table_info *info);
@@ -430,15 +432,15 @@ extern short xt_compat_calc_jump(int af, unsigned int offset);
430 432
431extern int xt_compat_match_offset(struct xt_match *match); 433extern int xt_compat_match_offset(struct xt_match *match);
432extern int xt_compat_match_from_user(struct xt_entry_match *m, 434extern int xt_compat_match_from_user(struct xt_entry_match *m,
433 void **dstptr, int *size); 435 void **dstptr, unsigned int *size);
434extern int xt_compat_match_to_user(struct xt_entry_match *m, 436extern int xt_compat_match_to_user(struct xt_entry_match *m,
435 void __user **dstptr, int *size); 437 void __user **dstptr, unsigned int *size);
436 438
437extern int xt_compat_target_offset(struct xt_target *target); 439extern int xt_compat_target_offset(struct xt_target *target);
438extern void xt_compat_target_from_user(struct xt_entry_target *t, 440extern void xt_compat_target_from_user(struct xt_entry_target *t,
439 void **dstptr, int *size); 441 void **dstptr, unsigned int *size);
440extern int xt_compat_target_to_user(struct xt_entry_target *t, 442extern int xt_compat_target_to_user(struct xt_entry_target *t,
441 void __user **dstptr, int *size); 443 void __user **dstptr, unsigned int *size);
442 444
443#endif /* CONFIG_COMPAT */ 445#endif /* CONFIG_COMPAT */
444#endif /* __KERNEL__ */ 446#endif /* __KERNEL__ */
diff --git a/include/linux/netfilter/xt_conntrack.h b/include/linux/netfilter/xt_conntrack.h
index d2492a3329be..f3fd83e46bab 100644
--- a/include/linux/netfilter/xt_conntrack.h
+++ b/include/linux/netfilter/xt_conntrack.h
@@ -6,9 +6,6 @@
6#define _XT_CONNTRACK_H 6#define _XT_CONNTRACK_H
7 7
8#include <linux/netfilter/nf_conntrack_tuple_common.h> 8#include <linux/netfilter/nf_conntrack_tuple_common.h>
9#ifdef __KERNEL__
10# include <linux/in.h>
11#endif
12 9
13#define XT_CONNTRACK_STATE_BIT(ctinfo) (1 << ((ctinfo)%IP_CT_IS_REPLY+1)) 10#define XT_CONNTRACK_STATE_BIT(ctinfo) (1 << ((ctinfo)%IP_CT_IS_REPLY+1))
14#define XT_CONNTRACK_STATE_INVALID (1 << 0) 11#define XT_CONNTRACK_STATE_INVALID (1 << 0)
@@ -18,14 +15,21 @@
18#define XT_CONNTRACK_STATE_UNTRACKED (1 << (IP_CT_NUMBER + 3)) 15#define XT_CONNTRACK_STATE_UNTRACKED (1 << (IP_CT_NUMBER + 3))
19 16
20/* flags, invflags: */ 17/* flags, invflags: */
21#define XT_CONNTRACK_STATE 0x01 18enum {
22#define XT_CONNTRACK_PROTO 0x02 19 XT_CONNTRACK_STATE = 1 << 0,
23#define XT_CONNTRACK_ORIGSRC 0x04 20 XT_CONNTRACK_PROTO = 1 << 1,
24#define XT_CONNTRACK_ORIGDST 0x08 21 XT_CONNTRACK_ORIGSRC = 1 << 2,
25#define XT_CONNTRACK_REPLSRC 0x10 22 XT_CONNTRACK_ORIGDST = 1 << 3,
26#define XT_CONNTRACK_REPLDST 0x20 23 XT_CONNTRACK_REPLSRC = 1 << 4,
27#define XT_CONNTRACK_STATUS 0x40 24 XT_CONNTRACK_REPLDST = 1 << 5,
28#define XT_CONNTRACK_EXPIRES 0x80 25 XT_CONNTRACK_STATUS = 1 << 6,
26 XT_CONNTRACK_EXPIRES = 1 << 7,
27 XT_CONNTRACK_ORIGSRC_PORT = 1 << 8,
28 XT_CONNTRACK_ORIGDST_PORT = 1 << 9,
29 XT_CONNTRACK_REPLSRC_PORT = 1 << 10,
30 XT_CONNTRACK_REPLDST_PORT = 1 << 11,
31 XT_CONNTRACK_DIRECTION = 1 << 12,
32};
29 33
30/* This is exposed to userspace, so remains frozen in time. */ 34/* This is exposed to userspace, so remains frozen in time. */
31struct ip_conntrack_old_tuple 35struct ip_conntrack_old_tuple
@@ -70,8 +74,10 @@ struct xt_conntrack_mtinfo1 {
70 union nf_inet_addr repldst_addr, repldst_mask; 74 union nf_inet_addr repldst_addr, repldst_mask;
71 u_int32_t expires_min, expires_max; 75 u_int32_t expires_min, expires_max;
72 u_int16_t l4proto; 76 u_int16_t l4proto;
77 __be16 origsrc_port, origdst_port;
78 __be16 replsrc_port, repldst_port;
79 u_int16_t match_flags, invert_flags;
73 u_int8_t state_mask, status_mask; 80 u_int8_t state_mask, status_mask;
74 u_int8_t match_flags, invert_flags;
75}; 81};
76 82
77#endif /*_XT_CONNTRACK_H*/ 83#endif /*_XT_CONNTRACK_H*/
diff --git a/include/linux/netfilter/xt_hashlimit.h b/include/linux/netfilter/xt_hashlimit.h
index c19972e4564d..58b818ee41ca 100644
--- a/include/linux/netfilter/xt_hashlimit.h
+++ b/include/linux/netfilter/xt_hashlimit.h
@@ -9,13 +9,16 @@
9/* details of this structure hidden by the implementation */ 9/* details of this structure hidden by the implementation */
10struct xt_hashlimit_htable; 10struct xt_hashlimit_htable;
11 11
12#define XT_HASHLIMIT_HASH_DIP 0x0001 12enum {
13#define XT_HASHLIMIT_HASH_DPT 0x0002 13 XT_HASHLIMIT_HASH_DIP = 1 << 0,
14#define XT_HASHLIMIT_HASH_SIP 0x0004 14 XT_HASHLIMIT_HASH_DPT = 1 << 1,
15#define XT_HASHLIMIT_HASH_SPT 0x0008 15 XT_HASHLIMIT_HASH_SIP = 1 << 2,
16 XT_HASHLIMIT_HASH_SPT = 1 << 3,
17 XT_HASHLIMIT_INVERT = 1 << 4,
18};
16 19
17struct hashlimit_cfg { 20struct hashlimit_cfg {
18 u_int32_t mode; /* bitmask of IPT_HASHLIMIT_HASH_* */ 21 u_int32_t mode; /* bitmask of XT_HASHLIMIT_HASH_* */
19 u_int32_t avg; /* Average secs between packets * scale */ 22 u_int32_t avg; /* Average secs between packets * scale */
20 u_int32_t burst; /* Period multiplier for upper limit. */ 23 u_int32_t burst; /* Period multiplier for upper limit. */
21 24
@@ -37,4 +40,28 @@ struct xt_hashlimit_info {
37 struct xt_hashlimit_info *master; 40 struct xt_hashlimit_info *master;
38 } u; 41 } u;
39}; 42};
43
44struct hashlimit_cfg1 {
45 u_int32_t mode; /* bitmask of XT_HASHLIMIT_HASH_* */
46 u_int32_t avg; /* Average secs between packets * scale */
47 u_int32_t burst; /* Period multiplier for upper limit. */
48
49 /* user specified */
50 u_int32_t size; /* how many buckets */
51 u_int32_t max; /* max number of entries */
52 u_int32_t gc_interval; /* gc interval */
53 u_int32_t expire; /* when do entries expire? */
54
55 u_int8_t srcmask, dstmask;
56};
57
58struct xt_hashlimit_mtinfo1 {
59 char name[IFNAMSIZ];
60 struct hashlimit_cfg1 cfg;
61
62 /* Used internally by the kernel */
63 struct xt_hashlimit_htable *hinfo __attribute__((aligned(8)));
64 struct xt_hashlimit_mtinfo1 *master __attribute__((aligned(8)));
65};
66
40#endif /*_XT_HASHLIMIT_H*/ 67#endif /*_XT_HASHLIMIT_H*/
diff --git a/include/linux/netfilter/xt_owner.h b/include/linux/netfilter/xt_owner.h
index eacd34efebd5..c84e52cfe415 100644
--- a/include/linux/netfilter/xt_owner.h
+++ b/include/linux/netfilter/xt_owner.h
@@ -8,8 +8,8 @@ enum {
8}; 8};
9 9
10struct xt_owner_match_info { 10struct xt_owner_match_info {
11 u_int32_t uid; 11 u_int32_t uid_min, uid_max;
12 u_int32_t gid; 12 u_int32_t gid_min, gid_max;
13 u_int8_t match, invert; 13 u_int8_t match, invert;
14}; 14};
15 15
diff --git a/include/linux/netfilter_arp/arp_tables.h b/include/linux/netfilter_arp/arp_tables.h
index 53dd4df27aa1..db223ca92c8b 100644
--- a/include/linux/netfilter_arp/arp_tables.h
+++ b/include/linux/netfilter_arp/arp_tables.h
@@ -271,8 +271,9 @@ struct arpt_error
271 xt_register_target(tgt); }) 271 xt_register_target(tgt); })
272#define arpt_unregister_target(tgt) xt_unregister_target(tgt) 272#define arpt_unregister_target(tgt) xt_unregister_target(tgt)
273 273
274extern int arpt_register_table(struct arpt_table *table, 274extern struct arpt_table *arpt_register_table(struct net *net,
275 const struct arpt_replace *repl); 275 struct arpt_table *table,
276 const struct arpt_replace *repl);
276extern void arpt_unregister_table(struct arpt_table *table); 277extern void arpt_unregister_table(struct arpt_table *table);
277extern unsigned int arpt_do_table(struct sk_buff *skb, 278extern unsigned int arpt_do_table(struct sk_buff *skb,
278 unsigned int hook, 279 unsigned int hook,
diff --git a/include/linux/netfilter_ipv4/ip_tables.h b/include/linux/netfilter_ipv4/ip_tables.h
index 45fcad91e67b..bfc889f90276 100644
--- a/include/linux/netfilter_ipv4/ip_tables.h
+++ b/include/linux/netfilter_ipv4/ip_tables.h
@@ -244,8 +244,9 @@ ipt_get_target(struct ipt_entry *e)
244#include <linux/init.h> 244#include <linux/init.h>
245extern void ipt_init(void) __init; 245extern void ipt_init(void) __init;
246 246
247extern int ipt_register_table(struct xt_table *table, 247extern struct xt_table *ipt_register_table(struct net *net,
248 const struct ipt_replace *repl); 248 struct xt_table *table,
249 const struct ipt_replace *repl);
249extern void ipt_unregister_table(struct xt_table *table); 250extern void ipt_unregister_table(struct xt_table *table);
250 251
251/* Standard entry. */ 252/* Standard entry. */
diff --git a/include/linux/netfilter_ipv6/ip6_tables.h b/include/linux/netfilter_ipv6/ip6_tables.h
index 110801d699ee..f2507dcc5750 100644
--- a/include/linux/netfilter_ipv6/ip6_tables.h
+++ b/include/linux/netfilter_ipv6/ip6_tables.h
@@ -305,8 +305,9 @@ ip6t_get_target(struct ip6t_entry *e)
305#include <linux/init.h> 305#include <linux/init.h>
306extern void ip6t_init(void) __init; 306extern void ip6t_init(void) __init;
307 307
308extern int ip6t_register_table(struct xt_table *table, 308extern struct xt_table *ip6t_register_table(struct net *net,
309 const struct ip6t_replace *repl); 309 struct xt_table *table,
310 const struct ip6t_replace *repl);
310extern void ip6t_unregister_table(struct xt_table *table); 311extern void ip6t_unregister_table(struct xt_table *table);
311extern unsigned int ip6t_do_table(struct sk_buff *skb, 312extern unsigned int ip6t_do_table(struct sk_buff *skb,
312 unsigned int hook, 313 unsigned int hook,
diff --git a/include/linux/netlink.h b/include/linux/netlink.h
index bd13b6f4a98e..fb0713b6ffaf 100644
--- a/include/linux/netlink.h
+++ b/include/linux/netlink.h
@@ -219,7 +219,7 @@ struct netlink_callback
219 int (*dump)(struct sk_buff * skb, struct netlink_callback *cb); 219 int (*dump)(struct sk_buff * skb, struct netlink_callback *cb);
220 int (*done)(struct netlink_callback *cb); 220 int (*done)(struct netlink_callback *cb);
221 int family; 221 int family;
222 long args[5]; 222 long args[6];
223}; 223};
224 224
225struct netlink_notify 225struct netlink_notify
diff --git a/include/linux/pfkeyv2.h b/include/linux/pfkeyv2.h
index d9db5f62ee48..6db69ff5d83e 100644
--- a/include/linux/pfkeyv2.h
+++ b/include/linux/pfkeyv2.h
@@ -298,6 +298,12 @@ struct sadb_x_sec_ctx {
298#define SADB_X_EALG_BLOWFISHCBC 7 298#define SADB_X_EALG_BLOWFISHCBC 7
299#define SADB_EALG_NULL 11 299#define SADB_EALG_NULL 11
300#define SADB_X_EALG_AESCBC 12 300#define SADB_X_EALG_AESCBC 12
301#define SADB_X_EALG_AES_CCM_ICV8 14
302#define SADB_X_EALG_AES_CCM_ICV12 15
303#define SADB_X_EALG_AES_CCM_ICV16 16
304#define SADB_X_EALG_AES_GCM_ICV8 18
305#define SADB_X_EALG_AES_GCM_ICV12 19
306#define SADB_X_EALG_AES_GCM_ICV16 20
301#define SADB_X_EALG_CAMELLIACBC 22 307#define SADB_X_EALG_CAMELLIACBC 22
302#define SADB_EALG_MAX 253 /* last EALG */ 308#define SADB_EALG_MAX 253 /* last EALG */
303/* private allocations should use 249-255 (RFC2407) */ 309/* private allocations should use 249-255 (RFC2407) */
diff --git a/include/linux/pkt_cls.h b/include/linux/pkt_cls.h
index 30b8571e6b34..1c1dba9ea5fb 100644
--- a/include/linux/pkt_cls.h
+++ b/include/linux/pkt_cls.h
@@ -328,6 +328,56 @@ enum
328 328
329#define TCA_TCINDEX_MAX (__TCA_TCINDEX_MAX - 1) 329#define TCA_TCINDEX_MAX (__TCA_TCINDEX_MAX - 1)
330 330
331/* Flow filter */
332
333enum
334{
335 FLOW_KEY_SRC,
336 FLOW_KEY_DST,
337 FLOW_KEY_PROTO,
338 FLOW_KEY_PROTO_SRC,
339 FLOW_KEY_PROTO_DST,
340 FLOW_KEY_IIF,
341 FLOW_KEY_PRIORITY,
342 FLOW_KEY_MARK,
343 FLOW_KEY_NFCT,
344 FLOW_KEY_NFCT_SRC,
345 FLOW_KEY_NFCT_DST,
346 FLOW_KEY_NFCT_PROTO_SRC,
347 FLOW_KEY_NFCT_PROTO_DST,
348 FLOW_KEY_RTCLASSID,
349 FLOW_KEY_SKUID,
350 FLOW_KEY_SKGID,
351 __FLOW_KEY_MAX,
352};
353
354#define FLOW_KEY_MAX (__FLOW_KEY_MAX - 1)
355
356enum
357{
358 FLOW_MODE_MAP,
359 FLOW_MODE_HASH,
360};
361
362enum
363{
364 TCA_FLOW_UNSPEC,
365 TCA_FLOW_KEYS,
366 TCA_FLOW_MODE,
367 TCA_FLOW_BASECLASS,
368 TCA_FLOW_RSHIFT,
369 TCA_FLOW_ADDEND,
370 TCA_FLOW_MASK,
371 TCA_FLOW_XOR,
372 TCA_FLOW_DIVISOR,
373 TCA_FLOW_ACT,
374 TCA_FLOW_POLICE,
375 TCA_FLOW_EMATCHES,
376 __TCA_FLOW_MAX
377};
378
379#define TCA_FLOW_MAX (__TCA_FLOW_MAX - 1)
380
331/* Basic filter */ 381/* Basic filter */
332 382
333enum 383enum
diff --git a/include/linux/pkt_sched.h b/include/linux/pkt_sched.h
index 32761352e858..dbb7ac37960d 100644
--- a/include/linux/pkt_sched.h
+++ b/include/linux/pkt_sched.h
@@ -150,6 +150,11 @@ struct tc_sfq_qopt
150 unsigned flows; /* Maximal number of flows */ 150 unsigned flows; /* Maximal number of flows */
151}; 151};
152 152
153struct tc_sfq_xstats
154{
155 __s32 allot;
156};
157
153/* 158/*
154 * NOTE: limit, divisor and flows are hardwired to code at the moment. 159 * NOTE: limit, divisor and flows are hardwired to code at the moment.
155 * 160 *
diff --git a/include/linux/rfkill.h b/include/linux/rfkill.h
index 0ce5e0b52dbd..e3ab21d7fc7f 100644
--- a/include/linux/rfkill.h
+++ b/include/linux/rfkill.h
@@ -33,11 +33,13 @@
33 * RFKILL_TYPE_WLAN: switch is on a 802.11 wireless network device. 33 * RFKILL_TYPE_WLAN: switch is on a 802.11 wireless network device.
34 * RFKILL_TYPE_BLUETOOTH: switch is on a bluetooth device. 34 * RFKILL_TYPE_BLUETOOTH: switch is on a bluetooth device.
35 * RFKILL_TYPE_UWB: switch is on a ultra wideband device. 35 * RFKILL_TYPE_UWB: switch is on a ultra wideband device.
36 * RFKILL_TYPE_WIMAX: switch is on a WiMAX device.
36 */ 37 */
37enum rfkill_type { 38enum rfkill_type {
38 RFKILL_TYPE_WLAN , 39 RFKILL_TYPE_WLAN ,
39 RFKILL_TYPE_BLUETOOTH, 40 RFKILL_TYPE_BLUETOOTH,
40 RFKILL_TYPE_UWB, 41 RFKILL_TYPE_UWB,
42 RFKILL_TYPE_WIMAX,
41 RFKILL_TYPE_MAX, 43 RFKILL_TYPE_MAX,
42}; 44};
43 45
diff --git a/include/linux/skbuff.h b/include/linux/skbuff.h
index c618fbf7d173..dfe975a9967e 100644
--- a/include/linux/skbuff.h
+++ b/include/linux/skbuff.h
@@ -108,9 +108,6 @@ struct nf_bridge_info {
108 atomic_t use; 108 atomic_t use;
109 struct net_device *physindev; 109 struct net_device *physindev;
110 struct net_device *physoutdev; 110 struct net_device *physoutdev;
111#if defined(CONFIG_VLAN_8021Q) || defined(CONFIG_VLAN_8021Q_MODULE)
112 struct net_device *netoutdev;
113#endif
114 unsigned int mask; 111 unsigned int mask;
115 unsigned long data[32 / sizeof(unsigned long)]; 112 unsigned long data[32 / sizeof(unsigned long)];
116}; 113};
diff --git a/include/linux/snmp.h b/include/linux/snmp.h
index 86d3effb2836..5df62ef1280c 100644
--- a/include/linux/snmp.h
+++ b/include/linux/snmp.h
@@ -227,7 +227,7 @@ enum
227 LINUX_MIB_XFRMINNOSTATES, /* XfrmInNoStates */ 227 LINUX_MIB_XFRMINNOSTATES, /* XfrmInNoStates */
228 LINUX_MIB_XFRMINSTATEPROTOERROR, /* XfrmInStateProtoError */ 228 LINUX_MIB_XFRMINSTATEPROTOERROR, /* XfrmInStateProtoError */
229 LINUX_MIB_XFRMINSTATEMODEERROR, /* XfrmInStateModeError */ 229 LINUX_MIB_XFRMINSTATEMODEERROR, /* XfrmInStateModeError */
230 LINUX_MIB_XFRMINSEQOUTOFWINDOW, /* XfrmInSeqOutOfWindow */ 230 LINUX_MIB_XFRMINSTATESEQERROR, /* XfrmInStateSeqError */
231 LINUX_MIB_XFRMINSTATEEXPIRED, /* XfrmInStateExpired */ 231 LINUX_MIB_XFRMINSTATEEXPIRED, /* XfrmInStateExpired */
232 LINUX_MIB_XFRMINSTATEMISMATCH, /* XfrmInStateMismatch */ 232 LINUX_MIB_XFRMINSTATEMISMATCH, /* XfrmInStateMismatch */
233 LINUX_MIB_XFRMINSTATEINVALID, /* XfrmInStateInvalid */ 233 LINUX_MIB_XFRMINSTATEINVALID, /* XfrmInStateInvalid */
@@ -241,6 +241,7 @@ enum
241 LINUX_MIB_XFRMOUTNOSTATES, /* XfrmOutNoStates */ 241 LINUX_MIB_XFRMOUTNOSTATES, /* XfrmOutNoStates */
242 LINUX_MIB_XFRMOUTSTATEPROTOERROR, /* XfrmOutStateProtoError */ 242 LINUX_MIB_XFRMOUTSTATEPROTOERROR, /* XfrmOutStateProtoError */
243 LINUX_MIB_XFRMOUTSTATEMODEERROR, /* XfrmOutStateModeError */ 243 LINUX_MIB_XFRMOUTSTATEMODEERROR, /* XfrmOutStateModeError */
244 LINUX_MIB_XFRMOUTSTATESEQERROR, /* XfrmOutStateSeqError */
244 LINUX_MIB_XFRMOUTSTATEEXPIRED, /* XfrmOutStateExpired */ 245 LINUX_MIB_XFRMOUTSTATEEXPIRED, /* XfrmOutStateExpired */
245 LINUX_MIB_XFRMOUTPOLBLOCK, /* XfrmOutPolBlock */ 246 LINUX_MIB_XFRMOUTPOLBLOCK, /* XfrmOutPolBlock */
246 LINUX_MIB_XFRMOUTPOLDEAD, /* XfrmOutPolDead */ 247 LINUX_MIB_XFRMOUTPOLDEAD, /* XfrmOutPolDead */
diff --git a/include/linux/sysctl.h b/include/linux/sysctl.h
index 89faebfe48b8..bf4ae4e138f7 100644
--- a/include/linux/sysctl.h
+++ b/include/linux/sysctl.h
@@ -440,8 +440,8 @@ enum
440 440
441enum { 441enum {
442 NET_IPV4_ROUTE_FLUSH=1, 442 NET_IPV4_ROUTE_FLUSH=1,
443 NET_IPV4_ROUTE_MIN_DELAY=2, 443 NET_IPV4_ROUTE_MIN_DELAY=2, /* obsolete since 2.6.25 */
444 NET_IPV4_ROUTE_MAX_DELAY=3, 444 NET_IPV4_ROUTE_MAX_DELAY=3, /* obsolete since 2.6.25 */
445 NET_IPV4_ROUTE_GC_THRESH=4, 445 NET_IPV4_ROUTE_GC_THRESH=4,
446 NET_IPV4_ROUTE_MAX_SIZE=5, 446 NET_IPV4_ROUTE_MAX_SIZE=5,
447 NET_IPV4_ROUTE_GC_MIN_INTERVAL=6, 447 NET_IPV4_ROUTE_GC_MIN_INTERVAL=6,
diff --git a/include/linux/types.h b/include/linux/types.h
index f4f8d19158e4..b94c0e4efe24 100644
--- a/include/linux/types.h
+++ b/include/linux/types.h
@@ -126,7 +126,7 @@ typedef __s64 int64_t;
126#endif 126#endif
127 127
128/* this is a special 64bit data type that is 8-byte aligned */ 128/* this is a special 64bit data type that is 8-byte aligned */
129#define aligned_u64 unsigned long long __attribute__((aligned(8))) 129#define aligned_u64 __u64 __attribute__((aligned(8)))
130#define aligned_be64 __be64 __attribute__((aligned(8))) 130#define aligned_be64 __be64 __attribute__((aligned(8)))
131#define aligned_le64 __le64 __attribute__((aligned(8))) 131#define aligned_le64 __le64 __attribute__((aligned(8)))
132 132
diff --git a/include/linux/usb/rndis_host.h b/include/linux/usb/rndis_host.h
new file mode 100644
index 000000000000..edc1d4a0e272
--- /dev/null
+++ b/include/linux/usb/rndis_host.h
@@ -0,0 +1,274 @@
1/*
2 * Host Side support for RNDIS Networking Links
3 * Copyright (C) 2005 by David Brownell
4 *
5 * This program is free software; you can redistribute it and/or modify
6 * it under the terms of the GNU General Public License as published by
7 * the Free Software Foundation; either version 2 of the License, or
8 * (at your option) any later version.
9 *
10 * This program is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 * GNU General Public License for more details.
14 *
15 * You should have received a copy of the GNU General Public License
16 * along with this program; if not, write to the Free Software
17 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
18 */
19
20
21#ifndef __RNDIS_HOST_H
22#define __RNDIS_HOST_H
23
24
25/*
26 * CONTROL uses CDC "encapsulated commands" with funky notifications.
27 * - control-out: SEND_ENCAPSULATED
28 * - interrupt-in: RESPONSE_AVAILABLE
29 * - control-in: GET_ENCAPSULATED
30 *
31 * We'll try to ignore the RESPONSE_AVAILABLE notifications.
32 *
33 * REVISIT some RNDIS implementations seem to have curious issues still
34 * to be resolved.
35 */
36struct rndis_msg_hdr {
37 __le32 msg_type; /* RNDIS_MSG_* */
38 __le32 msg_len;
39 // followed by data that varies between messages
40 __le32 request_id;
41 __le32 status;
42 // ... and more
43} __attribute__ ((packed));
44
45/* MS-Windows uses this strange size, but RNDIS spec says 1024 minimum */
46#define CONTROL_BUFFER_SIZE 1025
47
48/* RNDIS defines an (absurdly huge) 10 second control timeout,
49 * but ActiveSync seems to use a more usual 5 second timeout
50 * (which matches the USB 2.0 spec).
51 */
52#define RNDIS_CONTROL_TIMEOUT_MS (5 * 1000)
53
54
55#define ccpu2 __constant_cpu_to_le32
56
57#define RNDIS_MSG_COMPLETION ccpu2(0x80000000)
58
59/* codes for "msg_type" field of rndis messages;
60 * only the data channel uses packet messages (maybe batched);
61 * everything else goes on the control channel.
62 */
63#define RNDIS_MSG_PACKET ccpu2(0x00000001) /* 1-N packets */
64#define RNDIS_MSG_INIT ccpu2(0x00000002)
65#define RNDIS_MSG_INIT_C (RNDIS_MSG_INIT|RNDIS_MSG_COMPLETION)
66#define RNDIS_MSG_HALT ccpu2(0x00000003)
67#define RNDIS_MSG_QUERY ccpu2(0x00000004)
68#define RNDIS_MSG_QUERY_C (RNDIS_MSG_QUERY|RNDIS_MSG_COMPLETION)
69#define RNDIS_MSG_SET ccpu2(0x00000005)
70#define RNDIS_MSG_SET_C (RNDIS_MSG_SET|RNDIS_MSG_COMPLETION)
71#define RNDIS_MSG_RESET ccpu2(0x00000006)
72#define RNDIS_MSG_RESET_C (RNDIS_MSG_RESET|RNDIS_MSG_COMPLETION)
73#define RNDIS_MSG_INDICATE ccpu2(0x00000007)
74#define RNDIS_MSG_KEEPALIVE ccpu2(0x00000008)
75#define RNDIS_MSG_KEEPALIVE_C (RNDIS_MSG_KEEPALIVE|RNDIS_MSG_COMPLETION)
76
77/* codes for "status" field of completion messages */
78#define RNDIS_STATUS_SUCCESS ccpu2(0x00000000)
79#define RNDIS_STATUS_FAILURE ccpu2(0xc0000001)
80#define RNDIS_STATUS_INVALID_DATA ccpu2(0xc0010015)
81#define RNDIS_STATUS_NOT_SUPPORTED ccpu2(0xc00000bb)
82#define RNDIS_STATUS_MEDIA_CONNECT ccpu2(0x4001000b)
83#define RNDIS_STATUS_MEDIA_DISCONNECT ccpu2(0x4001000c)
84
85/* codes for OID_GEN_PHYSICAL_MEDIUM */
86#define RNDIS_PHYSICAL_MEDIUM_UNSPECIFIED ccpu2(0x00000000)
87#define RNDIS_PHYSICAL_MEDIUM_WIRELESS_LAN ccpu2(0x00000001)
88#define RNDIS_PHYSICAL_MEDIUM_CABLE_MODEM ccpu2(0x00000002)
89#define RNDIS_PHYSICAL_MEDIUM_PHONE_LINE ccpu2(0x00000003)
90#define RNDIS_PHYSICAL_MEDIUM_POWER_LINE ccpu2(0x00000004)
91#define RNDIS_PHYSICAL_MEDIUM_DSL ccpu2(0x00000005)
92#define RNDIS_PHYSICAL_MEDIUM_FIBRE_CHANNEL ccpu2(0x00000006)
93#define RNDIS_PHYSICAL_MEDIUM_1394 ccpu2(0x00000007)
94#define RNDIS_PHYSICAL_MEDIUM_WIRELESS_WAN ccpu2(0x00000008)
95#define RNDIS_PHYSICAL_MEDIUM_MAX ccpu2(0x00000009)
96
97struct rndis_data_hdr {
98 __le32 msg_type; /* RNDIS_MSG_PACKET */
99 __le32 msg_len; // rndis_data_hdr + data_len + pad
100 __le32 data_offset; // 36 -- right after header
101 __le32 data_len; // ... real packet size
102
103 __le32 oob_data_offset; // zero
104 __le32 oob_data_len; // zero
105 __le32 num_oob; // zero
106 __le32 packet_data_offset; // zero
107
108 __le32 packet_data_len; // zero
109 __le32 vc_handle; // zero
110 __le32 reserved; // zero
111} __attribute__ ((packed));
112
113struct rndis_init { /* OUT */
114 // header and:
115 __le32 msg_type; /* RNDIS_MSG_INIT */
116 __le32 msg_len; // 24
117 __le32 request_id;
118 __le32 major_version; // of rndis (1.0)
119 __le32 minor_version;
120 __le32 max_transfer_size;
121} __attribute__ ((packed));
122
123struct rndis_init_c { /* IN */
124 // header and:
125 __le32 msg_type; /* RNDIS_MSG_INIT_C */
126 __le32 msg_len;
127 __le32 request_id;
128 __le32 status;
129 __le32 major_version; // of rndis (1.0)
130 __le32 minor_version;
131 __le32 device_flags;
132 __le32 medium; // zero == 802.3
133 __le32 max_packets_per_message;
134 __le32 max_transfer_size;
135 __le32 packet_alignment; // max 7; (1<<n) bytes
136 __le32 af_list_offset; // zero
137 __le32 af_list_size; // zero
138} __attribute__ ((packed));
139
140struct rndis_halt { /* OUT (no reply) */
141 // header and:
142 __le32 msg_type; /* RNDIS_MSG_HALT */
143 __le32 msg_len;
144 __le32 request_id;
145} __attribute__ ((packed));
146
147struct rndis_query { /* OUT */
148 // header and:
149 __le32 msg_type; /* RNDIS_MSG_QUERY */
150 __le32 msg_len;
151 __le32 request_id;
152 __le32 oid;
153 __le32 len;
154 __le32 offset;
155/*?*/ __le32 handle; // zero
156} __attribute__ ((packed));
157
158struct rndis_query_c { /* IN */
159 // header and:
160 __le32 msg_type; /* RNDIS_MSG_QUERY_C */
161 __le32 msg_len;
162 __le32 request_id;
163 __le32 status;
164 __le32 len;
165 __le32 offset;
166} __attribute__ ((packed));
167
168struct rndis_set { /* OUT */
169 // header and:
170 __le32 msg_type; /* RNDIS_MSG_SET */
171 __le32 msg_len;
172 __le32 request_id;
173 __le32 oid;
174 __le32 len;
175 __le32 offset;
176/*?*/ __le32 handle; // zero
177} __attribute__ ((packed));
178
179struct rndis_set_c { /* IN */
180 // header and:
181 __le32 msg_type; /* RNDIS_MSG_SET_C */
182 __le32 msg_len;
183 __le32 request_id;
184 __le32 status;
185} __attribute__ ((packed));
186
187struct rndis_reset { /* IN */
188 // header and:
189 __le32 msg_type; /* RNDIS_MSG_RESET */
190 __le32 msg_len;
191 __le32 reserved;
192} __attribute__ ((packed));
193
194struct rndis_reset_c { /* OUT */
195 // header and:
196 __le32 msg_type; /* RNDIS_MSG_RESET_C */
197 __le32 msg_len;
198 __le32 status;
199 __le32 addressing_lost;
200} __attribute__ ((packed));
201
202struct rndis_indicate { /* IN (unrequested) */
203 // header and:
204 __le32 msg_type; /* RNDIS_MSG_INDICATE */
205 __le32 msg_len;
206 __le32 status;
207 __le32 length;
208 __le32 offset;
209/**/ __le32 diag_status;
210 __le32 error_offset;
211/**/ __le32 message;
212} __attribute__ ((packed));
213
214struct rndis_keepalive { /* OUT (optionally IN) */
215 // header and:
216 __le32 msg_type; /* RNDIS_MSG_KEEPALIVE */
217 __le32 msg_len;
218 __le32 request_id;
219} __attribute__ ((packed));
220
221struct rndis_keepalive_c { /* IN (optionally OUT) */
222 // header and:
223 __le32 msg_type; /* RNDIS_MSG_KEEPALIVE_C */
224 __le32 msg_len;
225 __le32 request_id;
226 __le32 status;
227} __attribute__ ((packed));
228
229/* NOTE: about 30 OIDs are "mandatory" for peripherals to support ... and
230 * there are gobs more that may optionally be supported. We'll avoid as much
231 * of that mess as possible.
232 */
233#define OID_802_3_PERMANENT_ADDRESS ccpu2(0x01010101)
234#define OID_GEN_MAXIMUM_FRAME_SIZE ccpu2(0x00010106)
235#define OID_GEN_CURRENT_PACKET_FILTER ccpu2(0x0001010e)
236#define OID_GEN_PHYSICAL_MEDIUM ccpu2(0x00010202)
237
238/* packet filter bits used by OID_GEN_CURRENT_PACKET_FILTER */
239#define RNDIS_PACKET_TYPE_DIRECTED ccpu2(0x00000001)
240#define RNDIS_PACKET_TYPE_MULTICAST ccpu2(0x00000002)
241#define RNDIS_PACKET_TYPE_ALL_MULTICAST ccpu2(0x00000004)
242#define RNDIS_PACKET_TYPE_BROADCAST ccpu2(0x00000008)
243#define RNDIS_PACKET_TYPE_SOURCE_ROUTING ccpu2(0x00000010)
244#define RNDIS_PACKET_TYPE_PROMISCUOUS ccpu2(0x00000020)
245#define RNDIS_PACKET_TYPE_SMT ccpu2(0x00000040)
246#define RNDIS_PACKET_TYPE_ALL_LOCAL ccpu2(0x00000080)
247#define RNDIS_PACKET_TYPE_GROUP ccpu2(0x00001000)
248#define RNDIS_PACKET_TYPE_ALL_FUNCTIONAL ccpu2(0x00002000)
249#define RNDIS_PACKET_TYPE_FUNCTIONAL ccpu2(0x00004000)
250#define RNDIS_PACKET_TYPE_MAC_FRAME ccpu2(0x00008000)
251
252/* default filter used with RNDIS devices */
253#define RNDIS_DEFAULT_FILTER ( \
254 RNDIS_PACKET_TYPE_DIRECTED | \
255 RNDIS_PACKET_TYPE_BROADCAST | \
256 RNDIS_PACKET_TYPE_ALL_MULTICAST | \
257 RNDIS_PACKET_TYPE_PROMISCUOUS)
258
259/* Flags to require specific physical medium type for generic_rndis_bind() */
260#define FLAG_RNDIS_PHYM_NOT_WIRELESS 0x0001
261#define FLAG_RNDIS_PHYM_WIRELESS 0x0002
262
263
264extern void rndis_status(struct usbnet *dev, struct urb *urb);
265extern int rndis_command(struct usbnet *dev, struct rndis_msg_hdr *buf);
266extern int
267generic_rndis_bind(struct usbnet *dev, struct usb_interface *intf, int flags);
268extern void rndis_unbind(struct usbnet *dev, struct usb_interface *intf);
269extern int rndis_rx_fixup(struct usbnet *dev, struct sk_buff *skb);
270extern struct sk_buff *
271rndis_tx_fixup(struct usbnet *dev, struct sk_buff *skb, gfp_t flags);
272
273#endif /* __RNDIS_HOST_H */
274
diff --git a/include/linux/usb/usbnet.h b/include/linux/usb/usbnet.h
new file mode 100644
index 000000000000..e0501da3dd11
--- /dev/null
+++ b/include/linux/usb/usbnet.h
@@ -0,0 +1,214 @@
1/*
2 * USB Networking Link Interface
3 *
4 * Copyright (C) 2000-2005 by David Brownell <dbrownell@users.sourceforge.net>
5 * Copyright (C) 2003-2005 David Hollis <dhollis@davehollis.com>
6 *
7 * This program is free software; you can redistribute it and/or modify
8 * it under the terms of the GNU General Public License as published by
9 * the Free Software Foundation; either version 2 of the License, or
10 * (at your option) any later version.
11 *
12 * This program is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 * GNU General Public License for more details.
16 *
17 * You should have received a copy of the GNU General Public License
18 * along with this program; if not, write to the Free Software
19 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
20 */
21
22
23#ifndef __USBNET_H
24#define __USBNET_H
25
26
27/* interface from usbnet core to each USB networking link we handle */
28struct usbnet {
29 /* housekeeping */
30 struct usb_device *udev;
31 struct usb_interface *intf;
32 struct driver_info *driver_info;
33 const char *driver_name;
34 void *driver_priv;
35 wait_queue_head_t *wait;
36 struct mutex phy_mutex;
37 unsigned char suspend_count;
38
39 /* i/o info: pipes etc */
40 unsigned in, out;
41 struct usb_host_endpoint *status;
42 unsigned maxpacket;
43 struct timer_list delay;
44
45 /* protocol/interface state */
46 struct net_device *net;
47 struct net_device_stats stats;
48 int msg_enable;
49 unsigned long data [5];
50 u32 xid;
51 u32 hard_mtu; /* count any extra framing */
52 size_t rx_urb_size; /* size for rx urbs */
53 struct mii_if_info mii;
54
55 /* various kinds of pending driver work */
56 struct sk_buff_head rxq;
57 struct sk_buff_head txq;
58 struct sk_buff_head done;
59 struct urb *interrupt;
60 struct tasklet_struct bh;
61
62 struct work_struct kevent;
63 unsigned long flags;
64# define EVENT_TX_HALT 0
65# define EVENT_RX_HALT 1
66# define EVENT_RX_MEMORY 2
67# define EVENT_STS_SPLIT 3
68# define EVENT_LINK_RESET 4
69};
70
71static inline struct usb_driver *driver_of(struct usb_interface *intf)
72{
73 return to_usb_driver(intf->dev.driver);
74}
75
76/* interface from the device/framing level "minidriver" to core */
77struct driver_info {
78 char *description;
79
80 int flags;
81/* framing is CDC Ethernet, not writing ZLPs (hw issues), or optionally: */
82#define FLAG_FRAMING_NC 0x0001 /* guard against device dropouts */
83#define FLAG_FRAMING_GL 0x0002 /* genelink batches packets */
84#define FLAG_FRAMING_Z 0x0004 /* zaurus adds a trailer */
85#define FLAG_FRAMING_RN 0x0008 /* RNDIS batches, plus huge header */
86
87#define FLAG_NO_SETINT 0x0010 /* device can't set_interface() */
88#define FLAG_ETHER 0x0020 /* maybe use "eth%d" names */
89
90#define FLAG_FRAMING_AX 0x0040 /* AX88772/178 packets */
91#define FLAG_WLAN 0x0080 /* use "wlan%d" names */
92
93
94 /* init device ... can sleep, or cause probe() failure */
95 int (*bind)(struct usbnet *, struct usb_interface *);
96
97 /* cleanup device ... can sleep, but can't fail */
98 void (*unbind)(struct usbnet *, struct usb_interface *);
99
100 /* reset device ... can sleep */
101 int (*reset)(struct usbnet *);
102
103 /* see if peer is connected ... can sleep */
104 int (*check_connect)(struct usbnet *);
105
106 /* for status polling */
107 void (*status)(struct usbnet *, struct urb *);
108
109 /* link reset handling, called from defer_kevent */
110 int (*link_reset)(struct usbnet *);
111
112 /* fixup rx packet (strip framing) */
113 int (*rx_fixup)(struct usbnet *dev, struct sk_buff *skb);
114
115 /* fixup tx packet (add framing) */
116 struct sk_buff *(*tx_fixup)(struct usbnet *dev,
117 struct sk_buff *skb, gfp_t flags);
118
119 /* early initialization code, can sleep. This is for minidrivers
120 * having 'subminidrivers' that need to do extra initialization
121 * right after minidriver have initialized hardware. */
122 int (*early_init)(struct usbnet *dev);
123
124 /* called by minidriver when link state changes, state: 0=disconnect,
125 * 1=connect */
126 void (*link_change)(struct usbnet *dev, int state);
127
128 /* for new devices, use the descriptor-reading code instead */
129 int in; /* rx endpoint */
130 int out; /* tx endpoint */
131
132 unsigned long data; /* Misc driver specific data */
133};
134
135/* Minidrivers are just drivers using the "usbnet" core as a powerful
136 * network-specific subroutine library ... that happens to do pretty
137 * much everything except custom framing and chip-specific stuff.
138 */
139extern int usbnet_probe(struct usb_interface *, const struct usb_device_id *);
140extern int usbnet_suspend (struct usb_interface *, pm_message_t );
141extern int usbnet_resume (struct usb_interface *);
142extern void usbnet_disconnect(struct usb_interface *);
143
144
145/* Drivers that reuse some of the standard USB CDC infrastructure
146 * (notably, using multiple interfaces according to the CDC
147 * union descriptor) get some helper code.
148 */
149struct cdc_state {
150 struct usb_cdc_header_desc *header;
151 struct usb_cdc_union_desc *u;
152 struct usb_cdc_ether_desc *ether;
153 struct usb_interface *control;
154 struct usb_interface *data;
155};
156
157extern int usbnet_generic_cdc_bind (struct usbnet *, struct usb_interface *);
158extern void usbnet_cdc_unbind (struct usbnet *, struct usb_interface *);
159
160/* CDC and RNDIS support the same host-chosen packet filters for IN transfers */
161#define DEFAULT_FILTER (USB_CDC_PACKET_TYPE_BROADCAST \
162 |USB_CDC_PACKET_TYPE_ALL_MULTICAST \
163 |USB_CDC_PACKET_TYPE_PROMISCUOUS \
164 |USB_CDC_PACKET_TYPE_DIRECTED)
165
166
167/* we record the state for each of our queued skbs */
168enum skb_state {
169 illegal = 0,
170 tx_start, tx_done,
171 rx_start, rx_done, rx_cleanup
172};
173
174struct skb_data { /* skb->cb is one of these */
175 struct urb *urb;
176 struct usbnet *dev;
177 enum skb_state state;
178 size_t length;
179};
180
181
182extern int usbnet_get_endpoints(struct usbnet *, struct usb_interface *);
183extern void usbnet_defer_kevent (struct usbnet *, int);
184extern void usbnet_skb_return (struct usbnet *, struct sk_buff *);
185extern void usbnet_unlink_rx_urbs(struct usbnet *);
186
187extern int usbnet_get_settings (struct net_device *net, struct ethtool_cmd *cmd);
188extern int usbnet_set_settings (struct net_device *net, struct ethtool_cmd *cmd);
189extern u32 usbnet_get_link (struct net_device *net);
190extern u32 usbnet_get_msglevel (struct net_device *);
191extern void usbnet_set_msglevel (struct net_device *, u32);
192extern void usbnet_get_drvinfo (struct net_device *, struct ethtool_drvinfo *);
193extern int usbnet_nway_reset(struct net_device *net);
194
195/* messaging support includes the interface name, so it must not be
196 * used before it has one ... notably, in minidriver bind() calls.
197 */
198#ifdef DEBUG
199#define devdbg(usbnet, fmt, arg...) \
200 printk(KERN_DEBUG "%s: " fmt "\n" , (usbnet)->net->name , ## arg)
201#else
202#define devdbg(usbnet, fmt, arg...) do {} while(0)
203#endif
204
205#define deverr(usbnet, fmt, arg...) \
206 printk(KERN_ERR "%s: " fmt "\n" , (usbnet)->net->name , ## arg)
207#define devwarn(usbnet, fmt, arg...) \
208 printk(KERN_WARNING "%s: " fmt "\n" , (usbnet)->net->name , ## arg)
209
210#define devinfo(usbnet, fmt, arg...) \
211 printk(KERN_INFO "%s: " fmt "\n" , (usbnet)->net->name , ## arg); \
212
213
214#endif /* __USBNET_H */
diff --git a/include/linux/xfrm.h b/include/linux/xfrm.h
index 9b5b00c4ef9d..e31b8c84f2c9 100644
--- a/include/linux/xfrm.h
+++ b/include/linux/xfrm.h
@@ -96,6 +96,13 @@ struct xfrm_algo {
96 char alg_key[0]; 96 char alg_key[0];
97}; 97};
98 98
99struct xfrm_algo_aead {
100 char alg_name[64];
101 int alg_key_len; /* in bits */
102 int alg_icv_len; /* in bits */
103 char alg_key[0];
104};
105
99struct xfrm_stats { 106struct xfrm_stats {
100 __u32 replay_window; 107 __u32 replay_window;
101 __u32 replay; 108 __u32 replay;
@@ -270,6 +277,7 @@ enum xfrm_attr_type_t {
270 XFRMA_LASTUSED, 277 XFRMA_LASTUSED,
271 XFRMA_POLICY_TYPE, /* struct xfrm_userpolicy_type */ 278 XFRMA_POLICY_TYPE, /* struct xfrm_userpolicy_type */
272 XFRMA_MIGRATE, 279 XFRMA_MIGRATE,
280 XFRMA_ALG_AEAD, /* struct xfrm_algo_aead */
273 __XFRMA_MAX 281 __XFRMA_MAX
274 282
275#define XFRMA_MAX (__XFRMA_MAX - 1) 283#define XFRMA_MAX (__XFRMA_MAX - 1)
diff --git a/include/net/arp.h b/include/net/arp.h
index 752eb47b2678..c236270ec95e 100644
--- a/include/net/arp.h
+++ b/include/net/arp.h
@@ -13,15 +13,17 @@ extern int arp_find(unsigned char *haddr, struct sk_buff *skb);
13extern int arp_ioctl(struct net *net, unsigned int cmd, void __user *arg); 13extern int arp_ioctl(struct net *net, unsigned int cmd, void __user *arg);
14extern void arp_send(int type, int ptype, __be32 dest_ip, 14extern void arp_send(int type, int ptype, __be32 dest_ip,
15 struct net_device *dev, __be32 src_ip, 15 struct net_device *dev, __be32 src_ip,
16 unsigned char *dest_hw, unsigned char *src_hw, unsigned char *th); 16 const unsigned char *dest_hw,
17 const unsigned char *src_hw, const unsigned char *th);
17extern int arp_bind_neighbour(struct dst_entry *dst); 18extern int arp_bind_neighbour(struct dst_entry *dst);
18extern int arp_mc_map(__be32 addr, u8 *haddr, struct net_device *dev, int dir); 19extern int arp_mc_map(__be32 addr, u8 *haddr, struct net_device *dev, int dir);
19extern void arp_ifdown(struct net_device *dev); 20extern void arp_ifdown(struct net_device *dev);
20 21
21extern struct sk_buff *arp_create(int type, int ptype, __be32 dest_ip, 22extern struct sk_buff *arp_create(int type, int ptype, __be32 dest_ip,
22 struct net_device *dev, __be32 src_ip, 23 struct net_device *dev, __be32 src_ip,
23 unsigned char *dest_hw, unsigned char *src_hw, 24 const unsigned char *dest_hw,
24 unsigned char *target_hw); 25 const unsigned char *src_hw,
26 const unsigned char *target_hw);
25extern void arp_xmit(struct sk_buff *skb); 27extern void arp_xmit(struct sk_buff *skb);
26 28
27extern struct neigh_ops arp_broken_ops; 29extern struct neigh_ops arp_broken_ops;
diff --git a/include/net/esp.h b/include/net/esp.h
index c05f529bff28..d58451331dbd 100644
--- a/include/net/esp.h
+++ b/include/net/esp.h
@@ -1,58 +1,20 @@
1#ifndef _NET_ESP_H 1#ifndef _NET_ESP_H
2#define _NET_ESP_H 2#define _NET_ESP_H
3 3
4#include <linux/crypto.h> 4#include <linux/skbuff.h>
5#include <net/xfrm.h>
6#include <linux/scatterlist.h>
7 5
8#define ESP_NUM_FAST_SG 4 6struct crypto_aead;
9 7
10struct esp_data 8struct esp_data {
11{ 9 /* 0..255 */
12 struct scatterlist sgbuf[ESP_NUM_FAST_SG]; 10 int padlen;
13 11
14 /* Confidentiality */ 12 /* Confidentiality & Integrity */
15 struct { 13 struct crypto_aead *aead;
16 int padlen; /* 0..255 */
17 /* ivlen is offset from enc_data, where encrypted data start.
18 * It is logically different of crypto_tfm_alg_ivsize(tfm).
19 * We assume that it is either zero (no ivec), or
20 * >= crypto_tfm_alg_ivsize(tfm). */
21 int ivlen;
22 int ivinitted;
23 u8 *ivec; /* ivec buffer */
24 struct crypto_blkcipher *tfm; /* crypto handle */
25 } conf;
26
27 /* Integrity. It is active when icv_full_len != 0 */
28 struct {
29 u8 *work_icv;
30 int icv_full_len;
31 int icv_trunc_len;
32 struct crypto_hash *tfm;
33 } auth;
34}; 14};
35 15
36extern void *pskb_put(struct sk_buff *skb, struct sk_buff *tail, int len); 16extern void *pskb_put(struct sk_buff *skb, struct sk_buff *tail, int len);
37 17
38static inline int esp_mac_digest(struct esp_data *esp, struct sk_buff *skb,
39 int offset, int len)
40{
41 struct hash_desc desc;
42 int err;
43
44 desc.tfm = esp->auth.tfm;
45 desc.flags = 0;
46
47 err = crypto_hash_init(&desc);
48 if (unlikely(err))
49 return err;
50 err = skb_icv_walk(skb, &desc, offset, len, crypto_hash_update);
51 if (unlikely(err))
52 return err;
53 return crypto_hash_final(&desc, esp->auth.work_icv);
54}
55
56struct ip_esp_hdr; 18struct ip_esp_hdr;
57 19
58static inline struct ip_esp_hdr *ip_esp_hdr(const struct sk_buff *skb) 20static inline struct ip_esp_hdr *ip_esp_hdr(const struct sk_buff *skb)
diff --git a/include/net/inet6_hashtables.h b/include/net/inet6_hashtables.h
index 668056b4bb0b..fdff630708ce 100644
--- a/include/net/inet6_hashtables.h
+++ b/include/net/inet6_hashtables.h
@@ -57,34 +57,37 @@ extern void __inet6_hash(struct inet_hashinfo *hashinfo, struct sock *sk);
57 * 57 *
58 * The sockhash lock must be held as a reader here. 58 * The sockhash lock must be held as a reader here.
59 */ 59 */
60extern struct sock *__inet6_lookup_established(struct inet_hashinfo *hashinfo, 60extern struct sock *__inet6_lookup_established(struct net *net,
61 struct inet_hashinfo *hashinfo,
61 const struct in6_addr *saddr, 62 const struct in6_addr *saddr,
62 const __be16 sport, 63 const __be16 sport,
63 const struct in6_addr *daddr, 64 const struct in6_addr *daddr,
64 const u16 hnum, 65 const u16 hnum,
65 const int dif); 66 const int dif);
66 67
67extern struct sock *inet6_lookup_listener(struct inet_hashinfo *hashinfo, 68extern struct sock *inet6_lookup_listener(struct net *net,
69 struct inet_hashinfo *hashinfo,
68 const struct in6_addr *daddr, 70 const struct in6_addr *daddr,
69 const unsigned short hnum, 71 const unsigned short hnum,
70 const int dif); 72 const int dif);
71 73
72static inline struct sock *__inet6_lookup(struct inet_hashinfo *hashinfo, 74static inline struct sock *__inet6_lookup(struct net *net,
75 struct inet_hashinfo *hashinfo,
73 const struct in6_addr *saddr, 76 const struct in6_addr *saddr,
74 const __be16 sport, 77 const __be16 sport,
75 const struct in6_addr *daddr, 78 const struct in6_addr *daddr,
76 const u16 hnum, 79 const u16 hnum,
77 const int dif) 80 const int dif)
78{ 81{
79 struct sock *sk = __inet6_lookup_established(hashinfo, saddr, sport, 82 struct sock *sk = __inet6_lookup_established(net, hashinfo, saddr,
80 daddr, hnum, dif); 83 sport, daddr, hnum, dif);
81 if (sk) 84 if (sk)
82 return sk; 85 return sk;
83 86
84 return inet6_lookup_listener(hashinfo, daddr, hnum, dif); 87 return inet6_lookup_listener(net, hashinfo, daddr, hnum, dif);
85} 88}
86 89
87extern struct sock *inet6_lookup(struct inet_hashinfo *hashinfo, 90extern struct sock *inet6_lookup(struct net *net, struct inet_hashinfo *hashinfo,
88 const struct in6_addr *saddr, const __be16 sport, 91 const struct in6_addr *saddr, const __be16 sport,
89 const struct in6_addr *daddr, const __be16 dport, 92 const struct in6_addr *daddr, const __be16 dport,
90 const int dif); 93 const int dif);
diff --git a/include/net/inet_hashtables.h b/include/net/inet_hashtables.h
index 761bdc01425d..c23c4ed30724 100644
--- a/include/net/inet_hashtables.h
+++ b/include/net/inet_hashtables.h
@@ -74,6 +74,7 @@ struct inet_ehash_bucket {
74 * ports are created in O(1) time? I thought so. ;-) -DaveM 74 * ports are created in O(1) time? I thought so. ;-) -DaveM
75 */ 75 */
76struct inet_bind_bucket { 76struct inet_bind_bucket {
77 struct net *ib_net;
77 unsigned short port; 78 unsigned short port;
78 signed short fastreuse; 79 signed short fastreuse;
79 struct hlist_node node; 80 struct hlist_node node;
@@ -194,6 +195,7 @@ static inline void inet_ehash_locks_free(struct inet_hashinfo *hashinfo)
194 195
195extern struct inet_bind_bucket * 196extern struct inet_bind_bucket *
196 inet_bind_bucket_create(struct kmem_cache *cachep, 197 inet_bind_bucket_create(struct kmem_cache *cachep,
198 struct net *net,
197 struct inet_bind_hashbucket *head, 199 struct inet_bind_hashbucket *head,
198 const unsigned short snum); 200 const unsigned short snum);
199extern void inet_bind_bucket_destroy(struct kmem_cache *cachep, 201extern void inet_bind_bucket_destroy(struct kmem_cache *cachep,
@@ -300,15 +302,17 @@ out:
300 wake_up(&hashinfo->lhash_wait); 302 wake_up(&hashinfo->lhash_wait);
301} 303}
302 304
303extern struct sock *__inet_lookup_listener(struct inet_hashinfo *hashinfo, 305extern struct sock *__inet_lookup_listener(struct net *net,
306 struct inet_hashinfo *hashinfo,
304 const __be32 daddr, 307 const __be32 daddr,
305 const unsigned short hnum, 308 const unsigned short hnum,
306 const int dif); 309 const int dif);
307 310
308static inline struct sock *inet_lookup_listener(struct inet_hashinfo *hashinfo, 311static inline struct sock *inet_lookup_listener(struct net *net,
309 __be32 daddr, __be16 dport, int dif) 312 struct inet_hashinfo *hashinfo,
313 __be32 daddr, __be16 dport, int dif)
310{ 314{
311 return __inet_lookup_listener(hashinfo, daddr, ntohs(dport), dif); 315 return __inet_lookup_listener(net, hashinfo, daddr, ntohs(dport), dif);
312} 316}
313 317
314/* Socket demux engine toys. */ 318/* Socket demux engine toys. */
@@ -342,26 +346,26 @@ typedef __u64 __bitwise __addrpair;
342 (((__force __u64)(__be32)(__daddr)) << 32) | \ 346 (((__force __u64)(__be32)(__daddr)) << 32) | \
343 ((__force __u64)(__be32)(__saddr))); 347 ((__force __u64)(__be32)(__saddr)));
344#endif /* __BIG_ENDIAN */ 348#endif /* __BIG_ENDIAN */
345#define INET_MATCH(__sk, __hash, __cookie, __saddr, __daddr, __ports, __dif)\ 349#define INET_MATCH(__sk, __net, __hash, __cookie, __saddr, __daddr, __ports, __dif)\
346 (((__sk)->sk_hash == (__hash)) && \ 350 (((__sk)->sk_hash == (__hash)) && ((__sk)->sk_net == (__net)) && \
347 ((*((__addrpair *)&(inet_sk(__sk)->daddr))) == (__cookie)) && \ 351 ((*((__addrpair *)&(inet_sk(__sk)->daddr))) == (__cookie)) && \
348 ((*((__portpair *)&(inet_sk(__sk)->dport))) == (__ports)) && \ 352 ((*((__portpair *)&(inet_sk(__sk)->dport))) == (__ports)) && \
349 (!((__sk)->sk_bound_dev_if) || ((__sk)->sk_bound_dev_if == (__dif)))) 353 (!((__sk)->sk_bound_dev_if) || ((__sk)->sk_bound_dev_if == (__dif))))
350#define INET_TW_MATCH(__sk, __hash, __cookie, __saddr, __daddr, __ports, __dif)\ 354#define INET_TW_MATCH(__sk, __net, __hash, __cookie, __saddr, __daddr, __ports, __dif)\
351 (((__sk)->sk_hash == (__hash)) && \ 355 (((__sk)->sk_hash == (__hash)) && ((__sk)->sk_net == (__net)) && \
352 ((*((__addrpair *)&(inet_twsk(__sk)->tw_daddr))) == (__cookie)) && \ 356 ((*((__addrpair *)&(inet_twsk(__sk)->tw_daddr))) == (__cookie)) && \
353 ((*((__portpair *)&(inet_twsk(__sk)->tw_dport))) == (__ports)) && \ 357 ((*((__portpair *)&(inet_twsk(__sk)->tw_dport))) == (__ports)) && \
354 (!((__sk)->sk_bound_dev_if) || ((__sk)->sk_bound_dev_if == (__dif)))) 358 (!((__sk)->sk_bound_dev_if) || ((__sk)->sk_bound_dev_if == (__dif))))
355#else /* 32-bit arch */ 359#else /* 32-bit arch */
356#define INET_ADDR_COOKIE(__name, __saddr, __daddr) 360#define INET_ADDR_COOKIE(__name, __saddr, __daddr)
357#define INET_MATCH(__sk, __hash, __cookie, __saddr, __daddr, __ports, __dif) \ 361#define INET_MATCH(__sk, __net, __hash, __cookie, __saddr, __daddr, __ports, __dif) \
358 (((__sk)->sk_hash == (__hash)) && \ 362 (((__sk)->sk_hash == (__hash)) && ((__sk)->sk_net == (__net)) && \
359 (inet_sk(__sk)->daddr == (__saddr)) && \ 363 (inet_sk(__sk)->daddr == (__saddr)) && \
360 (inet_sk(__sk)->rcv_saddr == (__daddr)) && \ 364 (inet_sk(__sk)->rcv_saddr == (__daddr)) && \
361 ((*((__portpair *)&(inet_sk(__sk)->dport))) == (__ports)) && \ 365 ((*((__portpair *)&(inet_sk(__sk)->dport))) == (__ports)) && \
362 (!((__sk)->sk_bound_dev_if) || ((__sk)->sk_bound_dev_if == (__dif)))) 366 (!((__sk)->sk_bound_dev_if) || ((__sk)->sk_bound_dev_if == (__dif))))
363#define INET_TW_MATCH(__sk, __hash,__cookie, __saddr, __daddr, __ports, __dif) \ 367#define INET_TW_MATCH(__sk, __net, __hash,__cookie, __saddr, __daddr, __ports, __dif) \
364 (((__sk)->sk_hash == (__hash)) && \ 368 (((__sk)->sk_hash == (__hash)) && ((__sk)->sk_net == (__net)) && \
365 (inet_twsk(__sk)->tw_daddr == (__saddr)) && \ 369 (inet_twsk(__sk)->tw_daddr == (__saddr)) && \
366 (inet_twsk(__sk)->tw_rcv_saddr == (__daddr)) && \ 370 (inet_twsk(__sk)->tw_rcv_saddr == (__daddr)) && \
367 ((*((__portpair *)&(inet_twsk(__sk)->tw_dport))) == (__ports)) && \ 371 ((*((__portpair *)&(inet_twsk(__sk)->tw_dport))) == (__ports)) && \
@@ -374,32 +378,36 @@ typedef __u64 __bitwise __addrpair;
374 * 378 *
375 * Local BH must be disabled here. 379 * Local BH must be disabled here.
376 */ 380 */
377extern struct sock * __inet_lookup_established(struct inet_hashinfo *hashinfo, 381extern struct sock * __inet_lookup_established(struct net *net,
382 struct inet_hashinfo *hashinfo,
378 const __be32 saddr, const __be16 sport, 383 const __be32 saddr, const __be16 sport,
379 const __be32 daddr, const u16 hnum, const int dif); 384 const __be32 daddr, const u16 hnum, const int dif);
380 385
381static inline struct sock * 386static inline struct sock *
382 inet_lookup_established(struct inet_hashinfo *hashinfo, 387 inet_lookup_established(struct net *net, struct inet_hashinfo *hashinfo,
383 const __be32 saddr, const __be16 sport, 388 const __be32 saddr, const __be16 sport,
384 const __be32 daddr, const __be16 dport, 389 const __be32 daddr, const __be16 dport,
385 const int dif) 390 const int dif)
386{ 391{
387 return __inet_lookup_established(hashinfo, saddr, sport, daddr, 392 return __inet_lookup_established(net, hashinfo, saddr, sport, daddr,
388 ntohs(dport), dif); 393 ntohs(dport), dif);
389} 394}
390 395
391static inline struct sock *__inet_lookup(struct inet_hashinfo *hashinfo, 396static inline struct sock *__inet_lookup(struct net *net,
397 struct inet_hashinfo *hashinfo,
392 const __be32 saddr, const __be16 sport, 398 const __be32 saddr, const __be16 sport,
393 const __be32 daddr, const __be16 dport, 399 const __be32 daddr, const __be16 dport,
394 const int dif) 400 const int dif)
395{ 401{
396 u16 hnum = ntohs(dport); 402 u16 hnum = ntohs(dport);
397 struct sock *sk = __inet_lookup_established(hashinfo, saddr, sport, daddr, 403 struct sock *sk = __inet_lookup_established(net, hashinfo,
398 hnum, dif); 404 saddr, sport, daddr, hnum, dif);
399 return sk ? : __inet_lookup_listener(hashinfo, daddr, hnum, dif); 405
406 return sk ? : __inet_lookup_listener(net, hashinfo, daddr, hnum, dif);
400} 407}
401 408
402static inline struct sock *inet_lookup(struct inet_hashinfo *hashinfo, 409static inline struct sock *inet_lookup(struct net *net,
410 struct inet_hashinfo *hashinfo,
403 const __be32 saddr, const __be16 sport, 411 const __be32 saddr, const __be16 sport,
404 const __be32 daddr, const __be16 dport, 412 const __be32 daddr, const __be16 dport,
405 const int dif) 413 const int dif)
@@ -407,12 +415,17 @@ static inline struct sock *inet_lookup(struct inet_hashinfo *hashinfo,
407 struct sock *sk; 415 struct sock *sk;
408 416
409 local_bh_disable(); 417 local_bh_disable();
410 sk = __inet_lookup(hashinfo, saddr, sport, daddr, dport, dif); 418 sk = __inet_lookup(net, hashinfo, saddr, sport, daddr, dport, dif);
411 local_bh_enable(); 419 local_bh_enable();
412 420
413 return sk; 421 return sk;
414} 422}
415 423
424extern int __inet_hash_connect(struct inet_timewait_death_row *death_row,
425 struct sock *sk,
426 int (*check_established)(struct inet_timewait_death_row *,
427 struct sock *, __u16, struct inet_timewait_sock **),
428 void (*hash)(struct inet_hashinfo *, struct sock *));
416extern int inet_hash_connect(struct inet_timewait_death_row *death_row, 429extern int inet_hash_connect(struct inet_timewait_death_row *death_row,
417 struct sock *sk); 430 struct sock *sk);
418#endif /* _INET_HASHTABLES_H */ 431#endif /* _INET_HASHTABLES_H */
diff --git a/include/net/ip_fib.h b/include/net/ip_fib.h
index 9daa60b544ba..90d1175f63de 100644
--- a/include/net/ip_fib.h
+++ b/include/net/ip_fib.h
@@ -69,6 +69,7 @@ struct fib_nh {
69struct fib_info { 69struct fib_info {
70 struct hlist_node fib_hash; 70 struct hlist_node fib_hash;
71 struct hlist_node fib_lhash; 71 struct hlist_node fib_lhash;
72 struct net *fib_net;
72 int fib_treeref; 73 int fib_treeref;
73 atomic_t fib_clntref; 74 atomic_t fib_clntref;
74 int fib_dead; 75 int fib_dead;
@@ -218,7 +219,8 @@ extern void fib_select_default(struct net *net, const struct flowi *flp,
218 219
219/* Exported by fib_semantics.c */ 220/* Exported by fib_semantics.c */
220extern int ip_fib_check_default(__be32 gw, struct net_device *dev); 221extern int ip_fib_check_default(__be32 gw, struct net_device *dev);
221extern int fib_sync_down(__be32 local, struct net_device *dev, int force); 222extern int fib_sync_down_dev(struct net_device *dev, int force);
223extern int fib_sync_down_addr(struct net *net, __be32 local);
222extern int fib_sync_up(struct net_device *dev); 224extern int fib_sync_up(struct net_device *dev);
223extern __be32 __fib_res_prefsrc(struct fib_result *res); 225extern __be32 __fib_res_prefsrc(struct fib_result *res);
224extern void fib_select_multipath(const struct flowi *flp, struct fib_result *res); 226extern void fib_select_multipath(const struct flowi *flp, struct fib_result *res);
diff --git a/include/net/net_namespace.h b/include/net/net_namespace.h
index b8c1d60ba9e4..28738b7d53eb 100644
--- a/include/net/net_namespace.h
+++ b/include/net/net_namespace.h
@@ -12,6 +12,7 @@
12#include <net/netns/packet.h> 12#include <net/netns/packet.h>
13#include <net/netns/ipv4.h> 13#include <net/netns/ipv4.h>
14#include <net/netns/ipv6.h> 14#include <net/netns/ipv6.h>
15#include <net/netns/x_tables.h>
15 16
16struct proc_dir_entry; 17struct proc_dir_entry;
17struct net_device; 18struct net_device;
@@ -56,6 +57,9 @@ struct net {
56#if defined(CONFIG_IPV6) || defined(CONFIG_IPV6_MODULE) 57#if defined(CONFIG_IPV6) || defined(CONFIG_IPV6_MODULE)
57 struct netns_ipv6 ipv6; 58 struct netns_ipv6 ipv6;
58#endif 59#endif
60#ifdef CONFIG_NETFILTER
61 struct netns_xt xt;
62#endif
59}; 63};
60 64
61#ifdef CONFIG_NET 65#ifdef CONFIG_NET
diff --git a/include/net/netfilter/nf_conntrack.h b/include/net/netfilter/nf_conntrack.h
index 857d89951790..90b3e7f5df5f 100644
--- a/include/net/netfilter/nf_conntrack.h
+++ b/include/net/netfilter/nf_conntrack.h
@@ -129,6 +129,8 @@ struct nf_conn
129 129
130 /* Extensions */ 130 /* Extensions */
131 struct nf_ct_ext *ext; 131 struct nf_ct_ext *ext;
132
133 struct rcu_head rcu;
132}; 134};
133 135
134static inline struct nf_conn * 136static inline struct nf_conn *
@@ -143,7 +145,7 @@ nf_ct_tuplehash_to_ctrack(const struct nf_conntrack_tuple_hash *hash)
143 145
144/* Alter reply tuple (maybe alter helper). */ 146/* Alter reply tuple (maybe alter helper). */
145extern void 147extern void
146nf_conntrack_alter_reply(struct nf_conn *conntrack, 148nf_conntrack_alter_reply(struct nf_conn *ct,
147 const struct nf_conntrack_tuple *newreply); 149 const struct nf_conntrack_tuple *newreply);
148 150
149/* Is this tuple taken? (ignoring any belonging to the given 151/* Is this tuple taken? (ignoring any belonging to the given
@@ -171,13 +173,12 @@ static inline void nf_ct_put(struct nf_conn *ct)
171extern int nf_ct_l3proto_try_module_get(unsigned short l3proto); 173extern int nf_ct_l3proto_try_module_get(unsigned short l3proto);
172extern void nf_ct_l3proto_module_put(unsigned short l3proto); 174extern void nf_ct_l3proto_module_put(unsigned short l3proto);
173 175
174extern struct hlist_head *nf_ct_alloc_hashtable(int *sizep, int *vmalloced); 176extern struct hlist_head *nf_ct_alloc_hashtable(unsigned int *sizep, int *vmalloced);
175extern void nf_ct_free_hashtable(struct hlist_head *hash, int vmalloced, 177extern void nf_ct_free_hashtable(struct hlist_head *hash, int vmalloced,
176 int size); 178 unsigned int size);
177 179
178extern struct nf_conntrack_tuple_hash * 180extern struct nf_conntrack_tuple_hash *
179__nf_conntrack_find(const struct nf_conntrack_tuple *tuple, 181__nf_conntrack_find(const struct nf_conntrack_tuple *tuple);
180 const struct nf_conn *ignored_conntrack);
181 182
182extern void nf_conntrack_hash_insert(struct nf_conn *ct); 183extern void nf_conntrack_hash_insert(struct nf_conn *ct);
183 184
@@ -215,9 +216,9 @@ static inline void nf_ct_refresh(struct nf_conn *ct,
215 216
216/* These are for NAT. Icky. */ 217/* These are for NAT. Icky. */
217/* Update TCP window tracking data when NAT mangles the packet */ 218/* Update TCP window tracking data when NAT mangles the packet */
218extern void nf_conntrack_tcp_update(struct sk_buff *skb, 219extern void nf_conntrack_tcp_update(const struct sk_buff *skb,
219 unsigned int dataoff, 220 unsigned int dataoff,
220 struct nf_conn *conntrack, 221 struct nf_conn *ct,
221 int dir); 222 int dir);
222 223
223/* Fake conntrack entry for untracked connections */ 224/* Fake conntrack entry for untracked connections */
diff --git a/include/net/netfilter/nf_conntrack_core.h b/include/net/netfilter/nf_conntrack_core.h
index 7ad0828f05cf..9ee26469c759 100644
--- a/include/net/netfilter/nf_conntrack_core.h
+++ b/include/net/netfilter/nf_conntrack_core.h
@@ -68,11 +68,11 @@ static inline int nf_conntrack_confirm(struct sk_buff *skb)
68 68
69int 69int
70print_tuple(struct seq_file *s, const struct nf_conntrack_tuple *tuple, 70print_tuple(struct seq_file *s, const struct nf_conntrack_tuple *tuple,
71 struct nf_conntrack_l3proto *l3proto, 71 const struct nf_conntrack_l3proto *l3proto,
72 struct nf_conntrack_l4proto *proto); 72 const struct nf_conntrack_l4proto *proto);
73 73
74extern struct hlist_head *nf_conntrack_hash; 74extern struct hlist_head *nf_conntrack_hash;
75extern rwlock_t nf_conntrack_lock ; 75extern spinlock_t nf_conntrack_lock ;
76extern struct hlist_head unconfirmed; 76extern struct hlist_head unconfirmed;
77 77
78#endif /* _NF_CONNTRACK_CORE_H */ 78#endif /* _NF_CONNTRACK_CORE_H */
diff --git a/include/net/netfilter/nf_conntrack_expect.h b/include/net/netfilter/nf_conntrack_expect.h
index 6c3fd254c28e..cb608a1b44e5 100644
--- a/include/net/netfilter/nf_conntrack_expect.h
+++ b/include/net/netfilter/nf_conntrack_expect.h
@@ -49,6 +49,8 @@ struct nf_conntrack_expect
49 /* Direction relative to the master connection. */ 49 /* Direction relative to the master connection. */
50 enum ip_conntrack_dir dir; 50 enum ip_conntrack_dir dir;
51#endif 51#endif
52
53 struct rcu_head rcu;
52}; 54};
53 55
54#define NF_CT_EXPECT_PERMANENT 0x1 56#define NF_CT_EXPECT_PERMANENT 0x1
diff --git a/include/net/netfilter/nf_conntrack_helper.h b/include/net/netfilter/nf_conntrack_helper.h
index 2f3af00643cf..4ca125e9b3ce 100644
--- a/include/net/netfilter/nf_conntrack_helper.h
+++ b/include/net/netfilter/nf_conntrack_helper.h
@@ -43,12 +43,8 @@ extern struct nf_conntrack_helper *
43__nf_ct_helper_find(const struct nf_conntrack_tuple *tuple); 43__nf_ct_helper_find(const struct nf_conntrack_tuple *tuple);
44 44
45extern struct nf_conntrack_helper * 45extern struct nf_conntrack_helper *
46nf_ct_helper_find_get( const struct nf_conntrack_tuple *tuple);
47
48extern struct nf_conntrack_helper *
49__nf_conntrack_helper_find_byname(const char *name); 46__nf_conntrack_helper_find_byname(const char *name);
50 47
51extern void nf_ct_helper_put(struct nf_conntrack_helper *helper);
52extern int nf_conntrack_helper_register(struct nf_conntrack_helper *); 48extern int nf_conntrack_helper_register(struct nf_conntrack_helper *);
53extern void nf_conntrack_helper_unregister(struct nf_conntrack_helper *); 49extern void nf_conntrack_helper_unregister(struct nf_conntrack_helper *);
54 50
diff --git a/include/net/netfilter/nf_conntrack_l3proto.h b/include/net/netfilter/nf_conntrack_l3proto.h
index d5526bcce147..b886e3ae6cad 100644
--- a/include/net/netfilter/nf_conntrack_l3proto.h
+++ b/include/net/netfilter/nf_conntrack_l3proto.h
@@ -43,7 +43,7 @@ struct nf_conntrack_l3proto
43 const struct nf_conntrack_tuple *); 43 const struct nf_conntrack_tuple *);
44 44
45 /* Returns verdict for packet, or -1 for invalid. */ 45 /* Returns verdict for packet, or -1 for invalid. */
46 int (*packet)(struct nf_conn *conntrack, 46 int (*packet)(struct nf_conn *ct,
47 const struct sk_buff *skb, 47 const struct sk_buff *skb,
48 enum ip_conntrack_info ctinfo); 48 enum ip_conntrack_info ctinfo);
49 49
@@ -51,7 +51,7 @@ struct nf_conntrack_l3proto
51 * Called when a new connection for this protocol found; 51 * Called when a new connection for this protocol found;
52 * returns TRUE if it's OK. If so, packet() called next. 52 * returns TRUE if it's OK. If so, packet() called next.
53 */ 53 */
54 int (*new)(struct nf_conn *conntrack, const struct sk_buff *skb); 54 int (*new)(struct nf_conn *ct, const struct sk_buff *skb);
55 55
56 /* 56 /*
57 * Called before tracking. 57 * Called before tracking.
diff --git a/include/net/netfilter/nf_conntrack_l4proto.h b/include/net/netfilter/nf_conntrack_l4proto.h
index fb50c217ba0a..efc16eccddb1 100644
--- a/include/net/netfilter/nf_conntrack_l4proto.h
+++ b/include/net/netfilter/nf_conntrack_l4proto.h
@@ -23,9 +23,6 @@ struct nf_conntrack_l4proto
23 /* L4 Protocol number. */ 23 /* L4 Protocol number. */
24 u_int8_t l4proto; 24 u_int8_t l4proto;
25 25
26 /* Protocol name */
27 const char *name;
28
29 /* Try to fill in the third arg: dataoff is offset past network protocol 26 /* Try to fill in the third arg: dataoff is offset past network protocol
30 hdr. Return true if possible. */ 27 hdr. Return true if possible. */
31 int (*pkt_to_tuple)(const struct sk_buff *skb, 28 int (*pkt_to_tuple)(const struct sk_buff *skb,
@@ -38,15 +35,8 @@ struct nf_conntrack_l4proto
38 int (*invert_tuple)(struct nf_conntrack_tuple *inverse, 35 int (*invert_tuple)(struct nf_conntrack_tuple *inverse,
39 const struct nf_conntrack_tuple *orig); 36 const struct nf_conntrack_tuple *orig);
40 37
41 /* Print out the per-protocol part of the tuple. Return like seq_* */
42 int (*print_tuple)(struct seq_file *s,
43 const struct nf_conntrack_tuple *);
44
45 /* Print out the private part of the conntrack. */
46 int (*print_conntrack)(struct seq_file *s, const struct nf_conn *);
47
48 /* Returns verdict for packet, or -1 for invalid. */ 38 /* Returns verdict for packet, or -1 for invalid. */
49 int (*packet)(struct nf_conn *conntrack, 39 int (*packet)(struct nf_conn *ct,
50 const struct sk_buff *skb, 40 const struct sk_buff *skb,
51 unsigned int dataoff, 41 unsigned int dataoff,
52 enum ip_conntrack_info ctinfo, 42 enum ip_conntrack_info ctinfo,
@@ -55,16 +45,23 @@ struct nf_conntrack_l4proto
55 45
56 /* Called when a new connection for this protocol found; 46 /* Called when a new connection for this protocol found;
57 * returns TRUE if it's OK. If so, packet() called next. */ 47 * returns TRUE if it's OK. If so, packet() called next. */
58 int (*new)(struct nf_conn *conntrack, const struct sk_buff *skb, 48 int (*new)(struct nf_conn *ct, const struct sk_buff *skb,
59 unsigned int dataoff); 49 unsigned int dataoff);
60 50
61 /* Called when a conntrack entry is destroyed */ 51 /* Called when a conntrack entry is destroyed */
62 void (*destroy)(struct nf_conn *conntrack); 52 void (*destroy)(struct nf_conn *ct);
63 53
64 int (*error)(struct sk_buff *skb, unsigned int dataoff, 54 int (*error)(struct sk_buff *skb, unsigned int dataoff,
65 enum ip_conntrack_info *ctinfo, 55 enum ip_conntrack_info *ctinfo,
66 int pf, unsigned int hooknum); 56 int pf, unsigned int hooknum);
67 57
58 /* Print out the per-protocol part of the tuple. Return like seq_* */
59 int (*print_tuple)(struct seq_file *s,
60 const struct nf_conntrack_tuple *);
61
62 /* Print out the private part of the conntrack. */
63 int (*print_conntrack)(struct seq_file *s, const struct nf_conn *);
64
68 /* convert protoinfo to nfnetink attributes */ 65 /* convert protoinfo to nfnetink attributes */
69 int (*to_nlattr)(struct sk_buff *skb, struct nlattr *nla, 66 int (*to_nlattr)(struct sk_buff *skb, struct nlattr *nla,
70 const struct nf_conn *ct); 67 const struct nf_conn *ct);
@@ -87,6 +84,8 @@ struct nf_conntrack_l4proto
87 struct ctl_table *ctl_compat_table; 84 struct ctl_table *ctl_compat_table;
88#endif 85#endif
89#endif 86#endif
87 /* Protocol name */
88 const char *name;
90 89
91 /* Module (if any) which this is connected to. */ 90 /* Module (if any) which this is connected to. */
92 struct module *me; 91 struct module *me;
diff --git a/include/net/netfilter/nf_conntrack_tuple.h b/include/net/netfilter/nf_conntrack_tuple.h
index 45cb17cdcfd0..e69ab2e87597 100644
--- a/include/net/netfilter/nf_conntrack_tuple.h
+++ b/include/net/netfilter/nf_conntrack_tuple.h
@@ -132,34 +132,33 @@ struct nf_conntrack_tuple_hash
132 132
133#endif /* __KERNEL__ */ 133#endif /* __KERNEL__ */
134 134
135static inline int nf_ct_tuple_src_equal(const struct nf_conntrack_tuple *t1, 135static inline int __nf_ct_tuple_src_equal(const struct nf_conntrack_tuple *t1,
136 const struct nf_conntrack_tuple *t2) 136 const struct nf_conntrack_tuple *t2)
137{ 137{
138 return (t1->src.u3.all[0] == t2->src.u3.all[0] && 138 return (t1->src.u3.all[0] == t2->src.u3.all[0] &&
139 t1->src.u3.all[1] == t2->src.u3.all[1] && 139 t1->src.u3.all[1] == t2->src.u3.all[1] &&
140 t1->src.u3.all[2] == t2->src.u3.all[2] && 140 t1->src.u3.all[2] == t2->src.u3.all[2] &&
141 t1->src.u3.all[3] == t2->src.u3.all[3] && 141 t1->src.u3.all[3] == t2->src.u3.all[3] &&
142 t1->src.u.all == t2->src.u.all && 142 t1->src.u.all == t2->src.u.all &&
143 t1->src.l3num == t2->src.l3num && 143 t1->src.l3num == t2->src.l3num);
144 t1->dst.protonum == t2->dst.protonum);
145} 144}
146 145
147static inline int nf_ct_tuple_dst_equal(const struct nf_conntrack_tuple *t1, 146static inline int __nf_ct_tuple_dst_equal(const struct nf_conntrack_tuple *t1,
148 const struct nf_conntrack_tuple *t2) 147 const struct nf_conntrack_tuple *t2)
149{ 148{
150 return (t1->dst.u3.all[0] == t2->dst.u3.all[0] && 149 return (t1->dst.u3.all[0] == t2->dst.u3.all[0] &&
151 t1->dst.u3.all[1] == t2->dst.u3.all[1] && 150 t1->dst.u3.all[1] == t2->dst.u3.all[1] &&
152 t1->dst.u3.all[2] == t2->dst.u3.all[2] && 151 t1->dst.u3.all[2] == t2->dst.u3.all[2] &&
153 t1->dst.u3.all[3] == t2->dst.u3.all[3] && 152 t1->dst.u3.all[3] == t2->dst.u3.all[3] &&
154 t1->dst.u.all == t2->dst.u.all && 153 t1->dst.u.all == t2->dst.u.all &&
155 t1->src.l3num == t2->src.l3num &&
156 t1->dst.protonum == t2->dst.protonum); 154 t1->dst.protonum == t2->dst.protonum);
157} 155}
158 156
159static inline int nf_ct_tuple_equal(const struct nf_conntrack_tuple *t1, 157static inline int nf_ct_tuple_equal(const struct nf_conntrack_tuple *t1,
160 const struct nf_conntrack_tuple *t2) 158 const struct nf_conntrack_tuple *t2)
161{ 159{
162 return nf_ct_tuple_src_equal(t1, t2) && nf_ct_tuple_dst_equal(t1, t2); 160 return __nf_ct_tuple_src_equal(t1, t2) &&
161 __nf_ct_tuple_dst_equal(t1, t2);
163} 162}
164 163
165static inline int nf_ct_tuple_mask_equal(const struct nf_conntrack_tuple_mask *m1, 164static inline int nf_ct_tuple_mask_equal(const struct nf_conntrack_tuple_mask *m1,
@@ -199,7 +198,7 @@ static inline int nf_ct_tuple_mask_cmp(const struct nf_conntrack_tuple *t,
199 const struct nf_conntrack_tuple_mask *mask) 198 const struct nf_conntrack_tuple_mask *mask)
200{ 199{
201 return nf_ct_tuple_src_mask_cmp(t, tuple, mask) && 200 return nf_ct_tuple_src_mask_cmp(t, tuple, mask) &&
202 nf_ct_tuple_dst_equal(t, tuple); 201 __nf_ct_tuple_dst_equal(t, tuple);
203} 202}
204 203
205#endif /* _NF_CONNTRACK_TUPLE_H */ 204#endif /* _NF_CONNTRACK_TUPLE_H */
diff --git a/include/net/netfilter/nf_log.h b/include/net/netfilter/nf_log.h
index 037e82403f91..8c6b5ae45534 100644
--- a/include/net/netfilter/nf_log.h
+++ b/include/net/netfilter/nf_log.h
@@ -54,6 +54,6 @@ void nf_log_packet(int pf,
54 const struct net_device *in, 54 const struct net_device *in,
55 const struct net_device *out, 55 const struct net_device *out,
56 const struct nf_loginfo *li, 56 const struct nf_loginfo *li,
57 const char *fmt, ...); 57 const char *fmt, ...) __attribute__ ((format(printf,7,8)));
58 58
59#endif /* _NF_LOG_H */ 59#endif /* _NF_LOG_H */
diff --git a/include/net/netns/ipv4.h b/include/net/netns/ipv4.h
index 15a0b052df22..a9b4f6086294 100644
--- a/include/net/netns/ipv4.h
+++ b/include/net/netns/ipv4.h
@@ -27,5 +27,11 @@ struct netns_ipv4 {
27 struct sock *fibnl; 27 struct sock *fibnl;
28 28
29 struct netns_frags frags; 29 struct netns_frags frags;
30#ifdef CONFIG_NETFILTER
31 struct xt_table *iptable_filter;
32 struct xt_table *iptable_mangle;
33 struct xt_table *iptable_raw;
34 struct xt_table *arptable_filter;
35#endif
30}; 36};
31#endif 37#endif
diff --git a/include/net/netns/ipv6.h b/include/net/netns/ipv6.h
index 187c4248df22..1dd7de4e4195 100644
--- a/include/net/netns/ipv6.h
+++ b/include/net/netns/ipv6.h
@@ -31,5 +31,10 @@ struct netns_ipv6 {
31 struct ipv6_devconf *devconf_all; 31 struct ipv6_devconf *devconf_all;
32 struct ipv6_devconf *devconf_dflt; 32 struct ipv6_devconf *devconf_dflt;
33 struct netns_frags frags; 33 struct netns_frags frags;
34#ifdef CONFIG_NETFILTER
35 struct xt_table *ip6table_filter;
36 struct xt_table *ip6table_mangle;
37 struct xt_table *ip6table_raw;
38#endif
34}; 39};
35#endif 40#endif
diff --git a/include/net/netns/x_tables.h b/include/net/netns/x_tables.h
new file mode 100644
index 000000000000..0cb63ed2c1fc
--- /dev/null
+++ b/include/net/netns/x_tables.h
@@ -0,0 +1,10 @@
1#ifndef __NETNS_X_TABLES_H
2#define __NETNS_X_TABLES_H
3
4#include <linux/list.h>
5#include <linux/net.h>
6
7struct netns_xt {
8 struct list_head tables[NPROTO];
9};
10#endif
diff --git a/include/net/pkt_cls.h b/include/net/pkt_cls.h
index 8716eb757d51..d349c66ef828 100644
--- a/include/net/pkt_cls.h
+++ b/include/net/pkt_cls.h
@@ -131,14 +131,14 @@ tcf_exts_exec(struct sk_buff *skb, struct tcf_exts *exts,
131 131
132extern int tcf_exts_validate(struct tcf_proto *tp, struct nlattr **tb, 132extern int tcf_exts_validate(struct tcf_proto *tp, struct nlattr **tb,
133 struct nlattr *rate_tlv, struct tcf_exts *exts, 133 struct nlattr *rate_tlv, struct tcf_exts *exts,
134 struct tcf_ext_map *map); 134 const struct tcf_ext_map *map);
135extern void tcf_exts_destroy(struct tcf_proto *tp, struct tcf_exts *exts); 135extern void tcf_exts_destroy(struct tcf_proto *tp, struct tcf_exts *exts);
136extern void tcf_exts_change(struct tcf_proto *tp, struct tcf_exts *dst, 136extern void tcf_exts_change(struct tcf_proto *tp, struct tcf_exts *dst,
137 struct tcf_exts *src); 137 struct tcf_exts *src);
138extern int tcf_exts_dump(struct sk_buff *skb, struct tcf_exts *exts, 138extern int tcf_exts_dump(struct sk_buff *skb, struct tcf_exts *exts,
139 struct tcf_ext_map *map); 139 const struct tcf_ext_map *map);
140extern int tcf_exts_dump_stats(struct sk_buff *skb, struct tcf_exts *exts, 140extern int tcf_exts_dump_stats(struct sk_buff *skb, struct tcf_exts *exts,
141 struct tcf_ext_map *map); 141 const struct tcf_ext_map *map);
142 142
143/** 143/**
144 * struct tcf_pkt_info - packet information 144 * struct tcf_pkt_info - packet information
diff --git a/include/net/raw.h b/include/net/raw.h
index cca81d8b2d8b..1828f81fe374 100644
--- a/include/net/raw.h
+++ b/include/net/raw.h
@@ -41,7 +41,6 @@ extern void raw_proc_exit(void);
41struct raw_iter_state { 41struct raw_iter_state {
42 struct seq_net_private p; 42 struct seq_net_private p;
43 int bucket; 43 int bucket;
44 unsigned short family;
45 struct raw_hashinfo *h; 44 struct raw_hashinfo *h;
46}; 45};
47 46
@@ -49,8 +48,8 @@ struct raw_iter_state {
49void *raw_seq_start(struct seq_file *seq, loff_t *pos); 48void *raw_seq_start(struct seq_file *seq, loff_t *pos);
50void *raw_seq_next(struct seq_file *seq, void *v, loff_t *pos); 49void *raw_seq_next(struct seq_file *seq, void *v, loff_t *pos);
51void raw_seq_stop(struct seq_file *seq, void *v); 50void raw_seq_stop(struct seq_file *seq, void *v);
52int raw_seq_open(struct inode *ino, struct file *file, struct raw_hashinfo *h, 51int raw_seq_open(struct inode *ino, struct file *file,
53 unsigned short family); 52 struct raw_hashinfo *h, const struct seq_operations *ops);
54 53
55#endif 54#endif
56 55
diff --git a/include/net/route.h b/include/net/route.h
index 4eabf008413b..eadad5901429 100644
--- a/include/net/route.h
+++ b/include/net/route.h
@@ -27,6 +27,7 @@
27#include <net/dst.h> 27#include <net/dst.h>
28#include <net/inetpeer.h> 28#include <net/inetpeer.h>
29#include <net/flow.h> 29#include <net/flow.h>
30#include <net/sock.h>
30#include <linux/in_route.h> 31#include <linux/in_route.h>
31#include <linux/rtnetlink.h> 32#include <linux/rtnetlink.h>
32#include <linux/route.h> 33#include <linux/route.h>
@@ -61,6 +62,7 @@ struct rtable
61 62
62 struct in_device *idev; 63 struct in_device *idev;
63 64
65 int rt_genid;
64 unsigned rt_flags; 66 unsigned rt_flags;
65 __u16 rt_type; 67 __u16 rt_type;
66 68
@@ -149,6 +151,7 @@ static inline int ip_route_connect(struct rtable **rp, __be32 dst,
149 int flags) 151 int flags)
150{ 152{
151 struct flowi fl = { .oif = oif, 153 struct flowi fl = { .oif = oif,
154 .mark = sk->sk_mark,
152 .nl_u = { .ip4_u = { .daddr = dst, 155 .nl_u = { .ip4_u = { .daddr = dst,
153 .saddr = src, 156 .saddr = src,
154 .tos = tos } }, 157 .tos = tos } },
diff --git a/include/net/sock.h b/include/net/sock.h
index 902324488d0f..e3fb4c047f4c 100644
--- a/include/net/sock.h
+++ b/include/net/sock.h
@@ -262,6 +262,8 @@ struct sock {
262 __u32 sk_sndmsg_off; 262 __u32 sk_sndmsg_off;
263 int sk_write_pending; 263 int sk_write_pending;
264 void *sk_security; 264 void *sk_security;
265 __u32 sk_mark;
266 /* XXX 4 bytes hole on 64 bit */
265 void (*sk_state_change)(struct sock *sk); 267 void (*sk_state_change)(struct sock *sk);
266 void (*sk_data_ready)(struct sock *sk, int bytes); 268 void (*sk_data_ready)(struct sock *sk, int bytes);
267 void (*sk_write_space)(struct sock *sk); 269 void (*sk_write_space)(struct sock *sk);
diff --git a/include/net/xfrm.h b/include/net/xfrm.h
index 5ebb9ba479b1..ac72116636ca 100644
--- a/include/net/xfrm.h
+++ b/include/net/xfrm.h
@@ -159,6 +159,7 @@ struct xfrm_state
159 struct xfrm_algo *aalg; 159 struct xfrm_algo *aalg;
160 struct xfrm_algo *ealg; 160 struct xfrm_algo *ealg;
161 struct xfrm_algo *calg; 161 struct xfrm_algo *calg;
162 struct xfrm_algo_aead *aead;
162 163
163 /* Data for encapsulator */ 164 /* Data for encapsulator */
164 struct xfrm_encap_tmpl *encap; 165 struct xfrm_encap_tmpl *encap;
@@ -201,7 +202,7 @@ struct xfrm_state
201 202
202 /* Reference to data common to all the instances of this 203 /* Reference to data common to all the instances of this
203 * transformer. */ 204 * transformer. */
204 struct xfrm_type *type; 205 const struct xfrm_type *type;
205 struct xfrm_mode *inner_mode; 206 struct xfrm_mode *inner_mode;
206 struct xfrm_mode *outer_mode; 207 struct xfrm_mode *outer_mode;
207 208
@@ -278,7 +279,7 @@ struct xfrm_state_afinfo {
278 unsigned int proto; 279 unsigned int proto;
279 unsigned int eth_proto; 280 unsigned int eth_proto;
280 struct module *owner; 281 struct module *owner;
281 struct xfrm_type *type_map[IPPROTO_MAX]; 282 const struct xfrm_type *type_map[IPPROTO_MAX];
282 struct xfrm_mode *mode_map[XFRM_MODE_MAX]; 283 struct xfrm_mode *mode_map[XFRM_MODE_MAX];
283 int (*init_flags)(struct xfrm_state *x); 284 int (*init_flags)(struct xfrm_state *x);
284 void (*init_tempsel)(struct xfrm_state *x, struct flowi *fl, 285 void (*init_tempsel)(struct xfrm_state *x, struct flowi *fl,
@@ -321,8 +322,8 @@ struct xfrm_type
321 u32 (*get_mtu)(struct xfrm_state *, int size); 322 u32 (*get_mtu)(struct xfrm_state *, int size);
322}; 323};
323 324
324extern int xfrm_register_type(struct xfrm_type *type, unsigned short family); 325extern int xfrm_register_type(const struct xfrm_type *type, unsigned short family);
325extern int xfrm_unregister_type(struct xfrm_type *type, unsigned short family); 326extern int xfrm_unregister_type(const struct xfrm_type *type, unsigned short family);
326 327
327struct xfrm_mode { 328struct xfrm_mode {
328 /* 329 /*
@@ -1108,6 +1109,10 @@ static inline int xfrm_id_proto_match(u8 proto, u8 userproto)
1108/* 1109/*
1109 * xfrm algorithm information 1110 * xfrm algorithm information
1110 */ 1111 */
1112struct xfrm_algo_aead_info {
1113 u16 icv_truncbits;
1114};
1115
1111struct xfrm_algo_auth_info { 1116struct xfrm_algo_auth_info {
1112 u16 icv_truncbits; 1117 u16 icv_truncbits;
1113 u16 icv_fullbits; 1118 u16 icv_fullbits;
@@ -1127,6 +1132,7 @@ struct xfrm_algo_desc {
1127 char *compat; 1132 char *compat;
1128 u8 available:1; 1133 u8 available:1;
1129 union { 1134 union {
1135 struct xfrm_algo_aead_info aead;
1130 struct xfrm_algo_auth_info auth; 1136 struct xfrm_algo_auth_info auth;
1131 struct xfrm_algo_encr_info encr; 1137 struct xfrm_algo_encr_info encr;
1132 struct xfrm_algo_comp_info comp; 1138 struct xfrm_algo_comp_info comp;
@@ -1343,6 +1349,8 @@ extern struct xfrm_algo_desc *xfrm_calg_get_byid(int alg_id);
1343extern struct xfrm_algo_desc *xfrm_aalg_get_byname(char *name, int probe); 1349extern struct xfrm_algo_desc *xfrm_aalg_get_byname(char *name, int probe);
1344extern struct xfrm_algo_desc *xfrm_ealg_get_byname(char *name, int probe); 1350extern struct xfrm_algo_desc *xfrm_ealg_get_byname(char *name, int probe);
1345extern struct xfrm_algo_desc *xfrm_calg_get_byname(char *name, int probe); 1351extern struct xfrm_algo_desc *xfrm_calg_get_byname(char *name, int probe);
1352extern struct xfrm_algo_desc *xfrm_aead_get_byname(char *name, int icv_len,
1353 int probe);
1346 1354
1347struct hash_desc; 1355struct hash_desc;
1348struct scatterlist; 1356struct scatterlist;