aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/sctp.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/linux/sctp.h')
-rw-r--r--include/linux/sctp.h72
1 files changed, 36 insertions, 36 deletions
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 */
59typedef struct sctphdr { 59typedef 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. */
67typedef struct sctp_chunkhdr { 67typedef 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
155typedef struct sctp_paramhdr { 155typedef 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
160typedef enum { 160typedef 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
205typedef struct sctp_datahdr { 205typedef 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 */
234typedef struct sctp_inithdr { 234typedef 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) */
262typedef struct sctp_cookie_preserve_param { 262typedef 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) */
274typedef struct sctp_supported_addrs_param { 274typedef 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 */
285typedef struct sctp_adaption_ind_param { 285typedef 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
318typedef struct sctp_gap_ack_block { 318typedef 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
323typedef uint32_t sctp_dup_tsn_t; 323typedef __be32 sctp_dup_tsn_t;
324 324
325typedef union { 325typedef 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
330typedef struct sctp_sackhdr { 330typedef 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 */
373typedef struct sctp_shutdownhdr { 373typedef 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
377struct sctp_shutdown_chunk_t { 377struct 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
384typedef struct sctp_errhdr { 384typedef 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 */
464typedef struct sctp_ecnehdr { 464typedef struct sctp_ecnehdr {
465 __u32 lowest_tsn; 465 __be32 lowest_tsn;
466} sctp_ecnehdr_t; 466} sctp_ecnehdr_t;
467 467
468typedef struct sctp_ecne_chunk { 468typedef 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 */
476typedef struct sctp_cwrhdr { 476typedef struct sctp_cwrhdr {
477 __u32 lowest_tsn; 477 __be32 lowest_tsn;
478} sctp_cwrhdr_t; 478} sctp_cwrhdr_t;
479 479
480typedef struct sctp_cwr_chunk { 480typedef 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 */
531struct sctp_fwdtsn_skip { 531struct sctp_fwdtsn_skip {
532 __u16 stream; 532 __be16 stream;
533 __u16 ssn; 533 __be16 ssn;
534} __attribute__((packed)); 534} __attribute__((packed));
535 535
536struct sctp_fwdtsn_hdr { 536struct 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 */
579typedef struct sctp_addip_param { 579typedef 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
584typedef struct sctp_addiphdr { 584typedef 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