diff options
author | David Howells <dhowells@redhat.com> | 2006-12-05 09:37:56 -0500 |
---|---|---|
committer | David Howells <dhowells@warthog.cambridge.redhat.com> | 2006-12-05 09:37:56 -0500 |
commit | 4c1ac1b49122b805adfa4efc620592f68dccf5db (patch) | |
tree | 87557f4bc2fd4fe65b7570489c2f610c45c0adcd /include/linux | |
parent | c4028958b6ecad064b1a6303a6a5906d4fe48d73 (diff) | |
parent | d916faace3efc0bf19fe9a615a1ab8fa1a24cd93 (diff) |
Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux-2.6
Conflicts:
drivers/infiniband/core/iwcm.c
drivers/net/chelsio/cxgb2.c
drivers/net/wireless/bcm43xx/bcm43xx_main.c
drivers/net/wireless/prism54/islpci_eth.c
drivers/usb/core/hub.h
drivers/usb/input/hid-core.c
net/core/netpoll.c
Fix up merge failures with Linus's head and fix new compilation failures.
Signed-Off-By: David Howells <dhowells@redhat.com>
Diffstat (limited to 'include/linux')
116 files changed, 1652 insertions, 1159 deletions
diff --git a/include/linux/Kbuild b/include/linux/Kbuild index a1155a2beb32..ff433126361f 100644 --- a/include/linux/Kbuild +++ b/include/linux/Kbuild | |||
@@ -60,8 +60,6 @@ header-y += fadvise.h | |||
60 | header-y += fd.h | 60 | header-y += fd.h |
61 | header-y += fdreg.h | 61 | header-y += fdreg.h |
62 | header-y += fib_rules.h | 62 | header-y += fib_rules.h |
63 | header-y += ftape-header-segment.h | ||
64 | header-y += ftape-vendors.h | ||
65 | header-y += fuse.h | 63 | header-y += fuse.h |
66 | header-y += futex.h | 64 | header-y += futex.h |
67 | header-y += genetlink.h | 65 | header-y += genetlink.h |
@@ -193,7 +191,6 @@ unifdef-y += cuda.h | |||
193 | unifdef-y += cyclades.h | 191 | unifdef-y += cyclades.h |
194 | unifdef-y += dccp.h | 192 | unifdef-y += dccp.h |
195 | unifdef-y += dirent.h | 193 | unifdef-y += dirent.h |
196 | unifdef-y += divert.h | ||
197 | unifdef-y += dlm.h | 194 | unifdef-y += dlm.h |
198 | unifdef-y += elfcore.h | 195 | unifdef-y += elfcore.h |
199 | unifdef-y += errno.h | 196 | unifdef-y += errno.h |
@@ -207,7 +204,6 @@ unifdef-y += fcntl.h | |||
207 | unifdef-y += filter.h | 204 | unifdef-y += filter.h |
208 | unifdef-y += flat.h | 205 | unifdef-y += flat.h |
209 | unifdef-y += fs.h | 206 | unifdef-y += fs.h |
210 | unifdef-y += ftape.h | ||
211 | unifdef-y += gameport.h | 207 | unifdef-y += gameport.h |
212 | unifdef-y += generic_serial.h | 208 | unifdef-y += generic_serial.h |
213 | unifdef-y += genhd.h | 209 | unifdef-y += genhd.h |
@@ -342,6 +338,5 @@ unifdef-y += wait.h | |||
342 | unifdef-y += wanrouter.h | 338 | unifdef-y += wanrouter.h |
343 | unifdef-y += watchdog.h | 339 | unifdef-y += watchdog.h |
344 | unifdef-y += xfrm.h | 340 | unifdef-y += xfrm.h |
345 | unifdef-y += zftape.h | ||
346 | 341 | ||
347 | objhdr-y += version.h | 342 | objhdr-y += version.h |
diff --git a/include/linux/atmarp.h b/include/linux/atmarp.h index 24f82338f59a..ee108f9e9cb7 100644 --- a/include/linux/atmarp.h +++ b/include/linux/atmarp.h | |||
@@ -37,7 +37,7 @@ enum atmarp_ctrl_type { | |||
37 | struct atmarp_ctrl { | 37 | struct atmarp_ctrl { |
38 | enum atmarp_ctrl_type type; /* message type */ | 38 | enum atmarp_ctrl_type type; /* message type */ |
39 | int itf_num;/* interface number (if present) */ | 39 | int itf_num;/* interface number (if present) */ |
40 | uint32_t ip; /* IP address (act_need only) */ | 40 | __be32 ip; /* IP address (act_need only) */ |
41 | }; | 41 | }; |
42 | 42 | ||
43 | #endif | 43 | #endif |
diff --git a/include/linux/atmbr2684.h b/include/linux/atmbr2684.h index 7981b733f1ef..969fb6c9e1cc 100644 --- a/include/linux/atmbr2684.h +++ b/include/linux/atmbr2684.h | |||
@@ -86,8 +86,8 @@ struct atm_backend_br2684 { | |||
86 | * efficient per-if in/out filters, this support will be removed | 86 | * efficient per-if in/out filters, this support will be removed |
87 | */ | 87 | */ |
88 | struct br2684_filter { | 88 | struct br2684_filter { |
89 | __u32 prefix; /* network byte order */ | 89 | __be32 prefix; /* network byte order */ |
90 | __u32 netmask; /* 0 = disable filter */ | 90 | __be32 netmask; /* 0 = disable filter */ |
91 | }; | 91 | }; |
92 | 92 | ||
93 | struct br2684_filter_set { | 93 | struct br2684_filter_set { |
diff --git a/include/linux/atmmpc.h b/include/linux/atmmpc.h index 5fbfa68136d3..ea1650425a12 100644 --- a/include/linux/atmmpc.h +++ b/include/linux/atmmpc.h | |||
@@ -13,7 +13,7 @@ | |||
13 | 13 | ||
14 | struct atmmpc_ioc { | 14 | struct atmmpc_ioc { |
15 | int dev_num; | 15 | int dev_num; |
16 | uint32_t ipaddr; /* the IP address of the shortcut */ | 16 | __be32 ipaddr; /* the IP address of the shortcut */ |
17 | int type; /* ingress or egress */ | 17 | int type; /* ingress or egress */ |
18 | }; | 18 | }; |
19 | 19 | ||
@@ -21,8 +21,8 @@ typedef struct in_ctrl_info { | |||
21 | uint8_t Last_NHRP_CIE_code; | 21 | uint8_t Last_NHRP_CIE_code; |
22 | uint8_t Last_Q2931_cause_value; | 22 | uint8_t Last_Q2931_cause_value; |
23 | uint8_t eg_MPC_ATM_addr[ATM_ESA_LEN]; | 23 | uint8_t eg_MPC_ATM_addr[ATM_ESA_LEN]; |
24 | uint32_t tag; | 24 | __be32 tag; |
25 | uint32_t in_dst_ip; /* IP address this ingress MPC sends packets to */ | 25 | __be32 in_dst_ip; /* IP address this ingress MPC sends packets to */ |
26 | uint16_t holding_time; | 26 | uint16_t holding_time; |
27 | uint32_t request_id; | 27 | uint32_t request_id; |
28 | } in_ctrl_info; | 28 | } in_ctrl_info; |
@@ -30,10 +30,10 @@ typedef struct in_ctrl_info { | |||
30 | typedef struct eg_ctrl_info { | 30 | typedef struct eg_ctrl_info { |
31 | uint8_t DLL_header[256]; | 31 | uint8_t DLL_header[256]; |
32 | uint8_t DH_length; | 32 | uint8_t DH_length; |
33 | uint32_t cache_id; | 33 | __be32 cache_id; |
34 | uint32_t tag; | 34 | __be32 tag; |
35 | uint32_t mps_ip; | 35 | __be32 mps_ip; |
36 | uint32_t eg_dst_ip; /* IP address to which ingress MPC sends packets */ | 36 | __be32 eg_dst_ip; /* IP address to which ingress MPC sends packets */ |
37 | uint8_t in_MPC_data_ATM_addr[ATM_ESA_LEN]; | 37 | uint8_t in_MPC_data_ATM_addr[ATM_ESA_LEN]; |
38 | uint16_t holding_time; | 38 | uint16_t holding_time; |
39 | } eg_ctrl_info; | 39 | } eg_ctrl_info; |
@@ -49,7 +49,7 @@ struct mpc_parameters { | |||
49 | 49 | ||
50 | struct k_message { | 50 | struct k_message { |
51 | uint16_t type; | 51 | uint16_t type; |
52 | uint32_t ip_mask; | 52 | __be32 ip_mask; |
53 | uint8_t MPS_ctrl[ATM_ESA_LEN]; | 53 | uint8_t MPS_ctrl[ATM_ESA_LEN]; |
54 | union { | 54 | union { |
55 | in_ctrl_info in_info; | 55 | in_ctrl_info in_info; |
diff --git a/include/linux/blkdev.h b/include/linux/blkdev.h index 7bfcde2d5578..e1c7286165ff 100644 --- a/include/linux/blkdev.h +++ b/include/linux/blkdev.h | |||
@@ -678,10 +678,11 @@ extern void __blk_stop_queue(request_queue_t *q); | |||
678 | extern void blk_run_queue(request_queue_t *); | 678 | extern void blk_run_queue(request_queue_t *); |
679 | extern void blk_start_queueing(request_queue_t *); | 679 | extern void blk_start_queueing(request_queue_t *); |
680 | extern void blk_queue_activity_fn(request_queue_t *, activity_fn *, void *); | 680 | extern void blk_queue_activity_fn(request_queue_t *, activity_fn *, void *); |
681 | extern int blk_rq_map_user(request_queue_t *, struct request *, void __user *, unsigned int); | 681 | extern int blk_rq_map_user(request_queue_t *, struct request *, void __user *, unsigned long); |
682 | extern int blk_rq_unmap_user(struct bio *, unsigned int); | 682 | extern int blk_rq_unmap_user(struct request *); |
683 | extern int blk_rq_map_kern(request_queue_t *, struct request *, void *, unsigned int, gfp_t); | 683 | extern int blk_rq_map_kern(request_queue_t *, struct request *, void *, unsigned int, gfp_t); |
684 | extern int blk_rq_map_user_iov(request_queue_t *, struct request *, struct sg_iovec *, int); | 684 | extern int blk_rq_map_user_iov(request_queue_t *, struct request *, |
685 | struct sg_iovec *, int, unsigned int); | ||
685 | extern int blk_execute_rq(request_queue_t *, struct gendisk *, | 686 | extern int blk_execute_rq(request_queue_t *, struct gendisk *, |
686 | struct request *, int); | 687 | struct request *, int); |
687 | extern void blk_execute_rq_nowait(request_queue_t *, struct gendisk *, | 688 | extern void blk_execute_rq_nowait(request_queue_t *, struct gendisk *, |
diff --git a/include/linux/blktrace_api.h b/include/linux/blktrace_api.h index b99a714fcac6..3680ff9a30ed 100644 --- a/include/linux/blktrace_api.h +++ b/include/linux/blktrace_api.h | |||
@@ -50,6 +50,15 @@ enum blktrace_act { | |||
50 | }; | 50 | }; |
51 | 51 | ||
52 | /* | 52 | /* |
53 | * Notify events. | ||
54 | */ | ||
55 | enum blktrace_notify { | ||
56 | __BLK_TN_PROCESS = 0, /* establish pid/name mapping */ | ||
57 | __BLK_TN_TIMESTAMP, /* include system clock */ | ||
58 | }; | ||
59 | |||
60 | |||
61 | /* | ||
53 | * Trace actions in full. Additionally, read or write is masked | 62 | * Trace actions in full. Additionally, read or write is masked |
54 | */ | 63 | */ |
55 | #define BLK_TA_QUEUE (__BLK_TA_QUEUE | BLK_TC_ACT(BLK_TC_QUEUE)) | 64 | #define BLK_TA_QUEUE (__BLK_TA_QUEUE | BLK_TC_ACT(BLK_TC_QUEUE)) |
@@ -68,6 +77,9 @@ enum blktrace_act { | |||
68 | #define BLK_TA_BOUNCE (__BLK_TA_BOUNCE) | 77 | #define BLK_TA_BOUNCE (__BLK_TA_BOUNCE) |
69 | #define BLK_TA_REMAP (__BLK_TA_REMAP | BLK_TC_ACT(BLK_TC_QUEUE)) | 78 | #define BLK_TA_REMAP (__BLK_TA_REMAP | BLK_TC_ACT(BLK_TC_QUEUE)) |
70 | 79 | ||
80 | #define BLK_TN_PROCESS (__BLK_TN_PROCESS | BLK_TC_ACT(BLK_TC_NOTIFY)) | ||
81 | #define BLK_TN_TIMESTAMP (__BLK_TN_TIMESTAMP | BLK_TC_ACT(BLK_TC_NOTIFY)) | ||
82 | |||
71 | #define BLK_IO_TRACE_MAGIC 0x65617400 | 83 | #define BLK_IO_TRACE_MAGIC 0x65617400 |
72 | #define BLK_IO_TRACE_VERSION 0x07 | 84 | #define BLK_IO_TRACE_VERSION 0x07 |
73 | 85 | ||
diff --git a/include/linux/dccp.h b/include/linux/dccp.h index 53553c99cad6..ed6cc8962d87 100644 --- a/include/linux/dccp.h +++ b/include/linux/dccp.h | |||
@@ -30,7 +30,7 @@ struct dccp_hdr { | |||
30 | #else | 30 | #else |
31 | #error "Adjust your <asm/byteorder.h> defines" | 31 | #error "Adjust your <asm/byteorder.h> defines" |
32 | #endif | 32 | #endif |
33 | __u16 dccph_checksum; | 33 | __sum16 dccph_checksum; |
34 | #if defined(__LITTLE_ENDIAN_BITFIELD) | 34 | #if defined(__LITTLE_ENDIAN_BITFIELD) |
35 | __u8 dccph_x:1, | 35 | __u8 dccph_x:1, |
36 | dccph_type:4, | 36 | dccph_type:4, |
@@ -175,17 +175,21 @@ enum { | |||
175 | DCCPC_CCID3 = 3, | 175 | DCCPC_CCID3 = 3, |
176 | }; | 176 | }; |
177 | 177 | ||
178 | /* DCCP features */ | 178 | /* DCCP features (RFC 4340 section 6.4) */ |
179 | enum { | 179 | enum { |
180 | DCCPF_RESERVED = 0, | 180 | DCCPF_RESERVED = 0, |
181 | DCCPF_CCID = 1, | 181 | DCCPF_CCID = 1, |
182 | DCCPF_SEQUENCE_WINDOW = 3, | 182 | DCCPF_SHORT_SEQNOS = 2, /* XXX: not yet implemented */ |
183 | DCCPF_ACK_RATIO = 5, | 183 | DCCPF_SEQUENCE_WINDOW = 3, |
184 | DCCPF_SEND_ACK_VECTOR = 6, | 184 | DCCPF_ECN_INCAPABLE = 4, /* XXX: not yet implemented */ |
185 | DCCPF_SEND_NDP_COUNT = 7, | 185 | DCCPF_ACK_RATIO = 5, |
186 | /* 10-127 reserved */ | 186 | DCCPF_SEND_ACK_VECTOR = 6, |
187 | DCCPF_MIN_CCID_SPECIFIC = 128, | 187 | DCCPF_SEND_NDP_COUNT = 7, |
188 | DCCPF_MAX_CCID_SPECIFIC = 255, | 188 | DCCPF_MIN_CSUM_COVER = 8, |
189 | DCCPF_DATA_CHECKSUM = 9, /* XXX: not yet implemented */ | ||
190 | /* 10-127 reserved */ | ||
191 | DCCPF_MIN_CCID_SPECIFIC = 128, | ||
192 | DCCPF_MAX_CCID_SPECIFIC = 255, | ||
189 | }; | 193 | }; |
190 | 194 | ||
191 | /* this structure is argument to DCCP_SOCKOPT_CHANGE_X */ | 195 | /* this structure is argument to DCCP_SOCKOPT_CHANGE_X */ |
@@ -196,13 +200,16 @@ struct dccp_so_feat { | |||
196 | }; | 200 | }; |
197 | 201 | ||
198 | /* DCCP socket options */ | 202 | /* DCCP socket options */ |
199 | #define DCCP_SOCKOPT_PACKET_SIZE 1 | 203 | #define DCCP_SOCKOPT_PACKET_SIZE 1 /* XXX deprecated, without effect */ |
200 | #define DCCP_SOCKOPT_SERVICE 2 | 204 | #define DCCP_SOCKOPT_SERVICE 2 |
201 | #define DCCP_SOCKOPT_CHANGE_L 3 | 205 | #define DCCP_SOCKOPT_CHANGE_L 3 |
202 | #define DCCP_SOCKOPT_CHANGE_R 4 | 206 | #define DCCP_SOCKOPT_CHANGE_R 4 |
207 | #define DCCP_SOCKOPT_SEND_CSCOV 10 | ||
208 | #define DCCP_SOCKOPT_RECV_CSCOV 11 | ||
203 | #define DCCP_SOCKOPT_CCID_RX_INFO 128 | 209 | #define DCCP_SOCKOPT_CCID_RX_INFO 128 |
204 | #define DCCP_SOCKOPT_CCID_TX_INFO 192 | 210 | #define DCCP_SOCKOPT_CCID_TX_INFO 192 |
205 | 211 | ||
212 | /* maximum number of services provided on the same listening port */ | ||
206 | #define DCCP_SERVICE_LIST_MAX_LEN 32 | 213 | #define DCCP_SERVICE_LIST_MAX_LEN 32 |
207 | 214 | ||
208 | #ifdef __KERNEL__ | 215 | #ifdef __KERNEL__ |
@@ -256,6 +263,13 @@ static inline struct dccp_hdr *dccp_hdr(const struct sk_buff *skb) | |||
256 | return (struct dccp_hdr *)skb->h.raw; | 263 | return (struct dccp_hdr *)skb->h.raw; |
257 | } | 264 | } |
258 | 265 | ||
266 | static inline struct dccp_hdr *dccp_zeroed_hdr(struct sk_buff *skb, int headlen) | ||
267 | { | ||
268 | skb->h.raw = skb_push(skb, headlen); | ||
269 | memset(skb->h.raw, 0, headlen); | ||
270 | return dccp_hdr(skb); | ||
271 | } | ||
272 | |||
259 | static inline struct dccp_hdr_ext *dccp_hdrx(const struct sk_buff *skb) | 273 | static inline struct dccp_hdr_ext *dccp_hdrx(const struct sk_buff *skb) |
260 | { | 274 | { |
261 | return (struct dccp_hdr_ext *)(skb->h.raw + sizeof(struct dccp_hdr)); | 275 | return (struct dccp_hdr_ext *)(skb->h.raw + sizeof(struct dccp_hdr)); |
@@ -342,6 +356,9 @@ static inline unsigned int dccp_hdr_len(const struct sk_buff *skb) | |||
342 | * @dccpms_ccid - Congestion Control Id (CCID) (section 10) | 356 | * @dccpms_ccid - Congestion Control Id (CCID) (section 10) |
343 | * @dccpms_send_ack_vector - Send Ack Vector Feature (section 11.5) | 357 | * @dccpms_send_ack_vector - Send Ack Vector Feature (section 11.5) |
344 | * @dccpms_send_ndp_count - Send NDP Count Feature (7.7.2) | 358 | * @dccpms_send_ndp_count - Send NDP Count Feature (7.7.2) |
359 | * @dccpms_ack_ratio - Ack Ratio Feature (section 11.3) | ||
360 | * @dccpms_pending - List of features being negotiated | ||
361 | * @dccpms_conf - | ||
345 | */ | 362 | */ |
346 | struct dccp_minisock { | 363 | struct dccp_minisock { |
347 | __u64 dccpms_sequence_window; | 364 | __u64 dccpms_sequence_window; |
@@ -439,12 +456,25 @@ struct dccp_ackvec; | |||
439 | * @dccps_gss - greatest sequence number sent | 456 | * @dccps_gss - greatest sequence number sent |
440 | * @dccps_gsr - greatest valid sequence number received | 457 | * @dccps_gsr - greatest valid sequence number received |
441 | * @dccps_gar - greatest valid ack number received on a non-Sync; initialized to %dccps_iss | 458 | * @dccps_gar - greatest valid ack number received on a non-Sync; initialized to %dccps_iss |
459 | * @dccps_service - first (passive sock) or unique (active sock) service code | ||
460 | * @dccps_service_list - second .. last service code on passive socket | ||
442 | * @dccps_timestamp_time - time of latest TIMESTAMP option | 461 | * @dccps_timestamp_time - time of latest TIMESTAMP option |
443 | * @dccps_timestamp_echo - latest timestamp received on a TIMESTAMP option | 462 | * @dccps_timestamp_echo - latest timestamp received on a TIMESTAMP option |
444 | * @dccps_packet_size - Set thru setsockopt | 463 | * @dccps_l_ack_ratio - |
445 | * @dccps_role - Role of this sock, one of %dccp_role | 464 | * @dccps_r_ack_ratio - |
465 | * @dccps_pcslen - sender partial checksum coverage (via sockopt) | ||
466 | * @dccps_pcrlen - receiver partial checksum coverage (via sockopt) | ||
446 | * @dccps_ndp_count - number of Non Data Packets since last data packet | 467 | * @dccps_ndp_count - number of Non Data Packets since last data packet |
468 | * @dccps_mss_cache - | ||
469 | * @dccps_minisock - | ||
447 | * @dccps_hc_rx_ackvec - rx half connection ack vector | 470 | * @dccps_hc_rx_ackvec - rx half connection ack vector |
471 | * @dccps_hc_rx_ccid - | ||
472 | * @dccps_hc_tx_ccid - | ||
473 | * @dccps_options_received - | ||
474 | * @dccps_epoch - | ||
475 | * @dccps_role - Role of this sock, one of %dccp_role | ||
476 | * @dccps_hc_rx_insert_options - | ||
477 | * @dccps_hc_tx_insert_options - | ||
448 | * @dccps_xmit_timer - timer for when CCID is not ready to send | 478 | * @dccps_xmit_timer - timer for when CCID is not ready to send |
449 | */ | 479 | */ |
450 | struct dccp_sock { | 480 | struct dccp_sock { |
@@ -464,9 +494,10 @@ struct dccp_sock { | |||
464 | struct dccp_service_list *dccps_service_list; | 494 | struct dccp_service_list *dccps_service_list; |
465 | struct timeval dccps_timestamp_time; | 495 | struct timeval dccps_timestamp_time; |
466 | __u32 dccps_timestamp_echo; | 496 | __u32 dccps_timestamp_echo; |
467 | __u32 dccps_packet_size; | ||
468 | __u16 dccps_l_ack_ratio; | 497 | __u16 dccps_l_ack_ratio; |
469 | __u16 dccps_r_ack_ratio; | 498 | __u16 dccps_r_ack_ratio; |
499 | __u16 dccps_pcslen; | ||
500 | __u16 dccps_pcrlen; | ||
470 | unsigned long dccps_ndp_count; | 501 | unsigned long dccps_ndp_count; |
471 | __u32 dccps_mss_cache; | 502 | __u32 dccps_mss_cache; |
472 | struct dccp_minisock dccps_minisock; | 503 | struct dccp_minisock dccps_minisock; |
diff --git a/include/linux/device.h b/include/linux/device.h index 9d4f6a963936..583a341e016c 100644 --- a/include/linux/device.h +++ b/include/linux/device.h | |||
@@ -21,6 +21,7 @@ | |||
21 | #include <linux/pm.h> | 21 | #include <linux/pm.h> |
22 | #include <asm/semaphore.h> | 22 | #include <asm/semaphore.h> |
23 | #include <asm/atomic.h> | 23 | #include <asm/atomic.h> |
24 | #include <asm/device.h> | ||
24 | 25 | ||
25 | #define DEVICE_NAME_SIZE 50 | 26 | #define DEVICE_NAME_SIZE 50 |
26 | #define DEVICE_NAME_HALF __stringify(20) /* Less than half to accommodate slop */ | 27 | #define DEVICE_NAME_HALF __stringify(20) /* Less than half to accommodate slop */ |
@@ -42,6 +43,8 @@ struct bus_type { | |||
42 | struct klist klist_devices; | 43 | struct klist klist_devices; |
43 | struct klist klist_drivers; | 44 | struct klist klist_drivers; |
44 | 45 | ||
46 | struct blocking_notifier_head bus_notifier; | ||
47 | |||
45 | struct bus_attribute * bus_attrs; | 48 | struct bus_attribute * bus_attrs; |
46 | struct device_attribute * dev_attrs; | 49 | struct device_attribute * dev_attrs; |
47 | struct driver_attribute * drv_attrs; | 50 | struct driver_attribute * drv_attrs; |
@@ -75,6 +78,29 @@ int __must_check bus_for_each_drv(struct bus_type *bus, | |||
75 | struct device_driver *start, void *data, | 78 | struct device_driver *start, void *data, |
76 | int (*fn)(struct device_driver *, void *)); | 79 | int (*fn)(struct device_driver *, void *)); |
77 | 80 | ||
81 | /* | ||
82 | * Bus notifiers: Get notified of addition/removal of devices | ||
83 | * and binding/unbinding of drivers to devices. | ||
84 | * In the long run, it should be a replacement for the platform | ||
85 | * notify hooks. | ||
86 | */ | ||
87 | struct notifier_block; | ||
88 | |||
89 | extern int bus_register_notifier(struct bus_type *bus, | ||
90 | struct notifier_block *nb); | ||
91 | extern int bus_unregister_notifier(struct bus_type *bus, | ||
92 | struct notifier_block *nb); | ||
93 | |||
94 | /* All 4 notifers below get called with the target struct device * | ||
95 | * as an argument. Note that those functions are likely to be called | ||
96 | * with the device semaphore held in the core, so be careful. | ||
97 | */ | ||
98 | #define BUS_NOTIFY_ADD_DEVICE 0x00000001 /* device added */ | ||
99 | #define BUS_NOTIFY_DEL_DEVICE 0x00000002 /* device removed */ | ||
100 | #define BUS_NOTIFY_BOUND_DRIVER 0x00000003 /* driver bound to device */ | ||
101 | #define BUS_NOTIFY_UNBIND_DRIVER 0x00000004 /* driver about to be | ||
102 | unbound */ | ||
103 | |||
78 | /* driverfs interface for exporting bus attributes */ | 104 | /* driverfs interface for exporting bus attributes */ |
79 | 105 | ||
80 | struct bus_attribute { | 106 | struct bus_attribute { |
@@ -343,8 +369,6 @@ struct device { | |||
343 | void *driver_data; /* data private to the driver */ | 369 | void *driver_data; /* data private to the driver */ |
344 | void *platform_data; /* Platform specific data, device | 370 | void *platform_data; /* Platform specific data, device |
345 | core doesn't touch it */ | 371 | core doesn't touch it */ |
346 | void *firmware_data; /* Firmware specific data (e.g. ACPI, | ||
347 | BIOS data),reserved for device core*/ | ||
348 | struct dev_pm_info power; | 372 | struct dev_pm_info power; |
349 | 373 | ||
350 | u64 *dma_mask; /* dma mask (if dma'able device) */ | 374 | u64 *dma_mask; /* dma mask (if dma'able device) */ |
@@ -358,6 +382,8 @@ struct device { | |||
358 | 382 | ||
359 | struct dma_coherent_mem *dma_mem; /* internal for coherent mem | 383 | struct dma_coherent_mem *dma_mem; /* internal for coherent mem |
360 | override */ | 384 | override */ |
385 | /* arch specific additions */ | ||
386 | struct dev_archdata archdata; | ||
361 | 387 | ||
362 | /* class_device migration path */ | 388 | /* class_device migration path */ |
363 | struct list_head node; | 389 | struct list_head node; |
@@ -395,7 +421,10 @@ extern int __must_check device_add(struct device * dev); | |||
395 | extern void device_del(struct device * dev); | 421 | extern void device_del(struct device * dev); |
396 | extern int device_for_each_child(struct device *, void *, | 422 | extern int device_for_each_child(struct device *, void *, |
397 | int (*fn)(struct device *, void *)); | 423 | int (*fn)(struct device *, void *)); |
424 | extern struct device *device_find_child(struct device *, void *data, | ||
425 | int (*match)(struct device *, void *)); | ||
398 | extern int device_rename(struct device *dev, char *new_name); | 426 | extern int device_rename(struct device *dev, char *new_name); |
427 | extern int device_move(struct device *dev, struct device *new_parent); | ||
399 | 428 | ||
400 | /* | 429 | /* |
401 | * Manual binding of a device to driver. See drivers/base/bus.c | 430 | * Manual binding of a device to driver. See drivers/base/bus.c |
@@ -415,8 +444,6 @@ extern struct device *device_create(struct class *cls, struct device *parent, | |||
415 | __attribute__((format(printf,4,5))); | 444 | __attribute__((format(printf,4,5))); |
416 | extern void device_destroy(struct class *cls, dev_t devt); | 445 | extern void device_destroy(struct class *cls, dev_t devt); |
417 | 446 | ||
418 | extern int virtual_device_parent(struct device *dev); | ||
419 | |||
420 | /* | 447 | /* |
421 | * Platform "fixup" functions - allow the platform to have their say | 448 | * Platform "fixup" functions - allow the platform to have their say |
422 | * about devices and actions that the general device layer doesn't | 449 | * about devices and actions that the general device layer doesn't |
diff --git a/include/linux/divert.h b/include/linux/divert.h deleted file mode 100644 index 8fb4e9de6843..000000000000 --- a/include/linux/divert.h +++ /dev/null | |||
@@ -1,132 +0,0 @@ | |||
1 | /* | ||
2 | * Frame Diversion, Benoit Locher <Benoit.Locher@skf.com> | ||
3 | * | ||
4 | * Changes: | ||
5 | * 06/09/2000 BL: initial version | ||
6 | * | ||
7 | */ | ||
8 | |||
9 | #ifndef _LINUX_DIVERT_H | ||
10 | #define _LINUX_DIVERT_H | ||
11 | |||
12 | #include <asm/types.h> | ||
13 | |||
14 | #define MAX_DIVERT_PORTS 8 /* Max number of ports to divert (tcp, udp) */ | ||
15 | |||
16 | /* Divertable protocols */ | ||
17 | #define DIVERT_PROTO_NONE 0x0000 | ||
18 | #define DIVERT_PROTO_IP 0x0001 | ||
19 | #define DIVERT_PROTO_ICMP 0x0002 | ||
20 | #define DIVERT_PROTO_TCP 0x0004 | ||
21 | #define DIVERT_PROTO_UDP 0x0008 | ||
22 | |||
23 | /* | ||
24 | * This is an Ethernet Frame Diverter option block | ||
25 | */ | ||
26 | struct divert_blk | ||
27 | { | ||
28 | int divert; /* are we active */ | ||
29 | unsigned int protos; /* protocols */ | ||
30 | __u16 tcp_dst[MAX_DIVERT_PORTS]; /* specific tcp dst ports to divert */ | ||
31 | __u16 tcp_src[MAX_DIVERT_PORTS]; /* specific tcp src ports to divert */ | ||
32 | __u16 udp_dst[MAX_DIVERT_PORTS]; /* specific udp dst ports to divert */ | ||
33 | __u16 udp_src[MAX_DIVERT_PORTS]; /* specific udp src ports to divert */ | ||
34 | }; | ||
35 | |||
36 | /* | ||
37 | * Diversion control block, for configuration with the userspace tool | ||
38 | * divert | ||
39 | */ | ||
40 | |||
41 | typedef union _divert_cf_arg | ||
42 | { | ||
43 | __s16 int16; | ||
44 | __u16 uint16; | ||
45 | __s32 int32; | ||
46 | __u32 uint32; | ||
47 | __s64 int64; | ||
48 | __u64 uint64; | ||
49 | void __user *ptr; | ||
50 | } divert_cf_arg; | ||
51 | |||
52 | |||
53 | struct divert_cf | ||
54 | { | ||
55 | int cmd; /* Command */ | ||
56 | divert_cf_arg arg1, | ||
57 | arg2, | ||
58 | arg3; | ||
59 | int dev_index; /* device index (eth0=0, etc...) */ | ||
60 | }; | ||
61 | |||
62 | |||
63 | /* Diversion commands */ | ||
64 | #define DIVCMD_DIVERT 1 /* ENABLE/DISABLE diversion */ | ||
65 | #define DIVCMD_IP 2 /* ENABLE/DISABLE whold IP diversion */ | ||
66 | #define DIVCMD_TCP 3 /* ENABLE/DISABLE whold TCP diversion */ | ||
67 | #define DIVCMD_TCPDST 4 /* ADD/REMOVE TCP DST port for diversion */ | ||
68 | #define DIVCMD_TCPSRC 5 /* ADD/REMOVE TCP SRC port for diversion */ | ||
69 | #define DIVCMD_UDP 6 /* ENABLE/DISABLE whole UDP diversion */ | ||
70 | #define DIVCMD_UDPDST 7 /* ADD/REMOVE UDP DST port for diversion */ | ||
71 | #define DIVCMD_UDPSRC 8 /* ADD/REMOVE UDP SRC port for diversion */ | ||
72 | #define DIVCMD_ICMP 9 /* ENABLE/DISABLE whole ICMP diversion */ | ||
73 | #define DIVCMD_GETSTATUS 10 /* GET the status of the diverter */ | ||
74 | #define DIVCMD_RESET 11 /* Reset the diverter on the specified dev */ | ||
75 | #define DIVCMD_GETVERSION 12 /* Retrieve the diverter code version (char[32]) */ | ||
76 | |||
77 | /* General syntax of the commands: | ||
78 | * | ||
79 | * DIVCMD_xxxxxx(arg1, arg2, arg3, dev_index) | ||
80 | * | ||
81 | * SIOCSIFDIVERT: | ||
82 | * DIVCMD_DIVERT(DIVARG1_ENABLE|DIVARG1_DISABLE, , ,ifindex) | ||
83 | * DIVCMD_IP(DIVARG1_ENABLE|DIVARG1_DISABLE, , , ifindex) | ||
84 | * DIVCMD_TCP(DIVARG1_ENABLE|DIVARG1_DISABLE, , , ifindex) | ||
85 | * DIVCMD_TCPDST(DIVARG1_ADD|DIVARG1_REMOVE, port, , ifindex) | ||
86 | * DIVCMD_TCPSRC(DIVARG1_ADD|DIVARG1_REMOVE, port, , ifindex) | ||
87 | * DIVCMD_UDP(DIVARG1_ENABLE|DIVARG1_DISABLE, , , ifindex) | ||
88 | * DIVCMD_UDPDST(DIVARG1_ADD|DIVARG1_REMOVE, port, , ifindex) | ||
89 | * DIVCMD_UDPSRC(DIVARG1_ADD|DIVARG1_REMOVE, port, , ifindex) | ||
90 | * DIVCMD_ICMP(DIVARG1_ENABLE|DIVARG1_DISABLE, , , ifindex) | ||
91 | * DIVCMD_RESET(, , , ifindex) | ||
92 | * | ||
93 | * SIOGIFDIVERT: | ||
94 | * DIVCMD_GETSTATUS(divert_blk, , , ifindex) | ||
95 | * DIVCMD_GETVERSION(string[3]) | ||
96 | */ | ||
97 | |||
98 | |||
99 | /* Possible values for arg1 */ | ||
100 | #define DIVARG1_ENABLE 0 /* ENABLE something */ | ||
101 | #define DIVARG1_DISABLE 1 /* DISABLE something */ | ||
102 | #define DIVARG1_ADD 2 /* ADD something */ | ||
103 | #define DIVARG1_REMOVE 3 /* REMOVE something */ | ||
104 | |||
105 | |||
106 | #ifdef __KERNEL__ | ||
107 | |||
108 | /* diverter functions */ | ||
109 | #include <linux/skbuff.h> | ||
110 | |||
111 | #ifdef CONFIG_NET_DIVERT | ||
112 | #include <linux/netdevice.h> | ||
113 | |||
114 | int alloc_divert_blk(struct net_device *); | ||
115 | void free_divert_blk(struct net_device *); | ||
116 | int divert_ioctl(unsigned int cmd, struct divert_cf __user *arg); | ||
117 | void divert_frame(struct sk_buff *skb); | ||
118 | static inline void handle_diverter(struct sk_buff *skb) | ||
119 | { | ||
120 | /* if diversion is supported on device, then divert */ | ||
121 | if (skb->dev->divert && skb->dev->divert->divert) | ||
122 | divert_frame(skb); | ||
123 | } | ||
124 | |||
125 | #else | ||
126 | # define alloc_divert_blk(dev) (0) | ||
127 | # define free_divert_blk(dev) do {} while (0) | ||
128 | # define divert_ioctl(cmd, arg) (-ENOPKG) | ||
129 | # define handle_diverter(skb) do {} while (0) | ||
130 | #endif | ||
131 | #endif | ||
132 | #endif /* _LINUX_DIVERT_H */ | ||
diff --git a/include/linux/elevator.h b/include/linux/elevator.h index 2fa9f1144228..a24931d24404 100644 --- a/include/linux/elevator.h +++ b/include/linux/elevator.h | |||
@@ -21,11 +21,11 @@ typedef void (elevator_completed_req_fn) (request_queue_t *, struct request *); | |||
21 | typedef int (elevator_may_queue_fn) (request_queue_t *, int); | 21 | typedef int (elevator_may_queue_fn) (request_queue_t *, int); |
22 | 22 | ||
23 | typedef int (elevator_set_req_fn) (request_queue_t *, struct request *, gfp_t); | 23 | typedef int (elevator_set_req_fn) (request_queue_t *, struct request *, gfp_t); |
24 | typedef void (elevator_put_req_fn) (request_queue_t *, struct request *); | 24 | typedef void (elevator_put_req_fn) (struct request *); |
25 | typedef void (elevator_activate_req_fn) (request_queue_t *, struct request *); | 25 | typedef void (elevator_activate_req_fn) (request_queue_t *, struct request *); |
26 | typedef void (elevator_deactivate_req_fn) (request_queue_t *, struct request *); | 26 | typedef void (elevator_deactivate_req_fn) (request_queue_t *, struct request *); |
27 | 27 | ||
28 | typedef void *(elevator_init_fn) (request_queue_t *, elevator_t *); | 28 | typedef void *(elevator_init_fn) (request_queue_t *); |
29 | typedef void (elevator_exit_fn) (elevator_t *); | 29 | typedef void (elevator_exit_fn) (elevator_t *); |
30 | 30 | ||
31 | struct elevator_ops | 31 | struct elevator_ops |
diff --git a/include/linux/fb.h b/include/linux/fb.h index 3e69241e6a81..fa23e0671bb3 100644 --- a/include/linux/fb.h +++ b/include/linux/fb.h | |||
@@ -774,8 +774,8 @@ struct fb_info { | |||
774 | #endif | 774 | #endif |
775 | 775 | ||
776 | struct fb_ops *fbops; | 776 | struct fb_ops *fbops; |
777 | struct device *device; | 777 | struct device *device; /* This is the parent */ |
778 | struct class_device *class_device; /* sysfs per device attrs */ | 778 | struct device *dev; /* This is this fb device */ |
779 | int class_flag; /* private sysfs flags */ | 779 | int class_flag; /* private sysfs flags */ |
780 | #ifdef CONFIG_FB_TILEBLITTING | 780 | #ifdef CONFIG_FB_TILEBLITTING |
781 | struct fb_tile_ops *tileops; /* Tile Blitting */ | 781 | struct fb_tile_ops *tileops; /* Tile Blitting */ |
@@ -910,8 +910,8 @@ static inline void __fb_pad_aligned_buffer(u8 *dst, u32 d_pitch, | |||
910 | /* drivers/video/fbsysfs.c */ | 910 | /* drivers/video/fbsysfs.c */ |
911 | extern struct fb_info *framebuffer_alloc(size_t size, struct device *dev); | 911 | extern struct fb_info *framebuffer_alloc(size_t size, struct device *dev); |
912 | extern void framebuffer_release(struct fb_info *info); | 912 | extern void framebuffer_release(struct fb_info *info); |
913 | extern int fb_init_class_device(struct fb_info *fb_info); | 913 | extern int fb_init_device(struct fb_info *fb_info); |
914 | extern void fb_cleanup_class_device(struct fb_info *head); | 914 | extern void fb_cleanup_device(struct fb_info *head); |
915 | extern void fb_bl_default_curve(struct fb_info *fb_info, u8 off, u8 min, u8 max); | 915 | extern void fb_bl_default_curve(struct fb_info *fb_info, u8 off, u8 min, u8 max); |
916 | 916 | ||
917 | /* drivers/video/fbmon.c */ | 917 | /* drivers/video/fbmon.c */ |
diff --git a/include/linux/fib_rules.h b/include/linux/fib_rules.h index 4418c8d9d479..8270aac2aa5d 100644 --- a/include/linux/fib_rules.h +++ b/include/linux/fib_rules.h | |||
@@ -6,6 +6,7 @@ | |||
6 | 6 | ||
7 | /* rule is permanent, and cannot be deleted */ | 7 | /* rule is permanent, and cannot be deleted */ |
8 | #define FIB_RULE_PERMANENT 1 | 8 | #define FIB_RULE_PERMANENT 1 |
9 | #define FIB_RULE_INVERT 2 | ||
9 | 10 | ||
10 | struct fib_rule_hdr | 11 | struct fib_rule_hdr |
11 | { | 12 | { |
@@ -34,7 +35,7 @@ enum | |||
34 | FRA_UNUSED3, | 35 | FRA_UNUSED3, |
35 | FRA_UNUSED4, | 36 | FRA_UNUSED4, |
36 | FRA_UNUSED5, | 37 | FRA_UNUSED5, |
37 | FRA_FWMARK, /* netfilter mark */ | 38 | FRA_FWMARK, /* mark */ |
38 | FRA_FLOW, /* flow/class id */ | 39 | FRA_FLOW, /* flow/class id */ |
39 | FRA_UNUSED6, | 40 | FRA_UNUSED6, |
40 | FRA_UNUSED7, | 41 | FRA_UNUSED7, |
diff --git a/include/linux/ftape-header-segment.h b/include/linux/ftape-header-segment.h deleted file mode 100644 index 4732218f0708..000000000000 --- a/include/linux/ftape-header-segment.h +++ /dev/null | |||
@@ -1,122 +0,0 @@ | |||
1 | #ifndef _FTAPE_HEADER_SEGMENT_H | ||
2 | #define _FTAPE_HEADER_SEGMENT_H | ||
3 | |||
4 | /* | ||
5 | * Copyright (C) 1996-1997 Claus-Justus Heine. | ||
6 | |||
7 | This program is free software; you can redistribute it and/or modify | ||
8 | it under the terms of the GNU General Public License as published by | ||
9 | the Free Software Foundation; either version 2, or (at your option) | ||
10 | any later version. | ||
11 | |||
12 | This program is distributed in the hope that it will be useful, | ||
13 | but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
14 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
15 | GNU General Public License for more details. | ||
16 | |||
17 | You should have received a copy of the GNU General Public License | ||
18 | along with this program; see the file COPYING. If not, write to | ||
19 | the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. | ||
20 | |||
21 | * | ||
22 | * $Source: /homes/cvs/ftape-stacked/include/linux/ftape-header-segment.h,v $ | ||
23 | * $Revision: 1.2 $ | ||
24 | * $Date: 1997/10/05 19:19:28 $ | ||
25 | * | ||
26 | * This file defines some offsets into the header segment of a | ||
27 | * floppy tape cartridge. For use with the QIC-40/80/3010/3020 | ||
28 | * floppy-tape driver "ftape" for Linux. | ||
29 | */ | ||
30 | |||
31 | #define FT_SIGNATURE 0 /* must be 0xaa55aa55 */ | ||
32 | #define FT_FMT_CODE 4 | ||
33 | #define FT_REV_LEVEL 5 /* only for QIC-80 since. Rev. L (== 0x0c) */ | ||
34 | #define FT_HSEG_1 6 /* first header segment, except for format code 6 */ | ||
35 | #define FT_HSEG_2 8 /* second header segment, except for format code 6 */ | ||
36 | #define FT_FRST_SEG 10 /* first data segment, except for format code 6 */ | ||
37 | #define FT_LAST_SEG 12 /* last data segment, except for format code 6 */ | ||
38 | #define FT_FMT_DATE 14 /* date and time of most recent format, see below */ | ||
39 | #define FT_WR_DATE 18 /* date and time of most recent write or format */ | ||
40 | #define FT_SPT 24 /* segments per track */ | ||
41 | #define FT_TPC 26 /* tracks per cartridge */ | ||
42 | #define FT_FHM 27 /* floppy drive head (maximum of it) */ | ||
43 | #define FT_FTM 28 /* floppy track max. */ | ||
44 | #define FT_FSM 29 /* floppy sector max. (128) */ | ||
45 | #define FT_LABEL 30 /* floppy tape label */ | ||
46 | #define FT_LABEL_DATE 74 /* date and time the tape label was written */ | ||
47 | #define FT_LABEL_SZ (FT_LABEL_DATE - FT_LABEL) | ||
48 | #define FT_CMAP_START 78 /* starting segment of compression map */ | ||
49 | #define FT_FMT_ERROR 128 /* must be set to 0xff if remainder gets lost during | ||
50 | * tape format | ||
51 | */ | ||
52 | #define FT_SEG_CNT 130 /* number of seg. written, formatted or verified | ||
53 | * through lifetime of tape (why not read?) | ||
54 | */ | ||
55 | #define FT_INIT_DATE 138 /* date and time of initial tape format */ | ||
56 | #define FT_FMT_CNT 142 /* number of times tape has been formatted */ | ||
57 | #define FT_FSL_CNT 144 /* number of segments in failed sector log */ | ||
58 | #define FT_MK_CODE 146 /* id string of tape manufacturer */ | ||
59 | #define FT_LOT_CODE 190 /* tape manufacturer lot code */ | ||
60 | #define FT_6_HSEG_1 234 /* first header segment for format code 6 */ | ||
61 | #define FT_6_HSEG_2 238 /* second header segment for format code 6 */ | ||
62 | #define FT_6_FRST_SEG 242 /* first data segment for format code 6 */ | ||
63 | #define FT_6_LAST_SEG 246 /* last data segment for format code 6 */ | ||
64 | |||
65 | #define FT_FSL 256 | ||
66 | #define FT_HEADER_END 256 /* space beyond this point: | ||
67 | * format codes 2, 3 and 5: | ||
68 | * - failed sector log until byte 2047 | ||
69 | * - bad sector map in the reamining part of segment | ||
70 | * format codes 4 and 6: | ||
71 | * - bad sector map starts hear | ||
72 | */ | ||
73 | |||
74 | |||
75 | /* value to be stored at the FT_SIGNATURE offset | ||
76 | */ | ||
77 | #define FT_HSEG_MAGIC 0xaa55aa55 | ||
78 | #define FT_D2G_MAGIC 0x82288228 /* Ditto 2GB */ | ||
79 | |||
80 | /* data and time encoding: */ | ||
81 | #define FT_YEAR_SHIFT 25 | ||
82 | #define FT_YEAR_MASK 0xfe000000 | ||
83 | #define FT_YEAR_0 1970 | ||
84 | #define FT_YEAR_MAX 127 | ||
85 | #define FT_YEAR(year) ((((year)-FT_YEAR_0)<<FT_YEAR_SHIFT)&FT_YEAR_MASK) | ||
86 | |||
87 | #define FT_TIME_SHIFT 0 | ||
88 | #define FT_TIME_MASK 0x01FFFFFF | ||
89 | #define FT_TIME_MAX 0x01ea6dff /* last second of a year */ | ||
90 | #define FT_TIME(mo,d,h,m,s) \ | ||
91 | ((((s)+60*((m)+60*((h)+24*((d)+31*(mo))))) & FT_TIME_MASK)) | ||
92 | |||
93 | #define FT_TIME_STAMP(y,mo,d,h,m,s) (FT_YEAR(y) | FT_TIME(mo,d,h,m,s)) | ||
94 | |||
95 | /* values for the format code field */ | ||
96 | typedef enum { | ||
97 | fmt_normal = 2, /* QIC-80 post Rev. B 205Ft or 307Ft tape */ | ||
98 | fmt_1100ft = 3, /* QIC-80 post Rev. B 1100Ft tape */ | ||
99 | fmt_var = 4, /* QIC-80 post Rev. B variabel length format */ | ||
100 | fmt_425ft = 5, /* QIC-80 post Rev. B 425Ft tape */ | ||
101 | fmt_big = 6 /* QIC-3010/3020 variable length tape with more | ||
102 | * than 2^16 segments per tape | ||
103 | */ | ||
104 | } ft_format_type; | ||
105 | |||
106 | /* definitions for the failed sector log */ | ||
107 | #define FT_FSL_SIZE (2 * FT_SECTOR_SIZE - FT_HEADER_END) | ||
108 | #define FT_FSL_MAX_ENTRIES (FT_FSL_SIZE/sizeof(__u32)) | ||
109 | |||
110 | typedef struct ft_fsl_entry { | ||
111 | __u16 segment; | ||
112 | __u16 date; | ||
113 | } __attribute__ ((packed)) ft_fsl_entry; | ||
114 | |||
115 | |||
116 | /* date encoding for the failed sector log | ||
117 | * month: 1..12, day: 1..31, year: 1970..2097 | ||
118 | */ | ||
119 | #define FT_FSL_TIME_STAMP(y,m,d) \ | ||
120 | (((((y) - FT_YEAR_0)<<9)&0xfe00) | (((m)<<5)&0x01e0) | ((d)&0x001f)) | ||
121 | |||
122 | #endif /* _FTAPE_HEADER_SEGMENT_H */ | ||
diff --git a/include/linux/ftape-vendors.h b/include/linux/ftape-vendors.h deleted file mode 100644 index ec1a81f059e5..000000000000 --- a/include/linux/ftape-vendors.h +++ /dev/null | |||
@@ -1,137 +0,0 @@ | |||
1 | #ifndef _FTAPE_VENDORS_H | ||
2 | #define _FTAPE_VENDORS_H | ||
3 | |||
4 | /* | ||
5 | * Copyright (C) 1993-1996 Bas Laarhoven, | ||
6 | * (C) 1996-1997 Claus-Justus Heine. | ||
7 | |||
8 | This program is free software; you can redistribute it and/or modify | ||
9 | it under the terms of the GNU General Public License as published by | ||
10 | the Free Software Foundation; either version 2, or (at your option) | ||
11 | any later version. | ||
12 | |||
13 | This program is distributed in the hope that it will be useful, | ||
14 | but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
15 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
16 | GNU General Public License for more details. | ||
17 | |||
18 | You should have received a copy of the GNU General Public License | ||
19 | along with this program; see the file COPYING. If not, write to | ||
20 | the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. | ||
21 | |||
22 | * | ||
23 | * $Source: /homes/cvs/ftape-stacked/include/linux/ftape-vendors.h,v $ | ||
24 | * $Revision: 1.6 $ | ||
25 | * $Date: 1997/10/09 15:38:11 $ | ||
26 | * | ||
27 | * This file contains the supported drive types with their | ||
28 | * QIC-117 spec. vendor code and drive dependent configuration | ||
29 | * information. | ||
30 | */ | ||
31 | |||
32 | typedef enum { | ||
33 | unknown_wake_up = 0, | ||
34 | no_wake_up, | ||
35 | wake_up_colorado, | ||
36 | wake_up_mountain, | ||
37 | wake_up_insight, | ||
38 | } wake_up_types; | ||
39 | |||
40 | typedef struct { | ||
41 | wake_up_types wake_up; /* see wake_up_types */ | ||
42 | char *name; /* Text describing the drive */ | ||
43 | } wakeup_method; | ||
44 | |||
45 | /* Note: order of entries in WAKEUP_METHODS must be so that a variable | ||
46 | * of type wake_up_types can be used as an index in the array. | ||
47 | */ | ||
48 | #define WAKEUP_METHODS { \ | ||
49 | { unknown_wake_up, "Unknown" }, \ | ||
50 | { no_wake_up, "None" }, \ | ||
51 | { wake_up_colorado, "Colorado" }, \ | ||
52 | { wake_up_mountain, "Mountain" }, \ | ||
53 | { wake_up_insight, "Motor-on" }, \ | ||
54 | } | ||
55 | |||
56 | typedef struct { | ||
57 | unsigned int vendor_id; /* vendor id from drive */ | ||
58 | int speed; /* maximum tape transport speed (ips) */ | ||
59 | wake_up_types wake_up; /* see wake_up_types */ | ||
60 | char *name; /* Text describing the drive */ | ||
61 | } vendor_struct; | ||
62 | |||
63 | #define UNKNOWN_VENDOR (-1) | ||
64 | |||
65 | #define QIC117_VENDORS { \ | ||
66 | /* see _vendor_struct */ \ | ||
67 | { 0x00000, 82, wake_up_colorado, "Colorado DJ-10 (old)" }, \ | ||
68 | { 0x00047, 90, wake_up_colorado, "Colorado DJ-10/DJ-20" }, \ | ||
69 | { 0x011c2, 84, wake_up_colorado, "Colorado 700" }, \ | ||
70 | { 0x011c3, 90, wake_up_colorado, "Colorado 1400" }, \ | ||
71 | { 0x011c4, 84, wake_up_colorado, "Colorado DJ-10/DJ-20 (new)" }, \ | ||
72 | { 0x011c5, 84, wake_up_colorado, "HP Colorado T1000" }, \ | ||
73 | { 0x011c6, 90, wake_up_colorado, "HP Colorado T3000" }, \ | ||
74 | { 0x00005, 45, wake_up_mountain, "Archive 5580i" }, \ | ||
75 | { 0x10005, 50, wake_up_insight, "Insight 80Mb, Irwin 80SX" }, \ | ||
76 | { 0x00140, 74, wake_up_mountain, "Archive S.Hornet [Identity/Escom]" }, \ | ||
77 | { 0x00146, 72, wake_up_mountain, "Archive 31250Q [Escom]" }, \ | ||
78 | { 0x0014a, 100, wake_up_mountain, "Archive XL9250i [Conner/Escom]" }, \ | ||
79 | { 0x0014c, 98, wake_up_mountain, "Conner C250MQT" }, \ | ||
80 | { 0x0014e, 80, wake_up_mountain, "Conner C250MQ" }, \ | ||
81 | { 0x00150, 80, wake_up_mountain, "Conner TSM420R/TST800R" }, \ | ||
82 | { 0x00152, 80, wake_up_mountain, "Conner TSM850R" }, \ | ||
83 | { 0x00156, 80, wake_up_mountain, "Conner TSM850R/1700R/TST3200R" }, \ | ||
84 | { 0x00180, 0, wake_up_mountain, "Summit SE 150" }, \ | ||
85 | { 0x00181, 85, wake_up_mountain, "Summit SE 250, Mountain FS8000" }, \ | ||
86 | { 0x001c1, 82, no_wake_up, "Wangtek 3040F" }, \ | ||
87 | { 0x001c8, 64, no_wake_up, "Wangtek 3080F" }, \ | ||
88 | { 0x001c8, 64, wake_up_colorado, "Wangtek 3080F" }, \ | ||
89 | { 0x001ca, 67, no_wake_up, "Wangtek 3080F (new)" }, \ | ||
90 | { 0x001cc, 77, wake_up_colorado, "Wangtek 3200 / Teac 700" }, \ | ||
91 | { 0x001cd, 75, wake_up_colorado, "Reveal TB1400" }, \ | ||
92 | { 0x00380, 85, wake_up_colorado, "Exabyte Eagle-96" }, \ | ||
93 | { 0x00381, 85, wake_up_colorado, "Exabyte Eagle TR-3" }, \ | ||
94 | { 0x00382, 85, wake_up_colorado, "Exabyte Eagle TR-3" }, \ | ||
95 | { 0x003ce, 77, wake_up_colorado, "Teac 800" }, \ | ||
96 | { 0x003cf, 0, wake_up_colorado, "Teac FT3010TR" }, \ | ||
97 | { 0x08880, 64, no_wake_up, "Iomega 250, Ditto 800" }, \ | ||
98 | { 0x08880, 64, wake_up_colorado, "Iomega 250, Ditto 800" }, \ | ||
99 | { 0x08880, 64, wake_up_insight, "Iomega 250, Ditto 800" }, \ | ||
100 | { 0x08881, 80, wake_up_colorado, "Iomega 700" }, \ | ||
101 | { 0x08882, 80, wake_up_colorado, "Iomega 3200" }, \ | ||
102 | { 0x08883, 80, wake_up_colorado, "Iomega DITTO 2GB" }, \ | ||
103 | { 0x00021, 70, no_wake_up, "AIWA CT-803" }, \ | ||
104 | { 0x004c0, 80, no_wake_up, "AIWA TD-S1600" }, \ | ||
105 | { 0x00021, 0, wake_up_mountain, "COREtape QIC80" }, \ | ||
106 | { 0x00441, 0, wake_up_mountain, "ComByte DoublePlay" }, \ | ||
107 | { 0x00481, 127, wake_up_mountain, "PERTEC MyTape 800" }, \ | ||
108 | { 0x00483, 130, wake_up_mountain, "PERTEC MyTape 3200" }, \ | ||
109 | { UNKNOWN_VENDOR, 0, no_wake_up, "unknown" } \ | ||
110 | } | ||
111 | |||
112 | #define QIC117_MAKE_CODES { \ | ||
113 | { 0, "Unassigned" }, \ | ||
114 | { 1, "Alloy Computer Products" }, \ | ||
115 | { 2, "3M" }, \ | ||
116 | { 3, "Tandberg Data" }, \ | ||
117 | { 4, "Colorado" }, \ | ||
118 | { 5, "Archive/Conner" }, \ | ||
119 | { 6, "Mountain/Summit Memory Systems" }, \ | ||
120 | { 7, "Wangtek/Rexon/Tecmar" }, \ | ||
121 | { 8, "Sony" }, \ | ||
122 | { 9, "Cipher Data Products" }, \ | ||
123 | { 10, "Irwin Magnetic Systems" }, \ | ||
124 | { 11, "Braemar" }, \ | ||
125 | { 12, "Verbatim" }, \ | ||
126 | { 13, "Core International" }, \ | ||
127 | { 14, "Exabyte" }, \ | ||
128 | { 15, "Teac" }, \ | ||
129 | { 16, "Gigatek" }, \ | ||
130 | { 17, "ComByte" }, \ | ||
131 | { 18, "PERTEC Memories" }, \ | ||
132 | { 19, "Aiwa" }, \ | ||
133 | { 71, "Colorado" }, \ | ||
134 | { 546, "Iomega Inc" }, \ | ||
135 | } | ||
136 | |||
137 | #endif /* _FTAPE_VENDORS_H */ | ||
diff --git a/include/linux/ftape.h b/include/linux/ftape.h deleted file mode 100644 index 7e7038cba86a..000000000000 --- a/include/linux/ftape.h +++ /dev/null | |||
@@ -1,201 +0,0 @@ | |||
1 | #ifndef _FTAPE_H | ||
2 | #define _FTAPE_H | ||
3 | |||
4 | /* | ||
5 | * Copyright (C) 1994-1996 Bas Laarhoven, | ||
6 | * (C) 1996-1997 Claus-Justus Heine. | ||
7 | |||
8 | This program is free software; you can redistribute it and/or modify | ||
9 | it under the terms of the GNU General Public License as published by | ||
10 | the Free Software Foundation; either version 2, or (at your option) | ||
11 | any later version. | ||
12 | |||
13 | This program is distributed in the hope that it will be useful, | ||
14 | but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
15 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
16 | GNU General Public License for more details. | ||
17 | |||
18 | You should have received a copy of the GNU General Public License | ||
19 | along with this program; see the file COPYING. If not, write to | ||
20 | the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. | ||
21 | |||
22 | * | ||
23 | * $Source: /homes/cvs/ftape-stacked/include/linux/ftape.h,v $ | ||
24 | * $Revision: 1.17.6.4 $ | ||
25 | * $Date: 1997/11/25 01:52:54 $ | ||
26 | * | ||
27 | * This file contains global definitions, typedefs and macro's | ||
28 | * for the QIC-40/80/3010/3020 floppy-tape driver for Linux. | ||
29 | */ | ||
30 | |||
31 | #define FTAPE_VERSION "ftape v3.04d 25/11/97" | ||
32 | |||
33 | #ifdef __KERNEL__ | ||
34 | #include <linux/interrupt.h> | ||
35 | #include <linux/mm.h> | ||
36 | #endif | ||
37 | #include <linux/types.h> | ||
38 | #include <linux/mtio.h> | ||
39 | |||
40 | #define FT_SECTOR(x) (x+1) /* sector offset into real sector */ | ||
41 | #define FT_SECTOR_SIZE 1024 | ||
42 | #define FT_SECTORS_PER_SEGMENT 32 | ||
43 | #define FT_ECC_SECTORS 3 | ||
44 | #define FT_SEGMENT_SIZE ((FT_SECTORS_PER_SEGMENT - FT_ECC_SECTORS) * FT_SECTOR_SIZE) | ||
45 | #define FT_BUFF_SIZE (FT_SECTORS_PER_SEGMENT * FT_SECTOR_SIZE) | ||
46 | |||
47 | /* | ||
48 | * bits of the minor device number that define drive selection | ||
49 | * methods. Could be used one day to access multiple tape | ||
50 | * drives on the same controller. | ||
51 | */ | ||
52 | #define FTAPE_SEL_A 0 | ||
53 | #define FTAPE_SEL_B 1 | ||
54 | #define FTAPE_SEL_C 2 | ||
55 | #define FTAPE_SEL_D 3 | ||
56 | #define FTAPE_SEL_MASK 3 | ||
57 | #define FTAPE_SEL(unit) ((unit) & FTAPE_SEL_MASK) | ||
58 | #define FTAPE_NO_REWIND 4 /* mask for minor nr */ | ||
59 | |||
60 | /* the following two may be reported when MTIOCGET is requested ... */ | ||
61 | typedef union { | ||
62 | struct { | ||
63 | __u8 error; | ||
64 | __u8 command; | ||
65 | } error; | ||
66 | long space; | ||
67 | } ft_drive_error; | ||
68 | typedef union { | ||
69 | struct { | ||
70 | __u8 drive_status; | ||
71 | __u8 drive_config; | ||
72 | __u8 tape_status; | ||
73 | } status; | ||
74 | long space; | ||
75 | } ft_drive_status; | ||
76 | |||
77 | #ifdef __KERNEL__ | ||
78 | |||
79 | #define FT_RQM_DELAY 12 | ||
80 | #define FT_MILLISECOND 1 | ||
81 | #define FT_SECOND 1000 | ||
82 | #define FT_FOREVER -1 | ||
83 | #ifndef HZ | ||
84 | #error "HZ undefined." | ||
85 | #endif | ||
86 | #define FT_USPT (1000000/HZ) /* microseconds per tick */ | ||
87 | |||
88 | /* This defines the number of retries that the driver will allow | ||
89 | * before giving up (and letting a higher level handle the error). | ||
90 | */ | ||
91 | #ifdef TESTING | ||
92 | #define FT_SOFT_RETRIES 1 /* number of low level retries */ | ||
93 | #define FT_RETRIES_ON_ECC_ERROR 3 /* ecc error when correcting segment */ | ||
94 | #else | ||
95 | #define FT_SOFT_RETRIES 6 /* number of low level retries (triple) */ | ||
96 | #define FT_RETRIES_ON_ECC_ERROR 3 /* ecc error when correcting segment */ | ||
97 | #endif | ||
98 | |||
99 | #ifndef THE_FTAPE_MAINTAINER | ||
100 | #define THE_FTAPE_MAINTAINER "the ftape maintainer" | ||
101 | #endif | ||
102 | |||
103 | /* Initialize missing configuration parameters. | ||
104 | */ | ||
105 | #ifndef CONFIG_FT_NR_BUFFERS | ||
106 | # define CONFIG_FT_NR_BUFFERS 3 | ||
107 | #endif | ||
108 | #ifndef CONFIG_FT_FDC_THR | ||
109 | # define CONFIG_FT_FDC_THR 8 | ||
110 | #endif | ||
111 | #ifndef CONFIG_FT_FDC_MAX_RATE | ||
112 | # define CONFIG_FT_FDC_MAX_RATE 2000 | ||
113 | #endif | ||
114 | #ifndef CONFIG_FT_FDC_BASE | ||
115 | # define CONFIG_FT_FDC_BASE 0 | ||
116 | #endif | ||
117 | #ifndef CONFIG_FT_FDC_IRQ | ||
118 | # define CONFIG_FT_FDC_IRQ 0 | ||
119 | #endif | ||
120 | #ifndef CONFIG_FT_FDC_DMA | ||
121 | # define CONFIG_FT_FDC_DMA 0 | ||
122 | #endif | ||
123 | |||
124 | /* Turn some booleans into numbers. | ||
125 | */ | ||
126 | #ifdef CONFIG_FT_PROBE_FC10 | ||
127 | # undef CONFIG_FT_PROBE_FC10 | ||
128 | # define CONFIG_FT_PROBE_FC10 1 | ||
129 | #else | ||
130 | # define CONFIG_FT_PROBE_FC10 0 | ||
131 | #endif | ||
132 | #ifdef CONFIG_FT_MACH2 | ||
133 | # undef CONFIG_FT_MACH2 | ||
134 | # define CONFIG_FT_MACH2 1 | ||
135 | #else | ||
136 | # define CONFIG_FT_MACH2 0 | ||
137 | #endif | ||
138 | |||
139 | /* Insert default settings | ||
140 | */ | ||
141 | #if CONFIG_FT_PROBE_FC10 == 1 | ||
142 | # if CONFIG_FT_FDC_BASE == 0 | ||
143 | # undef CONFIG_FT_FDC_BASE | ||
144 | # define CONFIG_FT_FDC_BASE 0x180 | ||
145 | # endif | ||
146 | # if CONFIG_FT_FDC_IRQ == 0 | ||
147 | # undef CONFIG_FT_FDC_IRQ | ||
148 | # define CONFIG_FT_FDC_IRQ 9 | ||
149 | # endif | ||
150 | # if CONFIG_FT_FDC_DMA == 0 | ||
151 | # undef CONFIG_FT_FDC_DMA | ||
152 | # define CONFIG_FT_FDC_DMA 3 | ||
153 | # endif | ||
154 | #elif CONFIG_FT_MACH2 == 1 /* CONFIG_FT_PROBE_FC10 == 1 */ | ||
155 | # if CONFIG_FT_FDC_BASE == 0 | ||
156 | # undef CONFIG_FT_FDC_BASE | ||
157 | # define CONFIG_FT_FDC_BASE 0x1E0 | ||
158 | # endif | ||
159 | # if CONFIG_FT_FDC_IRQ == 0 | ||
160 | # undef CONFIG_FT_FDC_IRQ | ||
161 | # define CONFIG_FT_FDC_IRQ 6 | ||
162 | # endif | ||
163 | # if CONFIG_FT_FDC_DMA == 0 | ||
164 | # undef CONFIG_FT_FDC_DMA | ||
165 | # define CONFIG_FT_FDC_DMA 2 | ||
166 | # endif | ||
167 | #elif defined(CONFIG_FT_ALT_FDC) /* CONFIG_FT_MACH2 */ | ||
168 | # if CONFIG_FT_FDC_BASE == 0 | ||
169 | # undef CONFIG_FT_FDC_BASE | ||
170 | # define CONFIG_FT_FDC_BASE 0x370 | ||
171 | # endif | ||
172 | # if CONFIG_FT_FDC_IRQ == 0 | ||
173 | # undef CONFIG_FT_FDC_IRQ | ||
174 | # define CONFIG_FT_FDC_IRQ 6 | ||
175 | # endif | ||
176 | # if CONFIG_FT_FDC_DMA == 0 | ||
177 | # undef CONFIG_FT_FDC_DMA | ||
178 | # define CONFIG_FT_FDC_DMA 2 | ||
179 | # endif | ||
180 | #else /* CONFIG_FT_ALT_FDC */ | ||
181 | # if CONFIG_FT_FDC_BASE == 0 | ||
182 | # undef CONFIG_FT_FDC_BASE | ||
183 | # define CONFIG_FT_FDC_BASE 0x3f0 | ||
184 | # endif | ||
185 | # if CONFIG_FT_FDC_IRQ == 0 | ||
186 | # undef CONFIG_FT_FDC_IRQ | ||
187 | # define CONFIG_FT_FDC_IRQ 6 | ||
188 | # endif | ||
189 | # if CONFIG_FT_FDC_DMA == 0 | ||
190 | # undef CONFIG_FT_FDC_DMA | ||
191 | # define CONFIG_FT_FDC_DMA 2 | ||
192 | # endif | ||
193 | #endif /* standard FDC */ | ||
194 | |||
195 | /* some useful macro's | ||
196 | */ | ||
197 | #define NR_ITEMS(x) (int)(sizeof(x)/ sizeof(*x)) | ||
198 | |||
199 | #endif /* __KERNEL__ */ | ||
200 | |||
201 | #endif | ||
diff --git a/include/linux/icmp.h b/include/linux/icmp.h index 878cfe4e587f..24da4fbc1a2f 100644 --- a/include/linux/icmp.h +++ b/include/linux/icmp.h | |||
@@ -68,7 +68,7 @@ | |||
68 | struct icmphdr { | 68 | struct icmphdr { |
69 | __u8 type; | 69 | __u8 type; |
70 | __u8 code; | 70 | __u8 code; |
71 | __be16 checksum; | 71 | __sum16 checksum; |
72 | union { | 72 | union { |
73 | struct { | 73 | struct { |
74 | __be16 id; | 74 | __be16 id; |
diff --git a/include/linux/icmpv6.h b/include/linux/icmpv6.h index c771a7db9871..68d3526c3a05 100644 --- a/include/linux/icmpv6.h +++ b/include/linux/icmpv6.h | |||
@@ -7,17 +7,17 @@ struct icmp6hdr { | |||
7 | 7 | ||
8 | __u8 icmp6_type; | 8 | __u8 icmp6_type; |
9 | __u8 icmp6_code; | 9 | __u8 icmp6_code; |
10 | __u16 icmp6_cksum; | 10 | __sum16 icmp6_cksum; |
11 | 11 | ||
12 | 12 | ||
13 | union { | 13 | union { |
14 | __u32 un_data32[1]; | 14 | __be32 un_data32[1]; |
15 | __u16 un_data16[2]; | 15 | __be16 un_data16[2]; |
16 | __u8 un_data8[4]; | 16 | __u8 un_data8[4]; |
17 | 17 | ||
18 | struct icmpv6_echo { | 18 | struct icmpv6_echo { |
19 | __u16 identifier; | 19 | __be16 identifier; |
20 | __u16 sequence; | 20 | __be16 sequence; |
21 | } u_echo; | 21 | } u_echo; |
22 | 22 | ||
23 | struct icmpv6_nd_advt { | 23 | struct icmpv6_nd_advt { |
@@ -53,7 +53,7 @@ struct icmp6hdr { | |||
53 | #else | 53 | #else |
54 | #error "Please fix <asm/byteorder.h>" | 54 | #error "Please fix <asm/byteorder.h>" |
55 | #endif | 55 | #endif |
56 | __u16 rt_lifetime; | 56 | __be16 rt_lifetime; |
57 | } u_nd_ra; | 57 | } u_nd_ra; |
58 | 58 | ||
59 | } icmp6_dataun; | 59 | } icmp6_dataun; |
diff --git a/include/linux/if_packet.h b/include/linux/if_packet.h index b92558549d27..99393ef3af39 100644 --- a/include/linux/if_packet.h +++ b/include/linux/if_packet.h | |||
@@ -1,17 +1,19 @@ | |||
1 | #ifndef __LINUX_IF_PACKET_H | 1 | #ifndef __LINUX_IF_PACKET_H |
2 | #define __LINUX_IF_PACKET_H | 2 | #define __LINUX_IF_PACKET_H |
3 | 3 | ||
4 | #include <linux/types.h> | ||
5 | |||
4 | struct sockaddr_pkt | 6 | struct sockaddr_pkt |
5 | { | 7 | { |
6 | unsigned short spkt_family; | 8 | unsigned short spkt_family; |
7 | unsigned char spkt_device[14]; | 9 | unsigned char spkt_device[14]; |
8 | unsigned short spkt_protocol; | 10 | __be16 spkt_protocol; |
9 | }; | 11 | }; |
10 | 12 | ||
11 | struct sockaddr_ll | 13 | struct sockaddr_ll |
12 | { | 14 | { |
13 | unsigned short sll_family; | 15 | unsigned short sll_family; |
14 | unsigned short sll_protocol; | 16 | __be16 sll_protocol; |
15 | int sll_ifindex; | 17 | int sll_ifindex; |
16 | unsigned short sll_hatype; | 18 | unsigned short sll_hatype; |
17 | unsigned char sll_pkttype; | 19 | unsigned char sll_pkttype; |
diff --git a/include/linux/if_tunnel.h b/include/linux/if_tunnel.h index bef9f8fd93b3..8de079ba1107 100644 --- a/include/linux/if_tunnel.h +++ b/include/linux/if_tunnel.h | |||
@@ -19,10 +19,10 @@ struct ip_tunnel_parm | |||
19 | { | 19 | { |
20 | char name[IFNAMSIZ]; | 20 | char name[IFNAMSIZ]; |
21 | int link; | 21 | int link; |
22 | __u16 i_flags; | 22 | __be16 i_flags; |
23 | __u16 o_flags; | 23 | __be16 o_flags; |
24 | __u32 i_key; | 24 | __be32 i_key; |
25 | __u32 o_key; | 25 | __be32 o_key; |
26 | struct iphdr iph; | 26 | struct iphdr iph; |
27 | }; | 27 | }; |
28 | 28 | ||
diff --git a/include/linux/igmp.h b/include/linux/igmp.h index 21dd56905271..6e7ea2f0a57c 100644 --- a/include/linux/igmp.h +++ b/include/linux/igmp.h | |||
@@ -30,7 +30,7 @@ struct igmphdr | |||
30 | { | 30 | { |
31 | __u8 type; | 31 | __u8 type; |
32 | __u8 code; /* For newer IGMP */ | 32 | __u8 code; /* For newer IGMP */ |
33 | __be16 csum; | 33 | __sum16 csum; |
34 | __be32 group; | 34 | __be32 group; |
35 | }; | 35 | }; |
36 | 36 | ||
diff --git a/include/linux/in.h b/include/linux/in.h index 2619859f6e1b..1912e7c0bc26 100644 --- a/include/linux/in.h +++ b/include/linux/in.h | |||
@@ -45,6 +45,7 @@ enum { | |||
45 | 45 | ||
46 | IPPROTO_COMP = 108, /* Compression Header protocol */ | 46 | IPPROTO_COMP = 108, /* Compression Header protocol */ |
47 | IPPROTO_SCTP = 132, /* Stream Control Transport Protocol */ | 47 | IPPROTO_SCTP = 132, /* Stream Control Transport Protocol */ |
48 | IPPROTO_UDPLITE = 136, /* UDP-Lite (RFC 3828) */ | ||
48 | 49 | ||
49 | IPPROTO_RAW = 255, /* Raw IP packets */ | 50 | IPPROTO_RAW = 255, /* Raw IP packets */ |
50 | IPPROTO_MAX | 51 | IPPROTO_MAX |
diff --git a/include/linux/in6.h b/include/linux/in6.h index f28621f638e0..4e8350ae8869 100644 --- a/include/linux/in6.h +++ b/include/linux/in6.h | |||
@@ -54,7 +54,7 @@ extern const struct in6_addr in6addr_loopback; | |||
54 | struct sockaddr_in6 { | 54 | struct sockaddr_in6 { |
55 | unsigned short int sin6_family; /* AF_INET6 */ | 55 | unsigned short int sin6_family; /* AF_INET6 */ |
56 | __be16 sin6_port; /* Transport layer port # */ | 56 | __be16 sin6_port; /* Transport layer port # */ |
57 | __u32 sin6_flowinfo; /* IPv6 flow information */ | 57 | __be32 sin6_flowinfo; /* IPv6 flow information */ |
58 | struct in6_addr sin6_addr; /* IPv6 address */ | 58 | struct in6_addr sin6_addr; /* IPv6 address */ |
59 | __u32 sin6_scope_id; /* scope id (new in RFC2553) */ | 59 | __u32 sin6_scope_id; /* scope id (new in RFC2553) */ |
60 | }; | 60 | }; |
@@ -72,7 +72,7 @@ struct ipv6_mreq { | |||
72 | struct in6_flowlabel_req | 72 | struct in6_flowlabel_req |
73 | { | 73 | { |
74 | struct in6_addr flr_dst; | 74 | struct in6_addr flr_dst; |
75 | __u32 flr_label; | 75 | __be32 flr_label; |
76 | __u8 flr_action; | 76 | __u8 flr_action; |
77 | __u8 flr_share; | 77 | __u8 flr_share; |
78 | __u16 flr_flags; | 78 | __u16 flr_flags; |
diff --git a/include/linux/inet.h b/include/linux/inet.h index b7c6da7d6d32..675a7dbe86f8 100644 --- a/include/linux/inet.h +++ b/include/linux/inet.h | |||
@@ -46,7 +46,7 @@ | |||
46 | #include <linux/types.h> | 46 | #include <linux/types.h> |
47 | 47 | ||
48 | extern __be32 in_aton(const char *str); | 48 | extern __be32 in_aton(const char *str); |
49 | extern int in4_pton(const char *src, int srclen, u8 *dst, char delim, const char **end); | 49 | extern int in4_pton(const char *src, int srclen, u8 *dst, int delim, const char **end); |
50 | extern int in6_pton(const char *src, int srclen, u8 *dst, char delim, const char **end); | 50 | extern int in6_pton(const char *src, int srclen, u8 *dst, int delim, const char **end); |
51 | #endif | 51 | #endif |
52 | #endif /* _LINUX_INET_H */ | 52 | #endif /* _LINUX_INET_H */ |
diff --git a/include/linux/inetdevice.h b/include/linux/inetdevice.h index 5a0ab04627bc..c0f7aec331c2 100644 --- a/include/linux/inetdevice.h +++ b/include/linux/inetdevice.h | |||
@@ -124,12 +124,13 @@ static __inline__ int inet_ifa_match(__be32 addr, struct in_ifaddr *ifa) | |||
124 | * Check if a mask is acceptable. | 124 | * Check if a mask is acceptable. |
125 | */ | 125 | */ |
126 | 126 | ||
127 | static __inline__ int bad_mask(u32 mask, u32 addr) | 127 | static __inline__ int bad_mask(__be32 mask, __be32 addr) |
128 | { | 128 | { |
129 | __u32 hmask; | ||
129 | if (addr & (mask = ~mask)) | 130 | if (addr & (mask = ~mask)) |
130 | return 1; | 131 | return 1; |
131 | mask = ntohl(mask); | 132 | hmask = ntohl(mask); |
132 | if (mask & (mask+1)) | 133 | if (hmask & (hmask+1)) |
133 | return 1; | 134 | return 1; |
134 | return 0; | 135 | return 0; |
135 | } | 136 | } |
@@ -190,11 +191,12 @@ static __inline__ __be32 inet_make_mask(int logmask) | |||
190 | return 0; | 191 | return 0; |
191 | } | 192 | } |
192 | 193 | ||
193 | static __inline__ int inet_mask_len(__u32 mask) | 194 | static __inline__ int inet_mask_len(__be32 mask) |
194 | { | 195 | { |
195 | if (!(mask = ntohl(mask))) | 196 | __u32 hmask = ntohl(mask); |
197 | if (!hmask) | ||
196 | return 0; | 198 | return 0; |
197 | return 32 - ffz(~mask); | 199 | return 32 - ffz(~hmask); |
198 | } | 200 | } |
199 | 201 | ||
200 | 202 | ||
diff --git a/include/linux/ioport.h b/include/linux/ioport.h index d42c83399071..cf8696d4a138 100644 --- a/include/linux/ioport.h +++ b/include/linux/ioport.h | |||
@@ -89,6 +89,7 @@ struct resource_list { | |||
89 | #define IORESOURCE_ROM_ENABLE (1<<0) /* ROM is enabled, same as PCI_ROM_ADDRESS_ENABLE */ | 89 | #define IORESOURCE_ROM_ENABLE (1<<0) /* ROM is enabled, same as PCI_ROM_ADDRESS_ENABLE */ |
90 | #define IORESOURCE_ROM_SHADOW (1<<1) /* ROM is copy at C000:0 */ | 90 | #define IORESOURCE_ROM_SHADOW (1<<1) /* ROM is copy at C000:0 */ |
91 | #define IORESOURCE_ROM_COPY (1<<2) /* ROM is alloc'd copy, resource field overlaid */ | 91 | #define IORESOURCE_ROM_COPY (1<<2) /* ROM is alloc'd copy, resource field overlaid */ |
92 | #define IORESOURCE_ROM_BIOS_COPY (1<<3) /* ROM is BIOS copy, resource field overlaid */ | ||
92 | 93 | ||
93 | /* PC/ISA/whatever - the normal PC address spaces: IO and memory */ | 94 | /* PC/ISA/whatever - the normal PC address spaces: IO and memory */ |
94 | extern struct resource ioport_resource; | 95 | extern struct resource ioport_resource; |
diff --git a/include/linux/ip.h b/include/linux/ip.h index ecee9bb27d0e..1d36b971a8b5 100644 --- a/include/linux/ip.h +++ b/include/linux/ip.h | |||
@@ -98,7 +98,7 @@ struct iphdr { | |||
98 | __be16 frag_off; | 98 | __be16 frag_off; |
99 | __u8 ttl; | 99 | __u8 ttl; |
100 | __u8 protocol; | 100 | __u8 protocol; |
101 | __be16 check; | 101 | __sum16 check; |
102 | __be32 saddr; | 102 | __be32 saddr; |
103 | __be32 daddr; | 103 | __be32 daddr; |
104 | /*The options start here. */ | 104 | /*The options start here. */ |
diff --git a/include/linux/ip6_tunnel.h b/include/linux/ip6_tunnel.h index 5c23aeb104ca..af3f4a70f3df 100644 --- a/include/linux/ip6_tunnel.h +++ b/include/linux/ip6_tunnel.h | |||
@@ -25,7 +25,7 @@ struct ip6_tnl_parm { | |||
25 | __u8 proto; /* tunnel protocol */ | 25 | __u8 proto; /* tunnel protocol */ |
26 | __u8 encap_limit; /* encapsulation limit for tunnel */ | 26 | __u8 encap_limit; /* encapsulation limit for tunnel */ |
27 | __u8 hop_limit; /* hop limit for tunnel */ | 27 | __u8 hop_limit; /* hop limit for tunnel */ |
28 | __u32 flowinfo; /* traffic class and flowlabel for tunnel */ | 28 | __be32 flowinfo; /* traffic class and flowlabel for tunnel */ |
29 | __u32 flags; /* tunnel flags */ | 29 | __u32 flags; /* tunnel flags */ |
30 | struct in6_addr laddr; /* local tunnel end-point address */ | 30 | struct in6_addr laddr; /* local tunnel end-point address */ |
31 | struct in6_addr raddr; /* remote tunnel end-point address */ | 31 | struct in6_addr raddr; /* remote tunnel end-point address */ |
diff --git a/include/linux/ipv6.h b/include/linux/ipv6.h index 4f435c59de06..f8241130f5ea 100644 --- a/include/linux/ipv6.h +++ b/include/linux/ipv6.h | |||
@@ -274,7 +274,7 @@ struct ipv6_pinfo { | |||
274 | struct in6_addr *saddr_cache; | 274 | struct in6_addr *saddr_cache; |
275 | #endif | 275 | #endif |
276 | 276 | ||
277 | __u32 flow_label; | 277 | __be32 flow_label; |
278 | __u32 frag_size; | 278 | __u32 frag_size; |
279 | __s16 hop_limit; | 279 | __s16 hop_limit; |
280 | __s16 mcast_hops; | 280 | __s16 mcast_hops; |
diff --git a/include/linux/ixjuser.h b/include/linux/ixjuser.h index fd1756d3a47e..88b45895746d 100644 --- a/include/linux/ixjuser.h +++ b/include/linux/ixjuser.h | |||
@@ -315,7 +315,7 @@ typedef struct { | |||
315 | * structures. If the freq0 variable is non-zero, the tone table contents | 315 | * structures. If the freq0 variable is non-zero, the tone table contents |
316 | * for the tone_index are updated to the frequencies and gains defined. It | 316 | * for the tone_index are updated to the frequencies and gains defined. It |
317 | * should be noted that DTMF tones cannot be reassigned, so if DTMF tone | 317 | * should be noted that DTMF tones cannot be reassigned, so if DTMF tone |
318 | * table indexs are used in a cadence the frequency and gain variables will | 318 | * table indexes are used in a cadence the frequency and gain variables will |
319 | * be ignored. | 319 | * be ignored. |
320 | * | 320 | * |
321 | * If the array elements contain frequency parameters the driver will | 321 | * If the array elements contain frequency parameters the driver will |
diff --git a/include/linux/jiffies.h b/include/linux/jiffies.h index c8d5f207c3d4..0ec6e28bccd2 100644 --- a/include/linux/jiffies.h +++ b/include/linux/jiffies.h | |||
@@ -74,7 +74,7 @@ | |||
74 | #define __jiffy_data __attribute__((section(".data"))) | 74 | #define __jiffy_data __attribute__((section(".data"))) |
75 | 75 | ||
76 | /* | 76 | /* |
77 | * The 64-bit value is not volatile - you MUST NOT read it | 77 | * The 64-bit value is not atomic - you MUST NOT read it |
78 | * without sampling the sequence number in xtime_lock. | 78 | * without sampling the sequence number in xtime_lock. |
79 | * get_jiffies_64() will do this for you as appropriate. | 79 | * get_jiffies_64() will do this for you as appropriate. |
80 | */ | 80 | */ |
diff --git a/include/linux/kernel.h b/include/linux/kernel.h index 24b611147adb..6738283ac385 100644 --- a/include/linux/kernel.h +++ b/include/linux/kernel.h | |||
@@ -30,8 +30,10 @@ extern const char linux_banner[]; | |||
30 | 30 | ||
31 | #define STACK_MAGIC 0xdeadbeef | 31 | #define STACK_MAGIC 0xdeadbeef |
32 | 32 | ||
33 | #define ALIGN(x,a) __ALIGN_MASK(x,(typeof(x))(a)-1) | ||
34 | #define __ALIGN_MASK(x,mask) (((x)+(mask))&~(mask)) | ||
35 | |||
33 | #define ARRAY_SIZE(x) (sizeof(x) / sizeof((x)[0])) | 36 | #define ARRAY_SIZE(x) (sizeof(x) / sizeof((x)[0])) |
34 | #define ALIGN(x,a) (((x)+(a)-1UL)&~((a)-1UL)) | ||
35 | #define FIELD_SIZEOF(t, f) (sizeof(((t*)0)->f)) | 37 | #define FIELD_SIZEOF(t, f) (sizeof(((t*)0)->f)) |
36 | #define DIV_ROUND_UP(n,d) (((n) + (d) - 1) / (d)) | 38 | #define DIV_ROUND_UP(n,d) (((n) + (d) - 1) / (d)) |
37 | #define roundup(x, y) ((((x) + ((y) - 1)) / (y)) * (y)) | 39 | #define roundup(x, y) ((((x) + ((y) - 1)) / (y)) * (y)) |
@@ -63,7 +65,7 @@ struct user; | |||
63 | * context (spinlock, irq-handler, ...). | 65 | * context (spinlock, irq-handler, ...). |
64 | * | 66 | * |
65 | * This is a useful debugging help to be able to catch problems early and not | 67 | * This is a useful debugging help to be able to catch problems early and not |
66 | * be biten later when the calling function happens to sleep when it is not | 68 | * be bitten later when the calling function happens to sleep when it is not |
67 | * supposed to. | 69 | * supposed to. |
68 | */ | 70 | */ |
69 | #ifdef CONFIG_PREEMPT_VOLUNTARY | 71 | #ifdef CONFIG_PREEMPT_VOLUNTARY |
diff --git a/include/linux/kexec.h b/include/linux/kexec.h index 6427949ddf99..a4ede62b339d 100644 --- a/include/linux/kexec.h +++ b/include/linux/kexec.h | |||
@@ -122,6 +122,8 @@ extern struct kimage *kexec_crash_image; | |||
122 | #define KEXEC_ARCH_IA_64 (50 << 16) | 122 | #define KEXEC_ARCH_IA_64 (50 << 16) |
123 | #define KEXEC_ARCH_S390 (22 << 16) | 123 | #define KEXEC_ARCH_S390 (22 << 16) |
124 | #define KEXEC_ARCH_SH (42 << 16) | 124 | #define KEXEC_ARCH_SH (42 << 16) |
125 | #define KEXEC_ARCH_MIPS_LE (10 << 16) | ||
126 | #define KEXEC_ARCH_MIPS ( 8 << 16) | ||
125 | 127 | ||
126 | #define KEXEC_FLAGS (KEXEC_ON_CRASH) /* List of defined/legal kexec flags */ | 128 | #define KEXEC_FLAGS (KEXEC_ON_CRASH) /* List of defined/legal kexec flags */ |
127 | 129 | ||
diff --git a/include/linux/kobject.h b/include/linux/kobject.h index bcd9cd173c2c..d1c8d28fa92e 100644 --- a/include/linux/kobject.h +++ b/include/linux/kobject.h | |||
@@ -47,6 +47,7 @@ enum kobject_action { | |||
47 | KOBJ_UMOUNT = (__force kobject_action_t) 0x05, /* umount event for block devices (broken) */ | 47 | KOBJ_UMOUNT = (__force kobject_action_t) 0x05, /* umount event for block devices (broken) */ |
48 | KOBJ_OFFLINE = (__force kobject_action_t) 0x06, /* device offline */ | 48 | KOBJ_OFFLINE = (__force kobject_action_t) 0x06, /* device offline */ |
49 | KOBJ_ONLINE = (__force kobject_action_t) 0x07, /* device online */ | 49 | KOBJ_ONLINE = (__force kobject_action_t) 0x07, /* device online */ |
50 | KOBJ_MOVE = (__force kobject_action_t) 0x08, /* device move */ | ||
50 | }; | 51 | }; |
51 | 52 | ||
52 | struct kobject { | 53 | struct kobject { |
@@ -76,6 +77,7 @@ extern int __must_check kobject_add(struct kobject *); | |||
76 | extern void kobject_del(struct kobject *); | 77 | extern void kobject_del(struct kobject *); |
77 | 78 | ||
78 | extern int __must_check kobject_rename(struct kobject *, const char *new_name); | 79 | extern int __must_check kobject_rename(struct kobject *, const char *new_name); |
80 | extern int __must_check kobject_move(struct kobject *, struct kobject *); | ||
79 | 81 | ||
80 | extern int __must_check kobject_register(struct kobject *); | 82 | extern int __must_check kobject_register(struct kobject *); |
81 | extern void kobject_unregister(struct kobject *); | 83 | extern void kobject_unregister(struct kobject *); |
@@ -264,6 +266,8 @@ extern int __must_check subsys_create_file(struct subsystem * , | |||
264 | 266 | ||
265 | #if defined(CONFIG_HOTPLUG) | 267 | #if defined(CONFIG_HOTPLUG) |
266 | void kobject_uevent(struct kobject *kobj, enum kobject_action action); | 268 | void kobject_uevent(struct kobject *kobj, enum kobject_action action); |
269 | void kobject_uevent_env(struct kobject *kobj, enum kobject_action action, | ||
270 | char *envp[]); | ||
267 | 271 | ||
268 | int add_uevent_var(char **envp, int num_envp, int *cur_index, | 272 | int add_uevent_var(char **envp, int num_envp, int *cur_index, |
269 | char *buffer, int buffer_size, int *cur_len, | 273 | char *buffer, int buffer_size, int *cur_len, |
@@ -271,6 +275,10 @@ int add_uevent_var(char **envp, int num_envp, int *cur_index, | |||
271 | __attribute__((format (printf, 7, 8))); | 275 | __attribute__((format (printf, 7, 8))); |
272 | #else | 276 | #else |
273 | static inline void kobject_uevent(struct kobject *kobj, enum kobject_action action) { } | 277 | static inline void kobject_uevent(struct kobject *kobj, enum kobject_action action) { } |
278 | static inline void kobject_uevent_env(struct kobject *kobj, | ||
279 | enum kobject_action action, | ||
280 | char *envp[]) | ||
281 | { } | ||
274 | 282 | ||
275 | static inline int add_uevent_var(char **envp, int num_envp, int *cur_index, | 283 | static inline int add_uevent_var(char **envp, int num_envp, int *cur_index, |
276 | char *buffer, int buffer_size, int *cur_len, | 284 | char *buffer, int buffer_size, int *cur_len, |
diff --git a/include/linux/miscdevice.h b/include/linux/miscdevice.h index b03cfb91e228..326da7d500c7 100644 --- a/include/linux/miscdevice.h +++ b/include/linux/miscdevice.h | |||
@@ -31,15 +31,14 @@ | |||
31 | #define HPET_MINOR 228 | 31 | #define HPET_MINOR 228 |
32 | 32 | ||
33 | struct device; | 33 | struct device; |
34 | struct class_device; | ||
35 | 34 | ||
36 | struct miscdevice { | 35 | struct miscdevice { |
37 | int minor; | 36 | int minor; |
38 | const char *name; | 37 | const char *name; |
39 | const struct file_operations *fops; | 38 | const struct file_operations *fops; |
40 | struct list_head list; | 39 | struct list_head list; |
41 | struct device *dev; | 40 | struct device *parent; |
42 | struct class_device *class; | 41 | struct device *this_device; |
43 | }; | 42 | }; |
44 | 43 | ||
45 | extern int misc_register(struct miscdevice * misc); | 44 | extern int misc_register(struct miscdevice * misc); |
diff --git a/include/linux/mmc/card.h b/include/linux/mmc/card.h index 991a37382a22..d0e6a5497614 100644 --- a/include/linux/mmc/card.h +++ b/include/linux/mmc/card.h | |||
@@ -39,6 +39,10 @@ struct mmc_csd { | |||
39 | write_misalign:1; | 39 | write_misalign:1; |
40 | }; | 40 | }; |
41 | 41 | ||
42 | struct mmc_ext_csd { | ||
43 | unsigned int hs_max_dtr; | ||
44 | }; | ||
45 | |||
42 | struct sd_scr { | 46 | struct sd_scr { |
43 | unsigned char sda_vsn; | 47 | unsigned char sda_vsn; |
44 | unsigned char bus_widths; | 48 | unsigned char bus_widths; |
@@ -46,6 +50,10 @@ struct sd_scr { | |||
46 | #define SD_SCR_BUS_WIDTH_4 (1<<2) | 50 | #define SD_SCR_BUS_WIDTH_4 (1<<2) |
47 | }; | 51 | }; |
48 | 52 | ||
53 | struct sd_switch_caps { | ||
54 | unsigned int hs_max_dtr; | ||
55 | }; | ||
56 | |||
49 | struct mmc_host; | 57 | struct mmc_host; |
50 | 58 | ||
51 | /* | 59 | /* |
@@ -62,12 +70,15 @@ struct mmc_card { | |||
62 | #define MMC_STATE_BAD (1<<2) /* unrecognised device */ | 70 | #define MMC_STATE_BAD (1<<2) /* unrecognised device */ |
63 | #define MMC_STATE_SDCARD (1<<3) /* is an SD card */ | 71 | #define MMC_STATE_SDCARD (1<<3) /* is an SD card */ |
64 | #define MMC_STATE_READONLY (1<<4) /* card is read-only */ | 72 | #define MMC_STATE_READONLY (1<<4) /* card is read-only */ |
73 | #define MMC_STATE_HIGHSPEED (1<<5) /* card is in high speed mode */ | ||
65 | u32 raw_cid[4]; /* raw card CID */ | 74 | u32 raw_cid[4]; /* raw card CID */ |
66 | u32 raw_csd[4]; /* raw card CSD */ | 75 | u32 raw_csd[4]; /* raw card CSD */ |
67 | u32 raw_scr[2]; /* raw card SCR */ | 76 | u32 raw_scr[2]; /* raw card SCR */ |
68 | struct mmc_cid cid; /* card identification */ | 77 | struct mmc_cid cid; /* card identification */ |
69 | struct mmc_csd csd; /* card specific */ | 78 | struct mmc_csd csd; /* card specific */ |
79 | struct mmc_ext_csd ext_csd; /* mmc v4 extended card specific */ | ||
70 | struct sd_scr scr; /* extra SD information */ | 80 | struct sd_scr scr; /* extra SD information */ |
81 | struct sd_switch_caps sw_caps; /* switch (CMD6) caps */ | ||
71 | }; | 82 | }; |
72 | 83 | ||
73 | #define mmc_card_present(c) ((c)->state & MMC_STATE_PRESENT) | 84 | #define mmc_card_present(c) ((c)->state & MMC_STATE_PRESENT) |
@@ -75,12 +86,14 @@ struct mmc_card { | |||
75 | #define mmc_card_bad(c) ((c)->state & MMC_STATE_BAD) | 86 | #define mmc_card_bad(c) ((c)->state & MMC_STATE_BAD) |
76 | #define mmc_card_sd(c) ((c)->state & MMC_STATE_SDCARD) | 87 | #define mmc_card_sd(c) ((c)->state & MMC_STATE_SDCARD) |
77 | #define mmc_card_readonly(c) ((c)->state & MMC_STATE_READONLY) | 88 | #define mmc_card_readonly(c) ((c)->state & MMC_STATE_READONLY) |
89 | #define mmc_card_highspeed(c) ((c)->state & MMC_STATE_HIGHSPEED) | ||
78 | 90 | ||
79 | #define mmc_card_set_present(c) ((c)->state |= MMC_STATE_PRESENT) | 91 | #define mmc_card_set_present(c) ((c)->state |= MMC_STATE_PRESENT) |
80 | #define mmc_card_set_dead(c) ((c)->state |= MMC_STATE_DEAD) | 92 | #define mmc_card_set_dead(c) ((c)->state |= MMC_STATE_DEAD) |
81 | #define mmc_card_set_bad(c) ((c)->state |= MMC_STATE_BAD) | 93 | #define mmc_card_set_bad(c) ((c)->state |= MMC_STATE_BAD) |
82 | #define mmc_card_set_sd(c) ((c)->state |= MMC_STATE_SDCARD) | 94 | #define mmc_card_set_sd(c) ((c)->state |= MMC_STATE_SDCARD) |
83 | #define mmc_card_set_readonly(c) ((c)->state |= MMC_STATE_READONLY) | 95 | #define mmc_card_set_readonly(c) ((c)->state |= MMC_STATE_READONLY) |
96 | #define mmc_card_set_highspeed(c) ((c)->state |= MMC_STATE_HIGHSPEED) | ||
84 | 97 | ||
85 | #define mmc_card_name(c) ((c)->cid.prod_name) | 98 | #define mmc_card_name(c) ((c)->cid.prod_name) |
86 | #define mmc_card_id(c) ((c)->dev.bus_id) | 99 | #define mmc_card_id(c) ((c)->dev.bus_id) |
diff --git a/include/linux/mmc/host.h b/include/linux/mmc/host.h index 8b08ef3820f2..c15ae1986b98 100644 --- a/include/linux/mmc/host.h +++ b/include/linux/mmc/host.h | |||
@@ -74,8 +74,8 @@ struct mmc_card; | |||
74 | struct device; | 74 | struct device; |
75 | 75 | ||
76 | struct mmc_host { | 76 | struct mmc_host { |
77 | struct device *dev; | 77 | struct device *parent; |
78 | struct class_device class_dev; | 78 | struct device class_dev; |
79 | int index; | 79 | int index; |
80 | const struct mmc_host_ops *ops; | 80 | const struct mmc_host_ops *ops; |
81 | unsigned int f_min; | 81 | unsigned int f_min; |
@@ -125,8 +125,8 @@ static inline void *mmc_priv(struct mmc_host *host) | |||
125 | return (void *)host->private; | 125 | return (void *)host->private; |
126 | } | 126 | } |
127 | 127 | ||
128 | #define mmc_dev(x) ((x)->dev) | 128 | #define mmc_dev(x) ((x)->parent) |
129 | #define mmc_hostname(x) ((x)->class_dev.class_id) | 129 | #define mmc_hostname(x) ((x)->class_dev.bus_id) |
130 | 130 | ||
131 | extern int mmc_suspend_host(struct mmc_host *, pm_message_t); | 131 | extern int mmc_suspend_host(struct mmc_host *, pm_message_t); |
132 | extern int mmc_resume_host(struct mmc_host *); | 132 | extern int mmc_resume_host(struct mmc_host *); |
diff --git a/include/linux/mmc/protocol.h b/include/linux/mmc/protocol.h index 08dec8d9e703..2dce60c43f4b 100644 --- a/include/linux/mmc/protocol.h +++ b/include/linux/mmc/protocol.h | |||
@@ -25,14 +25,16 @@ | |||
25 | #ifndef MMC_MMC_PROTOCOL_H | 25 | #ifndef MMC_MMC_PROTOCOL_H |
26 | #define MMC_MMC_PROTOCOL_H | 26 | #define MMC_MMC_PROTOCOL_H |
27 | 27 | ||
28 | /* Standard MMC commands (3.1) type argument response */ | 28 | /* Standard MMC commands (4.1) type argument response */ |
29 | /* class 1 */ | 29 | /* class 1 */ |
30 | #define MMC_GO_IDLE_STATE 0 /* bc */ | 30 | #define MMC_GO_IDLE_STATE 0 /* bc */ |
31 | #define MMC_SEND_OP_COND 1 /* bcr [31:0] OCR R3 */ | 31 | #define MMC_SEND_OP_COND 1 /* bcr [31:0] OCR R3 */ |
32 | #define MMC_ALL_SEND_CID 2 /* bcr R2 */ | 32 | #define MMC_ALL_SEND_CID 2 /* bcr R2 */ |
33 | #define MMC_SET_RELATIVE_ADDR 3 /* ac [31:16] RCA R1 */ | 33 | #define MMC_SET_RELATIVE_ADDR 3 /* ac [31:16] RCA R1 */ |
34 | #define MMC_SET_DSR 4 /* bc [31:16] RCA */ | 34 | #define MMC_SET_DSR 4 /* bc [31:16] RCA */ |
35 | #define MMC_SWITCH 6 /* ac [31:0] See below R1b */ | ||
35 | #define MMC_SELECT_CARD 7 /* ac [31:16] RCA R1 */ | 36 | #define MMC_SELECT_CARD 7 /* ac [31:16] RCA R1 */ |
37 | #define MMC_SEND_EXT_CSD 8 /* adtc R1 */ | ||
36 | #define MMC_SEND_CSD 9 /* ac [31:16] RCA R2 */ | 38 | #define MMC_SEND_CSD 9 /* ac [31:16] RCA R2 */ |
37 | #define MMC_SEND_CID 10 /* ac [31:16] RCA R2 */ | 39 | #define MMC_SEND_CID 10 /* ac [31:16] RCA R2 */ |
38 | #define MMC_READ_DAT_UNTIL_STOP 11 /* adtc [31:0] dadr R1 */ | 40 | #define MMC_READ_DAT_UNTIL_STOP 11 /* adtc [31:0] dadr R1 */ |
@@ -80,6 +82,7 @@ | |||
80 | /* class 8 */ | 82 | /* class 8 */ |
81 | /* This is basically the same command as for MMC with some quirks. */ | 83 | /* This is basically the same command as for MMC with some quirks. */ |
82 | #define SD_SEND_RELATIVE_ADDR 3 /* bcr R6 */ | 84 | #define SD_SEND_RELATIVE_ADDR 3 /* bcr R6 */ |
85 | #define SD_SWITCH 6 /* adtc [31:0] See below R1 */ | ||
83 | 86 | ||
84 | /* Application commands */ | 87 | /* Application commands */ |
85 | #define SD_APP_SET_BUS_WIDTH 6 /* ac [1:0] bus width R1 */ | 88 | #define SD_APP_SET_BUS_WIDTH 6 /* ac [1:0] bus width R1 */ |
@@ -88,6 +91,30 @@ | |||
88 | #define SD_APP_SEND_SCR 51 /* adtc R1 */ | 91 | #define SD_APP_SEND_SCR 51 /* adtc R1 */ |
89 | 92 | ||
90 | /* | 93 | /* |
94 | * MMC_SWITCH argument format: | ||
95 | * | ||
96 | * [31:26] Always 0 | ||
97 | * [25:24] Access Mode | ||
98 | * [23:16] Location of target Byte in EXT_CSD | ||
99 | * [15:08] Value Byte | ||
100 | * [07:03] Always 0 | ||
101 | * [02:00] Command Set | ||
102 | */ | ||
103 | |||
104 | /* | ||
105 | * SD_SWITCH argument format: | ||
106 | * | ||
107 | * [31] Check (0) or switch (1) | ||
108 | * [30:24] Reserved (0) | ||
109 | * [23:20] Function group 6 | ||
110 | * [19:16] Function group 5 | ||
111 | * [15:12] Function group 4 | ||
112 | * [11:8] Function group 3 | ||
113 | * [7:4] Function group 2 | ||
114 | * [3:0] Function group 1 | ||
115 | */ | ||
116 | |||
117 | /* | ||
91 | MMC status in R1 | 118 | MMC status in R1 |
92 | Type | 119 | Type |
93 | e : error bit | 120 | e : error bit |
@@ -230,13 +257,54 @@ struct _mmc_csd { | |||
230 | 257 | ||
231 | #define CSD_STRUCT_VER_1_0 0 /* Valid for system specification 1.0 - 1.2 */ | 258 | #define CSD_STRUCT_VER_1_0 0 /* Valid for system specification 1.0 - 1.2 */ |
232 | #define CSD_STRUCT_VER_1_1 1 /* Valid for system specification 1.4 - 2.2 */ | 259 | #define CSD_STRUCT_VER_1_1 1 /* Valid for system specification 1.4 - 2.2 */ |
233 | #define CSD_STRUCT_VER_1_2 2 /* Valid for system specification 3.1 */ | 260 | #define CSD_STRUCT_VER_1_2 2 /* Valid for system specification 3.1 - 3.2 - 3.31 - 4.0 - 4.1 */ |
261 | #define CSD_STRUCT_EXT_CSD 3 /* Version is coded in CSD_STRUCTURE in EXT_CSD */ | ||
234 | 262 | ||
235 | #define CSD_SPEC_VER_0 0 /* Implements system specification 1.0 - 1.2 */ | 263 | #define CSD_SPEC_VER_0 0 /* Implements system specification 1.0 - 1.2 */ |
236 | #define CSD_SPEC_VER_1 1 /* Implements system specification 1.4 */ | 264 | #define CSD_SPEC_VER_1 1 /* Implements system specification 1.4 */ |
237 | #define CSD_SPEC_VER_2 2 /* Implements system specification 2.0 - 2.2 */ | 265 | #define CSD_SPEC_VER_2 2 /* Implements system specification 2.0 - 2.2 */ |
238 | #define CSD_SPEC_VER_3 3 /* Implements system specification 3.1 */ | 266 | #define CSD_SPEC_VER_3 3 /* Implements system specification 3.1 - 3.2 - 3.31 */ |
267 | #define CSD_SPEC_VER_4 4 /* Implements system specification 4.0 - 4.1 */ | ||
268 | |||
269 | /* | ||
270 | * EXT_CSD fields | ||
271 | */ | ||
272 | |||
273 | #define EXT_CSD_BUS_WIDTH 183 /* R/W */ | ||
274 | #define EXT_CSD_HS_TIMING 185 /* R/W */ | ||
275 | #define EXT_CSD_CARD_TYPE 196 /* RO */ | ||
276 | |||
277 | /* | ||
278 | * EXT_CSD field definitions | ||
279 | */ | ||
280 | |||
281 | #define EXT_CSD_CMD_SET_NORMAL (1<<0) | ||
282 | #define EXT_CSD_CMD_SET_SECURE (1<<1) | ||
283 | #define EXT_CSD_CMD_SET_CPSECURE (1<<2) | ||
284 | |||
285 | #define EXT_CSD_CARD_TYPE_26 (1<<0) /* Card can run at 26MHz */ | ||
286 | #define EXT_CSD_CARD_TYPE_52 (1<<1) /* Card can run at 52MHz */ | ||
287 | |||
288 | #define EXT_CSD_BUS_WIDTH_1 0 /* Card is in 1 bit mode */ | ||
289 | #define EXT_CSD_BUS_WIDTH_4 1 /* Card is in 4 bit mode */ | ||
290 | #define EXT_CSD_BUS_WIDTH_8 2 /* Card is in 8 bit mode */ | ||
291 | |||
292 | /* | ||
293 | * MMC_SWITCH access modes | ||
294 | */ | ||
295 | |||
296 | #define MMC_SWITCH_MODE_CMD_SET 0x00 /* Change the command set */ | ||
297 | #define MMC_SWITCH_MODE_SET_BITS 0x01 /* Set bits which are 1 in value */ | ||
298 | #define MMC_SWITCH_MODE_CLEAR_BITS 0x02 /* Clear bits which are 1 in value */ | ||
299 | #define MMC_SWITCH_MODE_WRITE_BYTE 0x03 /* Set target to value */ | ||
300 | |||
301 | /* | ||
302 | * SCR field definitions | ||
303 | */ | ||
239 | 304 | ||
305 | #define SCR_SPEC_VER_0 0 /* Implements system specification 1.0 - 1.01 */ | ||
306 | #define SCR_SPEC_VER_1 1 /* Implements system specification 1.10 */ | ||
307 | #define SCR_SPEC_VER_2 2 /* Implements system specification 2.00 */ | ||
240 | 308 | ||
241 | /* | 309 | /* |
242 | * SD bus widths | 310 | * SD bus widths |
diff --git a/include/linux/module.h b/include/linux/module.h index d1d00ce8f4ed..9258ffd8a7f0 100644 --- a/include/linux/module.h +++ b/include/linux/module.h | |||
@@ -264,6 +264,7 @@ struct module | |||
264 | struct module_attribute *modinfo_attrs; | 264 | struct module_attribute *modinfo_attrs; |
265 | const char *version; | 265 | const char *version; |
266 | const char *srcversion; | 266 | const char *srcversion; |
267 | struct kobject *drivers_dir; | ||
267 | 268 | ||
268 | /* Exported symbols */ | 269 | /* Exported symbols */ |
269 | const struct kernel_symbol *syms; | 270 | const struct kernel_symbol *syms; |
diff --git a/include/linux/mqueue.h b/include/linux/mqueue.h index 8db9d75541a6..8b5a79615fbf 100644 --- a/include/linux/mqueue.h +++ b/include/linux/mqueue.h | |||
@@ -18,8 +18,6 @@ | |||
18 | #ifndef _LINUX_MQUEUE_H | 18 | #ifndef _LINUX_MQUEUE_H |
19 | #define _LINUX_MQUEUE_H | 19 | #define _LINUX_MQUEUE_H |
20 | 20 | ||
21 | #include <linux/types.h> | ||
22 | |||
23 | #define MQ_PRIO_MAX 32768 | 21 | #define MQ_PRIO_MAX 32768 |
24 | /* per-uid limit of kernel memory used by mqueue, in bytes */ | 22 | /* per-uid limit of kernel memory used by mqueue, in bytes */ |
25 | #define MQ_BYTES_MAX 819200 | 23 | #define MQ_BYTES_MAX 819200 |
diff --git a/include/linux/mv643xx.h b/include/linux/mv643xx.h index edfa012fad3a..aff25c000abf 100644 --- a/include/linux/mv643xx.h +++ b/include/linux/mv643xx.h | |||
@@ -724,7 +724,7 @@ | |||
724 | #define MV643XX_ETH_RX_FIFO_URGENT_THRESHOLD_REG(port) (0x2470 + (port<<10)) | 724 | #define MV643XX_ETH_RX_FIFO_URGENT_THRESHOLD_REG(port) (0x2470 + (port<<10)) |
725 | #define MV643XX_ETH_TX_FIFO_URGENT_THRESHOLD_REG(port) (0x2474 + (port<<10)) | 725 | #define MV643XX_ETH_TX_FIFO_URGENT_THRESHOLD_REG(port) (0x2474 + (port<<10)) |
726 | #define MV643XX_ETH_RX_MINIMAL_FRAME_SIZE_REG(port) (0x247c + (port<<10)) | 726 | #define MV643XX_ETH_RX_MINIMAL_FRAME_SIZE_REG(port) (0x247c + (port<<10)) |
727 | #define MV643XX_ETH_RX_DISCARDED_FRAMES_COUNTER(port) (0x2484 + (port<<10) | 727 | #define MV643XX_ETH_RX_DISCARDED_FRAMES_COUNTER(port) (0x2484 + (port<<10)) |
728 | #define MV643XX_ETH_PORT_DEBUG_0_REG(port) (0x248c + (port<<10)) | 728 | #define MV643XX_ETH_PORT_DEBUG_0_REG(port) (0x248c + (port<<10)) |
729 | #define MV643XX_ETH_PORT_DEBUG_1_REG(port) (0x2490 + (port<<10)) | 729 | #define MV643XX_ETH_PORT_DEBUG_1_REG(port) (0x2490 + (port<<10)) |
730 | #define MV643XX_ETH_PORT_INTERNAL_ADDR_ERROR_REG(port) (0x2494 + (port<<10)) | 730 | #define MV643XX_ETH_PORT_INTERNAL_ADDR_ERROR_REG(port) (0x2494 + (port<<10)) |
@@ -1135,7 +1135,7 @@ struct mv64xxx_i2c_pdata { | |||
1135 | #define MV643XX_ETH_DEFAULT_RX_UDP_QUEUE_1 (1<<19) | 1135 | #define MV643XX_ETH_DEFAULT_RX_UDP_QUEUE_1 (1<<19) |
1136 | #define MV643XX_ETH_DEFAULT_RX_UDP_QUEUE_2 (1<<20) | 1136 | #define MV643XX_ETH_DEFAULT_RX_UDP_QUEUE_2 (1<<20) |
1137 | #define MV643XX_ETH_DEFAULT_RX_UDP_QUEUE_3 ((1<<20) | (1<<19)) | 1137 | #define MV643XX_ETH_DEFAULT_RX_UDP_QUEUE_3 ((1<<20) | (1<<19)) |
1138 | #define MV643XX_ETH_DEFAULT_RX_UDP_QUEUE_4 ((1<<21) | 1138 | #define MV643XX_ETH_DEFAULT_RX_UDP_QUEUE_4 (1<<21) |
1139 | #define MV643XX_ETH_DEFAULT_RX_UDP_QUEUE_5 ((1<<21) | (1<<19)) | 1139 | #define MV643XX_ETH_DEFAULT_RX_UDP_QUEUE_5 ((1<<21) | (1<<19)) |
1140 | #define MV643XX_ETH_DEFAULT_RX_UDP_QUEUE_6 ((1<<21) | (1<<20)) | 1140 | #define MV643XX_ETH_DEFAULT_RX_UDP_QUEUE_6 ((1<<21) | (1<<20)) |
1141 | #define MV643XX_ETH_DEFAULT_RX_UDP_QUEUE_7 ((1<<21) | (1<<20) | (1<<19)) | 1141 | #define MV643XX_ETH_DEFAULT_RX_UDP_QUEUE_7 ((1<<21) | (1<<20) | (1<<19)) |
diff --git a/include/linux/net.h b/include/linux/net.h index 15c733b816f0..6f0dfeba509a 100644 --- a/include/linux/net.h +++ b/include/linux/net.h | |||
@@ -196,7 +196,7 @@ extern struct socket *sockfd_lookup(int fd, int *err); | |||
196 | extern int net_ratelimit(void); | 196 | extern int net_ratelimit(void); |
197 | 197 | ||
198 | #define net_random() random32() | 198 | #define net_random() random32() |
199 | #define net_srandom(seed) srandom32(seed) | 199 | #define net_srandom(seed) srandom32((__force u32)seed) |
200 | 200 | ||
201 | extern int kernel_sendmsg(struct socket *sock, struct msghdr *msg, | 201 | extern int kernel_sendmsg(struct socket *sock, struct msghdr *msg, |
202 | struct kvec *vec, size_t num, size_t len); | 202 | struct kvec *vec, size_t num, size_t len); |
diff --git a/include/linux/netdevice.h b/include/linux/netdevice.h index 9264139bd8df..949eada46ce1 100644 --- a/include/linux/netdevice.h +++ b/include/linux/netdevice.h | |||
@@ -38,7 +38,6 @@ | |||
38 | #include <linux/percpu.h> | 38 | #include <linux/percpu.h> |
39 | #include <linux/dmaengine.h> | 39 | #include <linux/dmaengine.h> |
40 | 40 | ||
41 | struct divert_blk; | ||
42 | struct vlan_group; | 41 | struct vlan_group; |
43 | struct ethtool_ops; | 42 | struct ethtool_ops; |
44 | struct netpoll_info; | 43 | struct netpoll_info; |
@@ -67,6 +66,10 @@ struct netpoll_info; | |||
67 | #define NET_RX_CN_HIGH 4 /* The storm is here */ | 66 | #define NET_RX_CN_HIGH 4 /* The storm is here */ |
68 | #define NET_RX_BAD 5 /* packet dropped due to kernel error */ | 67 | #define NET_RX_BAD 5 /* packet dropped due to kernel error */ |
69 | 68 | ||
69 | /* NET_XMIT_CN is special. It does not guarantee that this packet is lost. It | ||
70 | * indicates that the device will soon be dropping packets, or already drops | ||
71 | * some packets of the same priority; prompting us to send less aggressively. */ | ||
72 | #define net_xmit_eval(e) ((e) == NET_XMIT_CN? 0 : (e)) | ||
70 | #define net_xmit_errno(e) ((e) != NET_XMIT_CN ? -ENOBUFS : 0) | 73 | #define net_xmit_errno(e) ((e) != NET_XMIT_CN ? -ENOBUFS : 0) |
71 | 74 | ||
72 | #endif | 75 | #endif |
@@ -93,8 +96,10 @@ struct netpoll_info; | |||
93 | #endif | 96 | #endif |
94 | #endif | 97 | #endif |
95 | 98 | ||
96 | #if !defined(CONFIG_NET_IPIP) && \ | 99 | #if !defined(CONFIG_NET_IPIP) && !defined(CONFIG_NET_IPIP_MODULE) && \ |
97 | !defined(CONFIG_IPV6) && !defined(CONFIG_IPV6_MODULE) | 100 | !defined(CONFIG_NET_IPGRE) && !defined(CONFIG_NET_IPGRE_MODULE) && \ |
101 | !defined(CONFIG_IPV6_SIT) && !defined(CONFIG_IPV6_SIT_MODULE) && \ | ||
102 | !defined(CONFIG_IPV6_TUNNEL) && !defined(CONFIG_IPV6_TUNNEL_MODULE) | ||
98 | #define MAX_HEADER LL_MAX_HEADER | 103 | #define MAX_HEADER LL_MAX_HEADER |
99 | #else | 104 | #else |
100 | #define MAX_HEADER (LL_MAX_HEADER + 48) | 105 | #define MAX_HEADER (LL_MAX_HEADER + 48) |
@@ -191,7 +196,7 @@ struct hh_cache | |||
191 | * NOTE: For VLANs, this will be the | 196 | * NOTE: For VLANs, this will be the |
192 | * encapuslated type. --BLG | 197 | * encapuslated type. --BLG |
193 | */ | 198 | */ |
194 | int hh_len; /* length of header */ | 199 | u16 hh_len; /* length of header */ |
195 | int (*hh_output)(struct sk_buff *skb); | 200 | int (*hh_output)(struct sk_buff *skb); |
196 | rwlock_t hh_lock; | 201 | rwlock_t hh_lock; |
197 | 202 | ||
@@ -515,11 +520,6 @@ struct net_device | |||
515 | /* bridge stuff */ | 520 | /* bridge stuff */ |
516 | struct net_bridge_port *br_port; | 521 | struct net_bridge_port *br_port; |
517 | 522 | ||
518 | #ifdef CONFIG_NET_DIVERT | ||
519 | /* this will get initialized at each interface type init routine */ | ||
520 | struct divert_blk *divert; | ||
521 | #endif /* CONFIG_NET_DIVERT */ | ||
522 | |||
523 | /* class/net/name entry */ | 523 | /* class/net/name entry */ |
524 | struct class_device class_dev; | 524 | struct class_device class_dev; |
525 | /* space for optional statistics and wireless sysfs groups */ | 525 | /* space for optional statistics and wireless sysfs groups */ |
diff --git a/include/linux/netfilter.h b/include/linux/netfilter.h index b7e67d1d4382..d4c4c5120bc0 100644 --- a/include/linux/netfilter.h +++ b/include/linux/netfilter.h | |||
@@ -117,6 +117,16 @@ void nf_unregister_hooks(struct nf_hook_ops *reg, unsigned int n); | |||
117 | int nf_register_sockopt(struct nf_sockopt_ops *reg); | 117 | int nf_register_sockopt(struct nf_sockopt_ops *reg); |
118 | void nf_unregister_sockopt(struct nf_sockopt_ops *reg); | 118 | void nf_unregister_sockopt(struct nf_sockopt_ops *reg); |
119 | 119 | ||
120 | #ifdef CONFIG_SYSCTL | ||
121 | /* Sysctl registration */ | ||
122 | struct ctl_table_header *nf_register_sysctl_table(struct ctl_table *path, | ||
123 | struct ctl_table *table); | ||
124 | void nf_unregister_sysctl_table(struct ctl_table_header *header, | ||
125 | struct ctl_table *table); | ||
126 | extern struct ctl_table nf_net_netfilter_sysctl_path[]; | ||
127 | extern struct ctl_table nf_net_ipv4_netfilter_sysctl_path[]; | ||
128 | #endif /* CONFIG_SYSCTL */ | ||
129 | |||
120 | extern struct list_head nf_hooks[NPROTO][NF_MAX_HOOKS]; | 130 | extern struct list_head nf_hooks[NPROTO][NF_MAX_HOOKS]; |
121 | 131 | ||
122 | /* those NF_LOG_* defines and struct nf_loginfo are legacy definitios that will | 132 | /* those NF_LOG_* defines and struct nf_loginfo are legacy definitios that will |
@@ -282,15 +292,31 @@ extern void nf_invalidate_cache(int pf); | |||
282 | Returns true or false. */ | 292 | Returns true or false. */ |
283 | extern int skb_make_writable(struct sk_buff **pskb, unsigned int writable_len); | 293 | extern int skb_make_writable(struct sk_buff **pskb, unsigned int writable_len); |
284 | 294 | ||
285 | extern u_int16_t nf_csum_update(u_int32_t oldval, u_int32_t newval, | 295 | static inline void nf_csum_replace4(__sum16 *sum, __be32 from, __be32 to) |
286 | u_int32_t csum); | 296 | { |
287 | extern u_int16_t nf_proto_csum_update(struct sk_buff *skb, | 297 | __be32 diff[] = { ~from, to }; |
288 | u_int32_t oldval, u_int32_t newval, | 298 | |
289 | u_int16_t csum, int pseudohdr); | 299 | *sum = csum_fold(csum_partial((char *)diff, sizeof(diff), ~csum_unfold(*sum))); |
300 | } | ||
301 | |||
302 | static inline void nf_csum_replace2(__sum16 *sum, __be16 from, __be16 to) | ||
303 | { | ||
304 | nf_csum_replace4(sum, (__force __be32)from, (__force __be32)to); | ||
305 | } | ||
306 | |||
307 | extern void nf_proto_csum_replace4(__sum16 *sum, struct sk_buff *skb, | ||
308 | __be32 from, __be32 to, int pseudohdr); | ||
309 | |||
310 | static inline void nf_proto_csum_replace2(__sum16 *sum, struct sk_buff *skb, | ||
311 | __be16 from, __be16 to, int pseudohdr) | ||
312 | { | ||
313 | nf_proto_csum_replace4(sum, skb, (__force __be32)from, | ||
314 | (__force __be32)to, pseudohdr); | ||
315 | } | ||
290 | 316 | ||
291 | struct nf_afinfo { | 317 | struct nf_afinfo { |
292 | unsigned short family; | 318 | unsigned short family; |
293 | unsigned int (*checksum)(struct sk_buff *skb, unsigned int hook, | 319 | __sum16 (*checksum)(struct sk_buff *skb, unsigned int hook, |
294 | unsigned int dataoff, u_int8_t protocol); | 320 | unsigned int dataoff, u_int8_t protocol); |
295 | void (*saveroute)(const struct sk_buff *skb, | 321 | void (*saveroute)(const struct sk_buff *skb, |
296 | struct nf_info *info); | 322 | struct nf_info *info); |
@@ -305,12 +331,12 @@ static inline struct nf_afinfo *nf_get_afinfo(unsigned short family) | |||
305 | return rcu_dereference(nf_afinfo[family]); | 331 | return rcu_dereference(nf_afinfo[family]); |
306 | } | 332 | } |
307 | 333 | ||
308 | static inline unsigned int | 334 | static inline __sum16 |
309 | nf_checksum(struct sk_buff *skb, unsigned int hook, unsigned int dataoff, | 335 | nf_checksum(struct sk_buff *skb, unsigned int hook, unsigned int dataoff, |
310 | u_int8_t protocol, unsigned short family) | 336 | u_int8_t protocol, unsigned short family) |
311 | { | 337 | { |
312 | struct nf_afinfo *afinfo; | 338 | struct nf_afinfo *afinfo; |
313 | unsigned int csum = 0; | 339 | __sum16 csum = 0; |
314 | 340 | ||
315 | rcu_read_lock(); | 341 | rcu_read_lock(); |
316 | afinfo = nf_get_afinfo(family); | 342 | afinfo = nf_get_afinfo(family); |
@@ -331,7 +357,7 @@ extern void (*ip_nat_decode_session)(struct sk_buff *, struct flowi *); | |||
331 | static inline void | 357 | static inline void |
332 | nf_nat_decode_session(struct sk_buff *skb, struct flowi *fl, int family) | 358 | nf_nat_decode_session(struct sk_buff *skb, struct flowi *fl, int family) |
333 | { | 359 | { |
334 | #ifdef CONFIG_IP_NF_NAT_NEEDED | 360 | #if defined(CONFIG_IP_NF_NAT_NEEDED) || defined(CONFIG_NF_NAT_NEEDED) |
335 | void (*decodefn)(struct sk_buff *, struct flowi *); | 361 | void (*decodefn)(struct sk_buff *, struct flowi *); |
336 | 362 | ||
337 | if (family == AF_INET && (decodefn = ip_nat_decode_session) != NULL) | 363 | if (family == AF_INET && (decodefn = ip_nat_decode_session) != NULL) |
diff --git a/include/linux/netfilter/Kbuild b/include/linux/netfilter/Kbuild index 312bd2ffee33..6328175a1c3a 100644 --- a/include/linux/netfilter/Kbuild +++ b/include/linux/netfilter/Kbuild | |||
@@ -14,6 +14,7 @@ header-y += xt_dscp.h | |||
14 | header-y += xt_DSCP.h | 14 | header-y += xt_DSCP.h |
15 | header-y += xt_esp.h | 15 | header-y += xt_esp.h |
16 | header-y += xt_helper.h | 16 | header-y += xt_helper.h |
17 | header-y += xt_hashlimit.h | ||
17 | header-y += xt_length.h | 18 | header-y += xt_length.h |
18 | header-y += xt_limit.h | 19 | header-y += xt_limit.h |
19 | header-y += xt_mac.h | 20 | header-y += xt_mac.h |
@@ -21,6 +22,7 @@ header-y += xt_mark.h | |||
21 | header-y += xt_MARK.h | 22 | header-y += xt_MARK.h |
22 | header-y += xt_multiport.h | 23 | header-y += xt_multiport.h |
23 | header-y += xt_NFQUEUE.h | 24 | header-y += xt_NFQUEUE.h |
25 | header-y += xt_NFLOG.h | ||
24 | header-y += xt_pkttype.h | 26 | header-y += xt_pkttype.h |
25 | header-y += xt_policy.h | 27 | header-y += xt_policy.h |
26 | header-y += xt_realm.h | 28 | header-y += xt_realm.h |
diff --git a/include/linux/netfilter/nf_conntrack_amanda.h b/include/linux/netfilter/nf_conntrack_amanda.h new file mode 100644 index 000000000000..26c223544ae8 --- /dev/null +++ b/include/linux/netfilter/nf_conntrack_amanda.h | |||
@@ -0,0 +1,10 @@ | |||
1 | #ifndef _NF_CONNTRACK_AMANDA_H | ||
2 | #define _NF_CONNTRACK_AMANDA_H | ||
3 | /* AMANDA tracking. */ | ||
4 | |||
5 | extern unsigned int (*nf_nat_amanda_hook)(struct sk_buff **pskb, | ||
6 | enum ip_conntrack_info ctinfo, | ||
7 | unsigned int matchoff, | ||
8 | unsigned int matchlen, | ||
9 | struct nf_conntrack_expect *exp); | ||
10 | #endif /* _NF_CONNTRACK_AMANDA_H */ | ||
diff --git a/include/linux/netfilter/nf_conntrack_ftp.h b/include/linux/netfilter/nf_conntrack_ftp.h index ad4a41c9ce93..81453ea7e4c2 100644 --- a/include/linux/netfilter/nf_conntrack_ftp.h +++ b/include/linux/netfilter/nf_conntrack_ftp.h | |||
@@ -3,16 +3,16 @@ | |||
3 | /* FTP tracking. */ | 3 | /* FTP tracking. */ |
4 | 4 | ||
5 | /* This enum is exposed to userspace */ | 5 | /* This enum is exposed to userspace */ |
6 | enum ip_ct_ftp_type | 6 | enum nf_ct_ftp_type |
7 | { | 7 | { |
8 | /* PORT command from client */ | 8 | /* PORT command from client */ |
9 | IP_CT_FTP_PORT, | 9 | NF_CT_FTP_PORT, |
10 | /* PASV response from server */ | 10 | /* PASV response from server */ |
11 | IP_CT_FTP_PASV, | 11 | NF_CT_FTP_PASV, |
12 | /* EPRT command from client */ | 12 | /* EPRT command from client */ |
13 | IP_CT_FTP_EPRT, | 13 | NF_CT_FTP_EPRT, |
14 | /* EPSV response from server */ | 14 | /* EPSV response from server */ |
15 | IP_CT_FTP_EPSV, | 15 | NF_CT_FTP_EPSV, |
16 | }; | 16 | }; |
17 | 17 | ||
18 | #ifdef __KERNEL__ | 18 | #ifdef __KERNEL__ |
@@ -21,23 +21,23 @@ enum ip_ct_ftp_type | |||
21 | 21 | ||
22 | #define NUM_SEQ_TO_REMEMBER 2 | 22 | #define NUM_SEQ_TO_REMEMBER 2 |
23 | /* This structure exists only once per master */ | 23 | /* This structure exists only once per master */ |
24 | struct ip_ct_ftp_master { | 24 | struct nf_ct_ftp_master { |
25 | /* Valid seq positions for cmd matching after newline */ | 25 | /* Valid seq positions for cmd matching after newline */ |
26 | u_int32_t seq_aft_nl[IP_CT_DIR_MAX][NUM_SEQ_TO_REMEMBER]; | 26 | u_int32_t seq_aft_nl[IP_CT_DIR_MAX][NUM_SEQ_TO_REMEMBER]; |
27 | /* 0 means seq_match_aft_nl not set */ | 27 | /* 0 means seq_match_aft_nl not set */ |
28 | int seq_aft_nl_num[IP_CT_DIR_MAX]; | 28 | int seq_aft_nl_num[IP_CT_DIR_MAX]; |
29 | }; | 29 | }; |
30 | 30 | ||
31 | struct ip_conntrack_expect; | 31 | struct nf_conntrack_expect; |
32 | 32 | ||
33 | /* For NAT to hook in when we find a packet which describes what other | 33 | /* For NAT to hook in when we find a packet which describes what other |
34 | * connection we should expect. */ | 34 | * connection we should expect. */ |
35 | extern unsigned int (*ip_nat_ftp_hook)(struct sk_buff **pskb, | 35 | extern unsigned int (*nf_nat_ftp_hook)(struct sk_buff **pskb, |
36 | enum ip_conntrack_info ctinfo, | 36 | enum ip_conntrack_info ctinfo, |
37 | enum ip_ct_ftp_type type, | 37 | enum nf_ct_ftp_type type, |
38 | unsigned int matchoff, | 38 | unsigned int matchoff, |
39 | unsigned int matchlen, | 39 | unsigned int matchlen, |
40 | struct ip_conntrack_expect *exp, | 40 | struct nf_conntrack_expect *exp, |
41 | u32 *seq); | 41 | u32 *seq); |
42 | #endif /* __KERNEL__ */ | 42 | #endif /* __KERNEL__ */ |
43 | 43 | ||
diff --git a/include/linux/netfilter/nf_conntrack_h323.h b/include/linux/netfilter/nf_conntrack_h323.h new file mode 100644 index 000000000000..08e2f4977c2e --- /dev/null +++ b/include/linux/netfilter/nf_conntrack_h323.h | |||
@@ -0,0 +1,92 @@ | |||
1 | #ifndef _NF_CONNTRACK_H323_H | ||
2 | #define _NF_CONNTRACK_H323_H | ||
3 | |||
4 | #ifdef __KERNEL__ | ||
5 | |||
6 | #include <linux/netfilter/nf_conntrack_h323_asn1.h> | ||
7 | |||
8 | #define RAS_PORT 1719 | ||
9 | #define Q931_PORT 1720 | ||
10 | #define H323_RTP_CHANNEL_MAX 4 /* Audio, video, FAX and other */ | ||
11 | |||
12 | /* This structure exists only once per master */ | ||
13 | struct nf_ct_h323_master { | ||
14 | |||
15 | /* Original and NATed Q.931 or H.245 signal ports */ | ||
16 | __be16 sig_port[IP_CT_DIR_MAX]; | ||
17 | |||
18 | /* Original and NATed RTP ports */ | ||
19 | __be16 rtp_port[H323_RTP_CHANNEL_MAX][IP_CT_DIR_MAX]; | ||
20 | |||
21 | union { | ||
22 | /* RAS connection timeout */ | ||
23 | u_int32_t timeout; | ||
24 | |||
25 | /* Next TPKT length (for separate TPKT header and data) */ | ||
26 | u_int16_t tpkt_len[IP_CT_DIR_MAX]; | ||
27 | }; | ||
28 | }; | ||
29 | |||
30 | struct nf_conn; | ||
31 | |||
32 | extern int get_h225_addr(struct nf_conn *ct, unsigned char *data, | ||
33 | TransportAddress *taddr, | ||
34 | union nf_conntrack_address *addr, __be16 *port); | ||
35 | extern void nf_conntrack_h245_expect(struct nf_conn *new, | ||
36 | struct nf_conntrack_expect *this); | ||
37 | extern void nf_conntrack_q931_expect(struct nf_conn *new, | ||
38 | struct nf_conntrack_expect *this); | ||
39 | extern int (*set_h245_addr_hook) (struct sk_buff **pskb, | ||
40 | unsigned char **data, int dataoff, | ||
41 | H245_TransportAddress *taddr, | ||
42 | union nf_conntrack_address *addr, | ||
43 | __be16 port); | ||
44 | extern int (*set_h225_addr_hook) (struct sk_buff **pskb, | ||
45 | unsigned char **data, int dataoff, | ||
46 | TransportAddress *taddr, | ||
47 | union nf_conntrack_address *addr, | ||
48 | __be16 port); | ||
49 | extern int (*set_sig_addr_hook) (struct sk_buff **pskb, | ||
50 | struct nf_conn *ct, | ||
51 | enum ip_conntrack_info ctinfo, | ||
52 | unsigned char **data, | ||
53 | TransportAddress *taddr, int count); | ||
54 | extern int (*set_ras_addr_hook) (struct sk_buff **pskb, | ||
55 | struct nf_conn *ct, | ||
56 | enum ip_conntrack_info ctinfo, | ||
57 | unsigned char **data, | ||
58 | TransportAddress *taddr, int count); | ||
59 | extern int (*nat_rtp_rtcp_hook) (struct sk_buff **pskb, | ||
60 | struct nf_conn *ct, | ||
61 | enum ip_conntrack_info ctinfo, | ||
62 | unsigned char **data, int dataoff, | ||
63 | H245_TransportAddress *taddr, | ||
64 | __be16 port, __be16 rtp_port, | ||
65 | struct nf_conntrack_expect *rtp_exp, | ||
66 | struct nf_conntrack_expect *rtcp_exp); | ||
67 | extern int (*nat_t120_hook) (struct sk_buff **pskb, struct nf_conn *ct, | ||
68 | enum ip_conntrack_info ctinfo, | ||
69 | unsigned char **data, int dataoff, | ||
70 | H245_TransportAddress *taddr, __be16 port, | ||
71 | struct nf_conntrack_expect *exp); | ||
72 | extern int (*nat_h245_hook) (struct sk_buff **pskb, struct nf_conn *ct, | ||
73 | enum ip_conntrack_info ctinfo, | ||
74 | unsigned char **data, int dataoff, | ||
75 | TransportAddress *taddr, __be16 port, | ||
76 | struct nf_conntrack_expect *exp); | ||
77 | extern int (*nat_callforwarding_hook) (struct sk_buff **pskb, | ||
78 | struct nf_conn *ct, | ||
79 | enum ip_conntrack_info ctinfo, | ||
80 | unsigned char **data, int dataoff, | ||
81 | TransportAddress *taddr, | ||
82 | __be16 port, | ||
83 | struct nf_conntrack_expect *exp); | ||
84 | extern int (*nat_q931_hook) (struct sk_buff **pskb, struct nf_conn *ct, | ||
85 | enum ip_conntrack_info ctinfo, | ||
86 | unsigned char **data, TransportAddress *taddr, | ||
87 | int idx, __be16 port, | ||
88 | struct nf_conntrack_expect *exp); | ||
89 | |||
90 | #endif | ||
91 | |||
92 | #endif | ||
diff --git a/include/linux/netfilter_ipv4/ip_conntrack_helper_h323_asn1.h b/include/linux/netfilter/nf_conntrack_h323_asn1.h index c6e9a0b6d30b..8dab5968fc7e 100644 --- a/include/linux/netfilter_ipv4/ip_conntrack_helper_h323_asn1.h +++ b/include/linux/netfilter/nf_conntrack_h323_asn1.h | |||
@@ -1,6 +1,6 @@ | |||
1 | /**************************************************************************** | 1 | /**************************************************************************** |
2 | * ip_conntrack_helper_h323_asn1.h - BER and PER decoding library for H.323 | 2 | * ip_conntrack_h323_asn1.h - BER and PER decoding library for H.323 |
3 | * conntrack/NAT module. | 3 | * conntrack/NAT module. |
4 | * | 4 | * |
5 | * Copyright (c) 2006 by Jing Min Zhao <zhaojingmin@users.sourceforge.net> | 5 | * Copyright (c) 2006 by Jing Min Zhao <zhaojingmin@users.sourceforge.net> |
6 | * | 6 | * |
@@ -34,13 +34,13 @@ | |||
34 | * | 34 | * |
35 | ****************************************************************************/ | 35 | ****************************************************************************/ |
36 | 36 | ||
37 | #ifndef _IP_CONNTRACK_HELPER_H323_ASN1_H_ | 37 | #ifndef _NF_CONNTRACK_HELPER_H323_ASN1_H_ |
38 | #define _IP_CONNTRACK_HELPER_H323_ASN1_H_ | 38 | #define _NF_CONNTRACK_HELPER_H323_ASN1_H_ |
39 | 39 | ||
40 | /***************************************************************************** | 40 | /***************************************************************************** |
41 | * H.323 Types | 41 | * H.323 Types |
42 | ****************************************************************************/ | 42 | ****************************************************************************/ |
43 | #include "ip_conntrack_helper_h323_types.h" | 43 | #include "nf_conntrack_h323_types.h" |
44 | 44 | ||
45 | typedef struct { | 45 | typedef struct { |
46 | enum { | 46 | enum { |
diff --git a/include/linux/netfilter_ipv4/ip_conntrack_helper_h323_types.h b/include/linux/netfilter/nf_conntrack_h323_types.h index 3d4a773799fc..38d74d5c9700 100644 --- a/include/linux/netfilter_ipv4/ip_conntrack_helper_h323_types.h +++ b/include/linux/netfilter/nf_conntrack_h323_types.h | |||
@@ -10,6 +10,11 @@ typedef struct TransportAddress_ipAddress { /* SEQUENCE */ | |||
10 | unsigned ip; | 10 | unsigned ip; |
11 | } TransportAddress_ipAddress; | 11 | } TransportAddress_ipAddress; |
12 | 12 | ||
13 | typedef struct TransportAddress_ip6Address { /* SEQUENCE */ | ||
14 | int options; /* No use */ | ||
15 | unsigned ip6; | ||
16 | } TransportAddress_ip6Address; | ||
17 | |||
13 | typedef struct TransportAddress { /* CHOICE */ | 18 | typedef struct TransportAddress { /* CHOICE */ |
14 | enum { | 19 | enum { |
15 | eTransportAddress_ipAddress, | 20 | eTransportAddress_ipAddress, |
@@ -22,6 +27,7 @@ typedef struct TransportAddress { /* CHOICE */ | |||
22 | } choice; | 27 | } choice; |
23 | union { | 28 | union { |
24 | TransportAddress_ipAddress ipAddress; | 29 | TransportAddress_ipAddress ipAddress; |
30 | TransportAddress_ip6Address ip6Address; | ||
25 | }; | 31 | }; |
26 | } TransportAddress; | 32 | } TransportAddress; |
27 | 33 | ||
@@ -93,6 +99,11 @@ typedef struct UnicastAddress_iPAddress { /* SEQUENCE */ | |||
93 | unsigned network; | 99 | unsigned network; |
94 | } UnicastAddress_iPAddress; | 100 | } UnicastAddress_iPAddress; |
95 | 101 | ||
102 | typedef struct UnicastAddress_iP6Address { /* SEQUENCE */ | ||
103 | int options; /* No use */ | ||
104 | unsigned network; | ||
105 | } UnicastAddress_iP6Address; | ||
106 | |||
96 | typedef struct UnicastAddress { /* CHOICE */ | 107 | typedef struct UnicastAddress { /* CHOICE */ |
97 | enum { | 108 | enum { |
98 | eUnicastAddress_iPAddress, | 109 | eUnicastAddress_iPAddress, |
@@ -105,6 +116,7 @@ typedef struct UnicastAddress { /* CHOICE */ | |||
105 | } choice; | 116 | } choice; |
106 | union { | 117 | union { |
107 | UnicastAddress_iPAddress iPAddress; | 118 | UnicastAddress_iPAddress iPAddress; |
119 | UnicastAddress_iP6Address iP6Address; | ||
108 | }; | 120 | }; |
109 | } UnicastAddress; | 121 | } UnicastAddress; |
110 | 122 | ||
diff --git a/include/linux/netfilter/nf_conntrack_irc.h b/include/linux/netfilter/nf_conntrack_irc.h new file mode 100644 index 000000000000..2ab6b8255911 --- /dev/null +++ b/include/linux/netfilter/nf_conntrack_irc.h | |||
@@ -0,0 +1,15 @@ | |||
1 | #ifndef _NF_CONNTRACK_IRC_H | ||
2 | #define _NF_CONNTRACK_IRC_H | ||
3 | |||
4 | #ifdef __KERNEL__ | ||
5 | |||
6 | #define IRC_PORT 6667 | ||
7 | |||
8 | extern unsigned int (*nf_nat_irc_hook)(struct sk_buff **pskb, | ||
9 | enum ip_conntrack_info ctinfo, | ||
10 | unsigned int matchoff, | ||
11 | unsigned int matchlen, | ||
12 | struct nf_conntrack_expect *exp); | ||
13 | |||
14 | #endif /* __KERNEL__ */ | ||
15 | #endif /* _NF_CONNTRACK_IRC_H */ | ||
diff --git a/include/linux/netfilter/nf_conntrack_pptp.h b/include/linux/netfilter/nf_conntrack_pptp.h new file mode 100644 index 000000000000..fb049ec11ff2 --- /dev/null +++ b/include/linux/netfilter/nf_conntrack_pptp.h | |||
@@ -0,0 +1,321 @@ | |||
1 | /* PPTP constants and structs */ | ||
2 | #ifndef _NF_CONNTRACK_PPTP_H | ||
3 | #define _NF_CONNTRACK_PPTP_H | ||
4 | |||
5 | /* state of the control session */ | ||
6 | enum pptp_ctrlsess_state { | ||
7 | PPTP_SESSION_NONE, /* no session present */ | ||
8 | PPTP_SESSION_ERROR, /* some session error */ | ||
9 | PPTP_SESSION_STOPREQ, /* stop_sess request seen */ | ||
10 | PPTP_SESSION_REQUESTED, /* start_sess request seen */ | ||
11 | PPTP_SESSION_CONFIRMED, /* session established */ | ||
12 | }; | ||
13 | |||
14 | /* state of the call inside the control session */ | ||
15 | enum pptp_ctrlcall_state { | ||
16 | PPTP_CALL_NONE, | ||
17 | PPTP_CALL_ERROR, | ||
18 | PPTP_CALL_OUT_REQ, | ||
19 | PPTP_CALL_OUT_CONF, | ||
20 | PPTP_CALL_IN_REQ, | ||
21 | PPTP_CALL_IN_REP, | ||
22 | PPTP_CALL_IN_CONF, | ||
23 | PPTP_CALL_CLEAR_REQ, | ||
24 | }; | ||
25 | |||
26 | /* conntrack private data */ | ||
27 | struct nf_ct_pptp_master { | ||
28 | enum pptp_ctrlsess_state sstate; /* session state */ | ||
29 | enum pptp_ctrlcall_state cstate; /* call state */ | ||
30 | __be16 pac_call_id; /* call id of PAC */ | ||
31 | __be16 pns_call_id; /* call id of PNS */ | ||
32 | |||
33 | /* in pre-2.6.11 this used to be per-expect. Now it is per-conntrack | ||
34 | * and therefore imposes a fixed limit on the number of maps */ | ||
35 | struct nf_ct_gre_keymap *keymap[IP_CT_DIR_MAX]; | ||
36 | }; | ||
37 | |||
38 | struct nf_nat_pptp { | ||
39 | __be16 pns_call_id; /* NAT'ed PNS call id */ | ||
40 | __be16 pac_call_id; /* NAT'ed PAC call id */ | ||
41 | }; | ||
42 | |||
43 | #ifdef __KERNEL__ | ||
44 | |||
45 | #define PPTP_CONTROL_PORT 1723 | ||
46 | |||
47 | #define PPTP_PACKET_CONTROL 1 | ||
48 | #define PPTP_PACKET_MGMT 2 | ||
49 | |||
50 | #define PPTP_MAGIC_COOKIE 0x1a2b3c4d | ||
51 | |||
52 | struct pptp_pkt_hdr { | ||
53 | __u16 packetLength; | ||
54 | __be16 packetType; | ||
55 | __be32 magicCookie; | ||
56 | }; | ||
57 | |||
58 | /* PptpControlMessageType values */ | ||
59 | #define PPTP_START_SESSION_REQUEST 1 | ||
60 | #define PPTP_START_SESSION_REPLY 2 | ||
61 | #define PPTP_STOP_SESSION_REQUEST 3 | ||
62 | #define PPTP_STOP_SESSION_REPLY 4 | ||
63 | #define PPTP_ECHO_REQUEST 5 | ||
64 | #define PPTP_ECHO_REPLY 6 | ||
65 | #define PPTP_OUT_CALL_REQUEST 7 | ||
66 | #define PPTP_OUT_CALL_REPLY 8 | ||
67 | #define PPTP_IN_CALL_REQUEST 9 | ||
68 | #define PPTP_IN_CALL_REPLY 10 | ||
69 | #define PPTP_IN_CALL_CONNECT 11 | ||
70 | #define PPTP_CALL_CLEAR_REQUEST 12 | ||
71 | #define PPTP_CALL_DISCONNECT_NOTIFY 13 | ||
72 | #define PPTP_WAN_ERROR_NOTIFY 14 | ||
73 | #define PPTP_SET_LINK_INFO 15 | ||
74 | |||
75 | #define PPTP_MSG_MAX 15 | ||
76 | |||
77 | /* PptpGeneralError values */ | ||
78 | #define PPTP_ERROR_CODE_NONE 0 | ||
79 | #define PPTP_NOT_CONNECTED 1 | ||
80 | #define PPTP_BAD_FORMAT 2 | ||
81 | #define PPTP_BAD_VALUE 3 | ||
82 | #define PPTP_NO_RESOURCE 4 | ||
83 | #define PPTP_BAD_CALLID 5 | ||
84 | #define PPTP_REMOVE_DEVICE_ERROR 6 | ||
85 | |||
86 | struct PptpControlHeader { | ||
87 | __be16 messageType; | ||
88 | __u16 reserved; | ||
89 | }; | ||
90 | |||
91 | /* FramingCapability Bitmap Values */ | ||
92 | #define PPTP_FRAME_CAP_ASYNC 0x1 | ||
93 | #define PPTP_FRAME_CAP_SYNC 0x2 | ||
94 | |||
95 | /* BearerCapability Bitmap Values */ | ||
96 | #define PPTP_BEARER_CAP_ANALOG 0x1 | ||
97 | #define PPTP_BEARER_CAP_DIGITAL 0x2 | ||
98 | |||
99 | struct PptpStartSessionRequest { | ||
100 | __be16 protocolVersion; | ||
101 | __u16 reserved1; | ||
102 | __be32 framingCapability; | ||
103 | __be32 bearerCapability; | ||
104 | __be16 maxChannels; | ||
105 | __be16 firmwareRevision; | ||
106 | __u8 hostName[64]; | ||
107 | __u8 vendorString[64]; | ||
108 | }; | ||
109 | |||
110 | /* PptpStartSessionResultCode Values */ | ||
111 | #define PPTP_START_OK 1 | ||
112 | #define PPTP_START_GENERAL_ERROR 2 | ||
113 | #define PPTP_START_ALREADY_CONNECTED 3 | ||
114 | #define PPTP_START_NOT_AUTHORIZED 4 | ||
115 | #define PPTP_START_UNKNOWN_PROTOCOL 5 | ||
116 | |||
117 | struct PptpStartSessionReply { | ||
118 | __be16 protocolVersion; | ||
119 | __u8 resultCode; | ||
120 | __u8 generalErrorCode; | ||
121 | __be32 framingCapability; | ||
122 | __be32 bearerCapability; | ||
123 | __be16 maxChannels; | ||
124 | __be16 firmwareRevision; | ||
125 | __u8 hostName[64]; | ||
126 | __u8 vendorString[64]; | ||
127 | }; | ||
128 | |||
129 | /* PptpStopReasons */ | ||
130 | #define PPTP_STOP_NONE 1 | ||
131 | #define PPTP_STOP_PROTOCOL 2 | ||
132 | #define PPTP_STOP_LOCAL_SHUTDOWN 3 | ||
133 | |||
134 | struct PptpStopSessionRequest { | ||
135 | __u8 reason; | ||
136 | __u8 reserved1; | ||
137 | __u16 reserved2; | ||
138 | }; | ||
139 | |||
140 | /* PptpStopSessionResultCode */ | ||
141 | #define PPTP_STOP_OK 1 | ||
142 | #define PPTP_STOP_GENERAL_ERROR 2 | ||
143 | |||
144 | struct PptpStopSessionReply { | ||
145 | __u8 resultCode; | ||
146 | __u8 generalErrorCode; | ||
147 | __u16 reserved1; | ||
148 | }; | ||
149 | |||
150 | struct PptpEchoRequest { | ||
151 | __be32 identNumber; | ||
152 | }; | ||
153 | |||
154 | /* PptpEchoReplyResultCode */ | ||
155 | #define PPTP_ECHO_OK 1 | ||
156 | #define PPTP_ECHO_GENERAL_ERROR 2 | ||
157 | |||
158 | struct PptpEchoReply { | ||
159 | __be32 identNumber; | ||
160 | __u8 resultCode; | ||
161 | __u8 generalErrorCode; | ||
162 | __u16 reserved; | ||
163 | }; | ||
164 | |||
165 | /* PptpFramingType */ | ||
166 | #define PPTP_ASYNC_FRAMING 1 | ||
167 | #define PPTP_SYNC_FRAMING 2 | ||
168 | #define PPTP_DONT_CARE_FRAMING 3 | ||
169 | |||
170 | /* PptpCallBearerType */ | ||
171 | #define PPTP_ANALOG_TYPE 1 | ||
172 | #define PPTP_DIGITAL_TYPE 2 | ||
173 | #define PPTP_DONT_CARE_BEARER_TYPE 3 | ||
174 | |||
175 | struct PptpOutCallRequest { | ||
176 | __be16 callID; | ||
177 | __be16 callSerialNumber; | ||
178 | __be32 minBPS; | ||
179 | __be32 maxBPS; | ||
180 | __be32 bearerType; | ||
181 | __be32 framingType; | ||
182 | __be16 packetWindow; | ||
183 | __be16 packetProcDelay; | ||
184 | __be16 phoneNumberLength; | ||
185 | __u16 reserved1; | ||
186 | __u8 phoneNumber[64]; | ||
187 | __u8 subAddress[64]; | ||
188 | }; | ||
189 | |||
190 | /* PptpCallResultCode */ | ||
191 | #define PPTP_OUTCALL_CONNECT 1 | ||
192 | #define PPTP_OUTCALL_GENERAL_ERROR 2 | ||
193 | #define PPTP_OUTCALL_NO_CARRIER 3 | ||
194 | #define PPTP_OUTCALL_BUSY 4 | ||
195 | #define PPTP_OUTCALL_NO_DIAL_TONE 5 | ||
196 | #define PPTP_OUTCALL_TIMEOUT 6 | ||
197 | #define PPTP_OUTCALL_DONT_ACCEPT 7 | ||
198 | |||
199 | struct PptpOutCallReply { | ||
200 | __be16 callID; | ||
201 | __be16 peersCallID; | ||
202 | __u8 resultCode; | ||
203 | __u8 generalErrorCode; | ||
204 | __be16 causeCode; | ||
205 | __be32 connectSpeed; | ||
206 | __be16 packetWindow; | ||
207 | __be16 packetProcDelay; | ||
208 | __be32 physChannelID; | ||
209 | }; | ||
210 | |||
211 | struct PptpInCallRequest { | ||
212 | __be16 callID; | ||
213 | __be16 callSerialNumber; | ||
214 | __be32 callBearerType; | ||
215 | __be32 physChannelID; | ||
216 | __be16 dialedNumberLength; | ||
217 | __be16 dialingNumberLength; | ||
218 | __u8 dialedNumber[64]; | ||
219 | __u8 dialingNumber[64]; | ||
220 | __u8 subAddress[64]; | ||
221 | }; | ||
222 | |||
223 | /* PptpInCallResultCode */ | ||
224 | #define PPTP_INCALL_ACCEPT 1 | ||
225 | #define PPTP_INCALL_GENERAL_ERROR 2 | ||
226 | #define PPTP_INCALL_DONT_ACCEPT 3 | ||
227 | |||
228 | struct PptpInCallReply { | ||
229 | __be16 callID; | ||
230 | __be16 peersCallID; | ||
231 | __u8 resultCode; | ||
232 | __u8 generalErrorCode; | ||
233 | __be16 packetWindow; | ||
234 | __be16 packetProcDelay; | ||
235 | __u16 reserved; | ||
236 | }; | ||
237 | |||
238 | struct PptpInCallConnected { | ||
239 | __be16 peersCallID; | ||
240 | __u16 reserved; | ||
241 | __be32 connectSpeed; | ||
242 | __be16 packetWindow; | ||
243 | __be16 packetProcDelay; | ||
244 | __be32 callFramingType; | ||
245 | }; | ||
246 | |||
247 | struct PptpClearCallRequest { | ||
248 | __be16 callID; | ||
249 | __u16 reserved; | ||
250 | }; | ||
251 | |||
252 | struct PptpCallDisconnectNotify { | ||
253 | __be16 callID; | ||
254 | __u8 resultCode; | ||
255 | __u8 generalErrorCode; | ||
256 | __be16 causeCode; | ||
257 | __u16 reserved; | ||
258 | __u8 callStatistics[128]; | ||
259 | }; | ||
260 | |||
261 | struct PptpWanErrorNotify { | ||
262 | __be16 peersCallID; | ||
263 | __u16 reserved; | ||
264 | __be32 crcErrors; | ||
265 | __be32 framingErrors; | ||
266 | __be32 hardwareOverRuns; | ||
267 | __be32 bufferOverRuns; | ||
268 | __be32 timeoutErrors; | ||
269 | __be32 alignmentErrors; | ||
270 | }; | ||
271 | |||
272 | struct PptpSetLinkInfo { | ||
273 | __be16 peersCallID; | ||
274 | __u16 reserved; | ||
275 | __be32 sendAccm; | ||
276 | __be32 recvAccm; | ||
277 | }; | ||
278 | |||
279 | union pptp_ctrl_union { | ||
280 | struct PptpStartSessionRequest sreq; | ||
281 | struct PptpStartSessionReply srep; | ||
282 | struct PptpStopSessionRequest streq; | ||
283 | struct PptpStopSessionReply strep; | ||
284 | struct PptpOutCallRequest ocreq; | ||
285 | struct PptpOutCallReply ocack; | ||
286 | struct PptpInCallRequest icreq; | ||
287 | struct PptpInCallReply icack; | ||
288 | struct PptpInCallConnected iccon; | ||
289 | struct PptpClearCallRequest clrreq; | ||
290 | struct PptpCallDisconnectNotify disc; | ||
291 | struct PptpWanErrorNotify wanerr; | ||
292 | struct PptpSetLinkInfo setlink; | ||
293 | }; | ||
294 | |||
295 | /* crap needed for nf_conntrack_compat.h */ | ||
296 | struct nf_conn; | ||
297 | struct nf_conntrack_expect; | ||
298 | enum ip_conntrack_info; | ||
299 | |||
300 | extern int | ||
301 | (*nf_nat_pptp_hook_outbound)(struct sk_buff **pskb, | ||
302 | struct nf_conn *ct, enum ip_conntrack_info ctinfo, | ||
303 | struct PptpControlHeader *ctlh, | ||
304 | union pptp_ctrl_union *pptpReq); | ||
305 | |||
306 | extern int | ||
307 | (*nf_nat_pptp_hook_inbound)(struct sk_buff **pskb, | ||
308 | struct nf_conn *ct, enum ip_conntrack_info ctinfo, | ||
309 | struct PptpControlHeader *ctlh, | ||
310 | union pptp_ctrl_union *pptpReq); | ||
311 | |||
312 | extern void | ||
313 | (*nf_nat_pptp_hook_exp_gre)(struct nf_conntrack_expect *exp_orig, | ||
314 | struct nf_conntrack_expect *exp_reply); | ||
315 | |||
316 | extern void | ||
317 | (*nf_nat_pptp_hook_expectfn)(struct nf_conn *ct, | ||
318 | struct nf_conntrack_expect *exp); | ||
319 | |||
320 | #endif /* __KERNEL__ */ | ||
321 | #endif /* _NF_CONNTRACK_PPTP_H */ | ||
diff --git a/include/linux/netfilter/nf_conntrack_proto_gre.h b/include/linux/netfilter/nf_conntrack_proto_gre.h new file mode 100644 index 000000000000..4e6bbce04ff8 --- /dev/null +++ b/include/linux/netfilter/nf_conntrack_proto_gre.h | |||
@@ -0,0 +1,112 @@ | |||
1 | #ifndef _CONNTRACK_PROTO_GRE_H | ||
2 | #define _CONNTRACK_PROTO_GRE_H | ||
3 | #include <asm/byteorder.h> | ||
4 | |||
5 | /* GRE PROTOCOL HEADER */ | ||
6 | |||
7 | /* GRE Version field */ | ||
8 | #define GRE_VERSION_1701 0x0 | ||
9 | #define GRE_VERSION_PPTP 0x1 | ||
10 | |||
11 | /* GRE Protocol field */ | ||
12 | #define GRE_PROTOCOL_PPTP 0x880B | ||
13 | |||
14 | /* GRE Flags */ | ||
15 | #define GRE_FLAG_C 0x80 | ||
16 | #define GRE_FLAG_R 0x40 | ||
17 | #define GRE_FLAG_K 0x20 | ||
18 | #define GRE_FLAG_S 0x10 | ||
19 | #define GRE_FLAG_A 0x80 | ||
20 | |||
21 | #define GRE_IS_C(f) ((f)&GRE_FLAG_C) | ||
22 | #define GRE_IS_R(f) ((f)&GRE_FLAG_R) | ||
23 | #define GRE_IS_K(f) ((f)&GRE_FLAG_K) | ||
24 | #define GRE_IS_S(f) ((f)&GRE_FLAG_S) | ||
25 | #define GRE_IS_A(f) ((f)&GRE_FLAG_A) | ||
26 | |||
27 | /* GRE is a mess: Four different standards */ | ||
28 | struct gre_hdr { | ||
29 | #if defined(__LITTLE_ENDIAN_BITFIELD) | ||
30 | __u16 rec:3, | ||
31 | srr:1, | ||
32 | seq:1, | ||
33 | key:1, | ||
34 | routing:1, | ||
35 | csum:1, | ||
36 | version:3, | ||
37 | reserved:4, | ||
38 | ack:1; | ||
39 | #elif defined(__BIG_ENDIAN_BITFIELD) | ||
40 | __u16 csum:1, | ||
41 | routing:1, | ||
42 | key:1, | ||
43 | seq:1, | ||
44 | srr:1, | ||
45 | rec:3, | ||
46 | ack:1, | ||
47 | reserved:4, | ||
48 | version:3; | ||
49 | #else | ||
50 | #error "Adjust your <asm/byteorder.h> defines" | ||
51 | #endif | ||
52 | __be16 protocol; | ||
53 | }; | ||
54 | |||
55 | /* modified GRE header for PPTP */ | ||
56 | struct gre_hdr_pptp { | ||
57 | __u8 flags; /* bitfield */ | ||
58 | __u8 version; /* should be GRE_VERSION_PPTP */ | ||
59 | __be16 protocol; /* should be GRE_PROTOCOL_PPTP */ | ||
60 | __be16 payload_len; /* size of ppp payload, not inc. gre header */ | ||
61 | __be16 call_id; /* peer's call_id for this session */ | ||
62 | __be32 seq; /* sequence number. Present if S==1 */ | ||
63 | __be32 ack; /* seq number of highest packet recieved by */ | ||
64 | /* sender in this session */ | ||
65 | }; | ||
66 | |||
67 | struct nf_ct_gre { | ||
68 | unsigned int stream_timeout; | ||
69 | unsigned int timeout; | ||
70 | }; | ||
71 | |||
72 | #ifdef __KERNEL__ | ||
73 | #include <net/netfilter/nf_conntrack_tuple.h> | ||
74 | |||
75 | struct nf_conn; | ||
76 | |||
77 | /* structure for original <-> reply keymap */ | ||
78 | struct nf_ct_gre_keymap { | ||
79 | struct list_head list; | ||
80 | struct nf_conntrack_tuple tuple; | ||
81 | }; | ||
82 | |||
83 | /* add new tuple->key_reply pair to keymap */ | ||
84 | int nf_ct_gre_keymap_add(struct nf_conn *ct, enum ip_conntrack_dir dir, | ||
85 | struct nf_conntrack_tuple *t); | ||
86 | |||
87 | /* delete keymap entries */ | ||
88 | void nf_ct_gre_keymap_destroy(struct nf_conn *ct); | ||
89 | |||
90 | /* get pointer to gre key, if present */ | ||
91 | static inline __be32 *gre_key(struct gre_hdr *greh) | ||
92 | { | ||
93 | if (!greh->key) | ||
94 | return NULL; | ||
95 | if (greh->csum || greh->routing) | ||
96 | return (__be32 *)(greh+sizeof(*greh)+4); | ||
97 | return (__be32 *)(greh+sizeof(*greh)); | ||
98 | } | ||
99 | |||
100 | /* get pointer ot gre csum, if present */ | ||
101 | static inline __sum16 *gre_csum(struct gre_hdr *greh) | ||
102 | { | ||
103 | if (!greh->csum) | ||
104 | return NULL; | ||
105 | return (__sum16 *)(greh+sizeof(*greh)); | ||
106 | } | ||
107 | |||
108 | extern void nf_ct_gre_keymap_flush(void); | ||
109 | extern void nf_nat_need_gre(void); | ||
110 | |||
111 | #endif /* __KERNEL__ */ | ||
112 | #endif /* _CONNTRACK_PROTO_GRE_H */ | ||
diff --git a/include/linux/netfilter/nf_conntrack_sctp.h b/include/linux/netfilter/nf_conntrack_sctp.h index b8994d9fd1a9..5cf2c115cce4 100644 --- a/include/linux/netfilter/nf_conntrack_sctp.h +++ b/include/linux/netfilter/nf_conntrack_sctp.h | |||
@@ -20,7 +20,7 @@ struct ip_ct_sctp | |||
20 | { | 20 | { |
21 | enum sctp_conntrack state; | 21 | enum sctp_conntrack state; |
22 | 22 | ||
23 | u_int32_t vtag[IP_CT_DIR_MAX]; | 23 | __be32 vtag[IP_CT_DIR_MAX]; |
24 | u_int32_t ttag[IP_CT_DIR_MAX]; | 24 | u_int32_t ttag[IP_CT_DIR_MAX]; |
25 | }; | 25 | }; |
26 | 26 | ||
diff --git a/include/linux/netfilter/nf_conntrack_sip.h b/include/linux/netfilter/nf_conntrack_sip.h new file mode 100644 index 000000000000..bb7f2041db74 --- /dev/null +++ b/include/linux/netfilter/nf_conntrack_sip.h | |||
@@ -0,0 +1,41 @@ | |||
1 | #ifndef __NF_CONNTRACK_SIP_H__ | ||
2 | #define __NF_CONNTRACK_SIP_H__ | ||
3 | #ifdef __KERNEL__ | ||
4 | |||
5 | #define SIP_PORT 5060 | ||
6 | #define SIP_TIMEOUT 3600 | ||
7 | |||
8 | enum sip_header_pos { | ||
9 | POS_REG_REQ_URI, | ||
10 | POS_REQ_URI, | ||
11 | POS_FROM, | ||
12 | POS_TO, | ||
13 | POS_VIA, | ||
14 | POS_CONTACT, | ||
15 | POS_CONTENT, | ||
16 | POS_MEDIA, | ||
17 | POS_OWNER_IP4, | ||
18 | POS_CONNECTION_IP4, | ||
19 | POS_OWNER_IP6, | ||
20 | POS_CONNECTION_IP6, | ||
21 | POS_SDP_HEADER, | ||
22 | }; | ||
23 | |||
24 | extern unsigned int (*nf_nat_sip_hook)(struct sk_buff **pskb, | ||
25 | enum ip_conntrack_info ctinfo, | ||
26 | struct nf_conn *ct, | ||
27 | const char **dptr); | ||
28 | extern unsigned int (*nf_nat_sdp_hook)(struct sk_buff **pskb, | ||
29 | enum ip_conntrack_info ctinfo, | ||
30 | struct nf_conntrack_expect *exp, | ||
31 | const char *dptr); | ||
32 | |||
33 | extern int ct_sip_get_info(struct nf_conn *ct, const char *dptr, size_t dlen, | ||
34 | unsigned int *matchoff, unsigned int *matchlen, | ||
35 | enum sip_header_pos pos); | ||
36 | extern int ct_sip_lnlen(const char *line, const char *limit); | ||
37 | extern const char *ct_sip_search(const char *needle, const char *haystack, | ||
38 | size_t needle_len, size_t haystack_len, | ||
39 | int case_sensitive); | ||
40 | #endif /* __KERNEL__ */ | ||
41 | #endif /* __NF_CONNTRACK_SIP_H__ */ | ||
diff --git a/include/linux/netfilter/nf_conntrack_tftp.h b/include/linux/netfilter/nf_conntrack_tftp.h new file mode 100644 index 000000000000..0d79b7ae051f --- /dev/null +++ b/include/linux/netfilter/nf_conntrack_tftp.h | |||
@@ -0,0 +1,20 @@ | |||
1 | #ifndef _NF_CONNTRACK_TFTP_H | ||
2 | #define _NF_CONNTRACK_TFTP_H | ||
3 | |||
4 | #define TFTP_PORT 69 | ||
5 | |||
6 | struct tftphdr { | ||
7 | __be16 opcode; | ||
8 | }; | ||
9 | |||
10 | #define TFTP_OPCODE_READ 1 | ||
11 | #define TFTP_OPCODE_WRITE 2 | ||
12 | #define TFTP_OPCODE_DATA 3 | ||
13 | #define TFTP_OPCODE_ACK 4 | ||
14 | #define TFTP_OPCODE_ERROR 5 | ||
15 | |||
16 | extern unsigned int (*nf_nat_tftp_hook)(struct sk_buff **pskb, | ||
17 | enum ip_conntrack_info ctinfo, | ||
18 | struct nf_conntrack_expect *exp); | ||
19 | |||
20 | #endif /* _NF_CONNTRACK_TFTP_H */ | ||
diff --git a/include/linux/netfilter/nfnetlink.h b/include/linux/netfilter/nfnetlink.h index 6d8e3e5a80e9..1e9c821f152d 100644 --- a/include/linux/netfilter/nfnetlink.h +++ b/include/linux/netfilter/nfnetlink.h | |||
@@ -78,7 +78,7 @@ struct nfattr | |||
78 | struct nfgenmsg { | 78 | struct nfgenmsg { |
79 | u_int8_t nfgen_family; /* AF_xxx */ | 79 | u_int8_t nfgen_family; /* AF_xxx */ |
80 | u_int8_t version; /* nfnetlink version */ | 80 | u_int8_t version; /* nfnetlink version */ |
81 | u_int16_t res_id; /* resource id */ | 81 | __be16 res_id; /* resource id */ |
82 | }; | 82 | }; |
83 | 83 | ||
84 | #define NFNETLINK_V0 0 | 84 | #define NFNETLINK_V0 0 |
diff --git a/include/linux/netfilter/nfnetlink_log.h b/include/linux/netfilter/nfnetlink_log.h index 87b92f8b988f..5966afa026e9 100644 --- a/include/linux/netfilter/nfnetlink_log.h +++ b/include/linux/netfilter/nfnetlink_log.h | |||
@@ -16,24 +16,22 @@ enum nfulnl_msg_types { | |||
16 | }; | 16 | }; |
17 | 17 | ||
18 | struct nfulnl_msg_packet_hdr { | 18 | struct nfulnl_msg_packet_hdr { |
19 | u_int16_t hw_protocol; /* hw protocol (network order) */ | 19 | __be16 hw_protocol; /* hw protocol (network order) */ |
20 | u_int8_t hook; /* netfilter hook */ | 20 | u_int8_t hook; /* netfilter hook */ |
21 | u_int8_t _pad; | 21 | u_int8_t _pad; |
22 | }; | 22 | }; |
23 | 23 | ||
24 | struct nfulnl_msg_packet_hw { | 24 | struct nfulnl_msg_packet_hw { |
25 | u_int16_t hw_addrlen; | 25 | __be16 hw_addrlen; |
26 | u_int16_t _pad; | 26 | u_int16_t _pad; |
27 | u_int8_t hw_addr[8]; | 27 | u_int8_t hw_addr[8]; |
28 | }; | 28 | }; |
29 | 29 | ||
30 | struct nfulnl_msg_packet_timestamp { | 30 | struct nfulnl_msg_packet_timestamp { |
31 | aligned_u64 sec; | 31 | aligned_be64 sec; |
32 | aligned_u64 usec; | 32 | aligned_be64 usec; |
33 | }; | 33 | }; |
34 | 34 | ||
35 | #define NFULNL_PREFIXLEN 30 /* just like old log target */ | ||
36 | |||
37 | enum nfulnl_attr_type { | 35 | enum nfulnl_attr_type { |
38 | NFULA_UNSPEC, | 36 | NFULA_UNSPEC, |
39 | NFULA_PACKET_HDR, | 37 | NFULA_PACKET_HDR, |
@@ -67,7 +65,7 @@ struct nfulnl_msg_config_cmd { | |||
67 | } __attribute__ ((packed)); | 65 | } __attribute__ ((packed)); |
68 | 66 | ||
69 | struct nfulnl_msg_config_mode { | 67 | struct nfulnl_msg_config_mode { |
70 | u_int32_t copy_range; | 68 | __be32 copy_range; |
71 | u_int8_t copy_mode; | 69 | u_int8_t copy_mode; |
72 | u_int8_t _pad; | 70 | u_int8_t _pad; |
73 | } __attribute__ ((packed)); | 71 | } __attribute__ ((packed)); |
diff --git a/include/linux/netfilter/nfnetlink_queue.h b/include/linux/netfilter/nfnetlink_queue.h index 36af0360b56d..83e789633e35 100644 --- a/include/linux/netfilter/nfnetlink_queue.h +++ b/include/linux/netfilter/nfnetlink_queue.h | |||
@@ -13,20 +13,20 @@ enum nfqnl_msg_types { | |||
13 | }; | 13 | }; |
14 | 14 | ||
15 | struct nfqnl_msg_packet_hdr { | 15 | struct nfqnl_msg_packet_hdr { |
16 | u_int32_t packet_id; /* unique ID of packet in queue */ | 16 | __be32 packet_id; /* unique ID of packet in queue */ |
17 | u_int16_t hw_protocol; /* hw protocol (network order) */ | 17 | __be16 hw_protocol; /* hw protocol (network order) */ |
18 | u_int8_t hook; /* netfilter hook */ | 18 | u_int8_t hook; /* netfilter hook */ |
19 | } __attribute__ ((packed)); | 19 | } __attribute__ ((packed)); |
20 | 20 | ||
21 | struct nfqnl_msg_packet_hw { | 21 | struct nfqnl_msg_packet_hw { |
22 | u_int16_t hw_addrlen; | 22 | __be16 hw_addrlen; |
23 | u_int16_t _pad; | 23 | u_int16_t _pad; |
24 | u_int8_t hw_addr[8]; | 24 | u_int8_t hw_addr[8]; |
25 | }; | 25 | }; |
26 | 26 | ||
27 | struct nfqnl_msg_packet_timestamp { | 27 | struct nfqnl_msg_packet_timestamp { |
28 | aligned_u64 sec; | 28 | aligned_be64 sec; |
29 | aligned_u64 usec; | 29 | aligned_be64 usec; |
30 | }; | 30 | }; |
31 | 31 | ||
32 | enum nfqnl_attr_type { | 32 | enum nfqnl_attr_type { |
@@ -47,8 +47,8 @@ enum nfqnl_attr_type { | |||
47 | #define NFQA_MAX (__NFQA_MAX - 1) | 47 | #define NFQA_MAX (__NFQA_MAX - 1) |
48 | 48 | ||
49 | struct nfqnl_msg_verdict_hdr { | 49 | struct nfqnl_msg_verdict_hdr { |
50 | u_int32_t verdict; | 50 | __be32 verdict; |
51 | u_int32_t id; | 51 | __be32 id; |
52 | }; | 52 | }; |
53 | 53 | ||
54 | 54 | ||
@@ -63,7 +63,7 @@ enum nfqnl_msg_config_cmds { | |||
63 | struct nfqnl_msg_config_cmd { | 63 | struct nfqnl_msg_config_cmd { |
64 | u_int8_t command; /* nfqnl_msg_config_cmds */ | 64 | u_int8_t command; /* nfqnl_msg_config_cmds */ |
65 | u_int8_t _pad; | 65 | u_int8_t _pad; |
66 | u_int16_t pf; /* AF_xxx for PF_[UN]BIND */ | 66 | __be16 pf; /* AF_xxx for PF_[UN]BIND */ |
67 | }; | 67 | }; |
68 | 68 | ||
69 | enum nfqnl_config_mode { | 69 | enum nfqnl_config_mode { |
@@ -73,7 +73,7 @@ enum nfqnl_config_mode { | |||
73 | }; | 73 | }; |
74 | 74 | ||
75 | struct nfqnl_msg_config_params { | 75 | struct nfqnl_msg_config_params { |
76 | u_int32_t copy_range; | 76 | __be32 copy_range; |
77 | u_int8_t copy_mode; /* enum nfqnl_config_mode */ | 77 | u_int8_t copy_mode; /* enum nfqnl_config_mode */ |
78 | } __attribute__ ((packed)); | 78 | } __attribute__ ((packed)); |
79 | 79 | ||
@@ -82,6 +82,7 @@ enum nfqnl_attr_config { | |||
82 | NFQA_CFG_UNSPEC, | 82 | NFQA_CFG_UNSPEC, |
83 | NFQA_CFG_CMD, /* nfqnl_msg_config_cmd */ | 83 | NFQA_CFG_CMD, /* nfqnl_msg_config_cmd */ |
84 | NFQA_CFG_PARAMS, /* nfqnl_msg_config_params */ | 84 | NFQA_CFG_PARAMS, /* nfqnl_msg_config_params */ |
85 | NFQA_CFG_QUEUE_MAXLEN, /* u_int32_t */ | ||
85 | __NFQA_CFG_MAX | 86 | __NFQA_CFG_MAX |
86 | }; | 87 | }; |
87 | #define NFQA_CFG_MAX (__NFQA_CFG_MAX-1) | 88 | #define NFQA_CFG_MAX (__NFQA_CFG_MAX-1) |
diff --git a/include/linux/netfilter/xt_NFLOG.h b/include/linux/netfilter/xt_NFLOG.h new file mode 100644 index 000000000000..cdcd0ed58f7a --- /dev/null +++ b/include/linux/netfilter/xt_NFLOG.h | |||
@@ -0,0 +1,18 @@ | |||
1 | #ifndef _XT_NFLOG_TARGET | ||
2 | #define _XT_NFLOG_TARGET | ||
3 | |||
4 | #define XT_NFLOG_DEFAULT_GROUP 0x1 | ||
5 | #define XT_NFLOG_DEFAULT_THRESHOLD 1 | ||
6 | |||
7 | #define XT_NFLOG_MASK 0x0 | ||
8 | |||
9 | struct xt_nflog_info { | ||
10 | u_int32_t len; | ||
11 | u_int16_t group; | ||
12 | u_int16_t threshold; | ||
13 | u_int16_t flags; | ||
14 | u_int16_t pad; | ||
15 | char prefix[64]; | ||
16 | }; | ||
17 | |||
18 | #endif /* _XT_NFLOG_TARGET */ | ||
diff --git a/include/linux/netfilter/xt_conntrack.h b/include/linux/netfilter/xt_conntrack.h index 4c2d9945ca54..70b6f718cf4c 100644 --- a/include/linux/netfilter/xt_conntrack.h +++ b/include/linux/netfilter/xt_conntrack.h | |||
@@ -29,14 +29,14 @@ | |||
29 | struct ip_conntrack_old_tuple | 29 | struct ip_conntrack_old_tuple |
30 | { | 30 | { |
31 | struct { | 31 | struct { |
32 | __u32 ip; | 32 | __be32 ip; |
33 | union { | 33 | union { |
34 | __u16 all; | 34 | __u16 all; |
35 | } u; | 35 | } u; |
36 | } src; | 36 | } src; |
37 | 37 | ||
38 | struct { | 38 | struct { |
39 | __u32 ip; | 39 | __be32 ip; |
40 | union { | 40 | union { |
41 | __u16 all; | 41 | __u16 all; |
42 | } u; | 42 | } u; |
diff --git a/include/linux/netfilter/xt_hashlimit.h b/include/linux/netfilter/xt_hashlimit.h new file mode 100644 index 000000000000..b4556b8edbfd --- /dev/null +++ b/include/linux/netfilter/xt_hashlimit.h | |||
@@ -0,0 +1,40 @@ | |||
1 | #ifndef _XT_HASHLIMIT_H | ||
2 | #define _XT_HASHLIMIT_H | ||
3 | |||
4 | /* timings are in milliseconds. */ | ||
5 | #define XT_HASHLIMIT_SCALE 10000 | ||
6 | /* 1/10,000 sec period => max of 10,000/sec. Min rate is then 429490 | ||
7 | seconds, or one every 59 hours. */ | ||
8 | |||
9 | /* details of this structure hidden by the implementation */ | ||
10 | struct xt_hashlimit_htable; | ||
11 | |||
12 | #define XT_HASHLIMIT_HASH_DIP 0x0001 | ||
13 | #define XT_HASHLIMIT_HASH_DPT 0x0002 | ||
14 | #define XT_HASHLIMIT_HASH_SIP 0x0004 | ||
15 | #define XT_HASHLIMIT_HASH_SPT 0x0008 | ||
16 | |||
17 | struct hashlimit_cfg { | ||
18 | u_int32_t mode; /* bitmask of IPT_HASHLIMIT_HASH_* */ | ||
19 | u_int32_t avg; /* Average secs between packets * scale */ | ||
20 | u_int32_t burst; /* Period multiplier for upper limit. */ | ||
21 | |||
22 | /* user specified */ | ||
23 | u_int32_t size; /* how many buckets */ | ||
24 | u_int32_t max; /* max number of entries */ | ||
25 | u_int32_t gc_interval; /* gc interval */ | ||
26 | u_int32_t expire; /* when do entries expire? */ | ||
27 | }; | ||
28 | |||
29 | struct xt_hashlimit_info { | ||
30 | char name [IFNAMSIZ]; /* name */ | ||
31 | struct hashlimit_cfg cfg; | ||
32 | struct xt_hashlimit_htable *hinfo; | ||
33 | |||
34 | /* Used internally by the kernel */ | ||
35 | union { | ||
36 | void *ptr; | ||
37 | struct xt_hashlimit_info *master; | ||
38 | } u; | ||
39 | }; | ||
40 | #endif /*_XT_HASHLIMIT_H*/ | ||
diff --git a/include/linux/netfilter/xt_policy.h b/include/linux/netfilter/xt_policy.h index a8132ec076fb..45654d359a68 100644 --- a/include/linux/netfilter/xt_policy.h +++ b/include/linux/netfilter/xt_policy.h | |||
@@ -39,7 +39,7 @@ struct xt_policy_elem | |||
39 | union xt_policy_addr smask; | 39 | union xt_policy_addr smask; |
40 | union xt_policy_addr daddr; | 40 | union xt_policy_addr daddr; |
41 | union xt_policy_addr dmask; | 41 | union xt_policy_addr dmask; |
42 | u_int32_t spi; | 42 | __be32 spi; |
43 | u_int32_t reqid; | 43 | u_int32_t reqid; |
44 | u_int8_t proto; | 44 | u_int8_t proto; |
45 | u_int8_t mode; | 45 | u_int8_t mode; |
diff --git a/include/linux/netfilter_bridge.h b/include/linux/netfilter_bridge.h index 9a4dd11af86e..6c4613f8ad75 100644 --- a/include/linux/netfilter_bridge.h +++ b/include/linux/netfilter_bridge.h | |||
@@ -64,7 +64,7 @@ static inline int nf_bridge_pad(const struct sk_buff *skb) | |||
64 | 64 | ||
65 | struct bridge_skb_cb { | 65 | struct bridge_skb_cb { |
66 | union { | 66 | union { |
67 | __u32 ipv4; | 67 | __be32 ipv4; |
68 | } daddr; | 68 | } daddr; |
69 | }; | 69 | }; |
70 | 70 | ||
diff --git a/include/linux/netfilter_bridge/ebt_802_3.h b/include/linux/netfilter_bridge/ebt_802_3.h index b9f712c14a0a..07f044ff1a6b 100644 --- a/include/linux/netfilter_bridge/ebt_802_3.h +++ b/include/linux/netfilter_bridge/ebt_802_3.h | |||
@@ -28,21 +28,21 @@ struct hdr_ui { | |||
28 | uint8_t ssap; | 28 | uint8_t ssap; |
29 | uint8_t ctrl; | 29 | uint8_t ctrl; |
30 | uint8_t orig[3]; | 30 | uint8_t orig[3]; |
31 | uint16_t type; | 31 | __be16 type; |
32 | }; | 32 | }; |
33 | 33 | ||
34 | struct hdr_ni { | 34 | struct hdr_ni { |
35 | uint8_t dsap; | 35 | uint8_t dsap; |
36 | uint8_t ssap; | 36 | uint8_t ssap; |
37 | uint16_t ctrl; | 37 | __be16 ctrl; |
38 | uint8_t orig[3]; | 38 | uint8_t orig[3]; |
39 | uint16_t type; | 39 | __be16 type; |
40 | }; | 40 | }; |
41 | 41 | ||
42 | struct ebt_802_3_hdr { | 42 | struct ebt_802_3_hdr { |
43 | uint8_t daddr[6]; | 43 | uint8_t daddr[6]; |
44 | uint8_t saddr[6]; | 44 | uint8_t saddr[6]; |
45 | uint16_t len; | 45 | __be16 len; |
46 | union { | 46 | union { |
47 | struct hdr_ui ui; | 47 | struct hdr_ui ui; |
48 | struct hdr_ni ni; | 48 | struct hdr_ni ni; |
@@ -61,7 +61,7 @@ static inline struct ebt_802_3_hdr *ebt_802_3_hdr(const struct sk_buff *skb) | |||
61 | struct ebt_802_3_info | 61 | struct ebt_802_3_info |
62 | { | 62 | { |
63 | uint8_t sap; | 63 | uint8_t sap; |
64 | uint16_t type; | 64 | __be16 type; |
65 | uint8_t bitmask; | 65 | uint8_t bitmask; |
66 | uint8_t invflags; | 66 | uint8_t invflags; |
67 | }; | 67 | }; |
diff --git a/include/linux/netfilter_bridge/ebt_among.h b/include/linux/netfilter_bridge/ebt_among.h index 307c1fed8511..7654069233ca 100644 --- a/include/linux/netfilter_bridge/ebt_among.h +++ b/include/linux/netfilter_bridge/ebt_among.h | |||
@@ -32,7 +32,7 @@ | |||
32 | struct ebt_mac_wormhash_tuple | 32 | struct ebt_mac_wormhash_tuple |
33 | { | 33 | { |
34 | uint32_t cmp[2]; | 34 | uint32_t cmp[2]; |
35 | uint32_t ip; | 35 | __be32 ip; |
36 | }; | 36 | }; |
37 | 37 | ||
38 | struct ebt_mac_wormhash | 38 | struct ebt_mac_wormhash |
diff --git a/include/linux/netfilter_bridge/ebt_arp.h b/include/linux/netfilter_bridge/ebt_arp.h index 537ec6b487a2..97e4dbde1f89 100644 --- a/include/linux/netfilter_bridge/ebt_arp.h +++ b/include/linux/netfilter_bridge/ebt_arp.h | |||
@@ -14,13 +14,13 @@ | |||
14 | 14 | ||
15 | struct ebt_arp_info | 15 | struct ebt_arp_info |
16 | { | 16 | { |
17 | uint16_t htype; | 17 | __be16 htype; |
18 | uint16_t ptype; | 18 | __be16 ptype; |
19 | uint16_t opcode; | 19 | __be16 opcode; |
20 | uint32_t saddr; | 20 | __be32 saddr; |
21 | uint32_t smsk; | 21 | __be32 smsk; |
22 | uint32_t daddr; | 22 | __be32 daddr; |
23 | uint32_t dmsk; | 23 | __be32 dmsk; |
24 | unsigned char smaddr[ETH_ALEN]; | 24 | unsigned char smaddr[ETH_ALEN]; |
25 | unsigned char smmsk[ETH_ALEN]; | 25 | unsigned char smmsk[ETH_ALEN]; |
26 | unsigned char dmaddr[ETH_ALEN]; | 26 | unsigned char dmaddr[ETH_ALEN]; |
diff --git a/include/linux/netfilter_bridge/ebt_ip.h b/include/linux/netfilter_bridge/ebt_ip.h index 7247385cdcb1..d6847475bf2e 100644 --- a/include/linux/netfilter_bridge/ebt_ip.h +++ b/include/linux/netfilter_bridge/ebt_ip.h | |||
@@ -28,10 +28,10 @@ | |||
28 | /* the same values are used for the invflags */ | 28 | /* the same values are used for the invflags */ |
29 | struct ebt_ip_info | 29 | struct ebt_ip_info |
30 | { | 30 | { |
31 | uint32_t saddr; | 31 | __be32 saddr; |
32 | uint32_t daddr; | 32 | __be32 daddr; |
33 | uint32_t smsk; | 33 | __be32 smsk; |
34 | uint32_t dmsk; | 34 | __be32 dmsk; |
35 | uint8_t tos; | 35 | uint8_t tos; |
36 | uint8_t protocol; | 36 | uint8_t protocol; |
37 | uint8_t bitmask; | 37 | uint8_t bitmask; |
diff --git a/include/linux/netfilter_bridge/ebt_nat.h b/include/linux/netfilter_bridge/ebt_nat.h index 26fd90da4cd6..435b886a51aa 100644 --- a/include/linux/netfilter_bridge/ebt_nat.h +++ b/include/linux/netfilter_bridge/ebt_nat.h | |||
@@ -1,6 +1,7 @@ | |||
1 | #ifndef __LINUX_BRIDGE_EBT_NAT_H | 1 | #ifndef __LINUX_BRIDGE_EBT_NAT_H |
2 | #define __LINUX_BRIDGE_EBT_NAT_H | 2 | #define __LINUX_BRIDGE_EBT_NAT_H |
3 | 3 | ||
4 | #define NAT_ARP_BIT (0x00000010) | ||
4 | struct ebt_nat_info | 5 | struct ebt_nat_info |
5 | { | 6 | { |
6 | unsigned char mac[ETH_ALEN]; | 7 | unsigned char mac[ETH_ALEN]; |
diff --git a/include/linux/netfilter_bridge/ebt_vlan.h b/include/linux/netfilter_bridge/ebt_vlan.h index cb1fcc41565f..1d98be4031e7 100644 --- a/include/linux/netfilter_bridge/ebt_vlan.h +++ b/include/linux/netfilter_bridge/ebt_vlan.h | |||
@@ -10,7 +10,7 @@ | |||
10 | struct ebt_vlan_info { | 10 | struct ebt_vlan_info { |
11 | uint16_t id; /* VLAN ID {1-4095} */ | 11 | uint16_t id; /* VLAN ID {1-4095} */ |
12 | uint8_t prio; /* VLAN User Priority {0-7} */ | 12 | uint8_t prio; /* VLAN User Priority {0-7} */ |
13 | uint16_t encap; /* VLAN Encapsulated frame code {0-65535} */ | 13 | __be16 encap; /* VLAN Encapsulated frame code {0-65535} */ |
14 | uint8_t bitmask; /* Args bitmask bit 1=1 - ID arg, | 14 | uint8_t bitmask; /* Args bitmask bit 1=1 - ID arg, |
15 | bit 2=1 User-Priority arg, bit 3=1 encap*/ | 15 | bit 2=1 User-Priority arg, bit 3=1 encap*/ |
16 | uint8_t invflags; /* Inverse bitmask bit 1=1 - inversed ID arg, | 16 | uint8_t invflags; /* Inverse bitmask bit 1=1 - inversed ID arg, |
diff --git a/include/linux/netfilter_bridge/ebtables.h b/include/linux/netfilter_bridge/ebtables.h index b1a7cc90877b..94e0a7dc0cb2 100644 --- a/include/linux/netfilter_bridge/ebtables.h +++ b/include/linux/netfilter_bridge/ebtables.h | |||
@@ -26,6 +26,10 @@ | |||
26 | #define EBT_CONTINUE -3 | 26 | #define EBT_CONTINUE -3 |
27 | #define EBT_RETURN -4 | 27 | #define EBT_RETURN -4 |
28 | #define NUM_STANDARD_TARGETS 4 | 28 | #define NUM_STANDARD_TARGETS 4 |
29 | /* ebtables target modules store the verdict inside an int. We can | ||
30 | * reclaim a part of this int for backwards compatible extensions. | ||
31 | * The 4 lsb are more than enough to store the verdict. */ | ||
32 | #define EBT_VERDICT_BITS 0x0000000F | ||
29 | 33 | ||
30 | struct ebt_counter | 34 | struct ebt_counter |
31 | { | 35 | { |
@@ -42,6 +46,23 @@ struct ebt_replace | |||
42 | /* total size of the entries */ | 46 | /* total size of the entries */ |
43 | unsigned int entries_size; | 47 | unsigned int entries_size; |
44 | /* start of the chains */ | 48 | /* start of the chains */ |
49 | struct ebt_entries __user *hook_entry[NF_BR_NUMHOOKS]; | ||
50 | /* nr of counters userspace expects back */ | ||
51 | unsigned int num_counters; | ||
52 | /* where the kernel will put the old counters */ | ||
53 | struct ebt_counter __user *counters; | ||
54 | char __user *entries; | ||
55 | }; | ||
56 | |||
57 | struct ebt_replace_kernel | ||
58 | { | ||
59 | char name[EBT_TABLE_MAXNAMELEN]; | ||
60 | unsigned int valid_hooks; | ||
61 | /* nr of rules in the table */ | ||
62 | unsigned int nentries; | ||
63 | /* total size of the entries */ | ||
64 | unsigned int entries_size; | ||
65 | /* start of the chains */ | ||
45 | struct ebt_entries *hook_entry[NF_BR_NUMHOOKS]; | 66 | struct ebt_entries *hook_entry[NF_BR_NUMHOOKS]; |
46 | /* nr of counters userspace expects back */ | 67 | /* nr of counters userspace expects back */ |
47 | unsigned int num_counters; | 68 | unsigned int num_counters; |
@@ -141,7 +162,7 @@ struct ebt_entry { | |||
141 | /* this needs to be the first field */ | 162 | /* this needs to be the first field */ |
142 | unsigned int bitmask; | 163 | unsigned int bitmask; |
143 | unsigned int invflags; | 164 | unsigned int invflags; |
144 | uint16_t ethproto; | 165 | __be16 ethproto; |
145 | /* the physical in-dev */ | 166 | /* the physical in-dev */ |
146 | char in[IFNAMSIZ]; | 167 | char in[IFNAMSIZ]; |
147 | /* the logical in-dev */ | 168 | /* the logical in-dev */ |
@@ -251,7 +272,7 @@ struct ebt_table | |||
251 | { | 272 | { |
252 | struct list_head list; | 273 | struct list_head list; |
253 | char name[EBT_TABLE_MAXNAMELEN]; | 274 | char name[EBT_TABLE_MAXNAMELEN]; |
254 | struct ebt_replace *table; | 275 | struct ebt_replace_kernel *table; |
255 | unsigned int valid_hooks; | 276 | unsigned int valid_hooks; |
256 | rwlock_t lock; | 277 | rwlock_t lock; |
257 | /* e.g. could be the table explicitly only allows certain | 278 | /* e.g. could be the table explicitly only allows certain |
diff --git a/include/linux/netfilter_ipv4.h b/include/linux/netfilter_ipv4.h index 5b63a231a76b..5821eb5a0a3e 100644 --- a/include/linux/netfilter_ipv4.h +++ b/include/linux/netfilter_ipv4.h | |||
@@ -79,7 +79,7 @@ enum nf_ip_hook_priorities { | |||
79 | #ifdef __KERNEL__ | 79 | #ifdef __KERNEL__ |
80 | extern int ip_route_me_harder(struct sk_buff **pskb, unsigned addr_type); | 80 | extern int ip_route_me_harder(struct sk_buff **pskb, unsigned addr_type); |
81 | extern int ip_xfrm_me_harder(struct sk_buff **pskb); | 81 | extern int ip_xfrm_me_harder(struct sk_buff **pskb); |
82 | extern unsigned int nf_ip_checksum(struct sk_buff *skb, unsigned int hook, | 82 | extern __sum16 nf_ip_checksum(struct sk_buff *skb, unsigned int hook, |
83 | unsigned int dataoff, u_int8_t protocol); | 83 | unsigned int dataoff, u_int8_t protocol); |
84 | #endif /*__KERNEL__*/ | 84 | #endif /*__KERNEL__*/ |
85 | 85 | ||
diff --git a/include/linux/netfilter_ipv4/Kbuild b/include/linux/netfilter_ipv4/Kbuild index 591c1a809c00..180337801a86 100644 --- a/include/linux/netfilter_ipv4/Kbuild +++ b/include/linux/netfilter_ipv4/Kbuild | |||
@@ -1,6 +1,4 @@ | |||
1 | header-y += ip_conntrack_helper.h | 1 | header-y += ip_conntrack_helper.h |
2 | header-y += ip_conntrack_helper_h323_asn1.h | ||
3 | header-y += ip_conntrack_helper_h323_types.h | ||
4 | header-y += ip_conntrack_protocol.h | 2 | header-y += ip_conntrack_protocol.h |
5 | header-y += ip_conntrack_sctp.h | 3 | header-y += ip_conntrack_sctp.h |
6 | header-y += ip_conntrack_tcp.h | 4 | header-y += ip_conntrack_tcp.h |
diff --git a/include/linux/netfilter_ipv4/ip_conntrack.h b/include/linux/netfilter_ipv4/ip_conntrack.h index 64e868034c4a..61da56941dce 100644 --- a/include/linux/netfilter_ipv4/ip_conntrack.h +++ b/include/linux/netfilter_ipv4/ip_conntrack.h | |||
@@ -277,7 +277,7 @@ extern struct ip_conntrack_expect * | |||
277 | __ip_conntrack_expect_find(const struct ip_conntrack_tuple *tuple); | 277 | __ip_conntrack_expect_find(const struct ip_conntrack_tuple *tuple); |
278 | 278 | ||
279 | extern struct ip_conntrack_expect * | 279 | extern struct ip_conntrack_expect * |
280 | ip_conntrack_expect_find(const struct ip_conntrack_tuple *tuple); | 280 | ip_conntrack_expect_find_get(const struct ip_conntrack_tuple *tuple); |
281 | 281 | ||
282 | extern struct ip_conntrack_tuple_hash * | 282 | extern struct ip_conntrack_tuple_hash * |
283 | __ip_conntrack_find(const struct ip_conntrack_tuple *tuple, | 283 | __ip_conntrack_find(const struct ip_conntrack_tuple *tuple, |
diff --git a/include/linux/netfilter_ipv4/ip_conntrack_ftp.h b/include/linux/netfilter_ipv4/ip_conntrack_ftp.h index 63811934de4d..2129fc3972ac 100644 --- a/include/linux/netfilter_ipv4/ip_conntrack_ftp.h +++ b/include/linux/netfilter_ipv4/ip_conntrack_ftp.h | |||
@@ -1,6 +1,44 @@ | |||
1 | #ifndef _IP_CONNTRACK_FTP_H | 1 | #ifndef _IP_CONNTRACK_FTP_H |
2 | #define _IP_CONNTRACK_FTP_H | 2 | #define _IP_CONNTRACK_FTP_H |
3 | /* FTP tracking. */ | ||
3 | 4 | ||
4 | #include <linux/netfilter/nf_conntrack_ftp.h> | 5 | /* This enum is exposed to userspace */ |
6 | enum ip_ct_ftp_type | ||
7 | { | ||
8 | /* PORT command from client */ | ||
9 | IP_CT_FTP_PORT, | ||
10 | /* PASV response from server */ | ||
11 | IP_CT_FTP_PASV, | ||
12 | /* EPRT command from client */ | ||
13 | IP_CT_FTP_EPRT, | ||
14 | /* EPSV response from server */ | ||
15 | IP_CT_FTP_EPSV, | ||
16 | }; | ||
17 | |||
18 | #ifdef __KERNEL__ | ||
19 | |||
20 | #define FTP_PORT 21 | ||
21 | |||
22 | #define NUM_SEQ_TO_REMEMBER 2 | ||
23 | /* This structure exists only once per master */ | ||
24 | struct ip_ct_ftp_master { | ||
25 | /* Valid seq positions for cmd matching after newline */ | ||
26 | u_int32_t seq_aft_nl[IP_CT_DIR_MAX][NUM_SEQ_TO_REMEMBER]; | ||
27 | /* 0 means seq_match_aft_nl not set */ | ||
28 | int seq_aft_nl_num[IP_CT_DIR_MAX]; | ||
29 | }; | ||
30 | |||
31 | struct ip_conntrack_expect; | ||
32 | |||
33 | /* For NAT to hook in when we find a packet which describes what other | ||
34 | * connection we should expect. */ | ||
35 | extern unsigned int (*ip_nat_ftp_hook)(struct sk_buff **pskb, | ||
36 | enum ip_conntrack_info ctinfo, | ||
37 | enum ip_ct_ftp_type type, | ||
38 | unsigned int matchoff, | ||
39 | unsigned int matchlen, | ||
40 | struct ip_conntrack_expect *exp, | ||
41 | u32 *seq); | ||
42 | #endif /* __KERNEL__ */ | ||
5 | 43 | ||
6 | #endif /* _IP_CONNTRACK_FTP_H */ | 44 | #endif /* _IP_CONNTRACK_FTP_H */ |
diff --git a/include/linux/netfilter_ipv4/ip_conntrack_h323.h b/include/linux/netfilter_ipv4/ip_conntrack_h323.h index 943cc6a4871d..18f769818f4e 100644 --- a/include/linux/netfilter_ipv4/ip_conntrack_h323.h +++ b/include/linux/netfilter_ipv4/ip_conntrack_h323.h | |||
@@ -3,7 +3,7 @@ | |||
3 | 3 | ||
4 | #ifdef __KERNEL__ | 4 | #ifdef __KERNEL__ |
5 | 5 | ||
6 | #include <linux/netfilter_ipv4/ip_conntrack_helper_h323_asn1.h> | 6 | #include <linux/netfilter/nf_conntrack_h323_asn1.h> |
7 | 7 | ||
8 | #define RAS_PORT 1719 | 8 | #define RAS_PORT 1719 |
9 | #define Q931_PORT 1720 | 9 | #define Q931_PORT 1720 |
diff --git a/include/linux/netfilter_ipv4/ip_conntrack_proto_gre.h b/include/linux/netfilter_ipv4/ip_conntrack_proto_gre.h index 1d853aa873eb..e371e0fc1672 100644 --- a/include/linux/netfilter_ipv4/ip_conntrack_proto_gre.h +++ b/include/linux/netfilter_ipv4/ip_conntrack_proto_gre.h | |||
@@ -102,11 +102,11 @@ static inline __be32 *gre_key(struct gre_hdr *greh) | |||
102 | } | 102 | } |
103 | 103 | ||
104 | /* get pointer ot gre csum, if present */ | 104 | /* get pointer ot gre csum, if present */ |
105 | static inline u_int16_t *gre_csum(struct gre_hdr *greh) | 105 | static inline __sum16 *gre_csum(struct gre_hdr *greh) |
106 | { | 106 | { |
107 | if (!greh->csum) | 107 | if (!greh->csum) |
108 | return NULL; | 108 | return NULL; |
109 | return (u_int16_t *) (greh+sizeof(*greh)); | 109 | return (__sum16 *) (greh+sizeof(*greh)); |
110 | } | 110 | } |
111 | 111 | ||
112 | #endif /* __KERNEL__ */ | 112 | #endif /* __KERNEL__ */ |
diff --git a/include/linux/netfilter_ipv4/ip_conntrack_sip.h b/include/linux/netfilter_ipv4/ip_conntrack_sip.h index 913dad66c0fb..bef6c646defa 100644 --- a/include/linux/netfilter_ipv4/ip_conntrack_sip.h +++ b/include/linux/netfilter_ipv4/ip_conntrack_sip.h | |||
@@ -5,23 +5,18 @@ | |||
5 | #define SIP_PORT 5060 | 5 | #define SIP_PORT 5060 |
6 | #define SIP_TIMEOUT 3600 | 6 | #define SIP_TIMEOUT 3600 |
7 | 7 | ||
8 | #define POS_VIA 0 | 8 | enum sip_header_pos { |
9 | #define POS_CONTACT 1 | 9 | POS_REG_REQ_URI, |
10 | #define POS_CONTENT 2 | 10 | POS_REQ_URI, |
11 | #define POS_MEDIA 3 | 11 | POS_FROM, |
12 | #define POS_OWNER 4 | 12 | POS_TO, |
13 | #define POS_CONNECTION 5 | 13 | POS_VIA, |
14 | #define POS_REQ_HEADER 6 | 14 | POS_CONTACT, |
15 | #define POS_SDP_HEADER 7 | 15 | POS_CONTENT, |
16 | 16 | POS_MEDIA, | |
17 | struct sip_header_nfo { | 17 | POS_OWNER, |
18 | const char *lname; | 18 | POS_CONNECTION, |
19 | const char *sname; | 19 | POS_SDP_HEADER, |
20 | const char *ln_str; | ||
21 | size_t lnlen; | ||
22 | size_t snlen; | ||
23 | size_t ln_strlen; | ||
24 | int (*match_len)(const char *, const char *, int *); | ||
25 | }; | 20 | }; |
26 | 21 | ||
27 | extern unsigned int (*ip_nat_sip_hook)(struct sk_buff **pskb, | 22 | extern unsigned int (*ip_nat_sip_hook)(struct sk_buff **pskb, |
@@ -36,9 +31,10 @@ extern unsigned int (*ip_nat_sdp_hook)(struct sk_buff **pskb, | |||
36 | extern int ct_sip_get_info(const char *dptr, size_t dlen, | 31 | extern int ct_sip_get_info(const char *dptr, size_t dlen, |
37 | unsigned int *matchoff, | 32 | unsigned int *matchoff, |
38 | unsigned int *matchlen, | 33 | unsigned int *matchlen, |
39 | struct sip_header_nfo *hnfo); | 34 | enum sip_header_pos pos); |
40 | extern int ct_sip_lnlen(const char *line, const char *limit); | 35 | extern int ct_sip_lnlen(const char *line, const char *limit); |
41 | extern const char *ct_sip_search(const char *needle, const char *haystack, | 36 | extern const char *ct_sip_search(const char *needle, const char *haystack, |
42 | size_t needle_len, size_t haystack_len); | 37 | size_t needle_len, size_t haystack_len, |
38 | int case_sensitive); | ||
43 | #endif /* __KERNEL__ */ | 39 | #endif /* __KERNEL__ */ |
44 | #endif /* __IP_CONNTRACK_SIP_H__ */ | 40 | #endif /* __IP_CONNTRACK_SIP_H__ */ |
diff --git a/include/linux/netfilter_ipv4/ip_conntrack_tftp.h b/include/linux/netfilter_ipv4/ip_conntrack_tftp.h index cde9729aa173..a404fc0abf0e 100644 --- a/include/linux/netfilter_ipv4/ip_conntrack_tftp.h +++ b/include/linux/netfilter_ipv4/ip_conntrack_tftp.h | |||
@@ -4,7 +4,7 @@ | |||
4 | #define TFTP_PORT 69 | 4 | #define TFTP_PORT 69 |
5 | 5 | ||
6 | struct tftphdr { | 6 | struct tftphdr { |
7 | u_int16_t opcode; | 7 | __be16 opcode; |
8 | }; | 8 | }; |
9 | 9 | ||
10 | #define TFTP_OPCODE_READ 1 | 10 | #define TFTP_OPCODE_READ 1 |
diff --git a/include/linux/netfilter_ipv4/ipt_LOG.h b/include/linux/netfilter_ipv4/ipt_LOG.h index 892f9a33fea8..90fa6525ef9c 100644 --- a/include/linux/netfilter_ipv4/ipt_LOG.h +++ b/include/linux/netfilter_ipv4/ipt_LOG.h | |||
@@ -6,7 +6,7 @@ | |||
6 | #define IPT_LOG_TCPOPT 0x02 /* Log TCP options */ | 6 | #define IPT_LOG_TCPOPT 0x02 /* Log TCP options */ |
7 | #define IPT_LOG_IPOPT 0x04 /* Log IP options */ | 7 | #define IPT_LOG_IPOPT 0x04 /* Log IP options */ |
8 | #define IPT_LOG_UID 0x08 /* Log UID owning local socket */ | 8 | #define IPT_LOG_UID 0x08 /* Log UID owning local socket */ |
9 | #define IPT_LOG_NFLOG 0x10 /* Log using nf_log backend */ | 9 | #define IPT_LOG_NFLOG 0x10 /* Unsupported, don't reuse */ |
10 | #define IPT_LOG_MASK 0x1f | 10 | #define IPT_LOG_MASK 0x1f |
11 | 11 | ||
12 | struct ipt_log_info { | 12 | struct ipt_log_info { |
diff --git a/include/linux/netfilter_ipv4/ipt_hashlimit.h b/include/linux/netfilter_ipv4/ipt_hashlimit.h index ac2cb64ecd76..5662120a3d7b 100644 --- a/include/linux/netfilter_ipv4/ipt_hashlimit.h +++ b/include/linux/netfilter_ipv4/ipt_hashlimit.h | |||
@@ -1,40 +1,14 @@ | |||
1 | #ifndef _IPT_HASHLIMIT_H | 1 | #ifndef _IPT_HASHLIMIT_H |
2 | #define _IPT_HASHLIMIT_H | 2 | #define _IPT_HASHLIMIT_H |
3 | 3 | ||
4 | /* timings are in milliseconds. */ | 4 | #include <linux/netfilter/xt_hashlimit.h> |
5 | #define IPT_HASHLIMIT_SCALE 10000 | ||
6 | /* 1/10,000 sec period => max of 10,000/sec. Min rate is then 429490 | ||
7 | seconds, or one every 59 hours. */ | ||
8 | 5 | ||
9 | /* details of this structure hidden by the implementation */ | 6 | #define IPT_HASHLIMIT_SCALE XT_HASHLIMIT_SCALE |
10 | struct ipt_hashlimit_htable; | 7 | #define IPT_HASHLIMIT_HASH_DIP XT_HASHLIMIT_HASH_DIP |
8 | #define IPT_HASHLIMIT_HASH_DPT XT_HASHLIMIT_HASH_DPT | ||
9 | #define IPT_HASHLIMIT_HASH_SIP XT_HASHLIMIT_HASH_SIP | ||
10 | #define IPT_HASHLIMIT_HASH_SPT XT_HASHLIMIT_HASH_SPT | ||
11 | 11 | ||
12 | #define IPT_HASHLIMIT_HASH_DIP 0x0001 | 12 | #define ipt_hashlimit_info xt_hashlimit_info |
13 | #define IPT_HASHLIMIT_HASH_DPT 0x0002 | ||
14 | #define IPT_HASHLIMIT_HASH_SIP 0x0004 | ||
15 | #define IPT_HASHLIMIT_HASH_SPT 0x0008 | ||
16 | 13 | ||
17 | struct hashlimit_cfg { | 14 | #endif /* _IPT_HASHLIMIT_H */ |
18 | u_int32_t mode; /* bitmask of IPT_HASHLIMIT_HASH_* */ | ||
19 | u_int32_t avg; /* Average secs between packets * scale */ | ||
20 | u_int32_t burst; /* Period multiplier for upper limit. */ | ||
21 | |||
22 | /* user specified */ | ||
23 | u_int32_t size; /* how many buckets */ | ||
24 | u_int32_t max; /* max number of entries */ | ||
25 | u_int32_t gc_interval; /* gc interval */ | ||
26 | u_int32_t expire; /* when do entries expire? */ | ||
27 | }; | ||
28 | |||
29 | struct ipt_hashlimit_info { | ||
30 | char name [IFNAMSIZ]; /* name */ | ||
31 | struct hashlimit_cfg cfg; | ||
32 | struct ipt_hashlimit_htable *hinfo; | ||
33 | |||
34 | /* Used internally by the kernel */ | ||
35 | union { | ||
36 | void *ptr; | ||
37 | struct ipt_hashlimit_info *master; | ||
38 | } u; | ||
39 | }; | ||
40 | #endif /*_IPT_HASHLIMIT_H*/ | ||
diff --git a/include/linux/netfilter_ipv6.h b/include/linux/netfilter_ipv6.h index d97e268cdfe5..ab81a6dc94ea 100644 --- a/include/linux/netfilter_ipv6.h +++ b/include/linux/netfilter_ipv6.h | |||
@@ -74,7 +74,7 @@ enum nf_ip6_hook_priorities { | |||
74 | 74 | ||
75 | #ifdef CONFIG_NETFILTER | 75 | #ifdef CONFIG_NETFILTER |
76 | extern int ip6_route_me_harder(struct sk_buff *skb); | 76 | extern int ip6_route_me_harder(struct sk_buff *skb); |
77 | extern unsigned int nf_ip6_checksum(struct sk_buff *skb, unsigned int hook, | 77 | extern __sum16 nf_ip6_checksum(struct sk_buff *skb, unsigned int hook, |
78 | unsigned int dataoff, u_int8_t protocol); | 78 | unsigned int dataoff, u_int8_t protocol); |
79 | 79 | ||
80 | extern int ipv6_netfilter_init(void); | 80 | extern int ipv6_netfilter_init(void); |
diff --git a/include/linux/netfilter_ipv6/ip6t_LOG.h b/include/linux/netfilter_ipv6/ip6t_LOG.h index 060c1a1c6c60..0d0119b0458c 100644 --- a/include/linux/netfilter_ipv6/ip6t_LOG.h +++ b/include/linux/netfilter_ipv6/ip6t_LOG.h | |||
@@ -6,7 +6,7 @@ | |||
6 | #define IP6T_LOG_TCPOPT 0x02 /* Log TCP options */ | 6 | #define IP6T_LOG_TCPOPT 0x02 /* Log TCP options */ |
7 | #define IP6T_LOG_IPOPT 0x04 /* Log IP options */ | 7 | #define IP6T_LOG_IPOPT 0x04 /* Log IP options */ |
8 | #define IP6T_LOG_UID 0x08 /* Log UID owning local socket */ | 8 | #define IP6T_LOG_UID 0x08 /* Log UID owning local socket */ |
9 | #define IP6T_LOG_NFLOG 0x10 /* Log using nf_log backend */ | 9 | #define IP6T_LOG_NFLOG 0x10 /* Unsupported, don't use */ |
10 | #define IP6T_LOG_MASK 0x1f | 10 | #define IP6T_LOG_MASK 0x1f |
11 | 11 | ||
12 | struct ip6t_log_info { | 12 | struct ip6t_log_info { |
diff --git a/include/linux/netlink.h b/include/linux/netlink.h index 66411622e06e..b3b9b609ee89 100644 --- a/include/linux/netlink.h +++ b/include/linux/netlink.h | |||
@@ -141,7 +141,6 @@ struct netlink_skb_parms | |||
141 | { | 141 | { |
142 | struct ucred creds; /* Skb credentials */ | 142 | struct ucred creds; /* Skb credentials */ |
143 | __u32 pid; | 143 | __u32 pid; |
144 | __u32 dst_pid; | ||
145 | __u32 dst_group; | 144 | __u32 dst_group; |
146 | kernel_cap_t eff_cap; | 145 | kernel_cap_t eff_cap; |
147 | __u32 loginuid; /* Login (audit) uid */ | 146 | __u32 loginuid; /* Login (audit) uid */ |
@@ -174,6 +173,7 @@ int netlink_sendskb(struct sock *sk, struct sk_buff *skb, int protocol); | |||
174 | */ | 173 | */ |
175 | #define NLMSG_GOODORDER 0 | 174 | #define NLMSG_GOODORDER 0 |
176 | #define NLMSG_GOODSIZE (SKB_MAX_ORDER(0, NLMSG_GOODORDER)) | 175 | #define NLMSG_GOODSIZE (SKB_MAX_ORDER(0, NLMSG_GOODORDER)) |
176 | #define NLMSG_DEFAULT_SIZE (NLMSG_GOODSIZE - NLMSG_HDRLEN) | ||
177 | 177 | ||
178 | 178 | ||
179 | struct netlink_callback | 179 | struct netlink_callback |
diff --git a/include/linux/netpoll.h b/include/linux/netpoll.h index 1efe60c5c00c..2cc9867b1626 100644 --- a/include/linux/netpoll.h +++ b/include/linux/netpoll.h | |||
@@ -12,26 +12,27 @@ | |||
12 | #include <linux/rcupdate.h> | 12 | #include <linux/rcupdate.h> |
13 | #include <linux/list.h> | 13 | #include <linux/list.h> |
14 | 14 | ||
15 | struct netpoll; | ||
16 | |||
17 | struct netpoll { | 15 | struct netpoll { |
18 | struct net_device *dev; | 16 | struct net_device *dev; |
19 | char dev_name[16], *name; | 17 | char dev_name[IFNAMSIZ]; |
18 | const char *name; | ||
20 | void (*rx_hook)(struct netpoll *, int, char *, int); | 19 | void (*rx_hook)(struct netpoll *, int, char *, int); |
21 | void (*drop)(struct sk_buff *skb); | 20 | |
22 | u32 local_ip, remote_ip; | 21 | u32 local_ip, remote_ip; |
23 | u16 local_port, remote_port; | 22 | u16 local_port, remote_port; |
24 | unsigned char local_mac[6], remote_mac[6]; | 23 | u8 local_mac[ETH_ALEN], remote_mac[ETH_ALEN]; |
25 | }; | 24 | }; |
26 | 25 | ||
27 | struct netpoll_info { | 26 | struct netpoll_info { |
27 | atomic_t refcnt; | ||
28 | spinlock_t poll_lock; | 28 | spinlock_t poll_lock; |
29 | int poll_owner; | 29 | int poll_owner; |
30 | int tries; | ||
31 | int rx_flags; | 30 | int rx_flags; |
32 | spinlock_t rx_lock; | 31 | spinlock_t rx_lock; |
33 | struct netpoll *rx_np; /* netpoll that registered an rx_hook */ | 32 | struct netpoll *rx_np; /* netpoll that registered an rx_hook */ |
34 | struct sk_buff_head arp_tx; /* list of arp requests to reply to */ | 33 | struct sk_buff_head arp_tx; /* list of arp requests to reply to */ |
34 | struct sk_buff_head txq; | ||
35 | struct work_struct tx_work; | ||
35 | }; | 36 | }; |
36 | 37 | ||
37 | void netpoll_poll(struct netpoll *np); | 38 | void netpoll_poll(struct netpoll *np); |
@@ -42,7 +43,7 @@ int netpoll_trap(void); | |||
42 | void netpoll_set_trap(int trap); | 43 | void netpoll_set_trap(int trap); |
43 | void netpoll_cleanup(struct netpoll *np); | 44 | void netpoll_cleanup(struct netpoll *np); |
44 | int __netpoll_rx(struct sk_buff *skb); | 45 | int __netpoll_rx(struct sk_buff *skb); |
45 | void netpoll_queue(struct sk_buff *skb); | 46 | |
46 | 47 | ||
47 | #ifdef CONFIG_NETPOLL | 48 | #ifdef CONFIG_NETPOLL |
48 | static inline int netpoll_rx(struct sk_buff *skb) | 49 | static inline int netpoll_rx(struct sk_buff *skb) |
diff --git a/include/linux/nfs_fs.h b/include/linux/nfs_fs.h index 45228c1a1195..625ffea98561 100644 --- a/include/linux/nfs_fs.h +++ b/include/linux/nfs_fs.h | |||
@@ -318,7 +318,7 @@ extern void put_nfs_open_context(struct nfs_open_context *ctx); | |||
318 | extern struct nfs_open_context *nfs_find_open_context(struct inode *inode, struct rpc_cred *cred, int mode); | 318 | extern struct nfs_open_context *nfs_find_open_context(struct inode *inode, struct rpc_cred *cred, int mode); |
319 | 319 | ||
320 | /* linux/net/ipv4/ipconfig.c: trims ip addr off front of name, too. */ | 320 | /* linux/net/ipv4/ipconfig.c: trims ip addr off front of name, too. */ |
321 | extern u32 root_nfs_parse_addr(char *name); /*__init*/ | 321 | extern __be32 root_nfs_parse_addr(char *name); /*__init*/ |
322 | 322 | ||
323 | static inline void nfs_fattr_init(struct nfs_fattr *fattr) | 323 | static inline void nfs_fattr_init(struct nfs_fattr *fattr) |
324 | { | 324 | { |
diff --git a/include/linux/nsproxy.h b/include/linux/nsproxy.h index f6baecdeecd6..971d1c6dfc4b 100644 --- a/include/linux/nsproxy.h +++ b/include/linux/nsproxy.h | |||
@@ -45,8 +45,10 @@ static inline void exit_task_namespaces(struct task_struct *p) | |||
45 | { | 45 | { |
46 | struct nsproxy *ns = p->nsproxy; | 46 | struct nsproxy *ns = p->nsproxy; |
47 | if (ns) { | 47 | if (ns) { |
48 | put_nsproxy(ns); | 48 | task_lock(p); |
49 | p->nsproxy = NULL; | 49 | p->nsproxy = NULL; |
50 | task_unlock(p); | ||
51 | put_nsproxy(ns); | ||
50 | } | 52 | } |
51 | } | 53 | } |
52 | #endif | 54 | #endif |
diff --git a/include/linux/pci.h b/include/linux/pci.h index 09be0f81b27b..01c707261f9c 100644 --- a/include/linux/pci.h +++ b/include/linux/pci.h | |||
@@ -51,6 +51,7 @@ | |||
51 | #include <linux/list.h> | 51 | #include <linux/list.h> |
52 | #include <linux/compiler.h> | 52 | #include <linux/compiler.h> |
53 | #include <linux/errno.h> | 53 | #include <linux/errno.h> |
54 | #include <asm/atomic.h> | ||
54 | #include <linux/device.h> | 55 | #include <linux/device.h> |
55 | 56 | ||
56 | /* File state for mmap()s on /proc/bus/pci/X/Y */ | 57 | /* File state for mmap()s on /proc/bus/pci/X/Y */ |
@@ -159,7 +160,6 @@ struct pci_dev { | |||
159 | unsigned int transparent:1; /* Transparent PCI bridge */ | 160 | unsigned int transparent:1; /* Transparent PCI bridge */ |
160 | unsigned int multifunction:1;/* Part of multi-function device */ | 161 | unsigned int multifunction:1;/* Part of multi-function device */ |
161 | /* keep track of device state */ | 162 | /* keep track of device state */ |
162 | unsigned int is_enabled:1; /* pci_enable_device has been called */ | ||
163 | unsigned int is_busmaster:1; /* device is busmaster */ | 163 | unsigned int is_busmaster:1; /* device is busmaster */ |
164 | unsigned int no_msi:1; /* device may not use msi */ | 164 | unsigned int no_msi:1; /* device may not use msi */ |
165 | unsigned int no_d1d2:1; /* only allow d0 or d3 */ | 165 | unsigned int no_d1d2:1; /* only allow d0 or d3 */ |
@@ -167,6 +167,7 @@ struct pci_dev { | |||
167 | unsigned int broken_parity_status:1; /* Device generates false positive parity */ | 167 | unsigned int broken_parity_status:1; /* Device generates false positive parity */ |
168 | unsigned int msi_enabled:1; | 168 | unsigned int msi_enabled:1; |
169 | unsigned int msix_enabled:1; | 169 | unsigned int msix_enabled:1; |
170 | atomic_t enable_cnt; /* pci_enable_device has been called */ | ||
170 | 171 | ||
171 | u32 saved_config_space[16]; /* config space saved at suspend time */ | 172 | u32 saved_config_space[16]; /* config space saved at suspend time */ |
172 | struct hlist_head saved_cap_space; | 173 | struct hlist_head saved_cap_space; |
diff --git a/include/linux/pci_ids.h b/include/linux/pci_ids.h index fa4e1d799782..c09da1e30c54 100644 --- a/include/linux/pci_ids.h +++ b/include/linux/pci_ids.h | |||
@@ -1213,6 +1213,10 @@ | |||
1213 | #define PCI_DEVICE_ID_NVIDIA_NVENET_21 0x0451 | 1213 | #define PCI_DEVICE_ID_NVIDIA_NVENET_21 0x0451 |
1214 | #define PCI_DEVICE_ID_NVIDIA_NVENET_22 0x0452 | 1214 | #define PCI_DEVICE_ID_NVIDIA_NVENET_22 0x0452 |
1215 | #define PCI_DEVICE_ID_NVIDIA_NVENET_23 0x0453 | 1215 | #define PCI_DEVICE_ID_NVIDIA_NVENET_23 0x0453 |
1216 | #define PCI_DEVICE_ID_NVIDIA_NVENET_24 0x054C | ||
1217 | #define PCI_DEVICE_ID_NVIDIA_NVENET_25 0x054D | ||
1218 | #define PCI_DEVICE_ID_NVIDIA_NVENET_26 0x054E | ||
1219 | #define PCI_DEVICE_ID_NVIDIA_NVENET_27 0x054F | ||
1216 | #define PCI_DEVICE_ID_NVIDIA_NFORCE_MCP67_IDE 0x0560 | 1220 | #define PCI_DEVICE_ID_NVIDIA_NFORCE_MCP67_IDE 0x0560 |
1217 | 1221 | ||
1218 | #define PCI_VENDOR_ID_IMS 0x10e0 | 1222 | #define PCI_VENDOR_ID_IMS 0x10e0 |
@@ -1893,6 +1897,7 @@ | |||
1893 | #define PCI_VENDOR_ID_BROADCOM 0x14e4 | 1897 | #define PCI_VENDOR_ID_BROADCOM 0x14e4 |
1894 | #define PCI_DEVICE_ID_TIGON3_5752 0x1600 | 1898 | #define PCI_DEVICE_ID_TIGON3_5752 0x1600 |
1895 | #define PCI_DEVICE_ID_TIGON3_5752M 0x1601 | 1899 | #define PCI_DEVICE_ID_TIGON3_5752M 0x1601 |
1900 | #define PCI_DEVICE_ID_NX2_5709 0x1639 | ||
1896 | #define PCI_DEVICE_ID_TIGON3_5700 0x1644 | 1901 | #define PCI_DEVICE_ID_TIGON3_5700 0x1644 |
1897 | #define PCI_DEVICE_ID_TIGON3_5701 0x1645 | 1902 | #define PCI_DEVICE_ID_TIGON3_5701 0x1645 |
1898 | #define PCI_DEVICE_ID_TIGON3_5702 0x1646 | 1903 | #define PCI_DEVICE_ID_TIGON3_5702 0x1646 |
@@ -2211,6 +2216,13 @@ | |||
2211 | #define PCI_DEVICE_ID_INTEL_ICH8_4 0x2815 | 2216 | #define PCI_DEVICE_ID_INTEL_ICH8_4 0x2815 |
2212 | #define PCI_DEVICE_ID_INTEL_ICH8_5 0x283e | 2217 | #define PCI_DEVICE_ID_INTEL_ICH8_5 0x283e |
2213 | #define PCI_DEVICE_ID_INTEL_ICH8_6 0x2850 | 2218 | #define PCI_DEVICE_ID_INTEL_ICH8_6 0x2850 |
2219 | #define PCI_DEVICE_ID_INTEL_ICH9_0 0x2910 | ||
2220 | #define PCI_DEVICE_ID_INTEL_ICH9_1 0x2911 | ||
2221 | #define PCI_DEVICE_ID_INTEL_ICH9_2 0x2912 | ||
2222 | #define PCI_DEVICE_ID_INTEL_ICH9_3 0x2913 | ||
2223 | #define PCI_DEVICE_ID_INTEL_ICH9_4 0x2914 | ||
2224 | #define PCI_DEVICE_ID_INTEL_ICH9_5 0x2915 | ||
2225 | #define PCI_DEVICE_ID_INTEL_ICH9_6 0x2930 | ||
2214 | #define PCI_DEVICE_ID_INTEL_82855PM_HB 0x3340 | 2226 | #define PCI_DEVICE_ID_INTEL_82855PM_HB 0x3340 |
2215 | #define PCI_DEVICE_ID_INTEL_82830_HB 0x3575 | 2227 | #define PCI_DEVICE_ID_INTEL_82830_HB 0x3575 |
2216 | #define PCI_DEVICE_ID_INTEL_82830_CGC 0x3577 | 2228 | #define PCI_DEVICE_ID_INTEL_82830_CGC 0x3577 |
diff --git a/include/linux/pci_regs.h b/include/linux/pci_regs.h index c321316f1bc7..064b1dc71c22 100644 --- a/include/linux/pci_regs.h +++ b/include/linux/pci_regs.h | |||
@@ -292,6 +292,12 @@ | |||
292 | #define PCI_MSI_DATA_64 12 /* 16 bits of data for 64-bit devices */ | 292 | #define PCI_MSI_DATA_64 12 /* 16 bits of data for 64-bit devices */ |
293 | #define PCI_MSI_MASK_BIT 16 /* Mask bits register */ | 293 | #define PCI_MSI_MASK_BIT 16 /* Mask bits register */ |
294 | 294 | ||
295 | /* MSI-X registers (these are at offset PCI_MSI_FLAGS) */ | ||
296 | #define PCI_MSIX_FLAGS_QSIZE 0x7FF | ||
297 | #define PCI_MSIX_FLAGS_ENABLE (1 << 15) | ||
298 | #define PCI_MSIX_FLAGS_BIRMASK (7 << 0) | ||
299 | #define PCI_MSIX_FLAGS_BITMASK (1 << 0) | ||
300 | |||
295 | /* CompactPCI Hotswap Register */ | 301 | /* CompactPCI Hotswap Register */ |
296 | 302 | ||
297 | #define PCI_CHSWP_CSR 2 /* Control and Status Register */ | 303 | #define PCI_CHSWP_CSR 2 /* Control and Status Register */ |
diff --git a/include/linux/pfkeyv2.h b/include/linux/pfkeyv2.h index d5dd471da225..0f0b880c4280 100644 --- a/include/linux/pfkeyv2.h +++ b/include/linux/pfkeyv2.h | |||
@@ -32,7 +32,7 @@ struct sadb_ext { | |||
32 | struct sadb_sa { | 32 | struct sadb_sa { |
33 | uint16_t sadb_sa_len; | 33 | uint16_t sadb_sa_len; |
34 | uint16_t sadb_sa_exttype; | 34 | uint16_t sadb_sa_exttype; |
35 | uint32_t sadb_sa_spi; | 35 | __be32 sadb_sa_spi; |
36 | uint8_t sadb_sa_replay; | 36 | uint8_t sadb_sa_replay; |
37 | uint8_t sadb_sa_state; | 37 | uint8_t sadb_sa_state; |
38 | uint8_t sadb_sa_auth; | 38 | uint8_t sadb_sa_auth; |
@@ -211,7 +211,7 @@ struct sadb_x_nat_t_type { | |||
211 | struct sadb_x_nat_t_port { | 211 | struct sadb_x_nat_t_port { |
212 | uint16_t sadb_x_nat_t_port_len; | 212 | uint16_t sadb_x_nat_t_port_len; |
213 | uint16_t sadb_x_nat_t_port_exttype; | 213 | uint16_t sadb_x_nat_t_port_exttype; |
214 | uint16_t sadb_x_nat_t_port_port; | 214 | __be16 sadb_x_nat_t_port_port; |
215 | uint16_t sadb_x_nat_t_port_reserved; | 215 | uint16_t sadb_x_nat_t_port_reserved; |
216 | } __attribute__((packed)); | 216 | } __attribute__((packed)); |
217 | /* sizeof(struct sadb_x_nat_t_port) == 8 */ | 217 | /* sizeof(struct sadb_x_nat_t_port) == 8 */ |
diff --git a/include/linux/phy.h b/include/linux/phy.h index 9447a57ee8a9..edd4c88ca7d8 100644 --- a/include/linux/phy.h +++ b/include/linux/phy.h | |||
@@ -20,6 +20,10 @@ | |||
20 | 20 | ||
21 | #include <linux/spinlock.h> | 21 | #include <linux/spinlock.h> |
22 | #include <linux/device.h> | 22 | #include <linux/device.h> |
23 | #include <linux/ethtool.h> | ||
24 | #include <linux/mii.h> | ||
25 | #include <linux/timer.h> | ||
26 | #include <linux/workqueue.h> | ||
23 | 27 | ||
24 | #define PHY_BASIC_FEATURES (SUPPORTED_10baseT_Half | \ | 28 | #define PHY_BASIC_FEATURES (SUPPORTED_10baseT_Half | \ |
25 | SUPPORTED_10baseT_Full | \ | 29 | SUPPORTED_10baseT_Full | \ |
@@ -43,15 +47,26 @@ | |||
43 | #define PHY_HAS_INTERRUPT 0x00000001 | 47 | #define PHY_HAS_INTERRUPT 0x00000001 |
44 | #define PHY_HAS_MAGICANEG 0x00000002 | 48 | #define PHY_HAS_MAGICANEG 0x00000002 |
45 | 49 | ||
50 | /* Interface Mode definitions */ | ||
51 | typedef enum { | ||
52 | PHY_INTERFACE_MODE_MII, | ||
53 | PHY_INTERFACE_MODE_GMII, | ||
54 | PHY_INTERFACE_MODE_SGMII, | ||
55 | PHY_INTERFACE_MODE_TBI, | ||
56 | PHY_INTERFACE_MODE_RMII, | ||
57 | PHY_INTERFACE_MODE_RGMII, | ||
58 | PHY_INTERFACE_MODE_RTBI | ||
59 | } phy_interface_t; | ||
60 | |||
46 | #define MII_BUS_MAX 4 | 61 | #define MII_BUS_MAX 4 |
47 | 62 | ||
48 | 63 | ||
49 | #define PHY_INIT_TIMEOUT 100000 | 64 | #define PHY_INIT_TIMEOUT 100000 |
50 | #define PHY_STATE_TIME 1 | 65 | #define PHY_STATE_TIME 1 |
51 | #define PHY_FORCE_TIMEOUT 10 | 66 | #define PHY_FORCE_TIMEOUT 10 |
52 | #define PHY_AN_TIMEOUT 10 | 67 | #define PHY_AN_TIMEOUT 10 |
53 | 68 | ||
54 | #define PHY_MAX_ADDR 32 | 69 | #define PHY_MAX_ADDR 32 |
55 | 70 | ||
56 | /* Used when trying to connect to a specific phy (mii bus id:phy device id) */ | 71 | /* Used when trying to connect to a specific phy (mii bus id:phy device id) */ |
57 | #define PHY_ID_FMT "%x:%02x" | 72 | #define PHY_ID_FMT "%x:%02x" |
@@ -83,8 +98,8 @@ struct mii_bus { | |||
83 | int *irq; | 98 | int *irq; |
84 | }; | 99 | }; |
85 | 100 | ||
86 | #define PHY_INTERRUPT_DISABLED 0x0 | 101 | #define PHY_INTERRUPT_DISABLED 0x0 |
87 | #define PHY_INTERRUPT_ENABLED 0x80000000 | 102 | #define PHY_INTERRUPT_ENABLED 0x80000000 |
88 | 103 | ||
89 | /* PHY state machine states: | 104 | /* PHY state machine states: |
90 | * | 105 | * |
@@ -226,6 +241,8 @@ struct phy_device { | |||
226 | 241 | ||
227 | u32 dev_flags; | 242 | u32 dev_flags; |
228 | 243 | ||
244 | phy_interface_t interface; | ||
245 | |||
229 | /* Bus address of the PHY (0-32) */ | 246 | /* Bus address of the PHY (0-32) */ |
230 | int addr; | 247 | int addr; |
231 | 248 | ||
@@ -341,9 +358,10 @@ struct phy_device* get_phy_device(struct mii_bus *bus, int addr); | |||
341 | int phy_clear_interrupt(struct phy_device *phydev); | 358 | int phy_clear_interrupt(struct phy_device *phydev); |
342 | int phy_config_interrupt(struct phy_device *phydev, u32 interrupts); | 359 | int phy_config_interrupt(struct phy_device *phydev, u32 interrupts); |
343 | struct phy_device * phy_attach(struct net_device *dev, | 360 | struct phy_device * phy_attach(struct net_device *dev, |
344 | const char *phy_id, u32 flags); | 361 | const char *phy_id, u32 flags, phy_interface_t interface); |
345 | struct phy_device * phy_connect(struct net_device *dev, const char *phy_id, | 362 | struct phy_device * phy_connect(struct net_device *dev, const char *phy_id, |
346 | void (*handler)(struct net_device *), u32 flags); | 363 | void (*handler)(struct net_device *), u32 flags, |
364 | phy_interface_t interface); | ||
347 | void phy_disconnect(struct phy_device *phydev); | 365 | void phy_disconnect(struct phy_device *phydev); |
348 | void phy_detach(struct phy_device *phydev); | 366 | void phy_detach(struct phy_device *phydev); |
349 | void phy_start(struct phy_device *phydev); | 367 | void phy_start(struct phy_device *phydev); |
diff --git a/include/linux/platform_device.h b/include/linux/platform_device.h index 29cd6dee13db..20f47b81d3fa 100644 --- a/include/linux/platform_device.h +++ b/include/linux/platform_device.h | |||
@@ -58,6 +58,12 @@ struct platform_driver { | |||
58 | extern int platform_driver_register(struct platform_driver *); | 58 | extern int platform_driver_register(struct platform_driver *); |
59 | extern void platform_driver_unregister(struct platform_driver *); | 59 | extern void platform_driver_unregister(struct platform_driver *); |
60 | 60 | ||
61 | /* non-hotpluggable platform devices may use this so that probe() and | ||
62 | * its support may live in __init sections, conserving runtime memory. | ||
63 | */ | ||
64 | extern int platform_driver_probe(struct platform_driver *driver, | ||
65 | int (*probe)(struct platform_device *)); | ||
66 | |||
61 | #define platform_get_drvdata(_dev) dev_get_drvdata(&(_dev)->dev) | 67 | #define platform_get_drvdata(_dev) dev_get_drvdata(&(_dev)->dev) |
62 | #define platform_set_drvdata(_dev,data) dev_set_drvdata(&(_dev)->dev, (data)) | 68 | #define platform_set_drvdata(_dev,data) dev_set_drvdata(&(_dev)->dev, (data)) |
63 | 69 | ||
diff --git a/include/linux/random.h b/include/linux/random.h index 0248b30e306d..01ad71033d65 100644 --- a/include/linux/random.h +++ b/include/linux/random.h | |||
@@ -51,16 +51,16 @@ extern void add_interrupt_randomness(int irq); | |||
51 | extern void get_random_bytes(void *buf, int nbytes); | 51 | extern void get_random_bytes(void *buf, int nbytes); |
52 | void generate_random_uuid(unsigned char uuid_out[16]); | 52 | void generate_random_uuid(unsigned char uuid_out[16]); |
53 | 53 | ||
54 | extern __u32 secure_ip_id(__u32 daddr); | 54 | extern __u32 secure_ip_id(__be32 daddr); |
55 | extern u32 secure_ipv4_port_ephemeral(__u32 saddr, __u32 daddr, __u16 dport); | 55 | extern u32 secure_ipv4_port_ephemeral(__be32 saddr, __be32 daddr, __be16 dport); |
56 | extern u32 secure_ipv6_port_ephemeral(const __u32 *saddr, const __u32 *daddr, | 56 | extern u32 secure_ipv6_port_ephemeral(const __be32 *saddr, const __be32 *daddr, |
57 | __u16 dport); | 57 | __be16 dport); |
58 | extern __u32 secure_tcp_sequence_number(__u32 saddr, __u32 daddr, | 58 | extern __u32 secure_tcp_sequence_number(__be32 saddr, __be32 daddr, |
59 | __u16 sport, __u16 dport); | 59 | __be16 sport, __be16 dport); |
60 | extern __u32 secure_tcpv6_sequence_number(__u32 *saddr, __u32 *daddr, | 60 | extern __u32 secure_tcpv6_sequence_number(__be32 *saddr, __be32 *daddr, |
61 | __u16 sport, __u16 dport); | 61 | __be16 sport, __be16 dport); |
62 | extern u64 secure_dccp_sequence_number(__u32 saddr, __u32 daddr, | 62 | extern u64 secure_dccp_sequence_number(__be32 saddr, __be32 daddr, |
63 | __u16 sport, __u16 dport); | 63 | __be16 sport, __be16 dport); |
64 | 64 | ||
65 | #ifndef MODULE | 65 | #ifndef MODULE |
66 | extern struct file_operations random_fops, urandom_fops; | 66 | extern struct file_operations random_fops, urandom_fops; |
diff --git a/include/linux/reiserfs_fs_sb.h b/include/linux/reiserfs_fs_sb.h index 6610103f23e1..3a28742d86f9 100644 --- a/include/linux/reiserfs_fs_sb.h +++ b/include/linux/reiserfs_fs_sb.h | |||
@@ -430,7 +430,7 @@ enum reiserfs_mount_options { | |||
430 | /* -o hash={tea, rupasov, r5, detect} is meant for properly mounting | 430 | /* -o hash={tea, rupasov, r5, detect} is meant for properly mounting |
431 | ** reiserfs disks from 3.5.19 or earlier. 99% of the time, this option | 431 | ** reiserfs disks from 3.5.19 or earlier. 99% of the time, this option |
432 | ** is not required. If the normal autodection code can't determine which | 432 | ** is not required. If the normal autodection code can't determine which |
433 | ** hash to use (because both hases had the same value for a file) | 433 | ** hash to use (because both hashes had the same value for a file) |
434 | ** use this option to force a specific hash. It won't allow you to override | 434 | ** use this option to force a specific hash. It won't allow you to override |
435 | ** the existing hash on the FS, so if you have a tea hash disk, and mount | 435 | ** the existing hash on the FS, so if you have a tea hash disk, and mount |
436 | ** with -o hash=rupasov, the mount will fail. | 436 | ** with -o hash=rupasov, the mount will fail. |
diff --git a/include/linux/rtnetlink.h b/include/linux/rtnetlink.h index 3a18addaed4c..493297acdae8 100644 --- a/include/linux/rtnetlink.h +++ b/include/linux/rtnetlink.h | |||
@@ -81,8 +81,6 @@ enum { | |||
81 | 81 | ||
82 | RTM_NEWPREFIX = 52, | 82 | RTM_NEWPREFIX = 52, |
83 | #define RTM_NEWPREFIX RTM_NEWPREFIX | 83 | #define RTM_NEWPREFIX RTM_NEWPREFIX |
84 | RTM_GETPREFIX = 54, | ||
85 | #define RTM_GETPREFIX RTM_GETPREFIX | ||
86 | 84 | ||
87 | RTM_GETMULTICAST = 58, | 85 | RTM_GETMULTICAST = 58, |
88 | #define RTM_GETMULTICAST RTM_GETMULTICAST | 86 | #define RTM_GETMULTICAST RTM_GETMULTICAST |
@@ -587,6 +585,9 @@ extern int rtnl_notify(struct sk_buff *skb, u32 pid, u32 group, | |||
587 | struct nlmsghdr *nlh, gfp_t flags); | 585 | struct nlmsghdr *nlh, gfp_t flags); |
588 | extern void rtnl_set_sk_err(u32 group, int error); | 586 | extern void rtnl_set_sk_err(u32 group, int error); |
589 | extern int rtnetlink_put_metrics(struct sk_buff *skb, u32 *metrics); | 587 | extern int rtnetlink_put_metrics(struct sk_buff *skb, u32 *metrics); |
588 | extern int rtnl_put_cacheinfo(struct sk_buff *skb, struct dst_entry *dst, | ||
589 | u32 id, u32 ts, u32 tsage, long expires, | ||
590 | u32 error); | ||
590 | 591 | ||
591 | extern void __rta_fill(struct sk_buff *skb, int attrtype, int attrlen, const void *data); | 592 | extern void __rta_fill(struct sk_buff *skb, int attrtype, int attrlen, const void *data); |
592 | 593 | ||
diff --git a/include/linux/sctp.h b/include/linux/sctp.h index 6ec66dec29f7..35108fe7a686 100644 --- a/include/linux/sctp.h +++ b/include/linux/sctp.h | |||
@@ -57,17 +57,17 @@ | |||
57 | 57 | ||
58 | /* Section 3.1. SCTP Common Header Format */ | 58 | /* Section 3.1. SCTP Common Header Format */ |
59 | typedef struct sctphdr { | 59 | typedef struct sctphdr { |
60 | __u16 source; | 60 | __be16 source; |
61 | __u16 dest; | 61 | __be16 dest; |
62 | __u32 vtag; | 62 | __be32 vtag; |
63 | __u32 checksum; | 63 | __be32 checksum; |
64 | } __attribute__((packed)) sctp_sctphdr_t; | 64 | } __attribute__((packed)) sctp_sctphdr_t; |
65 | 65 | ||
66 | /* Section 3.2. Chunk Field Descriptions. */ | 66 | /* Section 3.2. Chunk Field Descriptions. */ |
67 | typedef struct sctp_chunkhdr { | 67 | typedef struct sctp_chunkhdr { |
68 | __u8 type; | 68 | __u8 type; |
69 | __u8 flags; | 69 | __u8 flags; |
70 | __u16 length; | 70 | __be16 length; |
71 | } __attribute__((packed)) sctp_chunkhdr_t; | 71 | } __attribute__((packed)) sctp_chunkhdr_t; |
72 | 72 | ||
73 | 73 | ||
@@ -153,8 +153,8 @@ enum { SCTP_CHUNK_FLAG_T = 0x01 }; | |||
153 | */ | 153 | */ |
154 | 154 | ||
155 | typedef struct sctp_paramhdr { | 155 | typedef struct sctp_paramhdr { |
156 | __u16 type; | 156 | __be16 type; |
157 | __u16 length; | 157 | __be16 length; |
158 | } __attribute__((packed)) sctp_paramhdr_t; | 158 | } __attribute__((packed)) sctp_paramhdr_t; |
159 | 159 | ||
160 | typedef enum { | 160 | typedef enum { |
@@ -203,10 +203,10 @@ enum { SCTP_PARAM_ACTION_MASK = __constant_htons(0xc000), }; | |||
203 | /* RFC 2960 Section 3.3.1 Payload Data (DATA) (0) */ | 203 | /* RFC 2960 Section 3.3.1 Payload Data (DATA) (0) */ |
204 | 204 | ||
205 | typedef struct sctp_datahdr { | 205 | typedef struct sctp_datahdr { |
206 | __u32 tsn; | 206 | __be32 tsn; |
207 | __u16 stream; | 207 | __be16 stream; |
208 | __u16 ssn; | 208 | __be16 ssn; |
209 | __u32 ppid; | 209 | __be32 ppid; |
210 | __u8 payload[0]; | 210 | __u8 payload[0]; |
211 | } __attribute__((packed)) sctp_datahdr_t; | 211 | } __attribute__((packed)) sctp_datahdr_t; |
212 | 212 | ||
@@ -232,11 +232,11 @@ enum { SCTP_DATA_FRAG_MASK = 0x03, }; | |||
232 | * endpoints. | 232 | * endpoints. |
233 | */ | 233 | */ |
234 | typedef struct sctp_inithdr { | 234 | typedef struct sctp_inithdr { |
235 | __u32 init_tag; | 235 | __be32 init_tag; |
236 | __u32 a_rwnd; | 236 | __be32 a_rwnd; |
237 | __u16 num_outbound_streams; | 237 | __be16 num_outbound_streams; |
238 | __u16 num_inbound_streams; | 238 | __be16 num_inbound_streams; |
239 | __u32 initial_tsn; | 239 | __be32 initial_tsn; |
240 | __u8 params[0]; | 240 | __u8 params[0]; |
241 | } __attribute__((packed)) sctp_inithdr_t; | 241 | } __attribute__((packed)) sctp_inithdr_t; |
242 | 242 | ||
@@ -261,7 +261,7 @@ typedef struct sctp_ipv6addr_param { | |||
261 | /* Section 3.3.2.1 Cookie Preservative (9) */ | 261 | /* Section 3.3.2.1 Cookie Preservative (9) */ |
262 | typedef struct sctp_cookie_preserve_param { | 262 | typedef struct sctp_cookie_preserve_param { |
263 | sctp_paramhdr_t param_hdr; | 263 | sctp_paramhdr_t param_hdr; |
264 | uint32_t lifespan_increment; | 264 | __be32 lifespan_increment; |
265 | } __attribute__((packed)) sctp_cookie_preserve_param_t; | 265 | } __attribute__((packed)) sctp_cookie_preserve_param_t; |
266 | 266 | ||
267 | /* Section 3.3.2.1 Host Name Address (11) */ | 267 | /* Section 3.3.2.1 Host Name Address (11) */ |
@@ -273,7 +273,7 @@ typedef struct sctp_hostname_param { | |||
273 | /* Section 3.3.2.1 Supported Address Types (12) */ | 273 | /* Section 3.3.2.1 Supported Address Types (12) */ |
274 | typedef struct sctp_supported_addrs_param { | 274 | typedef struct sctp_supported_addrs_param { |
275 | sctp_paramhdr_t param_hdr; | 275 | sctp_paramhdr_t param_hdr; |
276 | uint16_t types[0]; | 276 | __be16 types[0]; |
277 | } __attribute__((packed)) sctp_supported_addrs_param_t; | 277 | } __attribute__((packed)) sctp_supported_addrs_param_t; |
278 | 278 | ||
279 | /* Appendix A. ECN Capable (32768) */ | 279 | /* Appendix A. ECN Capable (32768) */ |
@@ -284,7 +284,7 @@ typedef struct sctp_ecn_capable_param { | |||
284 | /* ADDIP Section 3.2.6 Adaption Layer Indication */ | 284 | /* ADDIP Section 3.2.6 Adaption Layer Indication */ |
285 | typedef struct sctp_adaption_ind_param { | 285 | typedef struct sctp_adaption_ind_param { |
286 | struct sctp_paramhdr param_hdr; | 286 | struct sctp_paramhdr param_hdr; |
287 | __u32 adaption_ind; | 287 | __be32 adaption_ind; |
288 | } __attribute__((packed)) sctp_adaption_ind_param_t; | 288 | } __attribute__((packed)) sctp_adaption_ind_param_t; |
289 | 289 | ||
290 | /* RFC 2960. Section 3.3.3 Initiation Acknowledgement (INIT ACK) (2): | 290 | /* RFC 2960. Section 3.3.3 Initiation Acknowledgement (INIT ACK) (2): |
@@ -316,11 +316,11 @@ typedef struct sctp_unrecognized_param { | |||
316 | */ | 316 | */ |
317 | 317 | ||
318 | typedef struct sctp_gap_ack_block { | 318 | typedef struct sctp_gap_ack_block { |
319 | __u16 start; | 319 | __be16 start; |
320 | __u16 end; | 320 | __be16 end; |
321 | } __attribute__((packed)) sctp_gap_ack_block_t; | 321 | } __attribute__((packed)) sctp_gap_ack_block_t; |
322 | 322 | ||
323 | typedef uint32_t sctp_dup_tsn_t; | 323 | typedef __be32 sctp_dup_tsn_t; |
324 | 324 | ||
325 | typedef union { | 325 | typedef union { |
326 | sctp_gap_ack_block_t gab; | 326 | sctp_gap_ack_block_t gab; |
@@ -328,10 +328,10 @@ typedef union { | |||
328 | } sctp_sack_variable_t; | 328 | } sctp_sack_variable_t; |
329 | 329 | ||
330 | typedef struct sctp_sackhdr { | 330 | typedef struct sctp_sackhdr { |
331 | __u32 cum_tsn_ack; | 331 | __be32 cum_tsn_ack; |
332 | __u32 a_rwnd; | 332 | __be32 a_rwnd; |
333 | __u16 num_gap_ack_blocks; | 333 | __be16 num_gap_ack_blocks; |
334 | __u16 num_dup_tsns; | 334 | __be16 num_dup_tsns; |
335 | sctp_sack_variable_t variable[0]; | 335 | sctp_sack_variable_t variable[0]; |
336 | } __attribute__((packed)) sctp_sackhdr_t; | 336 | } __attribute__((packed)) sctp_sackhdr_t; |
337 | 337 | ||
@@ -371,7 +371,7 @@ typedef struct sctp_abort_chunk { | |||
371 | * and the highest consecutive acking value. | 371 | * and the highest consecutive acking value. |
372 | */ | 372 | */ |
373 | typedef struct sctp_shutdownhdr { | 373 | typedef struct sctp_shutdownhdr { |
374 | __u32 cum_tsn_ack; | 374 | __be32 cum_tsn_ack; |
375 | } __attribute__((packed)) sctp_shutdownhdr_t; | 375 | } __attribute__((packed)) sctp_shutdownhdr_t; |
376 | 376 | ||
377 | struct sctp_shutdown_chunk_t { | 377 | struct sctp_shutdown_chunk_t { |
@@ -382,8 +382,8 @@ struct sctp_shutdown_chunk_t { | |||
382 | /* RFC 2960. Section 3.3.10 Operation Error (ERROR) (9) */ | 382 | /* RFC 2960. Section 3.3.10 Operation Error (ERROR) (9) */ |
383 | 383 | ||
384 | typedef struct sctp_errhdr { | 384 | typedef struct sctp_errhdr { |
385 | __u16 cause; | 385 | __be16 cause; |
386 | __u16 length; | 386 | __be16 length; |
387 | __u8 variable[0]; | 387 | __u8 variable[0]; |
388 | } __attribute__((packed)) sctp_errhdr_t; | 388 | } __attribute__((packed)) sctp_errhdr_t; |
389 | 389 | ||
@@ -462,7 +462,7 @@ typedef enum { | |||
462 | * Explicit Congestion Notification Echo (ECNE) (12) | 462 | * Explicit Congestion Notification Echo (ECNE) (12) |
463 | */ | 463 | */ |
464 | typedef struct sctp_ecnehdr { | 464 | typedef struct sctp_ecnehdr { |
465 | __u32 lowest_tsn; | 465 | __be32 lowest_tsn; |
466 | } sctp_ecnehdr_t; | 466 | } sctp_ecnehdr_t; |
467 | 467 | ||
468 | typedef struct sctp_ecne_chunk { | 468 | typedef struct sctp_ecne_chunk { |
@@ -474,7 +474,7 @@ typedef struct sctp_ecne_chunk { | |||
474 | * Congestion Window Reduced (CWR) (13) | 474 | * Congestion Window Reduced (CWR) (13) |
475 | */ | 475 | */ |
476 | typedef struct sctp_cwrhdr { | 476 | typedef struct sctp_cwrhdr { |
477 | __u32 lowest_tsn; | 477 | __be32 lowest_tsn; |
478 | } sctp_cwrhdr_t; | 478 | } sctp_cwrhdr_t; |
479 | 479 | ||
480 | typedef struct sctp_cwr_chunk { | 480 | typedef struct sctp_cwr_chunk { |
@@ -529,12 +529,12 @@ typedef struct sctp_cwr_chunk { | |||
529 | * chunks this field MUST be filled in. | 529 | * chunks this field MUST be filled in. |
530 | */ | 530 | */ |
531 | struct sctp_fwdtsn_skip { | 531 | struct sctp_fwdtsn_skip { |
532 | __u16 stream; | 532 | __be16 stream; |
533 | __u16 ssn; | 533 | __be16 ssn; |
534 | } __attribute__((packed)); | 534 | } __attribute__((packed)); |
535 | 535 | ||
536 | struct sctp_fwdtsn_hdr { | 536 | struct sctp_fwdtsn_hdr { |
537 | __u32 new_cum_tsn; | 537 | __be32 new_cum_tsn; |
538 | struct sctp_fwdtsn_skip skip[0]; | 538 | struct sctp_fwdtsn_skip skip[0]; |
539 | } __attribute((packed)); | 539 | } __attribute((packed)); |
540 | 540 | ||
@@ -578,11 +578,11 @@ struct sctp_fwdtsn_chunk { | |||
578 | */ | 578 | */ |
579 | typedef struct sctp_addip_param { | 579 | typedef struct sctp_addip_param { |
580 | sctp_paramhdr_t param_hdr; | 580 | sctp_paramhdr_t param_hdr; |
581 | __u32 crr_id; | 581 | __be32 crr_id; |
582 | } __attribute__((packed)) sctp_addip_param_t; | 582 | } __attribute__((packed)) sctp_addip_param_t; |
583 | 583 | ||
584 | typedef struct sctp_addiphdr { | 584 | typedef struct sctp_addiphdr { |
585 | __u32 serial; | 585 | __be32 serial; |
586 | __u8 params[0]; | 586 | __u8 params[0]; |
587 | } __attribute__((packed)) sctp_addiphdr_t; | 587 | } __attribute__((packed)) sctp_addiphdr_t; |
588 | 588 | ||
diff --git a/include/linux/security.h b/include/linux/security.h index b200b9856f32..83cdefae9931 100644 --- a/include/linux/security.h +++ b/include/linux/security.h | |||
@@ -826,6 +826,8 @@ struct request_sock; | |||
826 | * Sets the openreq's sid to socket's sid with MLS portion taken from peer sid. | 826 | * Sets the openreq's sid to socket's sid with MLS portion taken from peer sid. |
827 | * @inet_csk_clone: | 827 | * @inet_csk_clone: |
828 | * Sets the new child socket's sid to the openreq sid. | 828 | * Sets the new child socket's sid to the openreq sid. |
829 | * @inet_conn_established: | ||
830 | * Sets the connection's peersid to the secmark on skb. | ||
829 | * @req_classify_flow: | 831 | * @req_classify_flow: |
830 | * Sets the flow's sid to the openreq sid. | 832 | * Sets the flow's sid to the openreq sid. |
831 | * | 833 | * |
@@ -836,10 +838,8 @@ struct request_sock; | |||
836 | * used by the XFRM system. | 838 | * used by the XFRM system. |
837 | * @sec_ctx contains the security context information being provided by | 839 | * @sec_ctx contains the security context information being provided by |
838 | * the user-level policy update program (e.g., setkey). | 840 | * the user-level policy update program (e.g., setkey). |
839 | * @sk refers to the sock from which to derive the security context. | ||
840 | * Allocate a security structure to the xp->security field; the security | 841 | * Allocate a security structure to the xp->security field; the security |
841 | * field is initialized to NULL when the xfrm_policy is allocated. Only | 842 | * field is initialized to NULL when the xfrm_policy is allocated. |
842 | * one of sec_ctx or sock can be specified. | ||
843 | * Return 0 if operation was successful (memory to allocate, legal context) | 843 | * Return 0 if operation was successful (memory to allocate, legal context) |
844 | * @xfrm_policy_clone_security: | 844 | * @xfrm_policy_clone_security: |
845 | * @old contains an existing xfrm_policy in the SPD. | 845 | * @old contains an existing xfrm_policy in the SPD. |
@@ -858,9 +858,6 @@ struct request_sock; | |||
858 | * Database by the XFRM system. | 858 | * Database by the XFRM system. |
859 | * @sec_ctx contains the security context information being provided by | 859 | * @sec_ctx contains the security context information being provided by |
860 | * the user-level SA generation program (e.g., setkey or racoon). | 860 | * the user-level SA generation program (e.g., setkey or racoon). |
861 | * @polsec contains the security context information associated with a xfrm | ||
862 | * policy rule from which to take the base context. polsec must be NULL | ||
863 | * when sec_ctx is specified. | ||
864 | * @secid contains the secid from which to take the mls portion of the context. | 861 | * @secid contains the secid from which to take the mls portion of the context. |
865 | * Allocate a security structure to the x->security field; the security | 862 | * Allocate a security structure to the x->security field; the security |
866 | * field is initialized to NULL when the xfrm_state is allocated. Set the | 863 | * field is initialized to NULL when the xfrm_state is allocated. Set the |
@@ -889,11 +886,6 @@ struct request_sock; | |||
889 | * @xp contains the policy to check for a match. | 886 | * @xp contains the policy to check for a match. |
890 | * @fl contains the flow to check for a match. | 887 | * @fl contains the flow to check for a match. |
891 | * Return 1 if there is a match. | 888 | * Return 1 if there is a match. |
892 | * @xfrm_flow_state_match: | ||
893 | * @fl contains the flow key to match. | ||
894 | * @xfrm points to the xfrm_state to match. | ||
895 | * @xp points to the xfrm_policy to match. | ||
896 | * Return 1 if there is a match. | ||
897 | * @xfrm_decode_session: | 889 | * @xfrm_decode_session: |
898 | * @skb points to skb to decode. | 890 | * @skb points to skb to decode. |
899 | * @secid points to the flow key secid to set. | 891 | * @secid points to the flow key secid to set. |
@@ -1373,25 +1365,24 @@ struct security_operations { | |||
1373 | int (*inet_conn_request)(struct sock *sk, struct sk_buff *skb, | 1365 | int (*inet_conn_request)(struct sock *sk, struct sk_buff *skb, |
1374 | struct request_sock *req); | 1366 | struct request_sock *req); |
1375 | void (*inet_csk_clone)(struct sock *newsk, const struct request_sock *req); | 1367 | void (*inet_csk_clone)(struct sock *newsk, const struct request_sock *req); |
1368 | void (*inet_conn_established)(struct sock *sk, struct sk_buff *skb); | ||
1376 | void (*req_classify_flow)(const struct request_sock *req, struct flowi *fl); | 1369 | void (*req_classify_flow)(const struct request_sock *req, struct flowi *fl); |
1377 | #endif /* CONFIG_SECURITY_NETWORK */ | 1370 | #endif /* CONFIG_SECURITY_NETWORK */ |
1378 | 1371 | ||
1379 | #ifdef CONFIG_SECURITY_NETWORK_XFRM | 1372 | #ifdef CONFIG_SECURITY_NETWORK_XFRM |
1380 | int (*xfrm_policy_alloc_security) (struct xfrm_policy *xp, | 1373 | int (*xfrm_policy_alloc_security) (struct xfrm_policy *xp, |
1381 | struct xfrm_user_sec_ctx *sec_ctx, struct sock *sk); | 1374 | struct xfrm_user_sec_ctx *sec_ctx); |
1382 | int (*xfrm_policy_clone_security) (struct xfrm_policy *old, struct xfrm_policy *new); | 1375 | int (*xfrm_policy_clone_security) (struct xfrm_policy *old, struct xfrm_policy *new); |
1383 | void (*xfrm_policy_free_security) (struct xfrm_policy *xp); | 1376 | void (*xfrm_policy_free_security) (struct xfrm_policy *xp); |
1384 | int (*xfrm_policy_delete_security) (struct xfrm_policy *xp); | 1377 | int (*xfrm_policy_delete_security) (struct xfrm_policy *xp); |
1385 | int (*xfrm_state_alloc_security) (struct xfrm_state *x, | 1378 | int (*xfrm_state_alloc_security) (struct xfrm_state *x, |
1386 | struct xfrm_user_sec_ctx *sec_ctx, struct xfrm_sec_ctx *polsec, | 1379 | struct xfrm_user_sec_ctx *sec_ctx, |
1387 | u32 secid); | 1380 | u32 secid); |
1388 | void (*xfrm_state_free_security) (struct xfrm_state *x); | 1381 | void (*xfrm_state_free_security) (struct xfrm_state *x); |
1389 | int (*xfrm_state_delete_security) (struct xfrm_state *x); | 1382 | int (*xfrm_state_delete_security) (struct xfrm_state *x); |
1390 | int (*xfrm_policy_lookup)(struct xfrm_policy *xp, u32 fl_secid, u8 dir); | 1383 | int (*xfrm_policy_lookup)(struct xfrm_policy *xp, u32 fl_secid, u8 dir); |
1391 | int (*xfrm_state_pol_flow_match)(struct xfrm_state *x, | 1384 | int (*xfrm_state_pol_flow_match)(struct xfrm_state *x, |
1392 | struct xfrm_policy *xp, struct flowi *fl); | 1385 | struct xfrm_policy *xp, struct flowi *fl); |
1393 | int (*xfrm_flow_state_match)(struct flowi *fl, struct xfrm_state *xfrm, | ||
1394 | struct xfrm_policy *xp); | ||
1395 | int (*xfrm_decode_session)(struct sk_buff *skb, u32 *secid, int ckall); | 1386 | int (*xfrm_decode_session)(struct sk_buff *skb, u32 *secid, int ckall); |
1396 | #endif /* CONFIG_SECURITY_NETWORK_XFRM */ | 1387 | #endif /* CONFIG_SECURITY_NETWORK_XFRM */ |
1397 | 1388 | ||
@@ -2966,9 +2957,15 @@ static inline void security_inet_csk_clone(struct sock *newsk, | |||
2966 | { | 2957 | { |
2967 | security_ops->inet_csk_clone(newsk, req); | 2958 | security_ops->inet_csk_clone(newsk, req); |
2968 | } | 2959 | } |
2960 | |||
2961 | static inline void security_inet_conn_established(struct sock *sk, | ||
2962 | struct sk_buff *skb) | ||
2963 | { | ||
2964 | security_ops->inet_conn_established(sk, skb); | ||
2965 | } | ||
2969 | #else /* CONFIG_SECURITY_NETWORK */ | 2966 | #else /* CONFIG_SECURITY_NETWORK */ |
2970 | static inline int security_unix_stream_connect(struct socket * sock, | 2967 | static inline int security_unix_stream_connect(struct socket * sock, |
2971 | struct socket * other, | 2968 | struct socket * other, |
2972 | struct sock * newsk) | 2969 | struct sock * newsk) |
2973 | { | 2970 | { |
2974 | return 0; | 2971 | return 0; |
@@ -3115,12 +3112,17 @@ static inline void security_inet_csk_clone(struct sock *newsk, | |||
3115 | const struct request_sock *req) | 3112 | const struct request_sock *req) |
3116 | { | 3113 | { |
3117 | } | 3114 | } |
3115 | |||
3116 | static inline void security_inet_conn_established(struct sock *sk, | ||
3117 | struct sk_buff *skb) | ||
3118 | { | ||
3119 | } | ||
3118 | #endif /* CONFIG_SECURITY_NETWORK */ | 3120 | #endif /* CONFIG_SECURITY_NETWORK */ |
3119 | 3121 | ||
3120 | #ifdef CONFIG_SECURITY_NETWORK_XFRM | 3122 | #ifdef CONFIG_SECURITY_NETWORK_XFRM |
3121 | static inline int security_xfrm_policy_alloc(struct xfrm_policy *xp, struct xfrm_user_sec_ctx *sec_ctx) | 3123 | static inline int security_xfrm_policy_alloc(struct xfrm_policy *xp, struct xfrm_user_sec_ctx *sec_ctx) |
3122 | { | 3124 | { |
3123 | return security_ops->xfrm_policy_alloc_security(xp, sec_ctx, NULL); | 3125 | return security_ops->xfrm_policy_alloc_security(xp, sec_ctx); |
3124 | } | 3126 | } |
3125 | 3127 | ||
3126 | static inline int security_xfrm_policy_clone(struct xfrm_policy *old, struct xfrm_policy *new) | 3128 | static inline int security_xfrm_policy_clone(struct xfrm_policy *old, struct xfrm_policy *new) |
@@ -3141,7 +3143,7 @@ static inline int security_xfrm_policy_delete(struct xfrm_policy *xp) | |||
3141 | static inline int security_xfrm_state_alloc(struct xfrm_state *x, | 3143 | static inline int security_xfrm_state_alloc(struct xfrm_state *x, |
3142 | struct xfrm_user_sec_ctx *sec_ctx) | 3144 | struct xfrm_user_sec_ctx *sec_ctx) |
3143 | { | 3145 | { |
3144 | return security_ops->xfrm_state_alloc_security(x, sec_ctx, NULL, 0); | 3146 | return security_ops->xfrm_state_alloc_security(x, sec_ctx, 0); |
3145 | } | 3147 | } |
3146 | 3148 | ||
3147 | static inline int security_xfrm_state_alloc_acquire(struct xfrm_state *x, | 3149 | static inline int security_xfrm_state_alloc_acquire(struct xfrm_state *x, |
@@ -3149,7 +3151,11 @@ static inline int security_xfrm_state_alloc_acquire(struct xfrm_state *x, | |||
3149 | { | 3151 | { |
3150 | if (!polsec) | 3152 | if (!polsec) |
3151 | return 0; | 3153 | return 0; |
3152 | return security_ops->xfrm_state_alloc_security(x, NULL, polsec, secid); | 3154 | /* |
3155 | * We want the context to be taken from secid which is usually | ||
3156 | * from the sock. | ||
3157 | */ | ||
3158 | return security_ops->xfrm_state_alloc_security(x, NULL, secid); | ||
3153 | } | 3159 | } |
3154 | 3160 | ||
3155 | static inline int security_xfrm_state_delete(struct xfrm_state *x) | 3161 | static inline int security_xfrm_state_delete(struct xfrm_state *x) |
@@ -3173,12 +3179,6 @@ static inline int security_xfrm_state_pol_flow_match(struct xfrm_state *x, | |||
3173 | return security_ops->xfrm_state_pol_flow_match(x, xp, fl); | 3179 | return security_ops->xfrm_state_pol_flow_match(x, xp, fl); |
3174 | } | 3180 | } |
3175 | 3181 | ||
3176 | static inline int security_xfrm_flow_state_match(struct flowi *fl, | ||
3177 | struct xfrm_state *xfrm, struct xfrm_policy *xp) | ||
3178 | { | ||
3179 | return security_ops->xfrm_flow_state_match(fl, xfrm, xp); | ||
3180 | } | ||
3181 | |||
3182 | static inline int security_xfrm_decode_session(struct sk_buff *skb, u32 *secid) | 3182 | static inline int security_xfrm_decode_session(struct sk_buff *skb, u32 *secid) |
3183 | { | 3183 | { |
3184 | return security_ops->xfrm_decode_session(skb, secid, 1); | 3184 | return security_ops->xfrm_decode_session(skb, secid, 1); |
@@ -3242,12 +3242,6 @@ static inline int security_xfrm_state_pol_flow_match(struct xfrm_state *x, | |||
3242 | return 1; | 3242 | return 1; |
3243 | } | 3243 | } |
3244 | 3244 | ||
3245 | static inline int security_xfrm_flow_state_match(struct flowi *fl, | ||
3246 | struct xfrm_state *xfrm, struct xfrm_policy *xp) | ||
3247 | { | ||
3248 | return 1; | ||
3249 | } | ||
3250 | |||
3251 | static inline int security_xfrm_decode_session(struct sk_buff *skb, u32 *secid) | 3245 | static inline int security_xfrm_decode_session(struct sk_buff *skb, u32 *secid) |
3252 | { | 3246 | { |
3253 | return 0; | 3247 | return 0; |
diff --git a/include/linux/skbuff.h b/include/linux/skbuff.h index 85577a4ffa61..14ec16d2d9ba 100644 --- a/include/linux/skbuff.h +++ b/include/linux/skbuff.h | |||
@@ -139,7 +139,7 @@ struct skb_shared_info { | |||
139 | /* Warning: this field is not always filled in (UFO)! */ | 139 | /* Warning: this field is not always filled in (UFO)! */ |
140 | unsigned short gso_segs; | 140 | unsigned short gso_segs; |
141 | unsigned short gso_type; | 141 | unsigned short gso_type; |
142 | unsigned int ip6_frag_id; | 142 | __be32 ip6_frag_id; |
143 | struct sk_buff *frag_list; | 143 | struct sk_buff *frag_list; |
144 | skb_frag_t frags[MAX_SKB_FRAGS]; | 144 | skb_frag_t frags[MAX_SKB_FRAGS]; |
145 | }; | 145 | }; |
@@ -216,7 +216,7 @@ enum { | |||
216 | * @tail: Tail pointer | 216 | * @tail: Tail pointer |
217 | * @end: End pointer | 217 | * @end: End pointer |
218 | * @destructor: Destruct function | 218 | * @destructor: Destruct function |
219 | * @nfmark: Can be used for communication between hooks | 219 | * @mark: Generic packet mark |
220 | * @nfct: Associated connection, if any | 220 | * @nfct: Associated connection, if any |
221 | * @ipvs_property: skbuff is owned by ipvs | 221 | * @ipvs_property: skbuff is owned by ipvs |
222 | * @nfctinfo: Relationship of this skb to the connection | 222 | * @nfctinfo: Relationship of this skb to the connection |
@@ -273,8 +273,11 @@ struct sk_buff { | |||
273 | 273 | ||
274 | unsigned int len, | 274 | unsigned int len, |
275 | data_len, | 275 | data_len, |
276 | mac_len, | 276 | mac_len; |
277 | csum; | 277 | union { |
278 | __wsum csum; | ||
279 | __u32 csum_offset; | ||
280 | }; | ||
278 | __u32 priority; | 281 | __u32 priority; |
279 | __u8 local_df:1, | 282 | __u8 local_df:1, |
280 | cloned:1, | 283 | cloned:1, |
@@ -295,7 +298,6 @@ struct sk_buff { | |||
295 | #ifdef CONFIG_BRIDGE_NETFILTER | 298 | #ifdef CONFIG_BRIDGE_NETFILTER |
296 | struct nf_bridge_info *nf_bridge; | 299 | struct nf_bridge_info *nf_bridge; |
297 | #endif | 300 | #endif |
298 | __u32 nfmark; | ||
299 | #endif /* CONFIG_NETFILTER */ | 301 | #endif /* CONFIG_NETFILTER */ |
300 | #ifdef CONFIG_NET_SCHED | 302 | #ifdef CONFIG_NET_SCHED |
301 | __u16 tc_index; /* traffic control index */ | 303 | __u16 tc_index; /* traffic control index */ |
@@ -310,6 +312,7 @@ struct sk_buff { | |||
310 | __u32 secmark; | 312 | __u32 secmark; |
311 | #endif | 313 | #endif |
312 | 314 | ||
315 | __u32 mark; | ||
313 | 316 | ||
314 | /* These elements must be at the end, see alloc_skb() for details. */ | 317 | /* These elements must be at the end, see alloc_skb() for details. */ |
315 | unsigned int truesize; | 318 | unsigned int truesize; |
@@ -1199,8 +1202,7 @@ static inline int skb_add_data(struct sk_buff *skb, | |||
1199 | 1202 | ||
1200 | if (skb->ip_summed == CHECKSUM_NONE) { | 1203 | if (skb->ip_summed == CHECKSUM_NONE) { |
1201 | int err = 0; | 1204 | int err = 0; |
1202 | unsigned int csum = csum_and_copy_from_user(from, | 1205 | __wsum csum = csum_and_copy_from_user(from, skb_put(skb, copy), |
1203 | skb_put(skb, copy), | ||
1204 | copy, 0, &err); | 1206 | copy, 0, &err); |
1205 | if (!err) { | 1207 | if (!err) { |
1206 | skb->csum = csum_block_add(skb->csum, csum, off); | 1208 | skb->csum = csum_block_add(skb->csum, csum, off); |
@@ -1335,15 +1337,15 @@ extern int skb_copy_and_csum_datagram_iovec(struct sk_buff *skb, | |||
1335 | extern void skb_free_datagram(struct sock *sk, struct sk_buff *skb); | 1337 | extern void skb_free_datagram(struct sock *sk, struct sk_buff *skb); |
1336 | extern void skb_kill_datagram(struct sock *sk, struct sk_buff *skb, | 1338 | extern void skb_kill_datagram(struct sock *sk, struct sk_buff *skb, |
1337 | unsigned int flags); | 1339 | unsigned int flags); |
1338 | extern unsigned int skb_checksum(const struct sk_buff *skb, int offset, | 1340 | extern __wsum skb_checksum(const struct sk_buff *skb, int offset, |
1339 | int len, unsigned int csum); | 1341 | int len, __wsum csum); |
1340 | extern int skb_copy_bits(const struct sk_buff *skb, int offset, | 1342 | extern int skb_copy_bits(const struct sk_buff *skb, int offset, |
1341 | void *to, int len); | 1343 | void *to, int len); |
1342 | extern int skb_store_bits(const struct sk_buff *skb, int offset, | 1344 | extern int skb_store_bits(const struct sk_buff *skb, int offset, |
1343 | void *from, int len); | 1345 | void *from, int len); |
1344 | extern unsigned int skb_copy_and_csum_bits(const struct sk_buff *skb, | 1346 | extern __wsum skb_copy_and_csum_bits(const struct sk_buff *skb, |
1345 | int offset, u8 *to, int len, | 1347 | int offset, u8 *to, int len, |
1346 | unsigned int csum); | 1348 | __wsum csum); |
1347 | extern void skb_copy_and_csum_dev(const struct sk_buff *skb, u8 *to); | 1349 | extern void skb_copy_and_csum_dev(const struct sk_buff *skb, u8 *to); |
1348 | extern void skb_split(struct sk_buff *skb, | 1350 | extern void skb_split(struct sk_buff *skb, |
1349 | struct sk_buff *skb1, const u32 len); | 1351 | struct sk_buff *skb1, const u32 len); |
@@ -1399,7 +1401,7 @@ static inline void skb_set_timestamp(struct sk_buff *skb, const struct timeval * | |||
1399 | 1401 | ||
1400 | extern void __net_timestamp(struct sk_buff *skb); | 1402 | extern void __net_timestamp(struct sk_buff *skb); |
1401 | 1403 | ||
1402 | extern unsigned int __skb_checksum_complete(struct sk_buff *skb); | 1404 | extern __sum16 __skb_checksum_complete(struct sk_buff *skb); |
1403 | 1405 | ||
1404 | /** | 1406 | /** |
1405 | * skb_checksum_complete - Calculate checksum of an entire packet | 1407 | * skb_checksum_complete - Calculate checksum of an entire packet |
diff --git a/include/linux/socket.h b/include/linux/socket.h index 361409094649..92cd38efad7f 100644 --- a/include/linux/socket.h +++ b/include/linux/socket.h | |||
@@ -264,6 +264,7 @@ struct ucred { | |||
264 | #define SOL_IPV6 41 | 264 | #define SOL_IPV6 41 |
265 | #define SOL_ICMPV6 58 | 265 | #define SOL_ICMPV6 58 |
266 | #define SOL_SCTP 132 | 266 | #define SOL_SCTP 132 |
267 | #define SOL_UDPLITE 136 /* UDP-Lite (RFC 3828) */ | ||
267 | #define SOL_RAW 255 | 268 | #define SOL_RAW 255 |
268 | #define SOL_IPX 256 | 269 | #define SOL_IPX 256 |
269 | #define SOL_AX25 257 | 270 | #define SOL_AX25 257 |
@@ -292,7 +293,7 @@ extern int memcpy_fromiovecend(unsigned char *kdata, struct iovec *iov, | |||
292 | extern int csum_partial_copy_fromiovecend(unsigned char *kdata, | 293 | extern int csum_partial_copy_fromiovecend(unsigned char *kdata, |
293 | struct iovec *iov, | 294 | struct iovec *iov, |
294 | int offset, | 295 | int offset, |
295 | unsigned int len, int *csump); | 296 | unsigned int len, __wsum *csump); |
296 | 297 | ||
297 | extern int verify_iovec(struct msghdr *m, struct iovec *iov, char *address, int mode); | 298 | extern int verify_iovec(struct msghdr *m, struct iovec *iov, char *address, int mode); |
298 | extern int memcpy_toiovec(struct iovec *v, unsigned char *kdata, int len); | 299 | extern int memcpy_toiovec(struct iovec *v, unsigned char *kdata, int len); |
diff --git a/include/linux/sockios.h b/include/linux/sockios.h index e6b9d1d36ea2..abef7596655a 100644 --- a/include/linux/sockios.h +++ b/include/linux/sockios.h | |||
@@ -72,8 +72,8 @@ | |||
72 | #define SIOCGIFTXQLEN 0x8942 /* Get the tx queue length */ | 72 | #define SIOCGIFTXQLEN 0x8942 /* Get the tx queue length */ |
73 | #define SIOCSIFTXQLEN 0x8943 /* Set the tx queue length */ | 73 | #define SIOCSIFTXQLEN 0x8943 /* Set the tx queue length */ |
74 | 74 | ||
75 | #define SIOCGIFDIVERT 0x8944 /* Frame diversion support */ | 75 | /* SIOCGIFDIVERT was: 0x8944 Frame diversion support */ |
76 | #define SIOCSIFDIVERT 0x8945 /* Set frame diversion options */ | 76 | /* SIOCSIFDIVERT was: 0x8945 Set frame diversion options */ |
77 | 77 | ||
78 | #define SIOCETHTOOL 0x8946 /* Ethtool interface */ | 78 | #define SIOCETHTOOL 0x8946 /* Ethtool interface */ |
79 | 79 | ||
diff --git a/include/linux/spinlock.h b/include/linux/spinlock.h index b800d2d68b32..8451052ca66f 100644 --- a/include/linux/spinlock.h +++ b/include/linux/spinlock.h | |||
@@ -183,13 +183,27 @@ do { \ | |||
183 | #define read_lock(lock) _read_lock(lock) | 183 | #define read_lock(lock) _read_lock(lock) |
184 | 184 | ||
185 | #if defined(CONFIG_SMP) || defined(CONFIG_DEBUG_SPINLOCK) | 185 | #if defined(CONFIG_SMP) || defined(CONFIG_DEBUG_SPINLOCK) |
186 | |||
186 | #define spin_lock_irqsave(lock, flags) flags = _spin_lock_irqsave(lock) | 187 | #define spin_lock_irqsave(lock, flags) flags = _spin_lock_irqsave(lock) |
187 | #define read_lock_irqsave(lock, flags) flags = _read_lock_irqsave(lock) | 188 | #define read_lock_irqsave(lock, flags) flags = _read_lock_irqsave(lock) |
188 | #define write_lock_irqsave(lock, flags) flags = _write_lock_irqsave(lock) | 189 | #define write_lock_irqsave(lock, flags) flags = _write_lock_irqsave(lock) |
190 | |||
191 | #ifdef CONFIG_DEBUG_LOCK_ALLOC | ||
192 | #define spin_lock_irqsave_nested(lock, flags, subclass) \ | ||
193 | flags = _spin_lock_irqsave_nested(lock, subclass) | ||
194 | #else | ||
195 | #define spin_lock_irqsave_nested(lock, flags, subclass) \ | ||
196 | flags = _spin_lock_irqsave(lock) | ||
197 | #endif | ||
198 | |||
189 | #else | 199 | #else |
200 | |||
190 | #define spin_lock_irqsave(lock, flags) _spin_lock_irqsave(lock, flags) | 201 | #define spin_lock_irqsave(lock, flags) _spin_lock_irqsave(lock, flags) |
191 | #define read_lock_irqsave(lock, flags) _read_lock_irqsave(lock, flags) | 202 | #define read_lock_irqsave(lock, flags) _read_lock_irqsave(lock, flags) |
192 | #define write_lock_irqsave(lock, flags) _write_lock_irqsave(lock, flags) | 203 | #define write_lock_irqsave(lock, flags) _write_lock_irqsave(lock, flags) |
204 | #define spin_lock_irqsave_nested(lock, flags, subclass) \ | ||
205 | spin_lock_irqsave(lock, flags) | ||
206 | |||
193 | #endif | 207 | #endif |
194 | 208 | ||
195 | #define spin_lock_irq(lock) _spin_lock_irq(lock) | 209 | #define spin_lock_irq(lock) _spin_lock_irq(lock) |
diff --git a/include/linux/spinlock_api_smp.h b/include/linux/spinlock_api_smp.h index 8828b8155e9c..8a2307ce7296 100644 --- a/include/linux/spinlock_api_smp.h +++ b/include/linux/spinlock_api_smp.h | |||
@@ -32,6 +32,8 @@ void __lockfunc _read_lock_irq(rwlock_t *lock) __acquires(lock); | |||
32 | void __lockfunc _write_lock_irq(rwlock_t *lock) __acquires(lock); | 32 | void __lockfunc _write_lock_irq(rwlock_t *lock) __acquires(lock); |
33 | unsigned long __lockfunc _spin_lock_irqsave(spinlock_t *lock) | 33 | unsigned long __lockfunc _spin_lock_irqsave(spinlock_t *lock) |
34 | __acquires(lock); | 34 | __acquires(lock); |
35 | unsigned long __lockfunc _spin_lock_irqsave_nested(spinlock_t *lock, int subclass) | ||
36 | __acquires(lock); | ||
35 | unsigned long __lockfunc _read_lock_irqsave(rwlock_t *lock) | 37 | unsigned long __lockfunc _read_lock_irqsave(rwlock_t *lock) |
36 | __acquires(lock); | 38 | __acquires(lock); |
37 | unsigned long __lockfunc _write_lock_irqsave(rwlock_t *lock) | 39 | unsigned long __lockfunc _write_lock_irqsave(rwlock_t *lock) |
diff --git a/include/linux/sunrpc/xdr.h b/include/linux/sunrpc/xdr.h index ac69e5511606..9a527c364394 100644 --- a/include/linux/sunrpc/xdr.h +++ b/include/linux/sunrpc/xdr.h | |||
@@ -151,7 +151,7 @@ typedef struct { | |||
151 | struct sk_buff *skb; | 151 | struct sk_buff *skb; |
152 | unsigned int offset; | 152 | unsigned int offset; |
153 | size_t count; | 153 | size_t count; |
154 | unsigned int csum; | 154 | __wsum csum; |
155 | } skb_reader_t; | 155 | } skb_reader_t; |
156 | 156 | ||
157 | typedef size_t (*skb_read_actor_t)(skb_reader_t *desc, void *to, size_t len); | 157 | typedef size_t (*skb_read_actor_t)(skb_reader_t *desc, void *to, size_t len); |
diff --git a/include/linux/sysctl.h b/include/linux/sysctl.h index d98562f1df76..94316a98e0d0 100644 --- a/include/linux/sysctl.h +++ b/include/linux/sysctl.h | |||
@@ -426,6 +426,8 @@ enum | |||
426 | NET_CIPSOV4_CACHE_BUCKET_SIZE=119, | 426 | NET_CIPSOV4_CACHE_BUCKET_SIZE=119, |
427 | NET_CIPSOV4_RBM_OPTFMT=120, | 427 | NET_CIPSOV4_RBM_OPTFMT=120, |
428 | NET_CIPSOV4_RBM_STRICTVALID=121, | 428 | NET_CIPSOV4_RBM_STRICTVALID=121, |
429 | NET_TCP_AVAIL_CONG_CONTROL=122, | ||
430 | NET_TCP_ALLOWED_CONG_CONTROL=123, | ||
429 | }; | 431 | }; |
430 | 432 | ||
431 | enum { | 433 | enum { |
@@ -604,16 +606,6 @@ enum { | |||
604 | NET_DCCP_DEFAULT=1, | 606 | NET_DCCP_DEFAULT=1, |
605 | }; | 607 | }; |
606 | 608 | ||
607 | /* /proc/sys/net/dccp/default */ | ||
608 | enum { | ||
609 | NET_DCCP_DEFAULT_SEQ_WINDOW = 1, | ||
610 | NET_DCCP_DEFAULT_RX_CCID = 2, | ||
611 | NET_DCCP_DEFAULT_TX_CCID = 3, | ||
612 | NET_DCCP_DEFAULT_ACK_RATIO = 4, | ||
613 | NET_DCCP_DEFAULT_SEND_ACKVEC = 5, | ||
614 | NET_DCCP_DEFAULT_SEND_NDP = 6, | ||
615 | }; | ||
616 | |||
617 | /* /proc/sys/net/ipx */ | 609 | /* /proc/sys/net/ipx */ |
618 | enum { | 610 | enum { |
619 | NET_IPX_PPROP_BROADCASTING=1, | 611 | NET_IPX_PPROP_BROADCASTING=1, |
diff --git a/include/linux/sysfs.h b/include/linux/sysfs.h index 6d5c43d31dec..2129d1b6c874 100644 --- a/include/linux/sysfs.h +++ b/include/linux/sysfs.h | |||
@@ -97,6 +97,9 @@ extern int __must_check | |||
97 | sysfs_rename_dir(struct kobject *, const char *new_name); | 97 | sysfs_rename_dir(struct kobject *, const char *new_name); |
98 | 98 | ||
99 | extern int __must_check | 99 | extern int __must_check |
100 | sysfs_move_dir(struct kobject *, struct kobject *); | ||
101 | |||
102 | extern int __must_check | ||
100 | sysfs_create_file(struct kobject *, const struct attribute *); | 103 | sysfs_create_file(struct kobject *, const struct attribute *); |
101 | 104 | ||
102 | extern int __must_check | 105 | extern int __must_check |
@@ -142,6 +145,11 @@ static inline int sysfs_rename_dir(struct kobject * k, const char *new_name) | |||
142 | return 0; | 145 | return 0; |
143 | } | 146 | } |
144 | 147 | ||
148 | static inline int sysfs_move_dir(struct kobject * k, struct kobject * new_parent) | ||
149 | { | ||
150 | return 0; | ||
151 | } | ||
152 | |||
145 | static inline int sysfs_create_file(struct kobject * k, const struct attribute * a) | 153 | static inline int sysfs_create_file(struct kobject * k, const struct attribute * a) |
146 | { | 154 | { |
147 | return 0; | 155 | return 0; |
diff --git a/include/linux/tcp.h b/include/linux/tcp.h index 2d36f6db3706..3cc70d1a3504 100644 --- a/include/linux/tcp.h +++ b/include/linux/tcp.h | |||
@@ -19,6 +19,7 @@ | |||
19 | 19 | ||
20 | #include <linux/types.h> | 20 | #include <linux/types.h> |
21 | #include <asm/byteorder.h> | 21 | #include <asm/byteorder.h> |
22 | #include <linux/socket.h> | ||
22 | 23 | ||
23 | struct tcphdr { | 24 | struct tcphdr { |
24 | __be16 source; | 25 | __be16 source; |
@@ -51,7 +52,7 @@ struct tcphdr { | |||
51 | #error "Adjust your <asm/byteorder.h> defines" | 52 | #error "Adjust your <asm/byteorder.h> defines" |
52 | #endif | 53 | #endif |
53 | __be16 window; | 54 | __be16 window; |
54 | __be16 check; | 55 | __sum16 check; |
55 | __be16 urg_ptr; | 56 | __be16 urg_ptr; |
56 | }; | 57 | }; |
57 | 58 | ||
@@ -94,6 +95,7 @@ enum { | |||
94 | #define TCP_INFO 11 /* Information about this connection. */ | 95 | #define TCP_INFO 11 /* Information about this connection. */ |
95 | #define TCP_QUICKACK 12 /* Block/reenable quick acks */ | 96 | #define TCP_QUICKACK 12 /* Block/reenable quick acks */ |
96 | #define TCP_CONGESTION 13 /* Congestion control algorithm */ | 97 | #define TCP_CONGESTION 13 /* Congestion control algorithm */ |
98 | #define TCP_MD5SIG 14 /* TCP MD5 Signature (RFC2385) */ | ||
97 | 99 | ||
98 | #define TCPI_OPT_TIMESTAMPS 1 | 100 | #define TCPI_OPT_TIMESTAMPS 1 |
99 | #define TCPI_OPT_SACK 2 | 101 | #define TCPI_OPT_SACK 2 |
@@ -157,6 +159,17 @@ struct tcp_info | |||
157 | __u32 tcpi_total_retrans; | 159 | __u32 tcpi_total_retrans; |
158 | }; | 160 | }; |
159 | 161 | ||
162 | /* for TCP_MD5SIG socket option */ | ||
163 | #define TCP_MD5SIG_MAXKEYLEN 80 | ||
164 | |||
165 | struct tcp_md5sig { | ||
166 | struct __kernel_sockaddr_storage tcpm_addr; /* address associated */ | ||
167 | __u16 __tcpm_pad1; /* zero */ | ||
168 | __u16 tcpm_keylen; /* key length */ | ||
169 | __u32 __tcpm_pad2; /* zero */ | ||
170 | __u8 tcpm_key[TCP_MD5SIG_MAXKEYLEN]; /* key (binary) */ | ||
171 | }; | ||
172 | |||
160 | #ifdef __KERNEL__ | 173 | #ifdef __KERNEL__ |
161 | 174 | ||
162 | #include <linux/skbuff.h> | 175 | #include <linux/skbuff.h> |
@@ -172,17 +185,17 @@ struct tcp_sack_block_wire { | |||
172 | }; | 185 | }; |
173 | 186 | ||
174 | struct tcp_sack_block { | 187 | struct tcp_sack_block { |
175 | __u32 start_seq; | 188 | u32 start_seq; |
176 | __u32 end_seq; | 189 | u32 end_seq; |
177 | }; | 190 | }; |
178 | 191 | ||
179 | struct tcp_options_received { | 192 | struct tcp_options_received { |
180 | /* PAWS/RTTM data */ | 193 | /* PAWS/RTTM data */ |
181 | long ts_recent_stamp;/* Time we stored ts_recent (for aging) */ | 194 | long ts_recent_stamp;/* Time we stored ts_recent (for aging) */ |
182 | __u32 ts_recent; /* Time stamp to echo next */ | 195 | u32 ts_recent; /* Time stamp to echo next */ |
183 | __u32 rcv_tsval; /* Time stamp value */ | 196 | u32 rcv_tsval; /* Time stamp value */ |
184 | __u32 rcv_tsecr; /* Time stamp echo reply */ | 197 | u32 rcv_tsecr; /* Time stamp echo reply */ |
185 | __u16 saw_tstamp : 1, /* Saw TIMESTAMP on last packet */ | 198 | u16 saw_tstamp : 1, /* Saw TIMESTAMP on last packet */ |
186 | tstamp_ok : 1, /* TIMESTAMP seen on SYN packet */ | 199 | tstamp_ok : 1, /* TIMESTAMP seen on SYN packet */ |
187 | dsack : 1, /* D-SACK is scheduled */ | 200 | dsack : 1, /* D-SACK is scheduled */ |
188 | wscale_ok : 1, /* Wscale seen on SYN packet */ | 201 | wscale_ok : 1, /* Wscale seen on SYN packet */ |
@@ -190,16 +203,20 @@ struct tcp_options_received { | |||
190 | snd_wscale : 4, /* Window scaling received from sender */ | 203 | snd_wscale : 4, /* Window scaling received from sender */ |
191 | rcv_wscale : 4; /* Window scaling to send to receiver */ | 204 | rcv_wscale : 4; /* Window scaling to send to receiver */ |
192 | /* SACKs data */ | 205 | /* SACKs data */ |
193 | __u8 eff_sacks; /* Size of SACK array to send with next packet */ | 206 | u8 eff_sacks; /* Size of SACK array to send with next packet */ |
194 | __u8 num_sacks; /* Number of SACK blocks */ | 207 | u8 num_sacks; /* Number of SACK blocks */ |
195 | __u16 user_mss; /* mss requested by user in ioctl */ | 208 | u16 user_mss; /* mss requested by user in ioctl */ |
196 | __u16 mss_clamp; /* Maximal mss, negotiated at connection setup */ | 209 | u16 mss_clamp; /* Maximal mss, negotiated at connection setup */ |
197 | }; | 210 | }; |
198 | 211 | ||
199 | struct tcp_request_sock { | 212 | struct tcp_request_sock { |
200 | struct inet_request_sock req; | 213 | struct inet_request_sock req; |
201 | __u32 rcv_isn; | 214 | #ifdef CONFIG_TCP_MD5SIG |
202 | __u32 snt_isn; | 215 | /* Only used by TCP MD5 Signature so far. */ |
216 | struct tcp_request_sock_ops *af_specific; | ||
217 | #endif | ||
218 | u32 rcv_isn; | ||
219 | u32 snt_isn; | ||
203 | }; | 220 | }; |
204 | 221 | ||
205 | static inline struct tcp_request_sock *tcp_rsk(const struct request_sock *req) | 222 | static inline struct tcp_request_sock *tcp_rsk(const struct request_sock *req) |
@@ -210,7 +227,8 @@ static inline struct tcp_request_sock *tcp_rsk(const struct request_sock *req) | |||
210 | struct tcp_sock { | 227 | struct tcp_sock { |
211 | /* inet_connection_sock has to be the first member of tcp_sock */ | 228 | /* inet_connection_sock has to be the first member of tcp_sock */ |
212 | struct inet_connection_sock inet_conn; | 229 | struct inet_connection_sock inet_conn; |
213 | int tcp_header_len; /* Bytes of tcp header to send */ | 230 | u16 tcp_header_len; /* Bytes of tcp header to send */ |
231 | u16 xmit_size_goal; /* Goal for segmenting output packets */ | ||
214 | 232 | ||
215 | /* | 233 | /* |
216 | * Header prediction flags | 234 | * Header prediction flags |
@@ -223,13 +241,13 @@ struct tcp_sock { | |||
223 | * read the code and the spec side by side (and laugh ...) | 241 | * read the code and the spec side by side (and laugh ...) |
224 | * See RFC793 and RFC1122. The RFC writes these in capitals. | 242 | * See RFC793 and RFC1122. The RFC writes these in capitals. |
225 | */ | 243 | */ |
226 | __u32 rcv_nxt; /* What we want to receive next */ | 244 | u32 rcv_nxt; /* What we want to receive next */ |
227 | __u32 snd_nxt; /* Next sequence we send */ | 245 | u32 snd_nxt; /* Next sequence we send */ |
228 | 246 | ||
229 | __u32 snd_una; /* First byte we want an ack for */ | 247 | u32 snd_una; /* First byte we want an ack for */ |
230 | __u32 snd_sml; /* Last byte of the most recently transmitted small packet */ | 248 | u32 snd_sml; /* Last byte of the most recently transmitted small packet */ |
231 | __u32 rcv_tstamp; /* timestamp of last received ACK (for keepalives) */ | 249 | u32 rcv_tstamp; /* timestamp of last received ACK (for keepalives) */ |
232 | __u32 lsndtime; /* timestamp of last sent data packet (for restart window) */ | 250 | u32 lsndtime; /* timestamp of last sent data packet (for restart window) */ |
233 | 251 | ||
234 | /* Data for direct copy to user */ | 252 | /* Data for direct copy to user */ |
235 | struct { | 253 | struct { |
@@ -247,32 +265,30 @@ struct tcp_sock { | |||
247 | #endif | 265 | #endif |
248 | } ucopy; | 266 | } ucopy; |
249 | 267 | ||
250 | __u32 snd_wl1; /* Sequence for window update */ | 268 | u32 snd_wl1; /* Sequence for window update */ |
251 | __u32 snd_wnd; /* The window we expect to receive */ | 269 | u32 snd_wnd; /* The window we expect to receive */ |
252 | __u32 max_window; /* Maximal window ever seen from peer */ | 270 | u32 max_window; /* Maximal window ever seen from peer */ |
253 | __u32 mss_cache; /* Cached effective mss, not including SACKS */ | 271 | u32 mss_cache; /* Cached effective mss, not including SACKS */ |
254 | __u16 xmit_size_goal; /* Goal for segmenting output packets */ | ||
255 | /* XXX Two bytes hole, try to pack */ | ||
256 | 272 | ||
257 | __u32 window_clamp; /* Maximal window to advertise */ | 273 | u32 window_clamp; /* Maximal window to advertise */ |
258 | __u32 rcv_ssthresh; /* Current window clamp */ | 274 | u32 rcv_ssthresh; /* Current window clamp */ |
259 | 275 | ||
260 | __u32 frto_highmark; /* snd_nxt when RTO occurred */ | 276 | u32 frto_highmark; /* snd_nxt when RTO occurred */ |
261 | __u8 reordering; /* Packet reordering metric. */ | 277 | u8 reordering; /* Packet reordering metric. */ |
262 | __u8 frto_counter; /* Number of new acks after RTO */ | 278 | u8 frto_counter; /* Number of new acks after RTO */ |
263 | __u8 nonagle; /* Disable Nagle algorithm? */ | 279 | u8 nonagle; /* Disable Nagle algorithm? */ |
264 | __u8 keepalive_probes; /* num of allowed keep alive probes */ | 280 | u8 keepalive_probes; /* num of allowed keep alive probes */ |
265 | 281 | ||
266 | /* RTT measurement */ | 282 | /* RTT measurement */ |
267 | __u32 srtt; /* smoothed round trip time << 3 */ | 283 | u32 srtt; /* smoothed round trip time << 3 */ |
268 | __u32 mdev; /* medium deviation */ | 284 | u32 mdev; /* medium deviation */ |
269 | __u32 mdev_max; /* maximal mdev for the last rtt period */ | 285 | u32 mdev_max; /* maximal mdev for the last rtt period */ |
270 | __u32 rttvar; /* smoothed mdev_max */ | 286 | u32 rttvar; /* smoothed mdev_max */ |
271 | __u32 rtt_seq; /* sequence number to update rttvar */ | 287 | u32 rtt_seq; /* sequence number to update rttvar */ |
272 | 288 | ||
273 | __u32 packets_out; /* Packets which are "in flight" */ | 289 | u32 packets_out; /* Packets which are "in flight" */ |
274 | __u32 left_out; /* Packets which leaved network */ | 290 | u32 left_out; /* Packets which leaved network */ |
275 | __u32 retrans_out; /* Retransmitted packets out */ | 291 | u32 retrans_out; /* Retransmitted packets out */ |
276 | /* | 292 | /* |
277 | * Options received (usually on last packet, some only on SYN packets). | 293 | * Options received (usually on last packet, some only on SYN packets). |
278 | */ | 294 | */ |
@@ -281,20 +297,20 @@ struct tcp_sock { | |||
281 | /* | 297 | /* |
282 | * Slow start and congestion control (see also Nagle, and Karn & Partridge) | 298 | * Slow start and congestion control (see also Nagle, and Karn & Partridge) |
283 | */ | 299 | */ |
284 | __u32 snd_ssthresh; /* Slow start size threshold */ | 300 | u32 snd_ssthresh; /* Slow start size threshold */ |
285 | __u32 snd_cwnd; /* Sending congestion window */ | 301 | u32 snd_cwnd; /* Sending congestion window */ |
286 | __u16 snd_cwnd_cnt; /* Linear increase counter */ | 302 | u16 snd_cwnd_cnt; /* Linear increase counter */ |
287 | __u16 snd_cwnd_clamp; /* Do not allow snd_cwnd to grow above this */ | 303 | u16 snd_cwnd_clamp; /* Do not allow snd_cwnd to grow above this */ |
288 | __u32 snd_cwnd_used; | 304 | u32 snd_cwnd_used; |
289 | __u32 snd_cwnd_stamp; | 305 | u32 snd_cwnd_stamp; |
290 | 306 | ||
291 | struct sk_buff_head out_of_order_queue; /* Out of order segments go here */ | 307 | struct sk_buff_head out_of_order_queue; /* Out of order segments go here */ |
292 | 308 | ||
293 | __u32 rcv_wnd; /* Current receiver window */ | 309 | u32 rcv_wnd; /* Current receiver window */ |
294 | __u32 rcv_wup; /* rcv_nxt on last window update sent */ | 310 | u32 rcv_wup; /* rcv_nxt on last window update sent */ |
295 | __u32 write_seq; /* Tail(+1) of data held in tcp send buffer */ | 311 | u32 write_seq; /* Tail(+1) of data held in tcp send buffer */ |
296 | __u32 pushed_seq; /* Last pushed seq, required to talk to windows */ | 312 | u32 pushed_seq; /* Last pushed seq, required to talk to windows */ |
297 | __u32 copied_seq; /* Head of yet unread data */ | 313 | u32 copied_seq; /* Head of yet unread data */ |
298 | 314 | ||
299 | /* SACKs data */ | 315 | /* SACKs data */ |
300 | struct tcp_sack_block duplicate_sack[1]; /* D-SACK block */ | 316 | struct tcp_sack_block duplicate_sack[1]; /* D-SACK block */ |
@@ -315,26 +331,26 @@ struct tcp_sock { | |||
315 | int retransmit_cnt_hint; | 331 | int retransmit_cnt_hint; |
316 | int forward_cnt_hint; | 332 | int forward_cnt_hint; |
317 | 333 | ||
318 | __u16 advmss; /* Advertised MSS */ | 334 | u16 advmss; /* Advertised MSS */ |
319 | __u16 prior_ssthresh; /* ssthresh saved at recovery start */ | 335 | u16 prior_ssthresh; /* ssthresh saved at recovery start */ |
320 | __u32 lost_out; /* Lost packets */ | 336 | u32 lost_out; /* Lost packets */ |
321 | __u32 sacked_out; /* SACK'd packets */ | 337 | u32 sacked_out; /* SACK'd packets */ |
322 | __u32 fackets_out; /* FACK'd packets */ | 338 | u32 fackets_out; /* FACK'd packets */ |
323 | __u32 high_seq; /* snd_nxt at onset of congestion */ | 339 | u32 high_seq; /* snd_nxt at onset of congestion */ |
324 | 340 | ||
325 | __u32 retrans_stamp; /* Timestamp of the last retransmit, | 341 | u32 retrans_stamp; /* Timestamp of the last retransmit, |
326 | * also used in SYN-SENT to remember stamp of | 342 | * also used in SYN-SENT to remember stamp of |
327 | * the first SYN. */ | 343 | * the first SYN. */ |
328 | __u32 undo_marker; /* tracking retrans started here. */ | 344 | u32 undo_marker; /* tracking retrans started here. */ |
329 | int undo_retrans; /* number of undoable retransmissions. */ | 345 | int undo_retrans; /* number of undoable retransmissions. */ |
330 | __u32 urg_seq; /* Seq of received urgent pointer */ | 346 | u32 urg_seq; /* Seq of received urgent pointer */ |
331 | __u16 urg_data; /* Saved octet of OOB data and control flags */ | 347 | u16 urg_data; /* Saved octet of OOB data and control flags */ |
332 | __u8 urg_mode; /* In urgent mode */ | 348 | u8 urg_mode; /* In urgent mode */ |
333 | __u8 ecn_flags; /* ECN status bits. */ | 349 | u8 ecn_flags; /* ECN status bits. */ |
334 | __u32 snd_up; /* Urgent pointer */ | 350 | u32 snd_up; /* Urgent pointer */ |
335 | 351 | ||
336 | __u32 total_retrans; /* Total retransmits for entire connection */ | 352 | u32 total_retrans; /* Total retransmits for entire connection */ |
337 | __u32 bytes_acked; /* Appropriate Byte Counting - RFC3465 */ | 353 | u32 bytes_acked; /* Appropriate Byte Counting - RFC3465 */ |
338 | 354 | ||
339 | unsigned int keepalive_time; /* time before keep alive takes place */ | 355 | unsigned int keepalive_time; /* time before keep alive takes place */ |
340 | unsigned int keepalive_intvl; /* time interval between keep alive probes */ | 356 | unsigned int keepalive_intvl; /* time interval between keep alive probes */ |
@@ -342,27 +358,35 @@ struct tcp_sock { | |||
342 | 358 | ||
343 | unsigned long last_synq_overflow; | 359 | unsigned long last_synq_overflow; |
344 | 360 | ||
345 | __u32 tso_deferred; | 361 | u32 tso_deferred; |
346 | 362 | ||
347 | /* Receiver side RTT estimation */ | 363 | /* Receiver side RTT estimation */ |
348 | struct { | 364 | struct { |
349 | __u32 rtt; | 365 | u32 rtt; |
350 | __u32 seq; | 366 | u32 seq; |
351 | __u32 time; | 367 | u32 time; |
352 | } rcv_rtt_est; | 368 | } rcv_rtt_est; |
353 | 369 | ||
354 | /* Receiver queue space */ | 370 | /* Receiver queue space */ |
355 | struct { | 371 | struct { |
356 | int space; | 372 | int space; |
357 | __u32 seq; | 373 | u32 seq; |
358 | __u32 time; | 374 | u32 time; |
359 | } rcvq_space; | 375 | } rcvq_space; |
360 | 376 | ||
361 | /* TCP-specific MTU probe information. */ | 377 | /* TCP-specific MTU probe information. */ |
362 | struct { | 378 | struct { |
363 | __u32 probe_seq_start; | 379 | u32 probe_seq_start; |
364 | __u32 probe_seq_end; | 380 | u32 probe_seq_end; |
365 | } mtu_probe; | 381 | } mtu_probe; |
382 | |||
383 | #ifdef CONFIG_TCP_MD5SIG | ||
384 | /* TCP AF-Specific parts; only used by MD5 Signature support so far */ | ||
385 | struct tcp_sock_af_ops *af_specific; | ||
386 | |||
387 | /* TCP MD5 Signagure Option information */ | ||
388 | struct tcp_md5sig_info *md5sig_info; | ||
389 | #endif | ||
366 | }; | 390 | }; |
367 | 391 | ||
368 | static inline struct tcp_sock *tcp_sk(const struct sock *sk) | 392 | static inline struct tcp_sock *tcp_sk(const struct sock *sk) |
@@ -372,11 +396,15 @@ static inline struct tcp_sock *tcp_sk(const struct sock *sk) | |||
372 | 396 | ||
373 | struct tcp_timewait_sock { | 397 | struct tcp_timewait_sock { |
374 | struct inet_timewait_sock tw_sk; | 398 | struct inet_timewait_sock tw_sk; |
375 | __u32 tw_rcv_nxt; | 399 | u32 tw_rcv_nxt; |
376 | __u32 tw_snd_nxt; | 400 | u32 tw_snd_nxt; |
377 | __u32 tw_rcv_wnd; | 401 | u32 tw_rcv_wnd; |
378 | __u32 tw_ts_recent; | 402 | u32 tw_ts_recent; |
379 | long tw_ts_recent_stamp; | 403 | long tw_ts_recent_stamp; |
404 | #ifdef CONFIG_TCP_MD5SIG | ||
405 | u16 tw_md5_keylen; | ||
406 | u8 tw_md5_key[TCP_MD5SIG_MAXKEYLEN]; | ||
407 | #endif | ||
380 | }; | 408 | }; |
381 | 409 | ||
382 | static inline struct tcp_timewait_sock *tcp_twsk(const struct sock *sk) | 410 | static inline struct tcp_timewait_sock *tcp_twsk(const struct sock *sk) |
diff --git a/include/linux/textsearch.h b/include/linux/textsearch.h index 7dac8f04d28e..004808a6df1d 100644 --- a/include/linux/textsearch.h +++ b/include/linux/textsearch.h | |||
@@ -20,7 +20,7 @@ struct ts_config; | |||
20 | /** | 20 | /** |
21 | * struct ts_state - search state | 21 | * struct ts_state - search state |
22 | * @offset: offset for next match | 22 | * @offset: offset for next match |
23 | * @cb: control buffer, for persistant variables of get_next_block() | 23 | * @cb: control buffer, for persistent variables of get_next_block() |
24 | */ | 24 | */ |
25 | struct ts_state | 25 | struct ts_state |
26 | { | 26 | { |
@@ -71,7 +71,7 @@ struct ts_config | |||
71 | * Called repeatedly until 0 is returned. Must assign the | 71 | * Called repeatedly until 0 is returned. Must assign the |
72 | * head of the next block of data to &*dst and return the length | 72 | * head of the next block of data to &*dst and return the length |
73 | * of the block or 0 if at the end. consumed == 0 indicates | 73 | * of the block or 0 if at the end. consumed == 0 indicates |
74 | * a new search. May store/read persistant values in state->cb. | 74 | * a new search. May store/read persistent values in state->cb. |
75 | */ | 75 | */ |
76 | unsigned int (*get_next_block)(unsigned int consumed, | 76 | unsigned int (*get_next_block)(unsigned int consumed, |
77 | const u8 **dst, | 77 | const u8 **dst, |
diff --git a/include/linux/tfrc.h b/include/linux/tfrc.h index 7dab7831c3cb..31a9b25276fe 100644 --- a/include/linux/tfrc.h +++ b/include/linux/tfrc.h | |||
@@ -1,7 +1,8 @@ | |||
1 | #ifndef _LINUX_TFRC_H_ | 1 | #ifndef _LINUX_TFRC_H_ |
2 | #define _LINUX_TFRC_H_ | 2 | #define _LINUX_TFRC_H_ |
3 | /* | 3 | /* |
4 | * include/linux/tfrc.h | 4 | * TFRC - Data Structures for the TCP-Friendly Rate Control congestion |
5 | * control mechanism as specified in RFC 3448. | ||
5 | * | 6 | * |
6 | * Copyright (c) 2005 The University of Waikato, Hamilton, New Zealand. | 7 | * Copyright (c) 2005 The University of Waikato, Hamilton, New Zealand. |
7 | * Copyright (c) 2005 Ian McDonald <iam4@cs.waikato.ac.nz> | 8 | * Copyright (c) 2005 Ian McDonald <iam4@cs.waikato.ac.nz> |
@@ -13,15 +14,30 @@ | |||
13 | * the Free Software Foundation; either version 2 of the License, or | 14 | * the Free Software Foundation; either version 2 of the License, or |
14 | * (at your option) any later version. | 15 | * (at your option) any later version. |
15 | */ | 16 | */ |
16 | |||
17 | #include <linux/types.h> | 17 | #include <linux/types.h> |
18 | 18 | ||
19 | /** tfrc_rx_info - TFRC Receiver Data Structure | ||
20 | * | ||
21 | * @tfrcrx_x_recv: receiver estimate of sending rate (3.2.2) | ||
22 | * @tfrcrx_rtt: round-trip-time (communicated by sender) | ||
23 | * @tfrcrx_p: current estimate of loss event rate (3.2.2) | ||
24 | */ | ||
19 | struct tfrc_rx_info { | 25 | struct tfrc_rx_info { |
20 | __u32 tfrcrx_x_recv; | 26 | __u32 tfrcrx_x_recv; |
21 | __u32 tfrcrx_rtt; | 27 | __u32 tfrcrx_rtt; |
22 | __u32 tfrcrx_p; | 28 | __u32 tfrcrx_p; |
23 | }; | 29 | }; |
24 | 30 | ||
31 | /** tfrc_tx_info - TFRC Sender Data Structure | ||
32 | * | ||
33 | * @tfrctx_x: computed transmit rate (4.3 (4)) | ||
34 | * @tfrctx_x_recv: receiver estimate of send rate (4.3) | ||
35 | * @tfrctx_x_calc: return value of throughput equation (3.1) | ||
36 | * @tfrctx_rtt: (moving average) estimate of RTT (4.3) | ||
37 | * @tfrctx_p: current loss event rate (5.4) | ||
38 | * @tfrctx_rto: estimate of RTO, equals 4*RTT (4.3) | ||
39 | * @tfrctx_ipi: inter-packet interval (4.6) | ||
40 | */ | ||
25 | struct tfrc_tx_info { | 41 | struct tfrc_tx_info { |
26 | __u32 tfrctx_x; | 42 | __u32 tfrctx_x; |
27 | __u32 tfrctx_x_recv; | 43 | __u32 tfrctx_x_recv; |
diff --git a/include/linux/tipc_config.h b/include/linux/tipc_config.h index 33a653913d94..b0c916d1f375 100644 --- a/include/linux/tipc_config.h +++ b/include/linux/tipc_config.h | |||
@@ -194,34 +194,34 @@ | |||
194 | 194 | ||
195 | 195 | ||
196 | struct tipc_node_info { | 196 | struct tipc_node_info { |
197 | __u32 addr; /* network address of node */ | 197 | __be32 addr; /* network address of node */ |
198 | __u32 up; /* 0=down, 1= up */ | 198 | __be32 up; /* 0=down, 1= up */ |
199 | }; | 199 | }; |
200 | 200 | ||
201 | struct tipc_link_info { | 201 | struct tipc_link_info { |
202 | __u32 dest; /* network address of peer node */ | 202 | __be32 dest; /* network address of peer node */ |
203 | __u32 up; /* 0=down, 1=up */ | 203 | __be32 up; /* 0=down, 1=up */ |
204 | char str[TIPC_MAX_LINK_NAME]; /* link name */ | 204 | char str[TIPC_MAX_LINK_NAME]; /* link name */ |
205 | }; | 205 | }; |
206 | 206 | ||
207 | struct tipc_bearer_config { | 207 | struct tipc_bearer_config { |
208 | __u32 priority; /* Range [1,31]. Override per link */ | 208 | __be32 priority; /* Range [1,31]. Override per link */ |
209 | __u32 detect_scope; | 209 | __be32 detect_scope; |
210 | char name[TIPC_MAX_BEARER_NAME]; | 210 | char name[TIPC_MAX_BEARER_NAME]; |
211 | }; | 211 | }; |
212 | 212 | ||
213 | struct tipc_link_config { | 213 | struct tipc_link_config { |
214 | __u32 value; | 214 | __be32 value; |
215 | char name[TIPC_MAX_LINK_NAME]; | 215 | char name[TIPC_MAX_LINK_NAME]; |
216 | }; | 216 | }; |
217 | 217 | ||
218 | #define TIPC_NTQ_ALLTYPES 0x80000000 | 218 | #define TIPC_NTQ_ALLTYPES 0x80000000 |
219 | 219 | ||
220 | struct tipc_name_table_query { | 220 | struct tipc_name_table_query { |
221 | __u32 depth; /* 1:type, 2:+name info, 3:+port info, 4+:+debug info */ | 221 | __be32 depth; /* 1:type, 2:+name info, 3:+port info, 4+:+debug info */ |
222 | __u32 type; /* {t,l,u} info ignored if high bit of "depth" is set */ | 222 | __be32 type; /* {t,l,u} info ignored if high bit of "depth" is set */ |
223 | __u32 lowbound; /* (i.e. displays all entries of name table) */ | 223 | __be32 lowbound; /* (i.e. displays all entries of name table) */ |
224 | __u32 upbound; | 224 | __be32 upbound; |
225 | }; | 225 | }; |
226 | 226 | ||
227 | /* | 227 | /* |
@@ -262,8 +262,8 @@ struct tipc_route_info { | |||
262 | */ | 262 | */ |
263 | 263 | ||
264 | struct tlv_desc { | 264 | struct tlv_desc { |
265 | __u16 tlv_len; /* TLV length (descriptor + value) */ | 265 | __be16 tlv_len; /* TLV length (descriptor + value) */ |
266 | __u16 tlv_type; /* TLV identifier */ | 266 | __be16 tlv_type; /* TLV identifier */ |
267 | }; | 267 | }; |
268 | 268 | ||
269 | #define TLV_ALIGNTO 4 | 269 | #define TLV_ALIGNTO 4 |
@@ -377,9 +377,9 @@ struct tipc_genlmsghdr { | |||
377 | 377 | ||
378 | struct tipc_cfg_msg_hdr | 378 | struct tipc_cfg_msg_hdr |
379 | { | 379 | { |
380 | __u32 tcm_len; /* Message length (including header) */ | 380 | __be32 tcm_len; /* Message length (including header) */ |
381 | __u16 tcm_type; /* Command type */ | 381 | __be16 tcm_type; /* Command type */ |
382 | __u16 tcm_flags; /* Additional flags */ | 382 | __be16 tcm_flags; /* Additional flags */ |
383 | char tcm_reserved[8]; /* Unused */ | 383 | char tcm_reserved[8]; /* Unused */ |
384 | }; | 384 | }; |
385 | 385 | ||
diff --git a/include/linux/tty.h b/include/linux/tty.h index c1f716446161..f717f0898238 100644 --- a/include/linux/tty.h +++ b/include/linux/tty.h | |||
@@ -276,9 +276,8 @@ extern int tty_register_ldisc(int disc, struct tty_ldisc *new_ldisc); | |||
276 | extern int tty_unregister_ldisc(int disc); | 276 | extern int tty_unregister_ldisc(int disc); |
277 | extern int tty_register_driver(struct tty_driver *driver); | 277 | extern int tty_register_driver(struct tty_driver *driver); |
278 | extern int tty_unregister_driver(struct tty_driver *driver); | 278 | extern int tty_unregister_driver(struct tty_driver *driver); |
279 | extern struct class_device *tty_register_device(struct tty_driver *driver, | 279 | extern struct device *tty_register_device(struct tty_driver *driver, |
280 | unsigned index, | 280 | unsigned index, struct device *dev); |
281 | struct device *dev); | ||
282 | extern void tty_unregister_device(struct tty_driver *driver, unsigned index); | 281 | extern void tty_unregister_device(struct tty_driver *driver, unsigned index); |
283 | extern int tty_read_raw_data(struct tty_struct *tty, unsigned char *bufp, | 282 | extern int tty_read_raw_data(struct tty_struct *tty, unsigned char *bufp, |
284 | int buflen); | 283 | int buflen); |
diff --git a/include/linux/types.h b/include/linux/types.h index 750f085fa564..745c409ebbb5 100644 --- a/include/linux/types.h +++ b/include/linux/types.h | |||
@@ -128,6 +128,8 @@ typedef __s64 int64_t; | |||
128 | 128 | ||
129 | /* this is a special 64bit data type that is 8-byte aligned */ | 129 | /* this is a special 64bit data type that is 8-byte aligned */ |
130 | #define aligned_u64 unsigned long long __attribute__((aligned(8))) | 130 | #define aligned_u64 unsigned long long __attribute__((aligned(8))) |
131 | #define aligned_be64 __be64 __attribute__((aligned(8))) | ||
132 | #define aligned_le64 __le64 __attribute__((aligned(8))) | ||
131 | 133 | ||
132 | /** | 134 | /** |
133 | * The type used for indexing onto a disc or disc partition. | 135 | * The type used for indexing onto a disc or disc partition. |
@@ -180,6 +182,8 @@ typedef __u32 __bitwise __be32; | |||
180 | typedef __u64 __bitwise __le64; | 182 | typedef __u64 __bitwise __le64; |
181 | typedef __u64 __bitwise __be64; | 183 | typedef __u64 __bitwise __be64; |
182 | #endif | 184 | #endif |
185 | typedef __u16 __bitwise __sum16; | ||
186 | typedef __u32 __bitwise __wsum; | ||
183 | 187 | ||
184 | #ifdef __KERNEL__ | 188 | #ifdef __KERNEL__ |
185 | typedef unsigned __bitwise__ gfp_t; | 189 | typedef unsigned __bitwise__ gfp_t; |
diff --git a/include/linux/udp.h b/include/linux/udp.h index 014b41d1e308..7e08c07efe0f 100644 --- a/include/linux/udp.h +++ b/include/linux/udp.h | |||
@@ -23,7 +23,7 @@ struct udphdr { | |||
23 | __be16 source; | 23 | __be16 source; |
24 | __be16 dest; | 24 | __be16 dest; |
25 | __be16 len; | 25 | __be16 len; |
26 | __be16 check; | 26 | __sum16 check; |
27 | }; | 27 | }; |
28 | 28 | ||
29 | /* UDP socket options */ | 29 | /* UDP socket options */ |
@@ -38,6 +38,7 @@ struct udphdr { | |||
38 | #include <linux/types.h> | 38 | #include <linux/types.h> |
39 | 39 | ||
40 | #include <net/inet_sock.h> | 40 | #include <net/inet_sock.h> |
41 | #define UDP_HTABLE_SIZE 128 | ||
41 | 42 | ||
42 | struct udp_sock { | 43 | struct udp_sock { |
43 | /* inet_sock has to be the first member */ | 44 | /* inet_sock has to be the first member */ |
@@ -50,12 +51,23 @@ struct udp_sock { | |||
50 | * when the socket is uncorked. | 51 | * when the socket is uncorked. |
51 | */ | 52 | */ |
52 | __u16 len; /* total length of pending frames */ | 53 | __u16 len; /* total length of pending frames */ |
54 | /* | ||
55 | * Fields specific to UDP-Lite. | ||
56 | */ | ||
57 | __u16 pcslen; | ||
58 | __u16 pcrlen; | ||
59 | /* indicator bits used by pcflag: */ | ||
60 | #define UDPLITE_BIT 0x1 /* set by udplite proto init function */ | ||
61 | #define UDPLITE_SEND_CC 0x2 /* set via udplite setsockopt */ | ||
62 | #define UDPLITE_RECV_CC 0x4 /* set via udplite setsocktopt */ | ||
63 | __u8 pcflag; /* marks socket as UDP-Lite if > 0 */ | ||
53 | }; | 64 | }; |
54 | 65 | ||
55 | static inline struct udp_sock *udp_sk(const struct sock *sk) | 66 | static inline struct udp_sock *udp_sk(const struct sock *sk) |
56 | { | 67 | { |
57 | return (struct udp_sock *)sk; | 68 | return (struct udp_sock *)sk; |
58 | } | 69 | } |
70 | #define IS_UDPLITE(__sk) (udp_sk(__sk)->pcflag) | ||
59 | 71 | ||
60 | #endif | 72 | #endif |
61 | 73 | ||
diff --git a/include/linux/usb.h b/include/linux/usb.h index 06ce7a626040..aab5b1b72021 100644 --- a/include/linux/usb.h +++ b/include/linux/usb.h | |||
@@ -313,8 +313,13 @@ struct usb_bus { | |||
313 | /* This is arbitrary. | 313 | /* This is arbitrary. |
314 | * From USB 2.0 spec Table 11-13, offset 7, a hub can | 314 | * From USB 2.0 spec Table 11-13, offset 7, a hub can |
315 | * have up to 255 ports. The most yet reported is 10. | 315 | * have up to 255 ports. The most yet reported is 10. |
316 | * | ||
317 | * Current Wireless USB host hardware (Intel i1480 for example) allows | ||
318 | * up to 22 devices to connect. Upcoming hardware might raise that | ||
319 | * limit. Because the arrays need to add a bit for hub status data, we | ||
320 | * do 31, so plus one evens out to four bytes. | ||
316 | */ | 321 | */ |
317 | #define USB_MAXCHILDREN (16) | 322 | #define USB_MAXCHILDREN (31) |
318 | 323 | ||
319 | struct usb_tt; | 324 | struct usb_tt; |
320 | 325 | ||
@@ -357,7 +362,8 @@ struct usb_device { | |||
357 | u8 portnum; /* Parent port number (origin 1) */ | 362 | u8 portnum; /* Parent port number (origin 1) */ |
358 | u8 level; /* Number of USB hub ancestors */ | 363 | u8 level; /* Number of USB hub ancestors */ |
359 | 364 | ||
360 | int have_langid; /* whether string_langid is valid */ | 365 | unsigned discon_suspended:1; /* Disconnected while suspended */ |
366 | unsigned have_langid:1; /* whether string_langid is valid */ | ||
361 | int string_langid; /* language ID for strings */ | 367 | int string_langid; /* language ID for strings */ |
362 | 368 | ||
363 | /* static strings from the device */ | 369 | /* static strings from the device */ |
@@ -410,14 +416,37 @@ extern struct usb_device *usb_find_device(u16 vendor_id, u16 product_id); | |||
410 | 416 | ||
411 | /* USB autosuspend and autoresume */ | 417 | /* USB autosuspend and autoresume */ |
412 | #ifdef CONFIG_USB_SUSPEND | 418 | #ifdef CONFIG_USB_SUSPEND |
419 | extern int usb_autopm_set_interface(struct usb_interface *intf); | ||
413 | extern int usb_autopm_get_interface(struct usb_interface *intf); | 420 | extern int usb_autopm_get_interface(struct usb_interface *intf); |
414 | extern void usb_autopm_put_interface(struct usb_interface *intf); | 421 | extern void usb_autopm_put_interface(struct usb_interface *intf); |
415 | 422 | ||
423 | static inline void usb_autopm_enable(struct usb_interface *intf) | ||
424 | { | ||
425 | intf->pm_usage_cnt = 0; | ||
426 | usb_autopm_set_interface(intf); | ||
427 | } | ||
428 | |||
429 | static inline void usb_autopm_disable(struct usb_interface *intf) | ||
430 | { | ||
431 | intf->pm_usage_cnt = 1; | ||
432 | usb_autopm_set_interface(intf); | ||
433 | } | ||
434 | |||
416 | #else | 435 | #else |
417 | #define usb_autopm_get_interface(intf) 0 | ||
418 | #define usb_autopm_put_interface(intf) do {} while (0) | ||
419 | #endif | ||
420 | 436 | ||
437 | static inline int usb_autopm_set_interface(struct usb_interface *intf) | ||
438 | { return 0; } | ||
439 | |||
440 | static inline int usb_autopm_get_interface(struct usb_interface *intf) | ||
441 | { return 0; } | ||
442 | |||
443 | static inline void usb_autopm_put_interface(struct usb_interface *intf) | ||
444 | { } | ||
445 | static inline void usb_autopm_enable(struct usb_interface *intf) | ||
446 | { } | ||
447 | static inline void usb_autopm_disable(struct usb_interface *intf) | ||
448 | { } | ||
449 | #endif | ||
421 | 450 | ||
422 | /*-------------------------------------------------------------------------*/ | 451 | /*-------------------------------------------------------------------------*/ |
423 | 452 | ||
@@ -490,17 +519,137 @@ static inline int usb_make_path (struct usb_device *dev, char *buf, | |||
490 | 519 | ||
491 | /*-------------------------------------------------------------------------*/ | 520 | /*-------------------------------------------------------------------------*/ |
492 | 521 | ||
493 | extern int usb_endpoint_dir_in(const struct usb_endpoint_descriptor *epd); | 522 | /** |
494 | extern int usb_endpoint_dir_out(const struct usb_endpoint_descriptor *epd); | 523 | * usb_endpoint_dir_in - check if the endpoint has IN direction |
495 | extern int usb_endpoint_xfer_bulk(const struct usb_endpoint_descriptor *epd); | 524 | * @epd: endpoint to be checked |
496 | extern int usb_endpoint_xfer_int(const struct usb_endpoint_descriptor *epd); | 525 | * |
497 | extern int usb_endpoint_xfer_isoc(const struct usb_endpoint_descriptor *epd); | 526 | * Returns true if the endpoint is of type IN, otherwise it returns false. |
498 | extern int usb_endpoint_is_bulk_in(const struct usb_endpoint_descriptor *epd); | 527 | */ |
499 | extern int usb_endpoint_is_bulk_out(const struct usb_endpoint_descriptor *epd); | 528 | static inline int usb_endpoint_dir_in(const struct usb_endpoint_descriptor *epd) |
500 | extern int usb_endpoint_is_int_in(const struct usb_endpoint_descriptor *epd); | 529 | { |
501 | extern int usb_endpoint_is_int_out(const struct usb_endpoint_descriptor *epd); | 530 | return ((epd->bEndpointAddress & USB_ENDPOINT_DIR_MASK) == USB_DIR_IN); |
502 | extern int usb_endpoint_is_isoc_in(const struct usb_endpoint_descriptor *epd); | 531 | } |
503 | extern int usb_endpoint_is_isoc_out(const struct usb_endpoint_descriptor *epd); | 532 | |
533 | /** | ||
534 | * usb_endpoint_dir_out - check if the endpoint has OUT direction | ||
535 | * @epd: endpoint to be checked | ||
536 | * | ||
537 | * Returns true if the endpoint is of type OUT, otherwise it returns false. | ||
538 | */ | ||
539 | static inline int usb_endpoint_dir_out(const struct usb_endpoint_descriptor *epd) | ||
540 | { | ||
541 | return ((epd->bEndpointAddress & USB_ENDPOINT_DIR_MASK) == USB_DIR_OUT); | ||
542 | } | ||
543 | |||
544 | /** | ||
545 | * usb_endpoint_xfer_bulk - check if the endpoint has bulk transfer type | ||
546 | * @epd: endpoint to be checked | ||
547 | * | ||
548 | * Returns true if the endpoint is of type bulk, otherwise it returns false. | ||
549 | */ | ||
550 | static inline int usb_endpoint_xfer_bulk(const struct usb_endpoint_descriptor *epd) | ||
551 | { | ||
552 | return ((epd->bmAttributes & USB_ENDPOINT_XFERTYPE_MASK) == | ||
553 | USB_ENDPOINT_XFER_BULK); | ||
554 | } | ||
555 | |||
556 | /** | ||
557 | * usb_endpoint_xfer_int - check if the endpoint has interrupt transfer type | ||
558 | * @epd: endpoint to be checked | ||
559 | * | ||
560 | * Returns true if the endpoint is of type interrupt, otherwise it returns | ||
561 | * false. | ||
562 | */ | ||
563 | static inline int usb_endpoint_xfer_int(const struct usb_endpoint_descriptor *epd) | ||
564 | { | ||
565 | return ((epd->bmAttributes & USB_ENDPOINT_XFERTYPE_MASK) == | ||
566 | USB_ENDPOINT_XFER_INT); | ||
567 | } | ||
568 | |||
569 | /** | ||
570 | * usb_endpoint_xfer_isoc - check if the endpoint has isochronous transfer type | ||
571 | * @epd: endpoint to be checked | ||
572 | * | ||
573 | * Returns true if the endpoint is of type isochronous, otherwise it returns | ||
574 | * false. | ||
575 | */ | ||
576 | static inline int usb_endpoint_xfer_isoc(const struct usb_endpoint_descriptor *epd) | ||
577 | { | ||
578 | return ((epd->bmAttributes & USB_ENDPOINT_XFERTYPE_MASK) == | ||
579 | USB_ENDPOINT_XFER_ISOC); | ||
580 | } | ||
581 | |||
582 | /** | ||
583 | * usb_endpoint_is_bulk_in - check if the endpoint is bulk IN | ||
584 | * @epd: endpoint to be checked | ||
585 | * | ||
586 | * Returns true if the endpoint has bulk transfer type and IN direction, | ||
587 | * otherwise it returns false. | ||
588 | */ | ||
589 | static inline int usb_endpoint_is_bulk_in(const struct usb_endpoint_descriptor *epd) | ||
590 | { | ||
591 | return (usb_endpoint_xfer_bulk(epd) && usb_endpoint_dir_in(epd)); | ||
592 | } | ||
593 | |||
594 | /** | ||
595 | * usb_endpoint_is_bulk_out - check if the endpoint is bulk OUT | ||
596 | * @epd: endpoint to be checked | ||
597 | * | ||
598 | * Returns true if the endpoint has bulk transfer type and OUT direction, | ||
599 | * otherwise it returns false. | ||
600 | */ | ||
601 | static inline int usb_endpoint_is_bulk_out(const struct usb_endpoint_descriptor *epd) | ||
602 | { | ||
603 | return (usb_endpoint_xfer_bulk(epd) && usb_endpoint_dir_out(epd)); | ||
604 | } | ||
605 | |||
606 | /** | ||
607 | * usb_endpoint_is_int_in - check if the endpoint is interrupt IN | ||
608 | * @epd: endpoint to be checked | ||
609 | * | ||
610 | * Returns true if the endpoint has interrupt transfer type and IN direction, | ||
611 | * otherwise it returns false. | ||
612 | */ | ||
613 | static inline int usb_endpoint_is_int_in(const struct usb_endpoint_descriptor *epd) | ||
614 | { | ||
615 | return (usb_endpoint_xfer_int(epd) && usb_endpoint_dir_in(epd)); | ||
616 | } | ||
617 | |||
618 | /** | ||
619 | * usb_endpoint_is_int_out - check if the endpoint is interrupt OUT | ||
620 | * @epd: endpoint to be checked | ||
621 | * | ||
622 | * Returns true if the endpoint has interrupt transfer type and OUT direction, | ||
623 | * otherwise it returns false. | ||
624 | */ | ||
625 | static inline int usb_endpoint_is_int_out(const struct usb_endpoint_descriptor *epd) | ||
626 | { | ||
627 | return (usb_endpoint_xfer_int(epd) && usb_endpoint_dir_out(epd)); | ||
628 | } | ||
629 | |||
630 | /** | ||
631 | * usb_endpoint_is_isoc_in - check if the endpoint is isochronous IN | ||
632 | * @epd: endpoint to be checked | ||
633 | * | ||
634 | * Returns true if the endpoint has isochronous transfer type and IN direction, | ||
635 | * otherwise it returns false. | ||
636 | */ | ||
637 | static inline int usb_endpoint_is_isoc_in(const struct usb_endpoint_descriptor *epd) | ||
638 | { | ||
639 | return (usb_endpoint_xfer_isoc(epd) && usb_endpoint_dir_in(epd)); | ||
640 | } | ||
641 | |||
642 | /** | ||
643 | * usb_endpoint_is_isoc_out - check if the endpoint is isochronous OUT | ||
644 | * @epd: endpoint to be checked | ||
645 | * | ||
646 | * Returns true if the endpoint has isochronous transfer type and OUT direction, | ||
647 | * otherwise it returns false. | ||
648 | */ | ||
649 | static inline int usb_endpoint_is_isoc_out(const struct usb_endpoint_descriptor *epd) | ||
650 | { | ||
651 | return (usb_endpoint_xfer_isoc(epd) && usb_endpoint_dir_out(epd)); | ||
652 | } | ||
504 | 653 | ||
505 | /*-------------------------------------------------------------------------*/ | 654 | /*-------------------------------------------------------------------------*/ |
506 | 655 | ||
diff --git a/include/linux/wireless.h b/include/linux/wireless.h index a50a0130fd9e..7c269f4992eb 100644 --- a/include/linux/wireless.h +++ b/include/linux/wireless.h | |||
@@ -546,6 +546,8 @@ | |||
546 | /* MLME requests (SIOCSIWMLME / struct iw_mlme) */ | 546 | /* MLME requests (SIOCSIWMLME / struct iw_mlme) */ |
547 | #define IW_MLME_DEAUTH 0 | 547 | #define IW_MLME_DEAUTH 0 |
548 | #define IW_MLME_DISASSOC 1 | 548 | #define IW_MLME_DISASSOC 1 |
549 | #define IW_MLME_AUTH 2 | ||
550 | #define IW_MLME_ASSOC 3 | ||
549 | 551 | ||
550 | /* SIOCSIWAUTH/SIOCGIWAUTH struct iw_param flags */ | 552 | /* SIOCSIWAUTH/SIOCGIWAUTH struct iw_param flags */ |
551 | #define IW_AUTH_INDEX 0x0FFF | 553 | #define IW_AUTH_INDEX 0x0FFF |
diff --git a/include/linux/xfrm.h b/include/linux/xfrm.h index 8ae7f744917b..088ba8113f7e 100644 --- a/include/linux/xfrm.h +++ b/include/linux/xfrm.h | |||
@@ -211,8 +211,8 @@ struct xfrm_user_tmpl { | |||
211 | 211 | ||
212 | struct xfrm_encap_tmpl { | 212 | struct xfrm_encap_tmpl { |
213 | __u16 encap_type; | 213 | __u16 encap_type; |
214 | __u16 encap_sport; | 214 | __be16 encap_sport; |
215 | __u16 encap_dport; | 215 | __be16 encap_dport; |
216 | xfrm_address_t encap_oa; | 216 | xfrm_address_t encap_oa; |
217 | }; | 217 | }; |
218 | 218 | ||
@@ -289,7 +289,9 @@ struct xfrm_usersa_id { | |||
289 | 289 | ||
290 | struct xfrm_aevent_id { | 290 | struct xfrm_aevent_id { |
291 | struct xfrm_usersa_id sa_id; | 291 | struct xfrm_usersa_id sa_id; |
292 | xfrm_address_t saddr; | ||
292 | __u32 flags; | 293 | __u32 flags; |
294 | __u32 reqid; | ||
293 | }; | 295 | }; |
294 | 296 | ||
295 | struct xfrm_userspi_info { | 297 | struct xfrm_userspi_info { |
diff --git a/include/linux/zftape.h b/include/linux/zftape.h deleted file mode 100644 index b057c65366c6..000000000000 --- a/include/linux/zftape.h +++ /dev/null | |||
@@ -1,87 +0,0 @@ | |||
1 | #ifndef _ZFTAPE_H | ||
2 | #define _ZFTAPE_H | ||
3 | |||
4 | /* | ||
5 | * Copyright (C) 1996, 1997 Claus-Justus Heine. | ||
6 | |||
7 | This program is free software; you can redistribute it and/or modify | ||
8 | it under the terms of the GNU General Public License as published by | ||
9 | the Free Software Foundation; either version 2, or (at your option) | ||
10 | any later version. | ||
11 | |||
12 | This program is distributed in the hope that it will be useful, | ||
13 | but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
14 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
15 | GNU General Public License for more details. | ||
16 | |||
17 | You should have received a copy of the GNU General Public License | ||
18 | along with this program; see the file COPYING. If not, write to | ||
19 | the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. | ||
20 | |||
21 | * | ||
22 | * $Source: /homes/cvs/ftape-stacked/include/linux/zftape.h,v $ | ||
23 | * $Revision: 1.12 $ | ||
24 | * $Date: 1997/10/21 11:02:37 $ | ||
25 | * | ||
26 | * Special ioctl and other global info for the zftape VFS | ||
27 | * interface for the QIC-40/80/3010/3020 floppy-tape driver for | ||
28 | * Linux. | ||
29 | */ | ||
30 | |||
31 | #define ZFTAPE_VERSION "zftape for " FTAPE_VERSION | ||
32 | |||
33 | #include <linux/ftape.h> | ||
34 | |||
35 | #define ZFTAPE_LABEL "Ftape - The Linux Floppy Tape Project!" | ||
36 | |||
37 | /* Bits of the minor device number that control the operation mode */ | ||
38 | #define ZFT_Q80_MODE (1 << 3) | ||
39 | #define ZFT_ZIP_MODE (1 << 4) | ||
40 | #define ZFT_RAW_MODE (1 << 5) | ||
41 | #define ZFT_MINOR_OP_MASK (ZFT_Q80_MODE | \ | ||
42 | ZFT_ZIP_MODE | \ | ||
43 | ZFT_RAW_MODE) | ||
44 | #define ZFT_MINOR_MASK (FTAPE_SEL_MASK | \ | ||
45 | ZFT_MINOR_OP_MASK | \ | ||
46 | FTAPE_NO_REWIND) | ||
47 | |||
48 | #ifdef ZFT_OBSOLETE | ||
49 | struct mtblksz { | ||
50 | unsigned int mt_blksz; | ||
51 | }; | ||
52 | #define MTIOC_ZFTAPE_GETBLKSZ _IOR('m', 104, struct mtblksz) | ||
53 | #endif | ||
54 | |||
55 | #ifdef __KERNEL__ | ||
56 | |||
57 | extern int zft_init(void); | ||
58 | |||
59 | static inline __s64 zft_div_blksz(__s64 value, __u32 blk_sz) | ||
60 | { | ||
61 | if (blk_sz == 1) { | ||
62 | return value; | ||
63 | } else { | ||
64 | return (__s64)(((__u32)(value >> 10) + (blk_sz >> 10) - 1) | ||
65 | / (blk_sz >> 10)); | ||
66 | } | ||
67 | } | ||
68 | |||
69 | static inline __s64 zft_mul_blksz(__s64 value, __u32 blk_sz) | ||
70 | { | ||
71 | if (blk_sz == 1) { | ||
72 | return value; | ||
73 | } else { | ||
74 | /* if blk_sz != 1, then it is a multiple of 1024. In | ||
75 | * this case, `value' will also fit into 32 bits. | ||
76 | * | ||
77 | * Actually, this limits the capacity to 42 | ||
78 | * bits. This is (2^32)*1024, roughly a thousand | ||
79 | * times 2GB, or 3 Terabytes. Hopefully this is enough | ||
80 | */ | ||
81 | return(__s64)(((__u32)(value)*(blk_sz>>10))<<10); | ||
82 | } | ||
83 | } | ||
84 | |||
85 | #endif | ||
86 | |||
87 | #endif | ||