diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2008-10-11 12:33:18 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2008-10-11 12:33:18 -0400 |
commit | 4dd9ec4946b4651a295d3bc8df9c15ac692a8f4e (patch) | |
tree | afb300c752de7175bb2df4722d5c857e070c75d9 /include/linux | |
parent | 86ed5a93b8b56e4e0877b914af0e10883a196384 (diff) | |
parent | 6861ff35ec5b60fafaf8651754c9a75142bfa9a4 (diff) |
Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next-2.6
* git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next-2.6: (1075 commits)
myri10ge: update driver version number to 1.4.3-1.369
r8169: add shutdown handler
r8169: preliminary 8168d support
r8169: support additional 8168cp chipset
r8169: change default behavior for mildly identified 8168c chipsets
r8169: add a new 8168cp flavor
r8169: add a new 8168c flavor (bis)
r8169: add a new 8168c flavor
r8169: sync existing 8168 device hardware start sequences with vendor driver
r8169: 8168b Tx performance tweak
r8169: make room for more specific 8168 hardware start procedure
r8169: shuffle some registers handling around (8168 operation only)
r8169: new phy init parameters for the 8168b
r8169: update phy init parameters
r8169: wake up the PHY of the 8168
af_key: fix SADB_X_SPDDELETE response
ath9k: Fix return code when ath9k_hw_setpower() fails on reset
ath9k: remove nasty FAIL macro from ath9k_hw_reset()
gre: minor cleanups in netlink interface
gre: fix copy and paste error
...
Diffstat (limited to 'include/linux')
36 files changed, 1158 insertions, 204 deletions
diff --git a/include/linux/Kbuild b/include/linux/Kbuild index 31474e89c59a..282a504bd1db 100644 --- a/include/linux/Kbuild +++ b/include/linux/Kbuild | |||
@@ -126,6 +126,7 @@ header-y += pci_regs.h | |||
126 | header-y += pfkeyv2.h | 126 | header-y += pfkeyv2.h |
127 | header-y += pg.h | 127 | header-y += pg.h |
128 | header-y += phantom.h | 128 | header-y += phantom.h |
129 | header-y += phonet.h | ||
129 | header-y += pkt_cls.h | 130 | header-y += pkt_cls.h |
130 | header-y += pkt_sched.h | 131 | header-y += pkt_sched.h |
131 | header-y += posix_types.h | 132 | header-y += posix_types.h |
@@ -233,6 +234,7 @@ unifdef-y += if_fddi.h | |||
233 | unifdef-y += if_frad.h | 234 | unifdef-y += if_frad.h |
234 | unifdef-y += if_ltalk.h | 235 | unifdef-y += if_ltalk.h |
235 | unifdef-y += if_link.h | 236 | unifdef-y += if_link.h |
237 | unifdef-y += if_phonet.h | ||
236 | unifdef-y += if_pppol2tp.h | 238 | unifdef-y += if_pppol2tp.h |
237 | unifdef-y += if_pppox.h | 239 | unifdef-y += if_pppox.h |
238 | unifdef-y += if_tr.h | 240 | unifdef-y += if_tr.h |
diff --git a/include/linux/ieee80211.h b/include/linux/ieee80211.h index 7f4df7c7659d..14126bc36641 100644 --- a/include/linux/ieee80211.h +++ b/include/linux/ieee80211.h | |||
@@ -471,6 +471,11 @@ struct ieee80211s_hdr { | |||
471 | u8 eaddr3[6]; | 471 | u8 eaddr3[6]; |
472 | } __attribute__ ((packed)); | 472 | } __attribute__ ((packed)); |
473 | 473 | ||
474 | /* Mesh flags */ | ||
475 | #define MESH_FLAGS_AE_A4 0x1 | ||
476 | #define MESH_FLAGS_AE_A5_A6 0x2 | ||
477 | #define MESH_FLAGS_PS_DEEP 0x4 | ||
478 | |||
474 | /** | 479 | /** |
475 | * struct ieee80211_quiet_ie | 480 | * struct ieee80211_quiet_ie |
476 | * | 481 | * |
@@ -643,6 +648,9 @@ struct ieee80211_mgmt { | |||
643 | } u; | 648 | } u; |
644 | } __attribute__ ((packed)); | 649 | } __attribute__ ((packed)); |
645 | 650 | ||
651 | /* mgmt header + 1 byte category code */ | ||
652 | #define IEEE80211_MIN_ACTION_SIZE offsetof(struct ieee80211_mgmt, u.action.u) | ||
653 | |||
646 | 654 | ||
647 | /* Control frames */ | 655 | /* Control frames */ |
648 | struct ieee80211_rts { | 656 | struct ieee80211_rts { |
@@ -708,12 +716,13 @@ struct ieee80211_ht_addt_info { | |||
708 | 716 | ||
709 | /* 802.11n HT capabilities masks */ | 717 | /* 802.11n HT capabilities masks */ |
710 | #define IEEE80211_HT_CAP_SUP_WIDTH 0x0002 | 718 | #define IEEE80211_HT_CAP_SUP_WIDTH 0x0002 |
711 | #define IEEE80211_HT_CAP_MIMO_PS 0x000C | 719 | #define IEEE80211_HT_CAP_SM_PS 0x000C |
712 | #define IEEE80211_HT_CAP_GRN_FLD 0x0010 | 720 | #define IEEE80211_HT_CAP_GRN_FLD 0x0010 |
713 | #define IEEE80211_HT_CAP_SGI_20 0x0020 | 721 | #define IEEE80211_HT_CAP_SGI_20 0x0020 |
714 | #define IEEE80211_HT_CAP_SGI_40 0x0040 | 722 | #define IEEE80211_HT_CAP_SGI_40 0x0040 |
715 | #define IEEE80211_HT_CAP_DELAY_BA 0x0400 | 723 | #define IEEE80211_HT_CAP_DELAY_BA 0x0400 |
716 | #define IEEE80211_HT_CAP_MAX_AMSDU 0x0800 | 724 | #define IEEE80211_HT_CAP_MAX_AMSDU 0x0800 |
725 | #define IEEE80211_HT_CAP_DSSSCCK40 0x1000 | ||
717 | /* 802.11n HT capability AMPDU settings */ | 726 | /* 802.11n HT capability AMPDU settings */ |
718 | #define IEEE80211_HT_CAP_AMPDU_FACTOR 0x03 | 727 | #define IEEE80211_HT_CAP_AMPDU_FACTOR 0x03 |
719 | #define IEEE80211_HT_CAP_AMPDU_DENSITY 0x1C | 728 | #define IEEE80211_HT_CAP_AMPDU_DENSITY 0x1C |
@@ -736,11 +745,26 @@ struct ieee80211_ht_addt_info { | |||
736 | #define IEEE80211_HT_IE_NON_GF_STA_PRSNT 0x0004 | 745 | #define IEEE80211_HT_IE_NON_GF_STA_PRSNT 0x0004 |
737 | #define IEEE80211_HT_IE_NON_HT_STA_PRSNT 0x0010 | 746 | #define IEEE80211_HT_IE_NON_HT_STA_PRSNT 0x0010 |
738 | 747 | ||
739 | /* MIMO Power Save Modes */ | 748 | /* block-ack parameters */ |
740 | #define WLAN_HT_CAP_MIMO_PS_STATIC 0 | 749 | #define IEEE80211_ADDBA_PARAM_POLICY_MASK 0x0002 |
741 | #define WLAN_HT_CAP_MIMO_PS_DYNAMIC 1 | 750 | #define IEEE80211_ADDBA_PARAM_TID_MASK 0x003C |
742 | #define WLAN_HT_CAP_MIMO_PS_INVALID 2 | 751 | #define IEEE80211_ADDBA_PARAM_BUF_SIZE_MASK 0xFFA0 |
743 | #define WLAN_HT_CAP_MIMO_PS_DISABLED 3 | 752 | #define IEEE80211_DELBA_PARAM_TID_MASK 0xF000 |
753 | #define IEEE80211_DELBA_PARAM_INITIATOR_MASK 0x0800 | ||
754 | |||
755 | /* | ||
756 | * A-PMDU buffer sizes | ||
757 | * According to IEEE802.11n spec size varies from 8K to 64K (in powers of 2) | ||
758 | */ | ||
759 | #define IEEE80211_MIN_AMPDU_BUF 0x8 | ||
760 | #define IEEE80211_MAX_AMPDU_BUF 0x40 | ||
761 | |||
762 | |||
763 | /* Spatial Multiplexing Power Save Modes */ | ||
764 | #define WLAN_HT_CAP_SM_PS_STATIC 0 | ||
765 | #define WLAN_HT_CAP_SM_PS_DYNAMIC 1 | ||
766 | #define WLAN_HT_CAP_SM_PS_INVALID 2 | ||
767 | #define WLAN_HT_CAP_SM_PS_DISABLED 3 | ||
744 | 768 | ||
745 | /* Authentication algorithms */ | 769 | /* Authentication algorithms */ |
746 | #define WLAN_AUTH_OPEN 0 | 770 | #define WLAN_AUTH_OPEN 0 |
diff --git a/include/linux/if.h b/include/linux/if.h index 5c9d1fa93fef..65246846c844 100644 --- a/include/linux/if.h +++ b/include/linux/if.h | |||
@@ -24,6 +24,7 @@ | |||
24 | #include <linux/compiler.h> /* for "__user" et al */ | 24 | #include <linux/compiler.h> /* for "__user" et al */ |
25 | 25 | ||
26 | #define IFNAMSIZ 16 | 26 | #define IFNAMSIZ 16 |
27 | #define IFALIASZ 256 | ||
27 | #include <linux/hdlc/ioctl.h> | 28 | #include <linux/hdlc/ioctl.h> |
28 | 29 | ||
29 | /* Standard interface flags (netdevice->flags). */ | 30 | /* Standard interface flags (netdevice->flags). */ |
diff --git a/include/linux/if_ether.h b/include/linux/if_ether.h index e157c1399b61..bf1a53b2682e 100644 --- a/include/linux/if_ether.h +++ b/include/linux/if_ether.h | |||
@@ -56,6 +56,7 @@ | |||
56 | #define ETH_P_DIAG 0x6005 /* DEC Diagnostics */ | 56 | #define ETH_P_DIAG 0x6005 /* DEC Diagnostics */ |
57 | #define ETH_P_CUST 0x6006 /* DEC Customer use */ | 57 | #define ETH_P_CUST 0x6006 /* DEC Customer use */ |
58 | #define ETH_P_SCA 0x6007 /* DEC Systems Comms Arch */ | 58 | #define ETH_P_SCA 0x6007 /* DEC Systems Comms Arch */ |
59 | #define ETH_P_TEB 0x6558 /* Trans Ether Bridging */ | ||
59 | #define ETH_P_RARP 0x8035 /* Reverse Addr Res packet */ | 60 | #define ETH_P_RARP 0x8035 /* Reverse Addr Res packet */ |
60 | #define ETH_P_ATALK 0x809B /* Appletalk DDP */ | 61 | #define ETH_P_ATALK 0x809B /* Appletalk DDP */ |
61 | #define ETH_P_AARP 0x80F3 /* Appletalk AARP */ | 62 | #define ETH_P_AARP 0x80F3 /* Appletalk AARP */ |
@@ -74,8 +75,10 @@ | |||
74 | #define ETH_P_ATMFATE 0x8884 /* Frame-based ATM Transport | 75 | #define ETH_P_ATMFATE 0x8884 /* Frame-based ATM Transport |
75 | * over Ethernet | 76 | * over Ethernet |
76 | */ | 77 | */ |
78 | #define ETH_P_PAE 0x888E /* Port Access Entity (IEEE 802.1X) */ | ||
77 | #define ETH_P_AOE 0x88A2 /* ATA over Ethernet */ | 79 | #define ETH_P_AOE 0x88A2 /* ATA over Ethernet */ |
78 | #define ETH_P_TIPC 0x88CA /* TIPC */ | 80 | #define ETH_P_TIPC 0x88CA /* TIPC */ |
81 | #define ETH_P_EDSA 0xDADA /* Ethertype DSA [ NOT AN OFFICIALLY REGISTERED ID ] */ | ||
79 | 82 | ||
80 | /* | 83 | /* |
81 | * Non DIX types. Won't clash for 1500 types. | 84 | * Non DIX types. Won't clash for 1500 types. |
@@ -99,6 +102,9 @@ | |||
99 | #define ETH_P_ECONET 0x0018 /* Acorn Econet */ | 102 | #define ETH_P_ECONET 0x0018 /* Acorn Econet */ |
100 | #define ETH_P_HDLC 0x0019 /* HDLC frames */ | 103 | #define ETH_P_HDLC 0x0019 /* HDLC frames */ |
101 | #define ETH_P_ARCNET 0x001A /* 1A for ArcNet :-) */ | 104 | #define ETH_P_ARCNET 0x001A /* 1A for ArcNet :-) */ |
105 | #define ETH_P_DSA 0x001B /* Distributed Switch Arch. */ | ||
106 | #define ETH_P_TRAILER 0x001C /* Trailer switch tagging */ | ||
107 | #define ETH_P_PHONET 0x00F5 /* Nokia Phonet frames */ | ||
102 | 108 | ||
103 | /* | 109 | /* |
104 | * This is an Ethernet frame header. | 110 | * This is an Ethernet frame header. |
diff --git a/include/linux/if_link.h b/include/linux/if_link.h index 84c3492ae5cb..f9032c88716a 100644 --- a/include/linux/if_link.h +++ b/include/linux/if_link.h | |||
@@ -79,6 +79,7 @@ enum | |||
79 | IFLA_LINKINFO, | 79 | IFLA_LINKINFO, |
80 | #define IFLA_LINKINFO IFLA_LINKINFO | 80 | #define IFLA_LINKINFO IFLA_LINKINFO |
81 | IFLA_NET_NS_PID, | 81 | IFLA_NET_NS_PID, |
82 | IFLA_IFALIAS, | ||
82 | __IFLA_MAX | 83 | __IFLA_MAX |
83 | }; | 84 | }; |
84 | 85 | ||
diff --git a/include/linux/if_phonet.h b/include/linux/if_phonet.h new file mode 100644 index 000000000000..d70034bcec05 --- /dev/null +++ b/include/linux/if_phonet.h | |||
@@ -0,0 +1,19 @@ | |||
1 | /* | ||
2 | * File: if_phonet.h | ||
3 | * | ||
4 | * Phonet interface kernel definitions | ||
5 | * | ||
6 | * Copyright (C) 2008 Nokia Corporation. All rights reserved. | ||
7 | */ | ||
8 | #ifndef LINUX_IF_PHONET_H | ||
9 | #define LINUX_IF_PHONET_H | ||
10 | |||
11 | #define PHONET_MIN_MTU 6 /* pn_length = 0 */ | ||
12 | #define PHONET_MAX_MTU 65541 /* pn_length = 0xffff */ | ||
13 | #define PHONET_DEV_MTU PHONET_MAX_MTU | ||
14 | |||
15 | #ifdef __KERNEL__ | ||
16 | extern struct header_ops phonet_header_ops; | ||
17 | #endif | ||
18 | |||
19 | #endif | ||
diff --git a/include/linux/if_tunnel.h b/include/linux/if_tunnel.h index d4efe4014705..aeab2cb32a9c 100644 --- a/include/linux/if_tunnel.h +++ b/include/linux/if_tunnel.h | |||
@@ -2,6 +2,7 @@ | |||
2 | #define _IF_TUNNEL_H_ | 2 | #define _IF_TUNNEL_H_ |
3 | 3 | ||
4 | #include <linux/types.h> | 4 | #include <linux/types.h> |
5 | #include <linux/ip.h> | ||
5 | 6 | ||
6 | #define SIOCGETTUNNEL (SIOCDEVPRIVATE + 0) | 7 | #define SIOCGETTUNNEL (SIOCDEVPRIVATE + 0) |
7 | #define SIOCADDTUNNEL (SIOCDEVPRIVATE + 1) | 8 | #define SIOCADDTUNNEL (SIOCDEVPRIVATE + 1) |
@@ -47,4 +48,22 @@ struct ip_tunnel_prl { | |||
47 | /* PRL flags */ | 48 | /* PRL flags */ |
48 | #define PRL_DEFAULT 0x0001 | 49 | #define PRL_DEFAULT 0x0001 |
49 | 50 | ||
51 | enum | ||
52 | { | ||
53 | IFLA_GRE_UNSPEC, | ||
54 | IFLA_GRE_LINK, | ||
55 | IFLA_GRE_IFLAGS, | ||
56 | IFLA_GRE_OFLAGS, | ||
57 | IFLA_GRE_IKEY, | ||
58 | IFLA_GRE_OKEY, | ||
59 | IFLA_GRE_LOCAL, | ||
60 | IFLA_GRE_REMOTE, | ||
61 | IFLA_GRE_TTL, | ||
62 | IFLA_GRE_TOS, | ||
63 | IFLA_GRE_PMTUDISC, | ||
64 | __IFLA_GRE_MAX, | ||
65 | }; | ||
66 | |||
67 | #define IFLA_GRE_MAX (__IFLA_GRE_MAX - 1) | ||
68 | |||
50 | #endif /* _IF_TUNNEL_H_ */ | 69 | #endif /* _IF_TUNNEL_H_ */ |
diff --git a/include/linux/in.h b/include/linux/in.h index 4065313cd7ee..db458beef19d 100644 --- a/include/linux/in.h +++ b/include/linux/in.h | |||
@@ -75,6 +75,7 @@ struct in_addr { | |||
75 | #define IP_IPSEC_POLICY 16 | 75 | #define IP_IPSEC_POLICY 16 |
76 | #define IP_XFRM_POLICY 17 | 76 | #define IP_XFRM_POLICY 17 |
77 | #define IP_PASSSEC 18 | 77 | #define IP_PASSSEC 18 |
78 | #define IP_TRANSPARENT 19 | ||
78 | 79 | ||
79 | /* BSD compatibility */ | 80 | /* BSD compatibility */ |
80 | #define IP_RECVRETOPTS IP_RETOPTS | 81 | #define IP_RECVRETOPTS IP_RETOPTS |
diff --git a/include/linux/inetdevice.h b/include/linux/inetdevice.h index c6f51ad52d5b..06fcdb45106b 100644 --- a/include/linux/inetdevice.h +++ b/include/linux/inetdevice.h | |||
@@ -25,6 +25,7 @@ struct in_device | |||
25 | struct in_ifaddr *ifa_list; /* IP ifaddr chain */ | 25 | struct in_ifaddr *ifa_list; /* IP ifaddr chain */ |
26 | rwlock_t mc_list_lock; | 26 | rwlock_t mc_list_lock; |
27 | struct ip_mc_list *mc_list; /* IP multicast filter chain */ | 27 | struct ip_mc_list *mc_list; /* IP multicast filter chain */ |
28 | int mc_count; /* Number of installed mcasts */ | ||
28 | spinlock_t mc_tomb_lock; | 29 | spinlock_t mc_tomb_lock; |
29 | struct ip_mc_list *mc_tomb; | 30 | struct ip_mc_list *mc_tomb; |
30 | unsigned long mr_v1_seen; | 31 | unsigned long mr_v1_seen; |
diff --git a/include/linux/ip_vs.h b/include/linux/ip_vs.h index ec6eb49af2d8..0f434a28fb58 100644 --- a/include/linux/ip_vs.h +++ b/include/linux/ip_vs.h | |||
@@ -242,4 +242,164 @@ struct ip_vs_daemon_user { | |||
242 | int syncid; | 242 | int syncid; |
243 | }; | 243 | }; |
244 | 244 | ||
245 | /* | ||
246 | * | ||
247 | * IPVS Generic Netlink interface definitions | ||
248 | * | ||
249 | */ | ||
250 | |||
251 | /* Generic Netlink family info */ | ||
252 | |||
253 | #define IPVS_GENL_NAME "IPVS" | ||
254 | #define IPVS_GENL_VERSION 0x1 | ||
255 | |||
256 | struct ip_vs_flags { | ||
257 | __be32 flags; | ||
258 | __be32 mask; | ||
259 | }; | ||
260 | |||
261 | /* Generic Netlink command attributes */ | ||
262 | enum { | ||
263 | IPVS_CMD_UNSPEC = 0, | ||
264 | |||
265 | IPVS_CMD_NEW_SERVICE, /* add service */ | ||
266 | IPVS_CMD_SET_SERVICE, /* modify service */ | ||
267 | IPVS_CMD_DEL_SERVICE, /* delete service */ | ||
268 | IPVS_CMD_GET_SERVICE, /* get service info */ | ||
269 | |||
270 | IPVS_CMD_NEW_DEST, /* add destination */ | ||
271 | IPVS_CMD_SET_DEST, /* modify destination */ | ||
272 | IPVS_CMD_DEL_DEST, /* delete destination */ | ||
273 | IPVS_CMD_GET_DEST, /* get destination info */ | ||
274 | |||
275 | IPVS_CMD_NEW_DAEMON, /* start sync daemon */ | ||
276 | IPVS_CMD_DEL_DAEMON, /* stop sync daemon */ | ||
277 | IPVS_CMD_GET_DAEMON, /* get sync daemon status */ | ||
278 | |||
279 | IPVS_CMD_SET_CONFIG, /* set config settings */ | ||
280 | IPVS_CMD_GET_CONFIG, /* get config settings */ | ||
281 | |||
282 | IPVS_CMD_SET_INFO, /* only used in GET_INFO reply */ | ||
283 | IPVS_CMD_GET_INFO, /* get general IPVS info */ | ||
284 | |||
285 | IPVS_CMD_ZERO, /* zero all counters and stats */ | ||
286 | IPVS_CMD_FLUSH, /* flush services and dests */ | ||
287 | |||
288 | __IPVS_CMD_MAX, | ||
289 | }; | ||
290 | |||
291 | #define IPVS_CMD_MAX (__IPVS_CMD_MAX - 1) | ||
292 | |||
293 | /* Attributes used in the first level of commands */ | ||
294 | enum { | ||
295 | IPVS_CMD_ATTR_UNSPEC = 0, | ||
296 | IPVS_CMD_ATTR_SERVICE, /* nested service attribute */ | ||
297 | IPVS_CMD_ATTR_DEST, /* nested destination attribute */ | ||
298 | IPVS_CMD_ATTR_DAEMON, /* nested sync daemon attribute */ | ||
299 | IPVS_CMD_ATTR_TIMEOUT_TCP, /* TCP connection timeout */ | ||
300 | IPVS_CMD_ATTR_TIMEOUT_TCP_FIN, /* TCP FIN wait timeout */ | ||
301 | IPVS_CMD_ATTR_TIMEOUT_UDP, /* UDP timeout */ | ||
302 | __IPVS_CMD_ATTR_MAX, | ||
303 | }; | ||
304 | |||
305 | #define IPVS_CMD_ATTR_MAX (__IPVS_SVC_ATTR_MAX - 1) | ||
306 | |||
307 | /* | ||
308 | * Attributes used to describe a service | ||
309 | * | ||
310 | * Used inside nested attribute IPVS_CMD_ATTR_SERVICE | ||
311 | */ | ||
312 | enum { | ||
313 | IPVS_SVC_ATTR_UNSPEC = 0, | ||
314 | IPVS_SVC_ATTR_AF, /* address family */ | ||
315 | IPVS_SVC_ATTR_PROTOCOL, /* virtual service protocol */ | ||
316 | IPVS_SVC_ATTR_ADDR, /* virtual service address */ | ||
317 | IPVS_SVC_ATTR_PORT, /* virtual service port */ | ||
318 | IPVS_SVC_ATTR_FWMARK, /* firewall mark of service */ | ||
319 | |||
320 | IPVS_SVC_ATTR_SCHED_NAME, /* name of scheduler */ | ||
321 | IPVS_SVC_ATTR_FLAGS, /* virtual service flags */ | ||
322 | IPVS_SVC_ATTR_TIMEOUT, /* persistent timeout */ | ||
323 | IPVS_SVC_ATTR_NETMASK, /* persistent netmask */ | ||
324 | |||
325 | IPVS_SVC_ATTR_STATS, /* nested attribute for service stats */ | ||
326 | __IPVS_SVC_ATTR_MAX, | ||
327 | }; | ||
328 | |||
329 | #define IPVS_SVC_ATTR_MAX (__IPVS_SVC_ATTR_MAX - 1) | ||
330 | |||
331 | /* | ||
332 | * Attributes used to describe a destination (real server) | ||
333 | * | ||
334 | * Used inside nested attribute IPVS_CMD_ATTR_DEST | ||
335 | */ | ||
336 | enum { | ||
337 | IPVS_DEST_ATTR_UNSPEC = 0, | ||
338 | IPVS_DEST_ATTR_ADDR, /* real server address */ | ||
339 | IPVS_DEST_ATTR_PORT, /* real server port */ | ||
340 | |||
341 | IPVS_DEST_ATTR_FWD_METHOD, /* forwarding method */ | ||
342 | IPVS_DEST_ATTR_WEIGHT, /* destination weight */ | ||
343 | |||
344 | IPVS_DEST_ATTR_U_THRESH, /* upper threshold */ | ||
345 | IPVS_DEST_ATTR_L_THRESH, /* lower threshold */ | ||
346 | |||
347 | IPVS_DEST_ATTR_ACTIVE_CONNS, /* active connections */ | ||
348 | IPVS_DEST_ATTR_INACT_CONNS, /* inactive connections */ | ||
349 | IPVS_DEST_ATTR_PERSIST_CONNS, /* persistent connections */ | ||
350 | |||
351 | IPVS_DEST_ATTR_STATS, /* nested attribute for dest stats */ | ||
352 | __IPVS_DEST_ATTR_MAX, | ||
353 | }; | ||
354 | |||
355 | #define IPVS_DEST_ATTR_MAX (__IPVS_DEST_ATTR_MAX - 1) | ||
356 | |||
357 | /* | ||
358 | * Attributes describing a sync daemon | ||
359 | * | ||
360 | * Used inside nested attribute IPVS_CMD_ATTR_DAEMON | ||
361 | */ | ||
362 | enum { | ||
363 | IPVS_DAEMON_ATTR_UNSPEC = 0, | ||
364 | IPVS_DAEMON_ATTR_STATE, /* sync daemon state (master/backup) */ | ||
365 | IPVS_DAEMON_ATTR_MCAST_IFN, /* multicast interface name */ | ||
366 | IPVS_DAEMON_ATTR_SYNC_ID, /* SyncID we belong to */ | ||
367 | __IPVS_DAEMON_ATTR_MAX, | ||
368 | }; | ||
369 | |||
370 | #define IPVS_DAEMON_ATTR_MAX (__IPVS_DAEMON_ATTR_MAX - 1) | ||
371 | |||
372 | /* | ||
373 | * Attributes used to describe service or destination entry statistics | ||
374 | * | ||
375 | * Used inside nested attributes IPVS_SVC_ATTR_STATS and IPVS_DEST_ATTR_STATS | ||
376 | */ | ||
377 | enum { | ||
378 | IPVS_STATS_ATTR_UNSPEC = 0, | ||
379 | IPVS_STATS_ATTR_CONNS, /* connections scheduled */ | ||
380 | IPVS_STATS_ATTR_INPKTS, /* incoming packets */ | ||
381 | IPVS_STATS_ATTR_OUTPKTS, /* outgoing packets */ | ||
382 | IPVS_STATS_ATTR_INBYTES, /* incoming bytes */ | ||
383 | IPVS_STATS_ATTR_OUTBYTES, /* outgoing bytes */ | ||
384 | |||
385 | IPVS_STATS_ATTR_CPS, /* current connection rate */ | ||
386 | IPVS_STATS_ATTR_INPPS, /* current in packet rate */ | ||
387 | IPVS_STATS_ATTR_OUTPPS, /* current out packet rate */ | ||
388 | IPVS_STATS_ATTR_INBPS, /* current in byte rate */ | ||
389 | IPVS_STATS_ATTR_OUTBPS, /* current out byte rate */ | ||
390 | __IPVS_STATS_ATTR_MAX, | ||
391 | }; | ||
392 | |||
393 | #define IPVS_STATS_ATTR_MAX (__IPVS_STATS_ATTR_MAX - 1) | ||
394 | |||
395 | /* Attributes used in response to IPVS_CMD_GET_INFO command */ | ||
396 | enum { | ||
397 | IPVS_INFO_ATTR_UNSPEC = 0, | ||
398 | IPVS_INFO_ATTR_VERSION, /* IPVS version number */ | ||
399 | IPVS_INFO_ATTR_CONN_TAB_SIZE, /* size of connection hash table */ | ||
400 | __IPVS_INFO_ATTR_MAX, | ||
401 | }; | ||
402 | |||
403 | #define IPVS_INFO_ATTR_MAX (__IPVS_INFO_ATTR_MAX - 1) | ||
404 | |||
245 | #endif /* _IP_VS_H */ | 405 | #endif /* _IP_VS_H */ |
diff --git a/include/linux/isdn_ppp.h b/include/linux/isdn_ppp.h index 8687a7dc0632..4c218ee7587a 100644 --- a/include/linux/isdn_ppp.h +++ b/include/linux/isdn_ppp.h | |||
@@ -157,7 +157,7 @@ typedef struct { | |||
157 | 157 | ||
158 | typedef struct { | 158 | typedef struct { |
159 | int mp_mrru; /* unused */ | 159 | int mp_mrru; /* unused */ |
160 | struct sk_buff * frags; /* fragments sl list -- use skb->next */ | 160 | struct sk_buff_head frags; /* fragments sl list */ |
161 | long frames; /* number of frames in the frame list */ | 161 | long frames; /* number of frames in the frame list */ |
162 | unsigned int seq; /* last processed packet seq #: any packets | 162 | unsigned int seq; /* last processed packet seq #: any packets |
163 | * with smaller seq # will be dropped | 163 | * with smaller seq # will be dropped |
diff --git a/include/linux/mv643xx_eth.h b/include/linux/mv643xx_eth.h index 12078577aef6..cbbbe9bfecad 100644 --- a/include/linux/mv643xx_eth.h +++ b/include/linux/mv643xx_eth.h | |||
@@ -17,9 +17,14 @@ | |||
17 | 17 | ||
18 | struct mv643xx_eth_shared_platform_data { | 18 | struct mv643xx_eth_shared_platform_data { |
19 | struct mbus_dram_target_info *dram; | 19 | struct mbus_dram_target_info *dram; |
20 | struct platform_device *shared_smi; | ||
20 | unsigned int t_clk; | 21 | unsigned int t_clk; |
21 | }; | 22 | }; |
22 | 23 | ||
24 | #define MV643XX_ETH_PHY_ADDR_DEFAULT 0 | ||
25 | #define MV643XX_ETH_PHY_ADDR(x) (0x80 | (x)) | ||
26 | #define MV643XX_ETH_PHY_NONE 0xff | ||
27 | |||
23 | struct mv643xx_eth_platform_data { | 28 | struct mv643xx_eth_platform_data { |
24 | /* | 29 | /* |
25 | * Pointer back to our parent instance, and our port number. | 30 | * Pointer back to our parent instance, and our port number. |
@@ -30,8 +35,6 @@ struct mv643xx_eth_platform_data { | |||
30 | /* | 35 | /* |
31 | * Whether a PHY is present, and if yes, at which address. | 36 | * Whether a PHY is present, and if yes, at which address. |
32 | */ | 37 | */ |
33 | struct platform_device *shared_smi; | ||
34 | int force_phy_addr; | ||
35 | int phy_addr; | 38 | int phy_addr; |
36 | 39 | ||
37 | /* | 40 | /* |
@@ -49,10 +52,10 @@ struct mv643xx_eth_platform_data { | |||
49 | int duplex; | 52 | int duplex; |
50 | 53 | ||
51 | /* | 54 | /* |
52 | * Which RX/TX queues to use. | 55 | * How many RX/TX queues to use. |
53 | */ | 56 | */ |
54 | int rx_queue_mask; | 57 | int rx_queue_count; |
55 | int tx_queue_mask; | 58 | int tx_queue_count; |
56 | 59 | ||
57 | /* | 60 | /* |
58 | * Override default RX/TX queue sizes if nonzero. | 61 | * Override default RX/TX queue sizes if nonzero. |
diff --git a/include/linux/netdevice.h b/include/linux/netdevice.h index 488c56e649b5..d3ea3de70a8a 100644 --- a/include/linux/netdevice.h +++ b/include/linux/netdevice.h | |||
@@ -42,6 +42,7 @@ | |||
42 | #include <linux/workqueue.h> | 42 | #include <linux/workqueue.h> |
43 | 43 | ||
44 | #include <net/net_namespace.h> | 44 | #include <net/net_namespace.h> |
45 | #include <net/dsa.h> | ||
45 | 46 | ||
46 | struct vlan_group; | 47 | struct vlan_group; |
47 | struct ethtool_ops; | 48 | struct ethtool_ops; |
@@ -471,6 +472,8 @@ struct net_device | |||
471 | char name[IFNAMSIZ]; | 472 | char name[IFNAMSIZ]; |
472 | /* device name hash chain */ | 473 | /* device name hash chain */ |
473 | struct hlist_node name_hlist; | 474 | struct hlist_node name_hlist; |
475 | /* snmp alias */ | ||
476 | char *ifalias; | ||
474 | 477 | ||
475 | /* | 478 | /* |
476 | * I/O specific fields | 479 | * I/O specific fields |
@@ -605,6 +608,9 @@ struct net_device | |||
605 | 608 | ||
606 | /* Protocol specific pointers */ | 609 | /* Protocol specific pointers */ |
607 | 610 | ||
611 | #ifdef CONFIG_NET_DSA | ||
612 | void *dsa_ptr; /* dsa specific data */ | ||
613 | #endif | ||
608 | void *atalk_ptr; /* AppleTalk link */ | 614 | void *atalk_ptr; /* AppleTalk link */ |
609 | void *ip_ptr; /* IPv4 specific data */ | 615 | void *ip_ptr; /* IPv4 specific data */ |
610 | void *dn_ptr; /* DECnet specific data */ | 616 | void *dn_ptr; /* DECnet specific data */ |
@@ -796,6 +802,26 @@ void dev_net_set(struct net_device *dev, struct net *net) | |||
796 | #endif | 802 | #endif |
797 | } | 803 | } |
798 | 804 | ||
805 | static inline bool netdev_uses_dsa_tags(struct net_device *dev) | ||
806 | { | ||
807 | #ifdef CONFIG_NET_DSA_TAG_DSA | ||
808 | if (dev->dsa_ptr != NULL) | ||
809 | return dsa_uses_dsa_tags(dev->dsa_ptr); | ||
810 | #endif | ||
811 | |||
812 | return 0; | ||
813 | } | ||
814 | |||
815 | static inline bool netdev_uses_trailer_tags(struct net_device *dev) | ||
816 | { | ||
817 | #ifdef CONFIG_NET_DSA_TAG_TRAILER | ||
818 | if (dev->dsa_ptr != NULL) | ||
819 | return dsa_uses_trailer_tags(dev->dsa_ptr); | ||
820 | #endif | ||
821 | |||
822 | return 0; | ||
823 | } | ||
824 | |||
799 | /** | 825 | /** |
800 | * netdev_priv - access network device private data | 826 | * netdev_priv - access network device private data |
801 | * @dev: network device | 827 | * @dev: network device |
@@ -1223,7 +1249,8 @@ extern int dev_ioctl(struct net *net, unsigned int cmd, void __user *); | |||
1223 | extern int dev_ethtool(struct net *net, struct ifreq *); | 1249 | extern int dev_ethtool(struct net *net, struct ifreq *); |
1224 | extern unsigned dev_get_flags(const struct net_device *); | 1250 | extern unsigned dev_get_flags(const struct net_device *); |
1225 | extern int dev_change_flags(struct net_device *, unsigned); | 1251 | extern int dev_change_flags(struct net_device *, unsigned); |
1226 | extern int dev_change_name(struct net_device *, char *); | 1252 | extern int dev_change_name(struct net_device *, const char *); |
1253 | extern int dev_set_alias(struct net_device *, const char *, size_t); | ||
1227 | extern int dev_change_net_namespace(struct net_device *, | 1254 | extern int dev_change_net_namespace(struct net_device *, |
1228 | struct net *, const char *); | 1255 | struct net *, const char *); |
1229 | extern int dev_set_mtu(struct net_device *, int); | 1256 | extern int dev_set_mtu(struct net_device *, int); |
@@ -1667,7 +1694,7 @@ extern void dev_seq_stop(struct seq_file *seq, void *v); | |||
1667 | extern int netdev_class_create_file(struct class_attribute *class_attr); | 1694 | extern int netdev_class_create_file(struct class_attribute *class_attr); |
1668 | extern void netdev_class_remove_file(struct class_attribute *class_attr); | 1695 | extern void netdev_class_remove_file(struct class_attribute *class_attr); |
1669 | 1696 | ||
1670 | extern char *netdev_drivername(struct net_device *dev, char *buffer, int len); | 1697 | extern char *netdev_drivername(const struct net_device *dev, char *buffer, int len); |
1671 | 1698 | ||
1672 | extern void linkwatch_run_queue(void); | 1699 | extern void linkwatch_run_queue(void); |
1673 | 1700 | ||
diff --git a/include/linux/netfilter.h b/include/linux/netfilter.h index 0c5eb7ed8b3f..48cfe51bfddc 100644 --- a/include/linux/netfilter.h +++ b/include/linux/netfilter.h | |||
@@ -5,13 +5,11 @@ | |||
5 | #include <linux/init.h> | 5 | #include <linux/init.h> |
6 | #include <linux/skbuff.h> | 6 | #include <linux/skbuff.h> |
7 | #include <linux/net.h> | 7 | #include <linux/net.h> |
8 | #include <linux/netdevice.h> | ||
9 | #include <linux/if.h> | 8 | #include <linux/if.h> |
10 | #include <linux/in.h> | 9 | #include <linux/in.h> |
11 | #include <linux/in6.h> | 10 | #include <linux/in6.h> |
12 | #include <linux/wait.h> | 11 | #include <linux/wait.h> |
13 | #include <linux/list.h> | 12 | #include <linux/list.h> |
14 | #include <net/net_namespace.h> | ||
15 | #endif | 13 | #endif |
16 | #include <linux/types.h> | 14 | #include <linux/types.h> |
17 | #include <linux/compiler.h> | 15 | #include <linux/compiler.h> |
@@ -52,6 +50,16 @@ enum nf_inet_hooks { | |||
52 | NF_INET_NUMHOOKS | 50 | NF_INET_NUMHOOKS |
53 | }; | 51 | }; |
54 | 52 | ||
53 | enum { | ||
54 | NFPROTO_UNSPEC = 0, | ||
55 | NFPROTO_IPV4 = 2, | ||
56 | NFPROTO_ARP = 3, | ||
57 | NFPROTO_BRIDGE = 7, | ||
58 | NFPROTO_IPV6 = 10, | ||
59 | NFPROTO_DECNET = 12, | ||
60 | NFPROTO_NUMPROTO, | ||
61 | }; | ||
62 | |||
55 | union nf_inet_addr { | 63 | union nf_inet_addr { |
56 | __u32 all[4]; | 64 | __u32 all[4]; |
57 | __be32 ip; | 65 | __be32 ip; |
@@ -92,8 +100,8 @@ struct nf_hook_ops | |||
92 | /* User fills in from here down. */ | 100 | /* User fills in from here down. */ |
93 | nf_hookfn *hook; | 101 | nf_hookfn *hook; |
94 | struct module *owner; | 102 | struct module *owner; |
95 | int pf; | 103 | u_int8_t pf; |
96 | int hooknum; | 104 | unsigned int hooknum; |
97 | /* Hooks are ordered in ascending priority. */ | 105 | /* Hooks are ordered in ascending priority. */ |
98 | int priority; | 106 | int priority; |
99 | }; | 107 | }; |
@@ -102,7 +110,7 @@ struct nf_sockopt_ops | |||
102 | { | 110 | { |
103 | struct list_head list; | 111 | struct list_head list; |
104 | 112 | ||
105 | int pf; | 113 | u_int8_t pf; |
106 | 114 | ||
107 | /* Non-inclusive ranges: use 0/0/NULL to never get called. */ | 115 | /* Non-inclusive ranges: use 0/0/NULL to never get called. */ |
108 | int set_optmin; | 116 | int set_optmin; |
@@ -138,9 +146,9 @@ extern struct ctl_path nf_net_netfilter_sysctl_path[]; | |||
138 | extern struct ctl_path nf_net_ipv4_netfilter_sysctl_path[]; | 146 | extern struct ctl_path nf_net_ipv4_netfilter_sysctl_path[]; |
139 | #endif /* CONFIG_SYSCTL */ | 147 | #endif /* CONFIG_SYSCTL */ |
140 | 148 | ||
141 | extern struct list_head nf_hooks[NPROTO][NF_MAX_HOOKS]; | 149 | extern struct list_head nf_hooks[NFPROTO_NUMPROTO][NF_MAX_HOOKS]; |
142 | 150 | ||
143 | int nf_hook_slow(int pf, unsigned int hook, struct sk_buff *skb, | 151 | int nf_hook_slow(u_int8_t pf, unsigned int hook, struct sk_buff *skb, |
144 | struct net_device *indev, struct net_device *outdev, | 152 | struct net_device *indev, struct net_device *outdev, |
145 | int (*okfn)(struct sk_buff *), int thresh); | 153 | int (*okfn)(struct sk_buff *), int thresh); |
146 | 154 | ||
@@ -151,7 +159,7 @@ int nf_hook_slow(int pf, unsigned int hook, struct sk_buff *skb, | |||
151 | * okfn must be invoked by the caller in this case. Any other return | 159 | * okfn must be invoked by the caller in this case. Any other return |
152 | * value indicates the packet has been consumed by the hook. | 160 | * value indicates the packet has been consumed by the hook. |
153 | */ | 161 | */ |
154 | static inline int nf_hook_thresh(int pf, unsigned int hook, | 162 | static inline int nf_hook_thresh(u_int8_t pf, unsigned int hook, |
155 | struct sk_buff *skb, | 163 | struct sk_buff *skb, |
156 | struct net_device *indev, | 164 | struct net_device *indev, |
157 | struct net_device *outdev, | 165 | struct net_device *outdev, |
@@ -167,7 +175,7 @@ static inline int nf_hook_thresh(int pf, unsigned int hook, | |||
167 | return nf_hook_slow(pf, hook, skb, indev, outdev, okfn, thresh); | 175 | return nf_hook_slow(pf, hook, skb, indev, outdev, okfn, thresh); |
168 | } | 176 | } |
169 | 177 | ||
170 | static inline int nf_hook(int pf, unsigned int hook, struct sk_buff *skb, | 178 | static inline int nf_hook(u_int8_t pf, unsigned int hook, struct sk_buff *skb, |
171 | struct net_device *indev, struct net_device *outdev, | 179 | struct net_device *indev, struct net_device *outdev, |
172 | int (*okfn)(struct sk_buff *)) | 180 | int (*okfn)(struct sk_buff *)) |
173 | { | 181 | { |
@@ -212,14 +220,14 @@ __ret;}) | |||
212 | NF_HOOK_THRESH(pf, hook, skb, indev, outdev, okfn, INT_MIN) | 220 | NF_HOOK_THRESH(pf, hook, skb, indev, outdev, okfn, INT_MIN) |
213 | 221 | ||
214 | /* Call setsockopt() */ | 222 | /* Call setsockopt() */ |
215 | int nf_setsockopt(struct sock *sk, int pf, int optval, char __user *opt, | 223 | int nf_setsockopt(struct sock *sk, u_int8_t pf, int optval, char __user *opt, |
216 | int len); | 224 | int len); |
217 | int nf_getsockopt(struct sock *sk, int pf, int optval, char __user *opt, | 225 | int nf_getsockopt(struct sock *sk, u_int8_t pf, int optval, char __user *opt, |
218 | int *len); | 226 | int *len); |
219 | 227 | ||
220 | int compat_nf_setsockopt(struct sock *sk, int pf, int optval, | 228 | int compat_nf_setsockopt(struct sock *sk, u_int8_t pf, int optval, |
221 | char __user *opt, int len); | 229 | char __user *opt, int len); |
222 | int compat_nf_getsockopt(struct sock *sk, int pf, int optval, | 230 | int compat_nf_getsockopt(struct sock *sk, u_int8_t pf, int optval, |
223 | char __user *opt, int *len); | 231 | char __user *opt, int *len); |
224 | 232 | ||
225 | /* Call this before modifying an existing packet: ensures it is | 233 | /* Call this before modifying an existing packet: ensures it is |
@@ -247,7 +255,7 @@ struct nf_afinfo { | |||
247 | int route_key_size; | 255 | int route_key_size; |
248 | }; | 256 | }; |
249 | 257 | ||
250 | extern const struct nf_afinfo *nf_afinfo[NPROTO]; | 258 | extern const struct nf_afinfo *nf_afinfo[NFPROTO_NUMPROTO]; |
251 | static inline const struct nf_afinfo *nf_get_afinfo(unsigned short family) | 259 | static inline const struct nf_afinfo *nf_get_afinfo(unsigned short family) |
252 | { | 260 | { |
253 | return rcu_dereference(nf_afinfo[family]); | 261 | return rcu_dereference(nf_afinfo[family]); |
@@ -292,7 +300,7 @@ extern void nf_unregister_afinfo(const struct nf_afinfo *afinfo); | |||
292 | extern void (*ip_nat_decode_session)(struct sk_buff *, struct flowi *); | 300 | extern void (*ip_nat_decode_session)(struct sk_buff *, struct flowi *); |
293 | 301 | ||
294 | static inline void | 302 | static inline void |
295 | nf_nat_decode_session(struct sk_buff *skb, struct flowi *fl, int family) | 303 | nf_nat_decode_session(struct sk_buff *skb, struct flowi *fl, u_int8_t family) |
296 | { | 304 | { |
297 | #ifdef CONFIG_NF_NAT_NEEDED | 305 | #ifdef CONFIG_NF_NAT_NEEDED |
298 | void (*decodefn)(struct sk_buff *, struct flowi *); | 306 | void (*decodefn)(struct sk_buff *, struct flowi *); |
@@ -315,7 +323,7 @@ extern struct proc_dir_entry *proc_net_netfilter; | |||
315 | #else /* !CONFIG_NETFILTER */ | 323 | #else /* !CONFIG_NETFILTER */ |
316 | #define NF_HOOK(pf, hook, skb, indev, outdev, okfn) (okfn)(skb) | 324 | #define NF_HOOK(pf, hook, skb, indev, outdev, okfn) (okfn)(skb) |
317 | #define NF_HOOK_COND(pf, hook, skb, indev, outdev, okfn, cond) (okfn)(skb) | 325 | #define NF_HOOK_COND(pf, hook, skb, indev, outdev, okfn, cond) (okfn)(skb) |
318 | static inline int nf_hook_thresh(int pf, unsigned int hook, | 326 | static inline int nf_hook_thresh(u_int8_t pf, unsigned int hook, |
319 | struct sk_buff *skb, | 327 | struct sk_buff *skb, |
320 | struct net_device *indev, | 328 | struct net_device *indev, |
321 | struct net_device *outdev, | 329 | struct net_device *outdev, |
@@ -324,7 +332,7 @@ static inline int nf_hook_thresh(int pf, unsigned int hook, | |||
324 | { | 332 | { |
325 | return okfn(skb); | 333 | return okfn(skb); |
326 | } | 334 | } |
327 | static inline int nf_hook(int pf, unsigned int hook, struct sk_buff *skb, | 335 | static inline int nf_hook(u_int8_t pf, unsigned int hook, struct sk_buff *skb, |
328 | struct net_device *indev, struct net_device *outdev, | 336 | struct net_device *indev, struct net_device *outdev, |
329 | int (*okfn)(struct sk_buff *)) | 337 | int (*okfn)(struct sk_buff *)) |
330 | { | 338 | { |
@@ -332,7 +340,9 @@ static inline int nf_hook(int pf, unsigned int hook, struct sk_buff *skb, | |||
332 | } | 340 | } |
333 | struct flowi; | 341 | struct flowi; |
334 | static inline void | 342 | static inline void |
335 | nf_nat_decode_session(struct sk_buff *skb, struct flowi *fl, int family) {} | 343 | nf_nat_decode_session(struct sk_buff *skb, struct flowi *fl, u_int8_t family) |
344 | { | ||
345 | } | ||
336 | #endif /*CONFIG_NETFILTER*/ | 346 | #endif /*CONFIG_NETFILTER*/ |
337 | 347 | ||
338 | #if defined(CONFIG_NF_CONNTRACK) || defined(CONFIG_NF_CONNTRACK_MODULE) | 348 | #if defined(CONFIG_NF_CONNTRACK) || defined(CONFIG_NF_CONNTRACK_MODULE) |
@@ -343,56 +353,5 @@ extern void (*nf_ct_destroy)(struct nf_conntrack *); | |||
343 | static inline void nf_ct_attach(struct sk_buff *new, struct sk_buff *skb) {} | 353 | static inline void nf_ct_attach(struct sk_buff *new, struct sk_buff *skb) {} |
344 | #endif | 354 | #endif |
345 | 355 | ||
346 | static inline struct net *nf_pre_routing_net(const struct net_device *in, | ||
347 | const struct net_device *out) | ||
348 | { | ||
349 | #ifdef CONFIG_NET_NS | ||
350 | return in->nd_net; | ||
351 | #else | ||
352 | return &init_net; | ||
353 | #endif | ||
354 | } | ||
355 | |||
356 | static inline struct net *nf_local_in_net(const struct net_device *in, | ||
357 | const struct net_device *out) | ||
358 | { | ||
359 | #ifdef CONFIG_NET_NS | ||
360 | return in->nd_net; | ||
361 | #else | ||
362 | return &init_net; | ||
363 | #endif | ||
364 | } | ||
365 | |||
366 | static inline struct net *nf_forward_net(const struct net_device *in, | ||
367 | const struct net_device *out) | ||
368 | { | ||
369 | #ifdef CONFIG_NET_NS | ||
370 | BUG_ON(in->nd_net != out->nd_net); | ||
371 | return in->nd_net; | ||
372 | #else | ||
373 | return &init_net; | ||
374 | #endif | ||
375 | } | ||
376 | |||
377 | static inline struct net *nf_local_out_net(const struct net_device *in, | ||
378 | const struct net_device *out) | ||
379 | { | ||
380 | #ifdef CONFIG_NET_NS | ||
381 | return out->nd_net; | ||
382 | #else | ||
383 | return &init_net; | ||
384 | #endif | ||
385 | } | ||
386 | |||
387 | static inline struct net *nf_post_routing_net(const struct net_device *in, | ||
388 | const struct net_device *out) | ||
389 | { | ||
390 | #ifdef CONFIG_NET_NS | ||
391 | return out->nd_net; | ||
392 | #else | ||
393 | return &init_net; | ||
394 | #endif | ||
395 | } | ||
396 | |||
397 | #endif /*__KERNEL__*/ | 356 | #endif /*__KERNEL__*/ |
398 | #endif /*__LINUX_NETFILTER_H*/ | 357 | #endif /*__LINUX_NETFILTER_H*/ |
diff --git a/include/linux/netfilter/Kbuild b/include/linux/netfilter/Kbuild index 3aff513d12c8..5a8af875bce2 100644 --- a/include/linux/netfilter/Kbuild +++ b/include/linux/netfilter/Kbuild | |||
@@ -32,6 +32,7 @@ header-y += xt_owner.h | |||
32 | header-y += xt_pkttype.h | 32 | header-y += xt_pkttype.h |
33 | header-y += xt_rateest.h | 33 | header-y += xt_rateest.h |
34 | header-y += xt_realm.h | 34 | header-y += xt_realm.h |
35 | header-y += xt_recent.h | ||
35 | header-y += xt_sctp.h | 36 | header-y += xt_sctp.h |
36 | header-y += xt_state.h | 37 | header-y += xt_state.h |
37 | header-y += xt_statistic.h | 38 | header-y += xt_statistic.h |
diff --git a/include/linux/netfilter/nf_conntrack_proto_gre.h b/include/linux/netfilter/nf_conntrack_proto_gre.h index 535e4219d2bb..2a10efda17fb 100644 --- a/include/linux/netfilter/nf_conntrack_proto_gre.h +++ b/include/linux/netfilter/nf_conntrack_proto_gre.h | |||
@@ -87,7 +87,7 @@ int nf_ct_gre_keymap_add(struct nf_conn *ct, enum ip_conntrack_dir dir, | |||
87 | /* delete keymap entries */ | 87 | /* delete keymap entries */ |
88 | void nf_ct_gre_keymap_destroy(struct nf_conn *ct); | 88 | void nf_ct_gre_keymap_destroy(struct nf_conn *ct); |
89 | 89 | ||
90 | extern void nf_ct_gre_keymap_flush(void); | 90 | extern void nf_ct_gre_keymap_flush(struct net *net); |
91 | extern void nf_nat_need_gre(void); | 91 | extern void nf_nat_need_gre(void); |
92 | 92 | ||
93 | #endif /* __KERNEL__ */ | 93 | #endif /* __KERNEL__ */ |
diff --git a/include/linux/netfilter/x_tables.h b/include/linux/netfilter/x_tables.h index 2326296b6f25..be41b609c88f 100644 --- a/include/linux/netfilter/x_tables.h +++ b/include/linux/netfilter/x_tables.h | |||
@@ -173,6 +173,98 @@ struct xt_counters_info | |||
173 | 173 | ||
174 | #include <linux/netdevice.h> | 174 | #include <linux/netdevice.h> |
175 | 175 | ||
176 | /** | ||
177 | * struct xt_match_param - parameters for match extensions' match functions | ||
178 | * | ||
179 | * @in: input netdevice | ||
180 | * @out: output netdevice | ||
181 | * @match: struct xt_match through which this function was invoked | ||
182 | * @matchinfo: per-match data | ||
183 | * @fragoff: packet is a fragment, this is the data offset | ||
184 | * @thoff: position of transport header relative to skb->data | ||
185 | * @hotdrop: drop packet if we had inspection problems | ||
186 | * @family: Actual NFPROTO_* through which the function is invoked | ||
187 | * (helpful when match->family == NFPROTO_UNSPEC) | ||
188 | */ | ||
189 | struct xt_match_param { | ||
190 | const struct net_device *in, *out; | ||
191 | const struct xt_match *match; | ||
192 | const void *matchinfo; | ||
193 | int fragoff; | ||
194 | unsigned int thoff; | ||
195 | bool *hotdrop; | ||
196 | u_int8_t family; | ||
197 | }; | ||
198 | |||
199 | /** | ||
200 | * struct xt_mtchk_param - parameters for match extensions' | ||
201 | * checkentry functions | ||
202 | * | ||
203 | * @table: table the rule is tried to be inserted into | ||
204 | * @entryinfo: the family-specific rule data | ||
205 | * (struct ipt_ip, ip6t_ip, ebt_entry) | ||
206 | * @match: struct xt_match through which this function was invoked | ||
207 | * @matchinfo: per-match data | ||
208 | * @hook_mask: via which hooks the new rule is reachable | ||
209 | */ | ||
210 | struct xt_mtchk_param { | ||
211 | const char *table; | ||
212 | const void *entryinfo; | ||
213 | const struct xt_match *match; | ||
214 | void *matchinfo; | ||
215 | unsigned int hook_mask; | ||
216 | u_int8_t family; | ||
217 | }; | ||
218 | |||
219 | /* Match destructor parameters */ | ||
220 | struct xt_mtdtor_param { | ||
221 | const struct xt_match *match; | ||
222 | void *matchinfo; | ||
223 | u_int8_t family; | ||
224 | }; | ||
225 | |||
226 | /** | ||
227 | * struct xt_target_param - parameters for target extensions' target functions | ||
228 | * | ||
229 | * @hooknum: hook through which this target was invoked | ||
230 | * @target: struct xt_target through which this function was invoked | ||
231 | * @targinfo: per-target data | ||
232 | * | ||
233 | * Other fields see above. | ||
234 | */ | ||
235 | struct xt_target_param { | ||
236 | const struct net_device *in, *out; | ||
237 | unsigned int hooknum; | ||
238 | const struct xt_target *target; | ||
239 | const void *targinfo; | ||
240 | u_int8_t family; | ||
241 | }; | ||
242 | |||
243 | /** | ||
244 | * struct xt_tgchk_param - parameters for target extensions' | ||
245 | * checkentry functions | ||
246 | * | ||
247 | * @entryinfo: the family-specific rule data | ||
248 | * (struct ipt_entry, ip6t_entry, arpt_entry, ebt_entry) | ||
249 | * | ||
250 | * Other fields see above. | ||
251 | */ | ||
252 | struct xt_tgchk_param { | ||
253 | const char *table; | ||
254 | void *entryinfo; | ||
255 | const struct xt_target *target; | ||
256 | void *targinfo; | ||
257 | unsigned int hook_mask; | ||
258 | u_int8_t family; | ||
259 | }; | ||
260 | |||
261 | /* Target destructor parameters */ | ||
262 | struct xt_tgdtor_param { | ||
263 | const struct xt_target *target; | ||
264 | void *targinfo; | ||
265 | u_int8_t family; | ||
266 | }; | ||
267 | |||
176 | struct xt_match | 268 | struct xt_match |
177 | { | 269 | { |
178 | struct list_head list; | 270 | struct list_head list; |
@@ -185,24 +277,13 @@ struct xt_match | |||
185 | non-linear skb, using skb_header_pointer and | 277 | non-linear skb, using skb_header_pointer and |
186 | skb_ip_make_writable. */ | 278 | skb_ip_make_writable. */ |
187 | bool (*match)(const struct sk_buff *skb, | 279 | bool (*match)(const struct sk_buff *skb, |
188 | const struct net_device *in, | 280 | const struct xt_match_param *); |
189 | const struct net_device *out, | ||
190 | const struct xt_match *match, | ||
191 | const void *matchinfo, | ||
192 | int offset, | ||
193 | unsigned int protoff, | ||
194 | bool *hotdrop); | ||
195 | 281 | ||
196 | /* Called when user tries to insert an entry of this type. */ | 282 | /* Called when user tries to insert an entry of this type. */ |
197 | /* Should return true or false. */ | 283 | bool (*checkentry)(const struct xt_mtchk_param *); |
198 | bool (*checkentry)(const char *tablename, | ||
199 | const void *ip, | ||
200 | const struct xt_match *match, | ||
201 | void *matchinfo, | ||
202 | unsigned int hook_mask); | ||
203 | 284 | ||
204 | /* Called when entry of this type deleted. */ | 285 | /* Called when entry of this type deleted. */ |
205 | void (*destroy)(const struct xt_match *match, void *matchinfo); | 286 | void (*destroy)(const struct xt_mtdtor_param *); |
206 | 287 | ||
207 | /* Called when userspace align differs from kernel space one */ | 288 | /* Called when userspace align differs from kernel space one */ |
208 | void (*compat_from_user)(void *dst, void *src); | 289 | void (*compat_from_user)(void *dst, void *src); |
@@ -235,24 +316,16 @@ struct xt_target | |||
235 | must now handle non-linear skbs, using skb_copy_bits and | 316 | must now handle non-linear skbs, using skb_copy_bits and |
236 | skb_ip_make_writable. */ | 317 | skb_ip_make_writable. */ |
237 | unsigned int (*target)(struct sk_buff *skb, | 318 | unsigned int (*target)(struct sk_buff *skb, |
238 | const struct net_device *in, | 319 | const struct xt_target_param *); |
239 | const struct net_device *out, | ||
240 | unsigned int hooknum, | ||
241 | const struct xt_target *target, | ||
242 | const void *targinfo); | ||
243 | 320 | ||
244 | /* Called when user tries to insert an entry of this type: | 321 | /* Called when user tries to insert an entry of this type: |
245 | hook_mask is a bitmask of hooks from which it can be | 322 | hook_mask is a bitmask of hooks from which it can be |
246 | called. */ | 323 | called. */ |
247 | /* Should return true or false. */ | 324 | /* Should return true or false. */ |
248 | bool (*checkentry)(const char *tablename, | 325 | bool (*checkentry)(const struct xt_tgchk_param *); |
249 | const void *entry, | ||
250 | const struct xt_target *target, | ||
251 | void *targinfo, | ||
252 | unsigned int hook_mask); | ||
253 | 326 | ||
254 | /* Called when entry of this type deleted. */ | 327 | /* Called when entry of this type deleted. */ |
255 | void (*destroy)(const struct xt_target *target, void *targinfo); | 328 | void (*destroy)(const struct xt_tgdtor_param *); |
256 | 329 | ||
257 | /* Called when userspace align differs from kernel space one */ | 330 | /* Called when userspace align differs from kernel space one */ |
258 | void (*compat_from_user)(void *dst, void *src); | 331 | void (*compat_from_user)(void *dst, void *src); |
@@ -292,7 +365,7 @@ struct xt_table | |||
292 | /* Set this to THIS_MODULE if you are a module, otherwise NULL */ | 365 | /* Set this to THIS_MODULE if you are a module, otherwise NULL */ |
293 | struct module *me; | 366 | struct module *me; |
294 | 367 | ||
295 | int af; /* address/protocol family */ | 368 | u_int8_t af; /* address/protocol family */ |
296 | }; | 369 | }; |
297 | 370 | ||
298 | #include <linux/netfilter_ipv4.h> | 371 | #include <linux/netfilter_ipv4.h> |
@@ -328,12 +401,10 @@ extern void xt_unregister_match(struct xt_match *target); | |||
328 | extern int xt_register_matches(struct xt_match *match, unsigned int n); | 401 | extern int xt_register_matches(struct xt_match *match, unsigned int n); |
329 | extern void xt_unregister_matches(struct xt_match *match, unsigned int n); | 402 | extern void xt_unregister_matches(struct xt_match *match, unsigned int n); |
330 | 403 | ||
331 | extern int xt_check_match(const struct xt_match *match, unsigned short family, | 404 | extern int xt_check_match(struct xt_mtchk_param *, |
332 | unsigned int size, const char *table, unsigned int hook, | 405 | unsigned int size, u_int8_t proto, bool inv_proto); |
333 | unsigned short proto, int inv_proto); | 406 | extern int xt_check_target(struct xt_tgchk_param *, |
334 | extern int xt_check_target(const struct xt_target *target, unsigned short family, | 407 | unsigned int size, u_int8_t proto, bool inv_proto); |
335 | unsigned int size, const char *table, unsigned int hook, | ||
336 | unsigned short proto, int inv_proto); | ||
337 | 408 | ||
338 | extern struct xt_table *xt_register_table(struct net *net, | 409 | extern struct xt_table *xt_register_table(struct net *net, |
339 | struct xt_table *table, | 410 | struct xt_table *table, |
@@ -346,19 +417,19 @@ extern struct xt_table_info *xt_replace_table(struct xt_table *table, | |||
346 | struct xt_table_info *newinfo, | 417 | struct xt_table_info *newinfo, |
347 | int *error); | 418 | int *error); |
348 | 419 | ||
349 | extern struct xt_match *xt_find_match(int af, const char *name, u8 revision); | 420 | extern struct xt_match *xt_find_match(u8 af, const char *name, u8 revision); |
350 | extern struct xt_target *xt_find_target(int af, const char *name, u8 revision); | 421 | extern struct xt_target *xt_find_target(u8 af, const char *name, u8 revision); |
351 | extern struct xt_target *xt_request_find_target(int af, const char *name, | 422 | extern struct xt_target *xt_request_find_target(u8 af, const char *name, |
352 | u8 revision); | 423 | u8 revision); |
353 | extern int xt_find_revision(int af, const char *name, u8 revision, int target, | 424 | extern int xt_find_revision(u8 af, const char *name, u8 revision, |
354 | int *err); | 425 | int target, int *err); |
355 | 426 | ||
356 | extern struct xt_table *xt_find_table_lock(struct net *net, int af, | 427 | extern struct xt_table *xt_find_table_lock(struct net *net, u_int8_t af, |
357 | const char *name); | 428 | const char *name); |
358 | extern void xt_table_unlock(struct xt_table *t); | 429 | extern void xt_table_unlock(struct xt_table *t); |
359 | 430 | ||
360 | extern int xt_proto_init(struct net *net, int af); | 431 | extern int xt_proto_init(struct net *net, u_int8_t af); |
361 | extern void xt_proto_fini(struct net *net, int af); | 432 | extern void xt_proto_fini(struct net *net, u_int8_t af); |
362 | 433 | ||
363 | extern struct xt_table_info *xt_alloc_table_info(unsigned int size); | 434 | extern struct xt_table_info *xt_alloc_table_info(unsigned int size); |
364 | extern void xt_free_table_info(struct xt_table_info *info); | 435 | extern void xt_free_table_info(struct xt_table_info *info); |
@@ -423,12 +494,12 @@ struct compat_xt_counters_info | |||
423 | #define COMPAT_XT_ALIGN(s) (((s) + (__alignof__(struct compat_xt_counters)-1)) \ | 494 | #define COMPAT_XT_ALIGN(s) (((s) + (__alignof__(struct compat_xt_counters)-1)) \ |
424 | & ~(__alignof__(struct compat_xt_counters)-1)) | 495 | & ~(__alignof__(struct compat_xt_counters)-1)) |
425 | 496 | ||
426 | extern void xt_compat_lock(int af); | 497 | extern void xt_compat_lock(u_int8_t af); |
427 | extern void xt_compat_unlock(int af); | 498 | extern void xt_compat_unlock(u_int8_t af); |
428 | 499 | ||
429 | extern int xt_compat_add_offset(int af, unsigned int offset, short delta); | 500 | extern int xt_compat_add_offset(u_int8_t af, unsigned int offset, short delta); |
430 | extern void xt_compat_flush_offsets(int af); | 501 | extern void xt_compat_flush_offsets(u_int8_t af); |
431 | extern short xt_compat_calc_jump(int af, unsigned int offset); | 502 | extern short xt_compat_calc_jump(u_int8_t af, unsigned int offset); |
432 | 503 | ||
433 | extern int xt_compat_match_offset(const struct xt_match *match); | 504 | extern int xt_compat_match_offset(const struct xt_match *match); |
434 | extern int xt_compat_match_from_user(struct xt_entry_match *m, | 505 | extern int xt_compat_match_from_user(struct xt_entry_match *m, |
diff --git a/include/linux/netfilter/xt_TPROXY.h b/include/linux/netfilter/xt_TPROXY.h new file mode 100644 index 000000000000..152e8f97132b --- /dev/null +++ b/include/linux/netfilter/xt_TPROXY.h | |||
@@ -0,0 +1,14 @@ | |||
1 | #ifndef _XT_TPROXY_H_target | ||
2 | #define _XT_TPROXY_H_target | ||
3 | |||
4 | /* TPROXY target is capable of marking the packet to perform | ||
5 | * redirection. We can get rid of that whenever we get support for | ||
6 | * mutliple targets in the same rule. */ | ||
7 | struct xt_tproxy_target_info { | ||
8 | u_int32_t mark_mask; | ||
9 | u_int32_t mark_value; | ||
10 | __be32 laddr; | ||
11 | __be16 lport; | ||
12 | }; | ||
13 | |||
14 | #endif /* _XT_TPROXY_H_target */ | ||
diff --git a/include/linux/netfilter/xt_recent.h b/include/linux/netfilter/xt_recent.h new file mode 100644 index 000000000000..5cfeb81c6794 --- /dev/null +++ b/include/linux/netfilter/xt_recent.h | |||
@@ -0,0 +1,26 @@ | |||
1 | #ifndef _LINUX_NETFILTER_XT_RECENT_H | ||
2 | #define _LINUX_NETFILTER_XT_RECENT_H 1 | ||
3 | |||
4 | enum { | ||
5 | XT_RECENT_CHECK = 1 << 0, | ||
6 | XT_RECENT_SET = 1 << 1, | ||
7 | XT_RECENT_UPDATE = 1 << 2, | ||
8 | XT_RECENT_REMOVE = 1 << 3, | ||
9 | XT_RECENT_TTL = 1 << 4, | ||
10 | |||
11 | XT_RECENT_SOURCE = 0, | ||
12 | XT_RECENT_DEST = 1, | ||
13 | |||
14 | XT_RECENT_NAME_LEN = 200, | ||
15 | }; | ||
16 | |||
17 | struct xt_recent_mtinfo { | ||
18 | u_int32_t seconds; | ||
19 | u_int32_t hit_count; | ||
20 | u_int8_t check_set; | ||
21 | u_int8_t invert; | ||
22 | char name[XT_RECENT_NAME_LEN]; | ||
23 | u_int8_t side; | ||
24 | }; | ||
25 | |||
26 | #endif /* _LINUX_NETFILTER_XT_RECENT_H */ | ||
diff --git a/include/linux/netfilter_bridge/ebtables.h b/include/linux/netfilter_bridge/ebtables.h index 892f5b7771c7..d45e29cd1cfb 100644 --- a/include/linux/netfilter_bridge/ebtables.h +++ b/include/linux/netfilter_bridge/ebtables.h | |||
@@ -31,6 +31,9 @@ | |||
31 | * The 4 lsb are more than enough to store the verdict. */ | 31 | * The 4 lsb are more than enough to store the verdict. */ |
32 | #define EBT_VERDICT_BITS 0x0000000F | 32 | #define EBT_VERDICT_BITS 0x0000000F |
33 | 33 | ||
34 | struct xt_match; | ||
35 | struct xt_target; | ||
36 | |||
34 | struct ebt_counter | 37 | struct ebt_counter |
35 | { | 38 | { |
36 | uint64_t pcnt; | 39 | uint64_t pcnt; |
@@ -121,7 +124,7 @@ struct ebt_entry_match | |||
121 | { | 124 | { |
122 | union { | 125 | union { |
123 | char name[EBT_FUNCTION_MAXNAMELEN]; | 126 | char name[EBT_FUNCTION_MAXNAMELEN]; |
124 | struct ebt_match *match; | 127 | struct xt_match *match; |
125 | } u; | 128 | } u; |
126 | /* size of data */ | 129 | /* size of data */ |
127 | unsigned int match_size; | 130 | unsigned int match_size; |
@@ -132,7 +135,7 @@ struct ebt_entry_watcher | |||
132 | { | 135 | { |
133 | union { | 136 | union { |
134 | char name[EBT_FUNCTION_MAXNAMELEN]; | 137 | char name[EBT_FUNCTION_MAXNAMELEN]; |
135 | struct ebt_watcher *watcher; | 138 | struct xt_target *watcher; |
136 | } u; | 139 | } u; |
137 | /* size of data */ | 140 | /* size of data */ |
138 | unsigned int watcher_size; | 141 | unsigned int watcher_size; |
@@ -143,7 +146,7 @@ struct ebt_entry_target | |||
143 | { | 146 | { |
144 | union { | 147 | union { |
145 | char name[EBT_FUNCTION_MAXNAMELEN]; | 148 | char name[EBT_FUNCTION_MAXNAMELEN]; |
146 | struct ebt_target *target; | 149 | struct xt_target *target; |
147 | } u; | 150 | } u; |
148 | /* size of data */ | 151 | /* size of data */ |
149 | unsigned int target_size; | 152 | unsigned int target_size; |
@@ -207,14 +210,17 @@ struct ebt_match | |||
207 | { | 210 | { |
208 | struct list_head list; | 211 | struct list_head list; |
209 | const char name[EBT_FUNCTION_MAXNAMELEN]; | 212 | const char name[EBT_FUNCTION_MAXNAMELEN]; |
210 | /* 0 == it matches */ | 213 | bool (*match)(const struct sk_buff *skb, const struct net_device *in, |
211 | int (*match)(const struct sk_buff *skb, const struct net_device *in, | 214 | const struct net_device *out, const struct xt_match *match, |
212 | const struct net_device *out, const void *matchdata, | 215 | const void *matchinfo, int offset, unsigned int protoff, |
213 | unsigned int datalen); | 216 | bool *hotdrop); |
214 | /* 0 == let it in */ | 217 | bool (*checkentry)(const char *table, const void *entry, |
215 | int (*check)(const char *tablename, unsigned int hookmask, | 218 | const struct xt_match *match, void *matchinfo, |
216 | const struct ebt_entry *e, void *matchdata, unsigned int datalen); | 219 | unsigned int hook_mask); |
217 | void (*destroy)(void *matchdata, unsigned int datalen); | 220 | void (*destroy)(const struct xt_match *match, void *matchinfo); |
221 | unsigned int matchsize; | ||
222 | u_int8_t revision; | ||
223 | u_int8_t family; | ||
218 | struct module *me; | 224 | struct module *me; |
219 | }; | 225 | }; |
220 | 226 | ||
@@ -222,13 +228,17 @@ struct ebt_watcher | |||
222 | { | 228 | { |
223 | struct list_head list; | 229 | struct list_head list; |
224 | const char name[EBT_FUNCTION_MAXNAMELEN]; | 230 | const char name[EBT_FUNCTION_MAXNAMELEN]; |
225 | void (*watcher)(const struct sk_buff *skb, unsigned int hooknr, | 231 | unsigned int (*target)(struct sk_buff *skb, |
226 | const struct net_device *in, const struct net_device *out, | 232 | const struct net_device *in, const struct net_device *out, |
227 | const void *watcherdata, unsigned int datalen); | 233 | unsigned int hook_num, const struct xt_target *target, |
228 | /* 0 == let it in */ | 234 | const void *targinfo); |
229 | int (*check)(const char *tablename, unsigned int hookmask, | 235 | bool (*checkentry)(const char *table, const void *entry, |
230 | const struct ebt_entry *e, void *watcherdata, unsigned int datalen); | 236 | const struct xt_target *target, void *targinfo, |
231 | void (*destroy)(void *watcherdata, unsigned int datalen); | 237 | unsigned int hook_mask); |
238 | void (*destroy)(const struct xt_target *target, void *targinfo); | ||
239 | unsigned int targetsize; | ||
240 | u_int8_t revision; | ||
241 | u_int8_t family; | ||
232 | struct module *me; | 242 | struct module *me; |
233 | }; | 243 | }; |
234 | 244 | ||
@@ -236,14 +246,18 @@ struct ebt_target | |||
236 | { | 246 | { |
237 | struct list_head list; | 247 | struct list_head list; |
238 | const char name[EBT_FUNCTION_MAXNAMELEN]; | 248 | const char name[EBT_FUNCTION_MAXNAMELEN]; |
239 | /* returns one of the standard verdicts */ | 249 | /* returns one of the standard EBT_* verdicts */ |
240 | int (*target)(struct sk_buff *skb, unsigned int hooknr, | 250 | unsigned int (*target)(struct sk_buff *skb, |
241 | const struct net_device *in, const struct net_device *out, | 251 | const struct net_device *in, const struct net_device *out, |
242 | const void *targetdata, unsigned int datalen); | 252 | unsigned int hook_num, const struct xt_target *target, |
243 | /* 0 == let it in */ | 253 | const void *targinfo); |
244 | int (*check)(const char *tablename, unsigned int hookmask, | 254 | bool (*checkentry)(const char *table, const void *entry, |
245 | const struct ebt_entry *e, void *targetdata, unsigned int datalen); | 255 | const struct xt_target *target, void *targinfo, |
246 | void (*destroy)(void *targetdata, unsigned int datalen); | 256 | unsigned int hook_mask); |
257 | void (*destroy)(const struct xt_target *target, void *targinfo); | ||
258 | unsigned int targetsize; | ||
259 | u_int8_t revision; | ||
260 | u_int8_t family; | ||
247 | struct module *me; | 261 | struct module *me; |
248 | }; | 262 | }; |
249 | 263 | ||
@@ -288,12 +302,6 @@ struct ebt_table | |||
288 | ~(__alignof__(struct ebt_replace)-1)) | 302 | ~(__alignof__(struct ebt_replace)-1)) |
289 | extern int ebt_register_table(struct ebt_table *table); | 303 | extern int ebt_register_table(struct ebt_table *table); |
290 | extern void ebt_unregister_table(struct ebt_table *table); | 304 | extern void ebt_unregister_table(struct ebt_table *table); |
291 | extern int ebt_register_match(struct ebt_match *match); | ||
292 | extern void ebt_unregister_match(struct ebt_match *match); | ||
293 | extern int ebt_register_watcher(struct ebt_watcher *watcher); | ||
294 | extern void ebt_unregister_watcher(struct ebt_watcher *watcher); | ||
295 | extern int ebt_register_target(struct ebt_target *target); | ||
296 | extern void ebt_unregister_target(struct ebt_target *target); | ||
297 | extern unsigned int ebt_do_table(unsigned int hook, struct sk_buff *skb, | 305 | extern unsigned int ebt_do_table(unsigned int hook, struct sk_buff *skb, |
298 | const struct net_device *in, const struct net_device *out, | 306 | const struct net_device *in, const struct net_device *out, |
299 | struct ebt_table *table); | 307 | struct ebt_table *table); |
@@ -302,9 +310,9 @@ extern unsigned int ebt_do_table(unsigned int hook, struct sk_buff *skb, | |||
302 | #define FWINV(bool,invflg) ((bool) ^ !!(info->invflags & invflg)) | 310 | #define FWINV(bool,invflg) ((bool) ^ !!(info->invflags & invflg)) |
303 | /* True if the hook mask denotes that the rule is in a base chain, | 311 | /* True if the hook mask denotes that the rule is in a base chain, |
304 | * used in the check() functions */ | 312 | * used in the check() functions */ |
305 | #define BASE_CHAIN (hookmask & (1 << NF_BR_NUMHOOKS)) | 313 | #define BASE_CHAIN (par->hook_mask & (1 << NF_BR_NUMHOOKS)) |
306 | /* Clear the bit in the hook mask that tells if the rule is on a base chain */ | 314 | /* Clear the bit in the hook mask that tells if the rule is on a base chain */ |
307 | #define CLEAR_BASE_CHAIN_BIT (hookmask &= ~(1 << NF_BR_NUMHOOKS)) | 315 | #define CLEAR_BASE_CHAIN_BIT (par->hook_mask &= ~(1 << NF_BR_NUMHOOKS)) |
308 | /* True if the target is not a standard target */ | 316 | /* True if the target is not a standard target */ |
309 | #define INVALID_TARGET (info->target < -NUM_STANDARD_TARGETS || info->target >= 0) | 317 | #define INVALID_TARGET (info->target < -NUM_STANDARD_TARGETS || info->target >= 0) |
310 | 318 | ||
diff --git a/include/linux/netfilter_ipv4/ipt_recent.h b/include/linux/netfilter_ipv4/ipt_recent.h index 6508a4592651..d636cca133c2 100644 --- a/include/linux/netfilter_ipv4/ipt_recent.h +++ b/include/linux/netfilter_ipv4/ipt_recent.h | |||
@@ -1,27 +1,21 @@ | |||
1 | #ifndef _IPT_RECENT_H | 1 | #ifndef _IPT_RECENT_H |
2 | #define _IPT_RECENT_H | 2 | #define _IPT_RECENT_H |
3 | 3 | ||
4 | #define RECENT_NAME "ipt_recent" | 4 | #include <linux/netfilter/xt_recent.h> |
5 | #define RECENT_VER "v0.3.1" | ||
6 | 5 | ||
7 | #define IPT_RECENT_CHECK 1 | 6 | #define ipt_recent_info xt_recent_mtinfo |
8 | #define IPT_RECENT_SET 2 | ||
9 | #define IPT_RECENT_UPDATE 4 | ||
10 | #define IPT_RECENT_REMOVE 8 | ||
11 | #define IPT_RECENT_TTL 16 | ||
12 | 7 | ||
13 | #define IPT_RECENT_SOURCE 0 | 8 | enum { |
14 | #define IPT_RECENT_DEST 1 | 9 | IPT_RECENT_CHECK = XT_RECENT_CHECK, |
10 | IPT_RECENT_SET = XT_RECENT_SET, | ||
11 | IPT_RECENT_UPDATE = XT_RECENT_UPDATE, | ||
12 | IPT_RECENT_REMOVE = XT_RECENT_REMOVE, | ||
13 | IPT_RECENT_TTL = XT_RECENT_TTL, | ||
15 | 14 | ||
16 | #define IPT_RECENT_NAME_LEN 200 | 15 | IPT_RECENT_SOURCE = XT_RECENT_SOURCE, |
16 | IPT_RECENT_DEST = XT_RECENT_DEST, | ||
17 | 17 | ||
18 | struct ipt_recent_info { | 18 | IPT_RECENT_NAME_LEN = XT_RECENT_NAME_LEN, |
19 | u_int32_t seconds; | ||
20 | u_int32_t hit_count; | ||
21 | u_int8_t check_set; | ||
22 | u_int8_t invert; | ||
23 | char name[IPT_RECENT_NAME_LEN]; | ||
24 | u_int8_t side; | ||
25 | }; | 19 | }; |
26 | 20 | ||
27 | #endif /*_IPT_RECENT_H*/ | 21 | #endif /*_IPT_RECENT_H*/ |
diff --git a/include/linux/nl80211.h b/include/linux/nl80211.h index 2be7c63bc0f2..9bad65400fba 100644 --- a/include/linux/nl80211.h +++ b/include/linux/nl80211.h | |||
@@ -89,6 +89,22 @@ | |||
89 | * @NL80211_CMD_DEL_PATH: Remove a mesh path identified by %NL80211_ATTR_MAC | 89 | * @NL80211_CMD_DEL_PATH: Remove a mesh path identified by %NL80211_ATTR_MAC |
90 | * or, if no MAC address given, all mesh paths, on the interface identified | 90 | * or, if no MAC address given, all mesh paths, on the interface identified |
91 | * by %NL80211_ATTR_IFINDEX. | 91 | * by %NL80211_ATTR_IFINDEX. |
92 | * @NL80211_CMD_SET_BSS: Set BSS attributes for BSS identified by | ||
93 | * %NL80211_ATTR_IFINDEX. | ||
94 | * | ||
95 | * @NL80211_CMD_SET_REG: Set current regulatory domain. CRDA sends this command | ||
96 | * after being queried by the kernel. CRDA replies by sending a regulatory | ||
97 | * domain structure which consists of %NL80211_ATTR_REG_ALPHA set to our | ||
98 | * current alpha2 if it found a match. It also provides | ||
99 | * NL80211_ATTR_REG_RULE_FLAGS, and a set of regulatory rules. Each | ||
100 | * regulatory rule is a nested set of attributes given by | ||
101 | * %NL80211_ATTR_REG_RULE_FREQ_[START|END] and | ||
102 | * %NL80211_ATTR_FREQ_RANGE_MAX_BW with an attached power rule given by | ||
103 | * %NL80211_ATTR_REG_RULE_POWER_MAX_ANT_GAIN and | ||
104 | * %NL80211_ATTR_REG_RULE_POWER_MAX_EIRP. | ||
105 | * @NL80211_CMD_REQ_SET_REG: ask the wireless core to set the regulatory domain | ||
106 | * to the the specified ISO/IEC 3166-1 alpha2 country code. The core will | ||
107 | * store this as a valid request and then query userspace for it. | ||
92 | * | 108 | * |
93 | * @NL80211_CMD_MAX: highest used command number | 109 | * @NL80211_CMD_MAX: highest used command number |
94 | * @__NL80211_CMD_AFTER_LAST: internal use | 110 | * @__NL80211_CMD_AFTER_LAST: internal use |
@@ -127,13 +143,23 @@ enum nl80211_commands { | |||
127 | NL80211_CMD_NEW_MPATH, | 143 | NL80211_CMD_NEW_MPATH, |
128 | NL80211_CMD_DEL_MPATH, | 144 | NL80211_CMD_DEL_MPATH, |
129 | 145 | ||
130 | /* add commands here */ | 146 | NL80211_CMD_SET_BSS, |
147 | |||
148 | NL80211_CMD_SET_REG, | ||
149 | NL80211_CMD_REQ_SET_REG, | ||
150 | |||
151 | /* add new commands above here */ | ||
131 | 152 | ||
132 | /* used to define NL80211_CMD_MAX below */ | 153 | /* used to define NL80211_CMD_MAX below */ |
133 | __NL80211_CMD_AFTER_LAST, | 154 | __NL80211_CMD_AFTER_LAST, |
134 | NL80211_CMD_MAX = __NL80211_CMD_AFTER_LAST - 1 | 155 | NL80211_CMD_MAX = __NL80211_CMD_AFTER_LAST - 1 |
135 | }; | 156 | }; |
136 | 157 | ||
158 | /* | ||
159 | * Allow user space programs to use #ifdef on new commands by defining them | ||
160 | * here | ||
161 | */ | ||
162 | #define NL80211_CMD_SET_BSS NL80211_CMD_SET_BSS | ||
137 | 163 | ||
138 | /** | 164 | /** |
139 | * enum nl80211_attrs - nl80211 netlink attributes | 165 | * enum nl80211_attrs - nl80211 netlink attributes |
@@ -188,10 +214,34 @@ enum nl80211_commands { | |||
188 | * info given for %NL80211_CMD_GET_MPATH, nested attribute described at | 214 | * info given for %NL80211_CMD_GET_MPATH, nested attribute described at |
189 | * &enum nl80211_mpath_info. | 215 | * &enum nl80211_mpath_info. |
190 | * | 216 | * |
191 | * | ||
192 | * @NL80211_ATTR_MNTR_FLAGS: flags, nested element with NLA_FLAG attributes of | 217 | * @NL80211_ATTR_MNTR_FLAGS: flags, nested element with NLA_FLAG attributes of |
193 | * &enum nl80211_mntr_flags. | 218 | * &enum nl80211_mntr_flags. |
194 | * | 219 | * |
220 | * @NL80211_ATTR_REG_ALPHA2: an ISO-3166-alpha2 country code for which the | ||
221 | * current regulatory domain should be set to or is already set to. | ||
222 | * For example, 'CR', for Costa Rica. This attribute is used by the kernel | ||
223 | * to query the CRDA to retrieve one regulatory domain. This attribute can | ||
224 | * also be used by userspace to query the kernel for the currently set | ||
225 | * regulatory domain. We chose an alpha2 as that is also used by the | ||
226 | * IEEE-802.11d country information element to identify a country. | ||
227 | * Users can also simply ask the wireless core to set regulatory domain | ||
228 | * to a specific alpha2. | ||
229 | * @NL80211_ATTR_REG_RULES: a nested array of regulatory domain regulatory | ||
230 | * rules. | ||
231 | * | ||
232 | * @NL80211_ATTR_BSS_CTS_PROT: whether CTS protection is enabled (u8, 0 or 1) | ||
233 | * @NL80211_ATTR_BSS_SHORT_PREAMBLE: whether short preamble is enabled | ||
234 | * (u8, 0 or 1) | ||
235 | * @NL80211_ATTR_BSS_SHORT_SLOT_TIME: whether short slot time enabled | ||
236 | * (u8, 0 or 1) | ||
237 | * | ||
238 | * @NL80211_ATTR_HT_CAPABILITY: HT Capability information element (from | ||
239 | * association request when used with NL80211_CMD_NEW_STATION) | ||
240 | * | ||
241 | * @NL80211_ATTR_SUPPORTED_IFTYPES: nested attribute containing all | ||
242 | * supported interface types, each a flag attribute with the number | ||
243 | * of the interface mode. | ||
244 | * | ||
195 | * @NL80211_ATTR_MAX: highest attribute number currently defined | 245 | * @NL80211_ATTR_MAX: highest attribute number currently defined |
196 | * @__NL80211_ATTR_AFTER_LAST: internal use | 246 | * @__NL80211_ATTR_AFTER_LAST: internal use |
197 | */ | 247 | */ |
@@ -235,16 +285,35 @@ enum nl80211_attrs { | |||
235 | NL80211_ATTR_MPATH_NEXT_HOP, | 285 | NL80211_ATTR_MPATH_NEXT_HOP, |
236 | NL80211_ATTR_MPATH_INFO, | 286 | NL80211_ATTR_MPATH_INFO, |
237 | 287 | ||
288 | NL80211_ATTR_BSS_CTS_PROT, | ||
289 | NL80211_ATTR_BSS_SHORT_PREAMBLE, | ||
290 | NL80211_ATTR_BSS_SHORT_SLOT_TIME, | ||
291 | |||
292 | NL80211_ATTR_HT_CAPABILITY, | ||
293 | |||
294 | NL80211_ATTR_SUPPORTED_IFTYPES, | ||
295 | |||
296 | NL80211_ATTR_REG_ALPHA2, | ||
297 | NL80211_ATTR_REG_RULES, | ||
298 | |||
238 | /* add attributes here, update the policy in nl80211.c */ | 299 | /* add attributes here, update the policy in nl80211.c */ |
239 | 300 | ||
240 | __NL80211_ATTR_AFTER_LAST, | 301 | __NL80211_ATTR_AFTER_LAST, |
241 | NL80211_ATTR_MAX = __NL80211_ATTR_AFTER_LAST - 1 | 302 | NL80211_ATTR_MAX = __NL80211_ATTR_AFTER_LAST - 1 |
242 | }; | 303 | }; |
243 | 304 | ||
305 | /* | ||
306 | * Allow user space programs to use #ifdef on new attributes by defining them | ||
307 | * here | ||
308 | */ | ||
309 | #define NL80211_ATTR_HT_CAPABILITY NL80211_ATTR_HT_CAPABILITY | ||
310 | |||
244 | #define NL80211_MAX_SUPP_RATES 32 | 311 | #define NL80211_MAX_SUPP_RATES 32 |
312 | #define NL80211_MAX_SUPP_REG_RULES 32 | ||
245 | #define NL80211_TKIP_DATA_OFFSET_ENCR_KEY 0 | 313 | #define NL80211_TKIP_DATA_OFFSET_ENCR_KEY 0 |
246 | #define NL80211_TKIP_DATA_OFFSET_TX_MIC_KEY 16 | 314 | #define NL80211_TKIP_DATA_OFFSET_TX_MIC_KEY 16 |
247 | #define NL80211_TKIP_DATA_OFFSET_RX_MIC_KEY 24 | 315 | #define NL80211_TKIP_DATA_OFFSET_RX_MIC_KEY 24 |
316 | #define NL80211_HT_CAPABILITY_LEN 26 | ||
248 | 317 | ||
249 | /** | 318 | /** |
250 | * enum nl80211_iftype - (virtual) interface types | 319 | * enum nl80211_iftype - (virtual) interface types |
@@ -436,6 +505,66 @@ enum nl80211_bitrate_attr { | |||
436 | }; | 505 | }; |
437 | 506 | ||
438 | /** | 507 | /** |
508 | * enum nl80211_reg_rule_attr - regulatory rule attributes | ||
509 | * @NL80211_ATTR_REG_RULE_FLAGS: a set of flags which specify additional | ||
510 | * considerations for a given frequency range. These are the | ||
511 | * &enum nl80211_reg_rule_flags. | ||
512 | * @NL80211_ATTR_FREQ_RANGE_START: starting frequencry for the regulatory | ||
513 | * rule in KHz. This is not a center of frequency but an actual regulatory | ||
514 | * band edge. | ||
515 | * @NL80211_ATTR_FREQ_RANGE_END: ending frequency for the regulatory rule | ||
516 | * in KHz. This is not a center a frequency but an actual regulatory | ||
517 | * band edge. | ||
518 | * @NL80211_ATTR_FREQ_RANGE_MAX_BW: maximum allowed bandwidth for this | ||
519 | * frequency range, in KHz. | ||
520 | * @NL80211_ATTR_POWER_RULE_MAX_ANT_GAIN: the maximum allowed antenna gain | ||
521 | * for a given frequency range. The value is in mBi (100 * dBi). | ||
522 | * If you don't have one then don't send this. | ||
523 | * @NL80211_ATTR_POWER_RULE_MAX_EIRP: the maximum allowed EIRP for | ||
524 | * a given frequency range. The value is in mBm (100 * dBm). | ||
525 | */ | ||
526 | enum nl80211_reg_rule_attr { | ||
527 | __NL80211_REG_RULE_ATTR_INVALID, | ||
528 | NL80211_ATTR_REG_RULE_FLAGS, | ||
529 | |||
530 | NL80211_ATTR_FREQ_RANGE_START, | ||
531 | NL80211_ATTR_FREQ_RANGE_END, | ||
532 | NL80211_ATTR_FREQ_RANGE_MAX_BW, | ||
533 | |||
534 | NL80211_ATTR_POWER_RULE_MAX_ANT_GAIN, | ||
535 | NL80211_ATTR_POWER_RULE_MAX_EIRP, | ||
536 | |||
537 | /* keep last */ | ||
538 | __NL80211_REG_RULE_ATTR_AFTER_LAST, | ||
539 | NL80211_REG_RULE_ATTR_MAX = __NL80211_REG_RULE_ATTR_AFTER_LAST - 1 | ||
540 | }; | ||
541 | |||
542 | /** | ||
543 | * enum nl80211_reg_rule_flags - regulatory rule flags | ||
544 | * | ||
545 | * @NL80211_RRF_NO_OFDM: OFDM modulation not allowed | ||
546 | * @NL80211_RRF_NO_CCK: CCK modulation not allowed | ||
547 | * @NL80211_RRF_NO_INDOOR: indoor operation not allowed | ||
548 | * @NL80211_RRF_NO_OUTDOOR: outdoor operation not allowed | ||
549 | * @NL80211_RRF_DFS: DFS support is required to be used | ||
550 | * @NL80211_RRF_PTP_ONLY: this is only for Point To Point links | ||
551 | * @NL80211_RRF_PTMP_ONLY: this is only for Point To Multi Point links | ||
552 | * @NL80211_RRF_PASSIVE_SCAN: passive scan is required | ||
553 | * @NL80211_RRF_NO_IBSS: no IBSS is allowed | ||
554 | */ | ||
555 | enum nl80211_reg_rule_flags { | ||
556 | NL80211_RRF_NO_OFDM = 1<<0, | ||
557 | NL80211_RRF_NO_CCK = 1<<1, | ||
558 | NL80211_RRF_NO_INDOOR = 1<<2, | ||
559 | NL80211_RRF_NO_OUTDOOR = 1<<3, | ||
560 | NL80211_RRF_DFS = 1<<4, | ||
561 | NL80211_RRF_PTP_ONLY = 1<<5, | ||
562 | NL80211_RRF_PTMP_ONLY = 1<<6, | ||
563 | NL80211_RRF_PASSIVE_SCAN = 1<<7, | ||
564 | NL80211_RRF_NO_IBSS = 1<<8, | ||
565 | }; | ||
566 | |||
567 | /** | ||
439 | * enum nl80211_mntr_flags - monitor configuration flags | 568 | * enum nl80211_mntr_flags - monitor configuration flags |
440 | * | 569 | * |
441 | * Monitor configuration flags. | 570 | * Monitor configuration flags. |
diff --git a/include/linux/pci_ids.h b/include/linux/pci_ids.h index f1624b396754..a65b082a888a 100644 --- a/include/linux/pci_ids.h +++ b/include/linux/pci_ids.h | |||
@@ -1411,6 +1411,8 @@ | |||
1411 | #define PCI_DEVICE_ID_EICON_MAESTRAQ_U 0xe013 | 1411 | #define PCI_DEVICE_ID_EICON_MAESTRAQ_U 0xe013 |
1412 | #define PCI_DEVICE_ID_EICON_MAESTRAP 0xe014 | 1412 | #define PCI_DEVICE_ID_EICON_MAESTRAP 0xe014 |
1413 | 1413 | ||
1414 | #define PCI_VENDOR_ID_CISCO 0x1137 | ||
1415 | |||
1414 | #define PCI_VENDOR_ID_ZIATECH 0x1138 | 1416 | #define PCI_VENDOR_ID_ZIATECH 0x1138 |
1415 | #define PCI_DEVICE_ID_ZIATECH_5550_HC 0x5550 | 1417 | #define PCI_DEVICE_ID_ZIATECH_5550_HC 0x5550 |
1416 | 1418 | ||
@@ -2213,6 +2215,7 @@ | |||
2213 | 2215 | ||
2214 | #define PCI_VENDOR_ID_ATTANSIC 0x1969 | 2216 | #define PCI_VENDOR_ID_ATTANSIC 0x1969 |
2215 | #define PCI_DEVICE_ID_ATTANSIC_L1 0x1048 | 2217 | #define PCI_DEVICE_ID_ATTANSIC_L1 0x1048 |
2218 | #define PCI_DEVICE_ID_ATTANSIC_L2 0x2048 | ||
2216 | 2219 | ||
2217 | #define PCI_VENDOR_ID_JMICRON 0x197B | 2220 | #define PCI_VENDOR_ID_JMICRON 0x197B |
2218 | #define PCI_DEVICE_ID_JMICRON_JMB360 0x2360 | 2221 | #define PCI_DEVICE_ID_JMICRON_JMB360 0x2360 |
@@ -2244,6 +2247,16 @@ | |||
2244 | #define PCI_DEVICE_ID_3DLABS_PERMEDIA2 0x0007 | 2247 | #define PCI_DEVICE_ID_3DLABS_PERMEDIA2 0x0007 |
2245 | #define PCI_DEVICE_ID_3DLABS_PERMEDIA2V 0x0009 | 2248 | #define PCI_DEVICE_ID_3DLABS_PERMEDIA2V 0x0009 |
2246 | 2249 | ||
2250 | #define PCI_VENDOR_ID_NETXEN 0x4040 | ||
2251 | #define PCI_DEVICE_ID_NX2031_10GXSR 0x0001 | ||
2252 | #define PCI_DEVICE_ID_NX2031_10GCX4 0x0002 | ||
2253 | #define PCI_DEVICE_ID_NX2031_4GCU 0x0003 | ||
2254 | #define PCI_DEVICE_ID_NX2031_IMEZ 0x0004 | ||
2255 | #define PCI_DEVICE_ID_NX2031_HMEZ 0x0005 | ||
2256 | #define PCI_DEVICE_ID_NX2031_XG_MGMT 0x0024 | ||
2257 | #define PCI_DEVICE_ID_NX2031_XG_MGMT2 0x0025 | ||
2258 | #define PCI_DEVICE_ID_NX3031 0x0100 | ||
2259 | |||
2247 | #define PCI_VENDOR_ID_AKS 0x416c | 2260 | #define PCI_VENDOR_ID_AKS 0x416c |
2248 | #define PCI_DEVICE_ID_AKS_ALADDINCARD 0x0100 | 2261 | #define PCI_DEVICE_ID_AKS_ALADDINCARD 0x0100 |
2249 | 2262 | ||
diff --git a/include/linux/pfkeyv2.h b/include/linux/pfkeyv2.h index 700725ddcaae..01b262959f2e 100644 --- a/include/linux/pfkeyv2.h +++ b/include/linux/pfkeyv2.h | |||
@@ -226,6 +226,15 @@ struct sadb_x_sec_ctx { | |||
226 | } __attribute__((packed)); | 226 | } __attribute__((packed)); |
227 | /* sizeof(struct sadb_sec_ctx) = 8 */ | 227 | /* sizeof(struct sadb_sec_ctx) = 8 */ |
228 | 228 | ||
229 | /* Used by MIGRATE to pass addresses IKE will use to perform | ||
230 | * negotiation with the peer */ | ||
231 | struct sadb_x_kmaddress { | ||
232 | uint16_t sadb_x_kmaddress_len; | ||
233 | uint16_t sadb_x_kmaddress_exttype; | ||
234 | uint32_t sadb_x_kmaddress_reserved; | ||
235 | } __attribute__((packed)); | ||
236 | /* sizeof(struct sadb_x_kmaddress) == 8 */ | ||
237 | |||
229 | /* Message types */ | 238 | /* Message types */ |
230 | #define SADB_RESERVED 0 | 239 | #define SADB_RESERVED 0 |
231 | #define SADB_GETSPI 1 | 240 | #define SADB_GETSPI 1 |
@@ -346,7 +355,9 @@ struct sadb_x_sec_ctx { | |||
346 | #define SADB_X_EXT_NAT_T_DPORT 22 | 355 | #define SADB_X_EXT_NAT_T_DPORT 22 |
347 | #define SADB_X_EXT_NAT_T_OA 23 | 356 | #define SADB_X_EXT_NAT_T_OA 23 |
348 | #define SADB_X_EXT_SEC_CTX 24 | 357 | #define SADB_X_EXT_SEC_CTX 24 |
349 | #define SADB_EXT_MAX 24 | 358 | /* Used with MIGRATE to pass @ to IKE for negotiation */ |
359 | #define SADB_X_EXT_KMADDRESS 25 | ||
360 | #define SADB_EXT_MAX 25 | ||
350 | 361 | ||
351 | /* Identity Extension values */ | 362 | /* Identity Extension values */ |
352 | #define SADB_IDENTTYPE_RESERVED 0 | 363 | #define SADB_IDENTTYPE_RESERVED 0 |
diff --git a/include/linux/phonet.h b/include/linux/phonet.h new file mode 100644 index 000000000000..c9609f9aedac --- /dev/null +++ b/include/linux/phonet.h | |||
@@ -0,0 +1,170 @@ | |||
1 | /** | ||
2 | * file phonet.h | ||
3 | * | ||
4 | * Phonet sockets kernel interface | ||
5 | * | ||
6 | * Copyright (C) 2008 Nokia Corporation. All rights reserved. | ||
7 | * | ||
8 | * This program is free software; you can redistribute it and/or | ||
9 | * modify it under the terms of the GNU General Public License | ||
10 | * version 2 as published by the Free Software Foundation. | ||
11 | * | ||
12 | * This program is distributed in the hope that it will be useful, but | ||
13 | * WITHOUT ANY WARRANTY; without even the implied warranty of | ||
14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | ||
15 | * 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., 51 Franklin St, Fifth Floor, Boston, MA | ||
20 | * 02110-1301 USA | ||
21 | */ | ||
22 | |||
23 | #ifndef LINUX_PHONET_H | ||
24 | #define LINUX_PHONET_H | ||
25 | |||
26 | /* Automatic protocol selection */ | ||
27 | #define PN_PROTO_TRANSPORT 0 | ||
28 | /* Phonet datagram socket */ | ||
29 | #define PN_PROTO_PHONET 1 | ||
30 | /* Phonet pipe */ | ||
31 | #define PN_PROTO_PIPE 2 | ||
32 | #define PHONET_NPROTO 3 | ||
33 | |||
34 | /* Socket options for SOL_PNPIPE level */ | ||
35 | #define PNPIPE_ENCAP 1 | ||
36 | #define PNPIPE_IFINDEX 2 | ||
37 | |||
38 | #define PNADDR_ANY 0 | ||
39 | #define PNPORT_RESOURCE_ROUTING 0 | ||
40 | |||
41 | /* Values for PNPIPE_ENCAP option */ | ||
42 | #define PNPIPE_ENCAP_NONE 0 | ||
43 | #define PNPIPE_ENCAP_IP 1 | ||
44 | |||
45 | /* ioctls */ | ||
46 | #define SIOCPNGETOBJECT (SIOCPROTOPRIVATE + 0) | ||
47 | |||
48 | /* Phonet protocol header */ | ||
49 | struct phonethdr { | ||
50 | __u8 pn_rdev; | ||
51 | __u8 pn_sdev; | ||
52 | __u8 pn_res; | ||
53 | __be16 pn_length; | ||
54 | __u8 pn_robj; | ||
55 | __u8 pn_sobj; | ||
56 | } __attribute__((packed)); | ||
57 | |||
58 | /* Common Phonet payload header */ | ||
59 | struct phonetmsg { | ||
60 | __u8 pn_trans_id; /* transaction ID */ | ||
61 | __u8 pn_msg_id; /* message type */ | ||
62 | union { | ||
63 | struct { | ||
64 | __u8 pn_submsg_id; /* message subtype */ | ||
65 | __u8 pn_data[5]; | ||
66 | } base; | ||
67 | struct { | ||
68 | __u16 pn_e_res_id; /* extended resource ID */ | ||
69 | __u8 pn_e_submsg_id; /* message subtype */ | ||
70 | __u8 pn_e_data[3]; | ||
71 | } ext; | ||
72 | } pn_msg_u; | ||
73 | }; | ||
74 | #define PN_COMMON_MESSAGE 0xF0 | ||
75 | #define PN_PREFIX 0xE0 /* resource for extended messages */ | ||
76 | #define pn_submsg_id pn_msg_u.base.pn_submsg_id | ||
77 | #define pn_e_submsg_id pn_msg_u.ext.pn_e_submsg_id | ||
78 | #define pn_e_res_id pn_msg_u.ext.pn_e_res_id | ||
79 | #define pn_data pn_msg_u.base.pn_data | ||
80 | #define pn_e_data pn_msg_u.ext.pn_e_data | ||
81 | |||
82 | /* data for unreachable errors */ | ||
83 | #define PN_COMM_SERVICE_NOT_IDENTIFIED_RESP 0x01 | ||
84 | #define PN_COMM_ISA_ENTITY_NOT_REACHABLE_RESP 0x14 | ||
85 | #define pn_orig_msg_id pn_data[0] | ||
86 | #define pn_status pn_data[1] | ||
87 | #define pn_e_orig_msg_id pn_e_data[0] | ||
88 | #define pn_e_status pn_e_data[1] | ||
89 | |||
90 | /* Phonet socket address structure */ | ||
91 | struct sockaddr_pn { | ||
92 | sa_family_t spn_family; | ||
93 | __u8 spn_obj; | ||
94 | __u8 spn_dev; | ||
95 | __u8 spn_resource; | ||
96 | __u8 spn_zero[sizeof(struct sockaddr) - sizeof(sa_family_t) - 3]; | ||
97 | } __attribute__ ((packed)); | ||
98 | |||
99 | static inline __u16 pn_object(__u8 addr, __u16 port) | ||
100 | { | ||
101 | return (addr << 8) | (port & 0x3ff); | ||
102 | } | ||
103 | |||
104 | static inline __u8 pn_obj(__u16 handle) | ||
105 | { | ||
106 | return handle & 0xff; | ||
107 | } | ||
108 | |||
109 | static inline __u8 pn_dev(__u16 handle) | ||
110 | { | ||
111 | return handle >> 8; | ||
112 | } | ||
113 | |||
114 | static inline __u16 pn_port(__u16 handle) | ||
115 | { | ||
116 | return handle & 0x3ff; | ||
117 | } | ||
118 | |||
119 | static inline __u8 pn_addr(__u16 handle) | ||
120 | { | ||
121 | return (handle >> 8) & 0xfc; | ||
122 | } | ||
123 | |||
124 | static inline void pn_sockaddr_set_addr(struct sockaddr_pn *spn, __u8 addr) | ||
125 | { | ||
126 | spn->spn_dev &= 0x03; | ||
127 | spn->spn_dev |= addr & 0xfc; | ||
128 | } | ||
129 | |||
130 | static inline void pn_sockaddr_set_port(struct sockaddr_pn *spn, __u16 port) | ||
131 | { | ||
132 | spn->spn_dev &= 0xfc; | ||
133 | spn->spn_dev |= (port >> 8) & 0x03; | ||
134 | spn->spn_obj = port & 0xff; | ||
135 | } | ||
136 | |||
137 | static inline void pn_sockaddr_set_object(struct sockaddr_pn *spn, | ||
138 | __u16 handle) | ||
139 | { | ||
140 | spn->spn_dev = pn_dev(handle); | ||
141 | spn->spn_obj = pn_obj(handle); | ||
142 | } | ||
143 | |||
144 | static inline void pn_sockaddr_set_resource(struct sockaddr_pn *spn, | ||
145 | __u8 resource) | ||
146 | { | ||
147 | spn->spn_resource = resource; | ||
148 | } | ||
149 | |||
150 | static inline __u8 pn_sockaddr_get_addr(const struct sockaddr_pn *spn) | ||
151 | { | ||
152 | return spn->spn_dev & 0xfc; | ||
153 | } | ||
154 | |||
155 | static inline __u16 pn_sockaddr_get_port(const struct sockaddr_pn *spn) | ||
156 | { | ||
157 | return ((spn->spn_dev & 0x03) << 8) | spn->spn_obj; | ||
158 | } | ||
159 | |||
160 | static inline __u16 pn_sockaddr_get_object(const struct sockaddr_pn *spn) | ||
161 | { | ||
162 | return pn_object(spn->spn_dev, spn->spn_obj); | ||
163 | } | ||
164 | |||
165 | static inline __u8 pn_sockaddr_get_resource(const struct sockaddr_pn *spn) | ||
166 | { | ||
167 | return spn->spn_resource; | ||
168 | } | ||
169 | |||
170 | #endif | ||
diff --git a/include/linux/phy.h b/include/linux/phy.h index 7224c4099a28..77c4ed60b982 100644 --- a/include/linux/phy.h +++ b/include/linux/phy.h | |||
@@ -99,7 +99,14 @@ struct mii_bus { | |||
99 | */ | 99 | */ |
100 | struct mutex mdio_lock; | 100 | struct mutex mdio_lock; |
101 | 101 | ||
102 | struct device *dev; | 102 | struct device *parent; |
103 | enum { | ||
104 | MDIOBUS_ALLOCATED = 1, | ||
105 | MDIOBUS_REGISTERED, | ||
106 | MDIOBUS_UNREGISTERED, | ||
107 | MDIOBUS_RELEASED, | ||
108 | } state; | ||
109 | struct device dev; | ||
103 | 110 | ||
104 | /* list of all PHYs on bus */ | 111 | /* list of all PHYs on bus */ |
105 | struct phy_device *phy_map[PHY_MAX_ADDR]; | 112 | struct phy_device *phy_map[PHY_MAX_ADDR]; |
@@ -113,6 +120,16 @@ struct mii_bus { | |||
113 | */ | 120 | */ |
114 | int *irq; | 121 | int *irq; |
115 | }; | 122 | }; |
123 | #define to_mii_bus(d) container_of(d, struct mii_bus, dev) | ||
124 | |||
125 | struct mii_bus *mdiobus_alloc(void); | ||
126 | int mdiobus_register(struct mii_bus *bus); | ||
127 | void mdiobus_unregister(struct mii_bus *bus); | ||
128 | void mdiobus_free(struct mii_bus *bus); | ||
129 | struct phy_device *mdiobus_scan(struct mii_bus *bus, int addr); | ||
130 | int mdiobus_read(struct mii_bus *bus, int addr, u16 regnum); | ||
131 | int mdiobus_write(struct mii_bus *bus, int addr, u16 regnum, u16 val); | ||
132 | |||
116 | 133 | ||
117 | #define PHY_INTERRUPT_DISABLED 0x0 | 134 | #define PHY_INTERRUPT_DISABLED 0x0 |
118 | #define PHY_INTERRUPT_ENABLED 0x80000000 | 135 | #define PHY_INTERRUPT_ENABLED 0x80000000 |
@@ -391,8 +408,35 @@ struct phy_fixup { | |||
391 | int (*run)(struct phy_device *phydev); | 408 | int (*run)(struct phy_device *phydev); |
392 | }; | 409 | }; |
393 | 410 | ||
394 | int phy_read(struct phy_device *phydev, u16 regnum); | 411 | /** |
395 | int phy_write(struct phy_device *phydev, u16 regnum, u16 val); | 412 | * phy_read - Convenience function for reading a given PHY register |
413 | * @phydev: the phy_device struct | ||
414 | * @regnum: register number to read | ||
415 | * | ||
416 | * NOTE: MUST NOT be called from interrupt context, | ||
417 | * because the bus read/write functions may wait for an interrupt | ||
418 | * to conclude the operation. | ||
419 | */ | ||
420 | static inline int phy_read(struct phy_device *phydev, u16 regnum) | ||
421 | { | ||
422 | return mdiobus_read(phydev->bus, phydev->addr, regnum); | ||
423 | } | ||
424 | |||
425 | /** | ||
426 | * phy_write - Convenience function for writing a given PHY register | ||
427 | * @phydev: the phy_device struct | ||
428 | * @regnum: register number to write | ||
429 | * @val: value to write to @regnum | ||
430 | * | ||
431 | * NOTE: MUST NOT be called from interrupt context, | ||
432 | * because the bus read/write functions may wait for an interrupt | ||
433 | * to conclude the operation. | ||
434 | */ | ||
435 | static inline int phy_write(struct phy_device *phydev, u16 regnum, u16 val) | ||
436 | { | ||
437 | return mdiobus_write(phydev->bus, phydev->addr, regnum, val); | ||
438 | } | ||
439 | |||
396 | int get_phy_id(struct mii_bus *bus, int addr, u32 *phy_id); | 440 | int get_phy_id(struct mii_bus *bus, int addr, u32 *phy_id); |
397 | struct phy_device* get_phy_device(struct mii_bus *bus, int addr); | 441 | struct phy_device* get_phy_device(struct mii_bus *bus, int addr); |
398 | int phy_clear_interrupt(struct phy_device *phydev); | 442 | int phy_clear_interrupt(struct phy_device *phydev); |
@@ -408,8 +452,6 @@ void phy_start(struct phy_device *phydev); | |||
408 | void phy_stop(struct phy_device *phydev); | 452 | void phy_stop(struct phy_device *phydev); |
409 | int phy_start_aneg(struct phy_device *phydev); | 453 | int phy_start_aneg(struct phy_device *phydev); |
410 | 454 | ||
411 | int mdiobus_register(struct mii_bus *bus); | ||
412 | void mdiobus_unregister(struct mii_bus *bus); | ||
413 | void phy_sanitize_settings(struct phy_device *phydev); | 455 | void phy_sanitize_settings(struct phy_device *phydev); |
414 | int phy_stop_interrupts(struct phy_device *phydev); | 456 | int phy_stop_interrupts(struct phy_device *phydev); |
415 | int phy_enable_interrupts(struct phy_device *phydev); | 457 | int phy_enable_interrupts(struct phy_device *phydev); |
diff --git a/include/linux/pkt_sched.h b/include/linux/pkt_sched.h index e5de421ac7b4..5d921fa91a5b 100644 --- a/include/linux/pkt_sched.h +++ b/include/linux/pkt_sched.h | |||
@@ -123,6 +123,13 @@ struct tc_prio_qopt | |||
123 | __u8 priomap[TC_PRIO_MAX+1]; /* Map: logical priority -> PRIO band */ | 123 | __u8 priomap[TC_PRIO_MAX+1]; /* Map: logical priority -> PRIO band */ |
124 | }; | 124 | }; |
125 | 125 | ||
126 | /* MULTIQ section */ | ||
127 | |||
128 | struct tc_multiq_qopt { | ||
129 | __u16 bands; /* Number of bands */ | ||
130 | __u16 max_bands; /* Maximum number of queues */ | ||
131 | }; | ||
132 | |||
126 | /* TBF section */ | 133 | /* TBF section */ |
127 | 134 | ||
128 | struct tc_tbf_qopt | 135 | struct tc_tbf_qopt |
diff --git a/include/linux/rfkill.h b/include/linux/rfkill.h index 741d1a62cc3f..4cd64b0d9825 100644 --- a/include/linux/rfkill.h +++ b/include/linux/rfkill.h | |||
@@ -49,6 +49,7 @@ enum rfkill_state { | |||
49 | RFKILL_STATE_SOFT_BLOCKED = 0, /* Radio output blocked */ | 49 | RFKILL_STATE_SOFT_BLOCKED = 0, /* Radio output blocked */ |
50 | RFKILL_STATE_UNBLOCKED = 1, /* Radio output allowed */ | 50 | RFKILL_STATE_UNBLOCKED = 1, /* Radio output allowed */ |
51 | RFKILL_STATE_HARD_BLOCKED = 2, /* Output blocked, non-overrideable */ | 51 | RFKILL_STATE_HARD_BLOCKED = 2, /* Output blocked, non-overrideable */ |
52 | RFKILL_STATE_MAX, /* marker for last valid state */ | ||
52 | }; | 53 | }; |
53 | 54 | ||
54 | /* | 55 | /* |
@@ -110,12 +111,14 @@ struct rfkill { | |||
110 | }; | 111 | }; |
111 | #define to_rfkill(d) container_of(d, struct rfkill, dev) | 112 | #define to_rfkill(d) container_of(d, struct rfkill, dev) |
112 | 113 | ||
113 | struct rfkill *rfkill_allocate(struct device *parent, enum rfkill_type type); | 114 | struct rfkill * __must_check rfkill_allocate(struct device *parent, |
115 | enum rfkill_type type); | ||
114 | void rfkill_free(struct rfkill *rfkill); | 116 | void rfkill_free(struct rfkill *rfkill); |
115 | int rfkill_register(struct rfkill *rfkill); | 117 | int __must_check rfkill_register(struct rfkill *rfkill); |
116 | void rfkill_unregister(struct rfkill *rfkill); | 118 | void rfkill_unregister(struct rfkill *rfkill); |
117 | 119 | ||
118 | int rfkill_force_state(struct rfkill *rfkill, enum rfkill_state state); | 120 | int rfkill_force_state(struct rfkill *rfkill, enum rfkill_state state); |
121 | int rfkill_set_default(enum rfkill_type type, enum rfkill_state state); | ||
119 | 122 | ||
120 | /** | 123 | /** |
121 | * rfkill_state_complement - return complementar state | 124 | * rfkill_state_complement - return complementar state |
diff --git a/include/linux/rtnetlink.h b/include/linux/rtnetlink.h index ca643b13b026..2b3d51c6ec9c 100644 --- a/include/linux/rtnetlink.h +++ b/include/linux/rtnetlink.h | |||
@@ -582,6 +582,10 @@ enum rtnetlink_groups { | |||
582 | #define RTNLGRP_IPV6_RULE RTNLGRP_IPV6_RULE | 582 | #define RTNLGRP_IPV6_RULE RTNLGRP_IPV6_RULE |
583 | RTNLGRP_ND_USEROPT, | 583 | RTNLGRP_ND_USEROPT, |
584 | #define RTNLGRP_ND_USEROPT RTNLGRP_ND_USEROPT | 584 | #define RTNLGRP_ND_USEROPT RTNLGRP_ND_USEROPT |
585 | RTNLGRP_PHONET_IFADDR, | ||
586 | #define RTNLGRP_PHONET_IFADDR RTNLGRP_PHONET_IFADDR | ||
587 | RTNLGRP_PHONET_ROUTE, | ||
588 | #define RTNLGRP_PHONET_ROUTE RTNLGRP_PHONET_ROUTE | ||
585 | __RTNLGRP_MAX | 589 | __RTNLGRP_MAX |
586 | }; | 590 | }; |
587 | #define RTNLGRP_MAX (__RTNLGRP_MAX - 1) | 591 | #define RTNLGRP_MAX (__RTNLGRP_MAX - 1) |
diff --git a/include/linux/skbuff.h b/include/linux/skbuff.h index 909923717830..2725f4e5a9bf 100644 --- a/include/linux/skbuff.h +++ b/include/linux/skbuff.h | |||
@@ -146,8 +146,14 @@ struct skb_shared_info { | |||
146 | unsigned short gso_segs; | 146 | unsigned short gso_segs; |
147 | unsigned short gso_type; | 147 | unsigned short gso_type; |
148 | __be32 ip6_frag_id; | 148 | __be32 ip6_frag_id; |
149 | #ifdef CONFIG_HAS_DMA | ||
150 | unsigned int num_dma_maps; | ||
151 | #endif | ||
149 | struct sk_buff *frag_list; | 152 | struct sk_buff *frag_list; |
150 | skb_frag_t frags[MAX_SKB_FRAGS]; | 153 | skb_frag_t frags[MAX_SKB_FRAGS]; |
154 | #ifdef CONFIG_HAS_DMA | ||
155 | dma_addr_t dma_maps[MAX_SKB_FRAGS + 1]; | ||
156 | #endif | ||
151 | }; | 157 | }; |
152 | 158 | ||
153 | /* We divide dataref into two halves. The higher 16 bits hold references | 159 | /* We divide dataref into two halves. The higher 16 bits hold references |
@@ -353,6 +359,14 @@ struct sk_buff { | |||
353 | 359 | ||
354 | #include <asm/system.h> | 360 | #include <asm/system.h> |
355 | 361 | ||
362 | #ifdef CONFIG_HAS_DMA | ||
363 | #include <linux/dma-mapping.h> | ||
364 | extern int skb_dma_map(struct device *dev, struct sk_buff *skb, | ||
365 | enum dma_data_direction dir); | ||
366 | extern void skb_dma_unmap(struct device *dev, struct sk_buff *skb, | ||
367 | enum dma_data_direction dir); | ||
368 | #endif | ||
369 | |||
356 | extern void kfree_skb(struct sk_buff *skb); | 370 | extern void kfree_skb(struct sk_buff *skb); |
357 | extern void __kfree_skb(struct sk_buff *skb); | 371 | extern void __kfree_skb(struct sk_buff *skb); |
358 | extern struct sk_buff *__alloc_skb(unsigned int size, | 372 | extern struct sk_buff *__alloc_skb(unsigned int size, |
@@ -369,6 +383,8 @@ static inline struct sk_buff *alloc_skb_fclone(unsigned int size, | |||
369 | return __alloc_skb(size, priority, 1, -1); | 383 | return __alloc_skb(size, priority, 1, -1); |
370 | } | 384 | } |
371 | 385 | ||
386 | extern int skb_recycle_check(struct sk_buff *skb, int skb_size); | ||
387 | |||
372 | extern struct sk_buff *skb_morph(struct sk_buff *dst, struct sk_buff *src); | 388 | extern struct sk_buff *skb_morph(struct sk_buff *dst, struct sk_buff *src); |
373 | extern struct sk_buff *skb_clone(struct sk_buff *skb, | 389 | extern struct sk_buff *skb_clone(struct sk_buff *skb, |
374 | gfp_t priority); | 390 | gfp_t priority); |
@@ -459,6 +475,37 @@ static inline int skb_queue_empty(const struct sk_buff_head *list) | |||
459 | } | 475 | } |
460 | 476 | ||
461 | /** | 477 | /** |
478 | * skb_queue_is_last - check if skb is the last entry in the queue | ||
479 | * @list: queue head | ||
480 | * @skb: buffer | ||
481 | * | ||
482 | * Returns true if @skb is the last buffer on the list. | ||
483 | */ | ||
484 | static inline bool skb_queue_is_last(const struct sk_buff_head *list, | ||
485 | const struct sk_buff *skb) | ||
486 | { | ||
487 | return (skb->next == (struct sk_buff *) list); | ||
488 | } | ||
489 | |||
490 | /** | ||
491 | * skb_queue_next - return the next packet in the queue | ||
492 | * @list: queue head | ||
493 | * @skb: current buffer | ||
494 | * | ||
495 | * Return the next packet in @list after @skb. It is only valid to | ||
496 | * call this if skb_queue_is_last() evaluates to false. | ||
497 | */ | ||
498 | static inline struct sk_buff *skb_queue_next(const struct sk_buff_head *list, | ||
499 | const struct sk_buff *skb) | ||
500 | { | ||
501 | /* This BUG_ON may seem severe, but if we just return then we | ||
502 | * are going to dereference garbage. | ||
503 | */ | ||
504 | BUG_ON(skb_queue_is_last(list, skb)); | ||
505 | return skb->next; | ||
506 | } | ||
507 | |||
508 | /** | ||
462 | * skb_get - reference buffer | 509 | * skb_get - reference buffer |
463 | * @skb: buffer to reference | 510 | * @skb: buffer to reference |
464 | * | 511 | * |
@@ -646,6 +693,22 @@ static inline __u32 skb_queue_len(const struct sk_buff_head *list_) | |||
646 | return list_->qlen; | 693 | return list_->qlen; |
647 | } | 694 | } |
648 | 695 | ||
696 | /** | ||
697 | * __skb_queue_head_init - initialize non-spinlock portions of sk_buff_head | ||
698 | * @list: queue to initialize | ||
699 | * | ||
700 | * This initializes only the list and queue length aspects of | ||
701 | * an sk_buff_head object. This allows to initialize the list | ||
702 | * aspects of an sk_buff_head without reinitializing things like | ||
703 | * the spinlock. It can also be used for on-stack sk_buff_head | ||
704 | * objects where the spinlock is known to not be used. | ||
705 | */ | ||
706 | static inline void __skb_queue_head_init(struct sk_buff_head *list) | ||
707 | { | ||
708 | list->prev = list->next = (struct sk_buff *)list; | ||
709 | list->qlen = 0; | ||
710 | } | ||
711 | |||
649 | /* | 712 | /* |
650 | * This function creates a split out lock class for each invocation; | 713 | * This function creates a split out lock class for each invocation; |
651 | * this is needed for now since a whole lot of users of the skb-queue | 714 | * this is needed for now since a whole lot of users of the skb-queue |
@@ -657,8 +720,7 @@ static inline __u32 skb_queue_len(const struct sk_buff_head *list_) | |||
657 | static inline void skb_queue_head_init(struct sk_buff_head *list) | 720 | static inline void skb_queue_head_init(struct sk_buff_head *list) |
658 | { | 721 | { |
659 | spin_lock_init(&list->lock); | 722 | spin_lock_init(&list->lock); |
660 | list->prev = list->next = (struct sk_buff *)list; | 723 | __skb_queue_head_init(list); |
661 | list->qlen = 0; | ||
662 | } | 724 | } |
663 | 725 | ||
664 | static inline void skb_queue_head_init_class(struct sk_buff_head *list, | 726 | static inline void skb_queue_head_init_class(struct sk_buff_head *list, |
@@ -685,6 +747,83 @@ static inline void __skb_insert(struct sk_buff *newsk, | |||
685 | list->qlen++; | 747 | list->qlen++; |
686 | } | 748 | } |
687 | 749 | ||
750 | static inline void __skb_queue_splice(const struct sk_buff_head *list, | ||
751 | struct sk_buff *prev, | ||
752 | struct sk_buff *next) | ||
753 | { | ||
754 | struct sk_buff *first = list->next; | ||
755 | struct sk_buff *last = list->prev; | ||
756 | |||
757 | first->prev = prev; | ||
758 | prev->next = first; | ||
759 | |||
760 | last->next = next; | ||
761 | next->prev = last; | ||
762 | } | ||
763 | |||
764 | /** | ||
765 | * skb_queue_splice - join two skb lists, this is designed for stacks | ||
766 | * @list: the new list to add | ||
767 | * @head: the place to add it in the first list | ||
768 | */ | ||
769 | static inline void skb_queue_splice(const struct sk_buff_head *list, | ||
770 | struct sk_buff_head *head) | ||
771 | { | ||
772 | if (!skb_queue_empty(list)) { | ||
773 | __skb_queue_splice(list, (struct sk_buff *) head, head->next); | ||
774 | head->qlen += list->qlen; | ||
775 | } | ||
776 | } | ||
777 | |||
778 | /** | ||
779 | * skb_queue_splice - join two skb lists and reinitialise the emptied list | ||
780 | * @list: the new list to add | ||
781 | * @head: the place to add it in the first list | ||
782 | * | ||
783 | * The list at @list is reinitialised | ||
784 | */ | ||
785 | static inline void skb_queue_splice_init(struct sk_buff_head *list, | ||
786 | struct sk_buff_head *head) | ||
787 | { | ||
788 | if (!skb_queue_empty(list)) { | ||
789 | __skb_queue_splice(list, (struct sk_buff *) head, head->next); | ||
790 | head->qlen += list->qlen; | ||
791 | __skb_queue_head_init(list); | ||
792 | } | ||
793 | } | ||
794 | |||
795 | /** | ||
796 | * skb_queue_splice_tail - join two skb lists, each list being a queue | ||
797 | * @list: the new list to add | ||
798 | * @head: the place to add it in the first list | ||
799 | */ | ||
800 | static inline void skb_queue_splice_tail(const struct sk_buff_head *list, | ||
801 | struct sk_buff_head *head) | ||
802 | { | ||
803 | if (!skb_queue_empty(list)) { | ||
804 | __skb_queue_splice(list, head->prev, (struct sk_buff *) head); | ||
805 | head->qlen += list->qlen; | ||
806 | } | ||
807 | } | ||
808 | |||
809 | /** | ||
810 | * skb_queue_splice_tail - join two skb lists and reinitialise the emptied list | ||
811 | * @list: the new list to add | ||
812 | * @head: the place to add it in the first list | ||
813 | * | ||
814 | * Each of the lists is a queue. | ||
815 | * The list at @list is reinitialised | ||
816 | */ | ||
817 | static inline void skb_queue_splice_tail_init(struct sk_buff_head *list, | ||
818 | struct sk_buff_head *head) | ||
819 | { | ||
820 | if (!skb_queue_empty(list)) { | ||
821 | __skb_queue_splice(list, head->prev, (struct sk_buff *) head); | ||
822 | head->qlen += list->qlen; | ||
823 | __skb_queue_head_init(list); | ||
824 | } | ||
825 | } | ||
826 | |||
688 | /** | 827 | /** |
689 | * __skb_queue_after - queue a buffer at the list head | 828 | * __skb_queue_after - queue a buffer at the list head |
690 | * @list: list to use | 829 | * @list: list to use |
@@ -829,6 +968,9 @@ static inline void skb_fill_page_desc(struct sk_buff *skb, int i, | |||
829 | skb_shinfo(skb)->nr_frags = i + 1; | 968 | skb_shinfo(skb)->nr_frags = i + 1; |
830 | } | 969 | } |
831 | 970 | ||
971 | extern void skb_add_rx_frag(struct sk_buff *skb, int i, struct page *page, | ||
972 | int off, int size); | ||
973 | |||
832 | #define SKB_PAGE_ASSERT(skb) BUG_ON(skb_shinfo(skb)->nr_frags) | 974 | #define SKB_PAGE_ASSERT(skb) BUG_ON(skb_shinfo(skb)->nr_frags) |
833 | #define SKB_FRAG_ASSERT(skb) BUG_ON(skb_shinfo(skb)->frag_list) | 975 | #define SKB_FRAG_ASSERT(skb) BUG_ON(skb_shinfo(skb)->frag_list) |
834 | #define SKB_LINEAR_ASSERT(skb) BUG_ON(skb_is_nonlinear(skb)) | 976 | #define SKB_LINEAR_ASSERT(skb) BUG_ON(skb_is_nonlinear(skb)) |
@@ -1243,6 +1385,26 @@ static inline struct sk_buff *netdev_alloc_skb(struct net_device *dev, | |||
1243 | return __netdev_alloc_skb(dev, length, GFP_ATOMIC); | 1385 | return __netdev_alloc_skb(dev, length, GFP_ATOMIC); |
1244 | } | 1386 | } |
1245 | 1387 | ||
1388 | extern struct page *__netdev_alloc_page(struct net_device *dev, gfp_t gfp_mask); | ||
1389 | |||
1390 | /** | ||
1391 | * netdev_alloc_page - allocate a page for ps-rx on a specific device | ||
1392 | * @dev: network device to receive on | ||
1393 | * | ||
1394 | * Allocate a new page node local to the specified device. | ||
1395 | * | ||
1396 | * %NULL is returned if there is no free memory. | ||
1397 | */ | ||
1398 | static inline struct page *netdev_alloc_page(struct net_device *dev) | ||
1399 | { | ||
1400 | return __netdev_alloc_page(dev, GFP_ATOMIC); | ||
1401 | } | ||
1402 | |||
1403 | static inline void netdev_free_page(struct net_device *dev, struct page *page) | ||
1404 | { | ||
1405 | __free_page(page); | ||
1406 | } | ||
1407 | |||
1246 | /** | 1408 | /** |
1247 | * skb_clone_writable - is the header of a clone writable | 1409 | * skb_clone_writable - is the header of a clone writable |
1248 | * @skb: buffer to check | 1410 | * @skb: buffer to check |
@@ -1434,6 +1596,15 @@ static inline int pskb_trim_rcsum(struct sk_buff *skb, unsigned int len) | |||
1434 | skb != (struct sk_buff *)(queue); \ | 1596 | skb != (struct sk_buff *)(queue); \ |
1435 | skb = tmp, tmp = skb->next) | 1597 | skb = tmp, tmp = skb->next) |
1436 | 1598 | ||
1599 | #define skb_queue_walk_from(queue, skb) \ | ||
1600 | for (; prefetch(skb->next), (skb != (struct sk_buff *)(queue)); \ | ||
1601 | skb = skb->next) | ||
1602 | |||
1603 | #define skb_queue_walk_from_safe(queue, skb, tmp) \ | ||
1604 | for (tmp = skb->next; \ | ||
1605 | skb != (struct sk_buff *)(queue); \ | ||
1606 | skb = tmp, tmp = skb->next) | ||
1607 | |||
1437 | #define skb_queue_reverse_walk(queue, skb) \ | 1608 | #define skb_queue_reverse_walk(queue, skb) \ |
1438 | for (skb = (queue)->prev; \ | 1609 | for (skb = (queue)->prev; \ |
1439 | prefetch(skb->prev), (skb != (struct sk_buff *)(queue)); \ | 1610 | prefetch(skb->prev), (skb != (struct sk_buff *)(queue)); \ |
diff --git a/include/linux/socket.h b/include/linux/socket.h index dc5086fe7736..20fc4bbfca42 100644 --- a/include/linux/socket.h +++ b/include/linux/socket.h | |||
@@ -190,7 +190,8 @@ struct ucred { | |||
190 | #define AF_IUCV 32 /* IUCV sockets */ | 190 | #define AF_IUCV 32 /* IUCV sockets */ |
191 | #define AF_RXRPC 33 /* RxRPC sockets */ | 191 | #define AF_RXRPC 33 /* RxRPC sockets */ |
192 | #define AF_ISDN 34 /* mISDN sockets */ | 192 | #define AF_ISDN 34 /* mISDN sockets */ |
193 | #define AF_MAX 35 /* For now.. */ | 193 | #define AF_PHONET 35 /* Phonet sockets */ |
194 | #define AF_MAX 36 /* For now.. */ | ||
194 | 195 | ||
195 | /* Protocol families, same as address families. */ | 196 | /* Protocol families, same as address families. */ |
196 | #define PF_UNSPEC AF_UNSPEC | 197 | #define PF_UNSPEC AF_UNSPEC |
@@ -227,6 +228,7 @@ struct ucred { | |||
227 | #define PF_IUCV AF_IUCV | 228 | #define PF_IUCV AF_IUCV |
228 | #define PF_RXRPC AF_RXRPC | 229 | #define PF_RXRPC AF_RXRPC |
229 | #define PF_ISDN AF_ISDN | 230 | #define PF_ISDN AF_ISDN |
231 | #define PF_PHONET AF_PHONET | ||
230 | #define PF_MAX AF_MAX | 232 | #define PF_MAX AF_MAX |
231 | 233 | ||
232 | /* Maximum queue length specifiable by listen. */ | 234 | /* Maximum queue length specifiable by listen. */ |
@@ -295,6 +297,7 @@ struct ucred { | |||
295 | #define SOL_RXRPC 272 | 297 | #define SOL_RXRPC 272 |
296 | #define SOL_PPPOL2TP 273 | 298 | #define SOL_PPPOL2TP 273 |
297 | #define SOL_BLUETOOTH 274 | 299 | #define SOL_BLUETOOTH 274 |
300 | #define SOL_PNPIPE 275 | ||
298 | 301 | ||
299 | /* IPX options */ | 302 | /* IPX options */ |
300 | #define IPX_TYPE 1 | 303 | #define IPX_TYPE 1 |
diff --git a/include/linux/ssb/ssb_regs.h b/include/linux/ssb/ssb_regs.h index ebad0bac9801..99a0f991e850 100644 --- a/include/linux/ssb/ssb_regs.h +++ b/include/linux/ssb/ssb_regs.h | |||
@@ -245,8 +245,6 @@ | |||
245 | 245 | ||
246 | /* SPROM Revision 3 (inherits most data from rev 2) */ | 246 | /* SPROM Revision 3 (inherits most data from rev 2) */ |
247 | #define SSB_SPROM3_IL0MAC 0x104A /* 6 bytes MAC address for 802.11b/g */ | 247 | #define SSB_SPROM3_IL0MAC 0x104A /* 6 bytes MAC address for 802.11b/g */ |
248 | #define SSB_SPROM3_ET0MAC 0x1050 /* 6 bytes MAC address for Ethernet ?? */ | ||
249 | #define SSB_SPROM3_ET1MAC 0x1050 /* 6 bytes MAC address for 802.11a ?? */ | ||
250 | #define SSB_SPROM3_OFDMAPO 0x102C /* A-PHY OFDM Mid Power Offset (4 bytes, BigEndian) */ | 248 | #define SSB_SPROM3_OFDMAPO 0x102C /* A-PHY OFDM Mid Power Offset (4 bytes, BigEndian) */ |
251 | #define SSB_SPROM3_OFDMALPO 0x1030 /* A-PHY OFDM Low Power Offset (4 bytes, BigEndian) */ | 249 | #define SSB_SPROM3_OFDMALPO 0x1030 /* A-PHY OFDM Low Power Offset (4 bytes, BigEndian) */ |
252 | #define SSB_SPROM3_OFDMAHPO 0x1034 /* A-PHY OFDM High Power Offset (4 bytes, BigEndian) */ | 250 | #define SSB_SPROM3_OFDMAHPO 0x1034 /* A-PHY OFDM High Power Offset (4 bytes, BigEndian) */ |
@@ -267,8 +265,6 @@ | |||
267 | 265 | ||
268 | /* SPROM Revision 4 */ | 266 | /* SPROM Revision 4 */ |
269 | #define SSB_SPROM4_IL0MAC 0x104C /* 6 byte MAC address for a/b/g/n */ | 267 | #define SSB_SPROM4_IL0MAC 0x104C /* 6 byte MAC address for a/b/g/n */ |
270 | #define SSB_SPROM4_ET0MAC 0x1018 /* 6 bytes MAC address for Ethernet ?? */ | ||
271 | #define SSB_SPROM4_ET1MAC 0x1018 /* 6 bytes MAC address for 802.11a ?? */ | ||
272 | #define SSB_SPROM4_ETHPHY 0x105A /* Ethernet PHY settings ?? */ | 268 | #define SSB_SPROM4_ETHPHY 0x105A /* Ethernet PHY settings ?? */ |
273 | #define SSB_SPROM4_ETHPHY_ET0A 0x001F /* MII Address for enet0 */ | 269 | #define SSB_SPROM4_ETHPHY_ET0A 0x001F /* MII Address for enet0 */ |
274 | #define SSB_SPROM4_ETHPHY_ET1A 0x03E0 /* MII Address for enet1 */ | 270 | #define SSB_SPROM4_ETHPHY_ET1A 0x03E0 /* MII Address for enet1 */ |
@@ -316,6 +312,21 @@ | |||
316 | #define SSB_SPROM4_PA1B1 0x1090 | 312 | #define SSB_SPROM4_PA1B1 0x1090 |
317 | #define SSB_SPROM4_PA1B2 0x1092 | 313 | #define SSB_SPROM4_PA1B2 0x1092 |
318 | 314 | ||
315 | /* SPROM Revision 5 (inherits most data from rev 4) */ | ||
316 | #define SSB_SPROM5_BFLLO 0x104A /* Boardflags (low 16 bits) */ | ||
317 | #define SSB_SPROM5_BFLHI 0x104C /* Board Flags Hi */ | ||
318 | #define SSB_SPROM5_IL0MAC 0x1052 /* 6 byte MAC address for a/b/g/n */ | ||
319 | #define SSB_SPROM5_CCODE 0x1044 /* Country Code (2 bytes) */ | ||
320 | #define SSB_SPROM5_GPIOA 0x1076 /* Gen. Purpose IO # 0 and 1 */ | ||
321 | #define SSB_SPROM5_GPIOA_P0 0x00FF /* Pin 0 */ | ||
322 | #define SSB_SPROM5_GPIOA_P1 0xFF00 /* Pin 1 */ | ||
323 | #define SSB_SPROM5_GPIOA_P1_SHIFT 8 | ||
324 | #define SSB_SPROM5_GPIOB 0x1078 /* Gen. Purpose IO # 2 and 3 */ | ||
325 | #define SSB_SPROM5_GPIOB_P2 0x00FF /* Pin 2 */ | ||
326 | #define SSB_SPROM5_GPIOB_P3 0xFF00 /* Pin 3 */ | ||
327 | #define SSB_SPROM5_GPIOB_P3_SHIFT 8 | ||
328 | |||
329 | |||
319 | /* Values for SSB_SPROM1_BINF_CCODE */ | 330 | /* Values for SSB_SPROM1_BINF_CCODE */ |
320 | enum { | 331 | enum { |
321 | SSB_SPROM1CCODE_WORLD = 0, | 332 | SSB_SPROM1CCODE_WORLD = 0, |
diff --git a/include/linux/tc_act/Kbuild b/include/linux/tc_act/Kbuild index 6dac0d7365cc..76990937f4c9 100644 --- a/include/linux/tc_act/Kbuild +++ b/include/linux/tc_act/Kbuild | |||
@@ -3,3 +3,4 @@ header-y += tc_ipt.h | |||
3 | header-y += tc_mirred.h | 3 | header-y += tc_mirred.h |
4 | header-y += tc_pedit.h | 4 | header-y += tc_pedit.h |
5 | header-y += tc_nat.h | 5 | header-y += tc_nat.h |
6 | header-y += tc_skbedit.h | ||
diff --git a/include/linux/tc_act/tc_skbedit.h b/include/linux/tc_act/tc_skbedit.h new file mode 100644 index 000000000000..a14e461a7af7 --- /dev/null +++ b/include/linux/tc_act/tc_skbedit.h | |||
@@ -0,0 +1,44 @@ | |||
1 | /* | ||
2 | * Copyright (c) 2008, Intel Corporation. | ||
3 | * | ||
4 | * This program is free software; you can redistribute it and/or modify it | ||
5 | * under the terms and conditions of the GNU General Public License, | ||
6 | * version 2, as published by the Free Software Foundation. | ||
7 | * | ||
8 | * This program is distributed in the hope it will be useful, but WITHOUT | ||
9 | * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or | ||
10 | * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for | ||
11 | * more details. | ||
12 | * | ||
13 | * You should have received a copy of the GNU General Public License along with | ||
14 | * this program; if not, write to the Free Software Foundation, Inc., 59 Temple | ||
15 | * Place - Suite 330, Boston, MA 02111-1307 USA. | ||
16 | * | ||
17 | * Author: Alexander Duyck <alexander.h.duyck@intel.com> | ||
18 | */ | ||
19 | |||
20 | #ifndef __LINUX_TC_SKBEDIT_H | ||
21 | #define __LINUX_TC_SKBEDIT_H | ||
22 | |||
23 | #include <linux/pkt_cls.h> | ||
24 | |||
25 | #define TCA_ACT_SKBEDIT 11 | ||
26 | |||
27 | #define SKBEDIT_F_PRIORITY 0x1 | ||
28 | #define SKBEDIT_F_QUEUE_MAPPING 0x2 | ||
29 | |||
30 | struct tc_skbedit { | ||
31 | tc_gen; | ||
32 | }; | ||
33 | |||
34 | enum { | ||
35 | TCA_SKBEDIT_UNSPEC, | ||
36 | TCA_SKBEDIT_TM, | ||
37 | TCA_SKBEDIT_PARMS, | ||
38 | TCA_SKBEDIT_PRIORITY, | ||
39 | TCA_SKBEDIT_QUEUE_MAPPING, | ||
40 | __TCA_SKBEDIT_MAX | ||
41 | }; | ||
42 | #define TCA_SKBEDIT_MAX (__TCA_SKBEDIT_MAX - 1) | ||
43 | |||
44 | #endif | ||
diff --git a/include/linux/tcp.h b/include/linux/tcp.h index 2e2557388e36..fe77e1499ab7 100644 --- a/include/linux/tcp.h +++ b/include/linux/tcp.h | |||
@@ -312,8 +312,11 @@ struct tcp_sock { | |||
312 | u32 retrans_out; /* Retransmitted packets out */ | 312 | u32 retrans_out; /* Retransmitted packets out */ |
313 | 313 | ||
314 | u16 urg_data; /* Saved octet of OOB data and control flags */ | 314 | u16 urg_data; /* Saved octet of OOB data and control flags */ |
315 | u8 urg_mode; /* In urgent mode */ | ||
316 | u8 ecn_flags; /* ECN status bits. */ | 315 | u8 ecn_flags; /* ECN status bits. */ |
316 | u8 reordering; /* Packet reordering metric. */ | ||
317 | u32 snd_up; /* Urgent pointer */ | ||
318 | |||
319 | u8 keepalive_probes; /* num of allowed keep alive probes */ | ||
317 | /* | 320 | /* |
318 | * Options received (usually on last packet, some only on SYN packets). | 321 | * Options received (usually on last packet, some only on SYN packets). |
319 | */ | 322 | */ |
@@ -342,7 +345,6 @@ struct tcp_sock { | |||
342 | struct sk_buff* lost_skb_hint; | 345 | struct sk_buff* lost_skb_hint; |
343 | struct sk_buff *scoreboard_skb_hint; | 346 | struct sk_buff *scoreboard_skb_hint; |
344 | struct sk_buff *retransmit_skb_hint; | 347 | struct sk_buff *retransmit_skb_hint; |
345 | struct sk_buff *forward_skb_hint; | ||
346 | 348 | ||
347 | struct sk_buff_head out_of_order_queue; /* Out of order segments go here */ | 349 | struct sk_buff_head out_of_order_queue; /* Out of order segments go here */ |
348 | 350 | ||
@@ -358,12 +360,10 @@ struct tcp_sock { | |||
358 | */ | 360 | */ |
359 | 361 | ||
360 | int lost_cnt_hint; | 362 | int lost_cnt_hint; |
361 | int retransmit_cnt_hint; | 363 | u32 retransmit_high; /* L-bits may be on up to this seqno */ |
362 | 364 | ||
363 | u32 lost_retrans_low; /* Sent seq after any rxmit (lowest) */ | 365 | u32 lost_retrans_low; /* Sent seq after any rxmit (lowest) */ |
364 | 366 | ||
365 | u8 reordering; /* Packet reordering metric. */ | ||
366 | u8 keepalive_probes; /* num of allowed keep alive probes */ | ||
367 | u32 prior_ssthresh; /* ssthresh saved at recovery start */ | 367 | u32 prior_ssthresh; /* ssthresh saved at recovery start */ |
368 | u32 high_seq; /* snd_nxt at onset of congestion */ | 368 | u32 high_seq; /* snd_nxt at onset of congestion */ |
369 | 369 | ||
@@ -375,8 +375,6 @@ struct tcp_sock { | |||
375 | u32 total_retrans; /* Total retransmits for entire connection */ | 375 | u32 total_retrans; /* Total retransmits for entire connection */ |
376 | 376 | ||
377 | u32 urg_seq; /* Seq of received urgent pointer */ | 377 | u32 urg_seq; /* Seq of received urgent pointer */ |
378 | u32 snd_up; /* Urgent pointer */ | ||
379 | |||
380 | unsigned int keepalive_time; /* time before keep alive takes place */ | 378 | unsigned int keepalive_time; /* time before keep alive takes place */ |
381 | unsigned int keepalive_intvl; /* time interval between keep alive probes */ | 379 | unsigned int keepalive_intvl; /* time interval between keep alive probes */ |
382 | 380 | ||
diff --git a/include/linux/xfrm.h b/include/linux/xfrm.h index fb0c215a3051..4bc1e6b86cb2 100644 --- a/include/linux/xfrm.h +++ b/include/linux/xfrm.h | |||
@@ -279,6 +279,7 @@ enum xfrm_attr_type_t { | |||
279 | XFRMA_POLICY_TYPE, /* struct xfrm_userpolicy_type */ | 279 | XFRMA_POLICY_TYPE, /* struct xfrm_userpolicy_type */ |
280 | XFRMA_MIGRATE, | 280 | XFRMA_MIGRATE, |
281 | XFRMA_ALG_AEAD, /* struct xfrm_algo_aead */ | 281 | XFRMA_ALG_AEAD, /* struct xfrm_algo_aead */ |
282 | XFRMA_KMADDRESS, /* struct xfrm_user_kmaddress */ | ||
282 | __XFRMA_MAX | 283 | __XFRMA_MAX |
283 | 284 | ||
284 | #define XFRMA_MAX (__XFRMA_MAX - 1) | 285 | #define XFRMA_MAX (__XFRMA_MAX - 1) |
@@ -415,6 +416,15 @@ struct xfrm_user_report { | |||
415 | struct xfrm_selector sel; | 416 | struct xfrm_selector sel; |
416 | }; | 417 | }; |
417 | 418 | ||
419 | /* Used by MIGRATE to pass addresses IKE should use to perform | ||
420 | * SA negotiation with the peer */ | ||
421 | struct xfrm_user_kmaddress { | ||
422 | xfrm_address_t local; | ||
423 | xfrm_address_t remote; | ||
424 | __u32 reserved; | ||
425 | __u16 family; | ||
426 | }; | ||
427 | |||
418 | struct xfrm_user_migrate { | 428 | struct xfrm_user_migrate { |
419 | xfrm_address_t old_daddr; | 429 | xfrm_address_t old_daddr; |
420 | xfrm_address_t old_saddr; | 430 | xfrm_address_t old_saddr; |