1 /*- 2 * SPDX-License-Identifier: BSD-3-Clause 3 * 4 * Copyright (c) 2001-2007, by Cisco Systems, Inc. All rights reserved. 5 * Copyright (c) 2008-2012, by Randall Stewart. All rights reserved. 6 * Copyright (c) 2008-2012, by Michael Tuexen. All rights reserved. 7 * 8 * Redistribution and use in source and binary forms, with or without 9 * modification, are permitted provided that the following conditions are met: 10 * 11 * a) Redistributions of source code must retain the above copyright notice, 12 * this list of conditions and the following disclaimer. 13 * 14 * b) Redistributions in binary form must reproduce the above copyright 15 * notice, this list of conditions and the following disclaimer in 16 * the documentation and/or other materials provided with the distribution. 17 * 18 * c) Neither the name of Cisco Systems, Inc. nor the names of its 19 * contributors may be used to endorse or promote products derived 20 * from this software without specific prior written permission. 21 * 22 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 23 * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, 24 * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 25 * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE 26 * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 27 * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 28 * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 29 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 30 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 31 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF 32 * THE POSSIBILITY OF SUCH DAMAGE. 33 */ 34 35 #if defined(__FreeBSD__) && !defined(__Userspace__) 36 #include <sys/cdefs.h> 37 __FBSDID("$FreeBSD: head/sys/netinet/sctp_header.h 366114 2020-09-24 12:26:06Z tuexen $"); 38 #endif 39 40 #ifndef _NETINET_SCTP_HEADER_H_ 41 #define _NETINET_SCTP_HEADER_H_ 42 43 #if defined(_WIN32) && !defined(__Userspace__) 44 #include <packon.h> 45 #endif 46 #if !defined(_WIN32) 47 #include <sys/time.h> 48 #endif 49 #include <netinet/sctp.h> 50 #include <netinet/sctp_constants.h> 51 52 #if !defined(_WIN32) 53 #define SCTP_PACKED __attribute__((packed)) 54 #else 55 #pragma pack (push, 1) 56 #define SCTP_PACKED 57 #endif 58 59 /* 60 * Parameter structures 61 */ 62 struct sctp_ipv4addr_param { 63 struct sctp_paramhdr ph;/* type=SCTP_IPV4_PARAM_TYPE, len=8 */ 64 uint32_t addr; /* IPV4 address */ 65 } SCTP_PACKED; 66 67 #define SCTP_V6_ADDR_BYTES 16 68 69 struct sctp_ipv6addr_param { 70 struct sctp_paramhdr ph;/* type=SCTP_IPV6_PARAM_TYPE, len=20 */ 71 uint8_t addr[SCTP_V6_ADDR_BYTES]; /* IPV6 address */ 72 } SCTP_PACKED; 73 74 /* Cookie Preservative */ 75 struct sctp_cookie_perserve_param { 76 struct sctp_paramhdr ph;/* type=SCTP_COOKIE_PRESERVE, len=8 */ 77 uint32_t time; /* time in ms to extend cookie */ 78 } SCTP_PACKED; 79 80 #define SCTP_ARRAY_MIN_LEN 1 81 /* Host Name Address */ 82 struct sctp_host_name_param { 83 struct sctp_paramhdr ph;/* type=SCTP_HOSTNAME_ADDRESS */ 84 char name[SCTP_ARRAY_MIN_LEN]; /* host name */ 85 } SCTP_PACKED; 86 87 /* 88 * This is the maximum padded size of a s-a-p 89 * so paramheadr + 3 address types (6 bytes) + 2 byte pad = 12 90 */ 91 #define SCTP_MAX_ADDR_PARAMS_SIZE 12 92 /* supported address type */ 93 struct sctp_supported_addr_param { 94 struct sctp_paramhdr ph;/* type=SCTP_SUPPORTED_ADDRTYPE */ 95 uint16_t addr_type[2]; /* array of supported address types */ 96 } SCTP_PACKED; 97 98 /* heartbeat info parameter */ 99 struct sctp_heartbeat_info_param { 100 struct sctp_paramhdr ph; 101 uint32_t time_value_1; 102 uint32_t time_value_2; 103 uint32_t random_value1; 104 uint32_t random_value2; 105 uint8_t addr_family; 106 uint8_t addr_len; 107 /* make sure that this structure is 4 byte aligned */ 108 uint8_t padding[2]; 109 char address[SCTP_ADDRMAX]; 110 } SCTP_PACKED; 111 112 /* draft-ietf-tsvwg-prsctp */ 113 /* PR-SCTP supported parameter */ 114 struct sctp_prsctp_supported_param { 115 struct sctp_paramhdr ph; 116 } SCTP_PACKED; 117 118 /* draft-ietf-tsvwg-addip-sctp */ 119 struct sctp_asconf_paramhdr { /* an ASCONF "parameter" */ 120 struct sctp_paramhdr ph;/* a SCTP parameter header */ 121 uint32_t correlation_id;/* correlation id for this param */ 122 } SCTP_PACKED; 123 124 struct sctp_asconf_addr_param { /* an ASCONF address parameter */ 125 struct sctp_asconf_paramhdr aph; /* asconf "parameter" */ 126 struct sctp_ipv6addr_param addrp; /* max storage size */ 127 } SCTP_PACKED; 128 129 struct sctp_asconf_tag_param { /* an ASCONF NAT-Vtag parameter */ 130 struct sctp_asconf_paramhdr aph; /* asconf "parameter" */ 131 uint32_t local_vtag; 132 uint32_t remote_vtag; 133 } SCTP_PACKED; 134 135 struct sctp_asconf_addrv4_param { /* an ASCONF address (v4) parameter */ 136 struct sctp_asconf_paramhdr aph; /* asconf "parameter" */ 137 struct sctp_ipv4addr_param addrp; /* max storage size */ 138 } SCTP_PACKED; 139 140 #define SCTP_MAX_SUPPORTED_EXT 256 141 142 struct sctp_supported_chunk_types_param { 143 struct sctp_paramhdr ph;/* type = 0x8008 len = x */ 144 uint8_t chunk_types[]; 145 } SCTP_PACKED; 146 147 /* 148 * Structures for DATA chunks 149 */ 150 struct sctp_data { 151 uint32_t tsn; 152 uint16_t sid; 153 uint16_t ssn; 154 uint32_t ppid; 155 /* user data follows */ 156 } SCTP_PACKED; 157 158 struct sctp_data_chunk { 159 struct sctp_chunkhdr ch; 160 struct sctp_data dp; 161 } SCTP_PACKED; 162 163 struct sctp_idata { 164 uint32_t tsn; 165 uint16_t sid; 166 uint16_t reserved; /* Where does the SSN go? */ 167 uint32_t mid; 168 union { 169 uint32_t ppid; 170 uint32_t fsn; /* Fragment Sequence Number */ 171 } ppid_fsn; 172 /* user data follows */ 173 } SCTP_PACKED; 174 175 struct sctp_idata_chunk { 176 struct sctp_chunkhdr ch; 177 struct sctp_idata dp; 178 } SCTP_PACKED; 179 180 /* 181 * Structures for the control chunks 182 */ 183 184 /* Initiate (INIT)/Initiate Ack (INIT ACK) */ 185 struct sctp_init { 186 uint32_t initiate_tag; /* initiate tag */ 187 uint32_t a_rwnd; /* a_rwnd */ 188 uint16_t num_outbound_streams; /* OS */ 189 uint16_t num_inbound_streams; /* MIS */ 190 uint32_t initial_tsn; /* I-TSN */ 191 /* optional param's follow */ 192 } SCTP_PACKED; 193 #define SCTP_IDENTIFICATION_SIZE 16 194 #define SCTP_ADDRESS_SIZE 4 195 #if defined(__Userspace__) 196 #define SCTP_RESERVE_SPACE 5 197 #else 198 #define SCTP_RESERVE_SPACE 6 199 #endif 200 /* state cookie header */ 201 struct sctp_state_cookie { /* this is our definition... */ 202 uint8_t identification[SCTP_IDENTIFICATION_SIZE];/* id of who we are */ 203 struct timeval time_entered; /* the time I built cookie */ 204 uint32_t cookie_life; /* life I will award this cookie */ 205 uint32_t tie_tag_my_vtag; /* my tag in old association */ 206 207 uint32_t tie_tag_peer_vtag; /* peers tag in old association */ 208 uint32_t peers_vtag; /* peers tag in INIT (for quick ref) */ 209 210 uint32_t my_vtag; /* my tag in INIT-ACK (for quick ref) */ 211 uint32_t address[SCTP_ADDRESS_SIZE]; /* 4 ints/128 bits */ 212 uint32_t addr_type; /* address type */ 213 uint32_t laddress[SCTP_ADDRESS_SIZE]; /* my local from address */ 214 uint32_t laddr_type; /* my local from address type */ 215 uint32_t scope_id; /* v6 scope id for link-locals */ 216 217 uint16_t peerport; /* port address of the peer in the INIT */ 218 uint16_t myport; /* my port address used in the INIT */ 219 uint8_t ipv4_addr_legal;/* Are V4 addr legal? */ 220 uint8_t ipv6_addr_legal;/* Are V6 addr legal? */ 221 #if defined(__Userspace__) 222 uint8_t conn_addr_legal; 223 #endif 224 uint8_t local_scope; /* IPv6 local scope flag */ 225 uint8_t site_scope; /* IPv6 site scope flag */ 226 227 uint8_t ipv4_scope; /* IPv4 private addr scope */ 228 uint8_t loopback_scope; /* loopback scope information */ 229 uint8_t reserved[SCTP_RESERVE_SPACE]; /* Align to 64 bits */ 230 /* 231 * at the end is tacked on the INIT chunk and the INIT-ACK chunk 232 * (minus the cookie). 233 */ 234 } SCTP_PACKED; 235 236 /* state cookie parameter */ 237 struct sctp_state_cookie_param { 238 struct sctp_paramhdr ph; 239 struct sctp_state_cookie cookie; 240 } SCTP_PACKED; 241 242 struct sctp_init_chunk { 243 struct sctp_chunkhdr ch; 244 struct sctp_init init; 245 } SCTP_PACKED; 246 247 struct sctp_init_msg { 248 struct sctphdr sh; 249 struct sctp_init_chunk msg; 250 } SCTP_PACKED; 251 252 /* ... used for both INIT and INIT ACK */ 253 #define sctp_init_ack sctp_init 254 #define sctp_init_ack_chunk sctp_init_chunk 255 #define sctp_init_ack_msg sctp_init_msg 256 257 /* Selective Ack (SACK) */ 258 struct sctp_gap_ack_block { 259 uint16_t start; /* Gap Ack block start */ 260 uint16_t end; /* Gap Ack block end */ 261 } SCTP_PACKED; 262 263 struct sctp_sack { 264 uint32_t cum_tsn_ack; /* cumulative TSN Ack */ 265 uint32_t a_rwnd; /* updated a_rwnd of sender */ 266 uint16_t num_gap_ack_blks; /* number of Gap Ack blocks */ 267 uint16_t num_dup_tsns; /* number of duplicate TSNs */ 268 /* struct sctp_gap_ack_block's follow */ 269 /* uint32_t duplicate_tsn's follow */ 270 } SCTP_PACKED; 271 272 struct sctp_sack_chunk { 273 struct sctp_chunkhdr ch; 274 struct sctp_sack sack; 275 } SCTP_PACKED; 276 277 struct sctp_nr_sack { 278 uint32_t cum_tsn_ack; /* cumulative TSN Ack */ 279 uint32_t a_rwnd; /* updated a_rwnd of sender */ 280 uint16_t num_gap_ack_blks; /* number of Gap Ack blocks */ 281 uint16_t num_nr_gap_ack_blks; /* number of NR Gap Ack blocks */ 282 uint16_t num_dup_tsns; /* number of duplicate TSNs */ 283 uint16_t reserved; /* not currently used*/ 284 /* struct sctp_gap_ack_block's follow */ 285 /* uint32_t duplicate_tsn's follow */ 286 } SCTP_PACKED; 287 288 struct sctp_nr_sack_chunk { 289 struct sctp_chunkhdr ch; 290 struct sctp_nr_sack nr_sack; 291 } SCTP_PACKED; 292 293 /* Heartbeat Request (HEARTBEAT) */ 294 struct sctp_heartbeat { 295 struct sctp_heartbeat_info_param hb_info; 296 } SCTP_PACKED; 297 298 struct sctp_heartbeat_chunk { 299 struct sctp_chunkhdr ch; 300 struct sctp_heartbeat heartbeat; 301 } SCTP_PACKED; 302 303 /* ... used for Heartbeat Ack (HEARTBEAT ACK) */ 304 #define sctp_heartbeat_ack sctp_heartbeat 305 #define sctp_heartbeat_ack_chunk sctp_heartbeat_chunk 306 307 /* Abort Asssociation (ABORT) */ 308 struct sctp_abort_chunk { 309 struct sctp_chunkhdr ch; 310 /* optional error cause may follow */ 311 } SCTP_PACKED; 312 313 struct sctp_abort_msg { 314 struct sctphdr sh; 315 struct sctp_abort_chunk msg; 316 } SCTP_PACKED; 317 318 /* Shutdown Association (SHUTDOWN) */ 319 struct sctp_shutdown_chunk { 320 struct sctp_chunkhdr ch; 321 uint32_t cumulative_tsn_ack; 322 } SCTP_PACKED; 323 324 /* Shutdown Acknowledgment (SHUTDOWN ACK) */ 325 struct sctp_shutdown_ack_chunk { 326 struct sctp_chunkhdr ch; 327 } SCTP_PACKED; 328 329 /* Operation Error (ERROR) */ 330 struct sctp_error_chunk { 331 struct sctp_chunkhdr ch; 332 /* optional error causes follow */ 333 } SCTP_PACKED; 334 335 /* Cookie Echo (COOKIE ECHO) */ 336 struct sctp_cookie_echo_chunk { 337 struct sctp_chunkhdr ch; 338 struct sctp_state_cookie cookie; 339 } SCTP_PACKED; 340 341 /* Cookie Acknowledgment (COOKIE ACK) */ 342 struct sctp_cookie_ack_chunk { 343 struct sctp_chunkhdr ch; 344 } SCTP_PACKED; 345 346 /* Explicit Congestion Notification Echo (ECNE) */ 347 struct old_sctp_ecne_chunk { 348 struct sctp_chunkhdr ch; 349 uint32_t tsn; 350 } SCTP_PACKED; 351 352 struct sctp_ecne_chunk { 353 struct sctp_chunkhdr ch; 354 uint32_t tsn; 355 uint32_t num_pkts_since_cwr; 356 } SCTP_PACKED; 357 358 /* Congestion Window Reduced (CWR) */ 359 struct sctp_cwr_chunk { 360 struct sctp_chunkhdr ch; 361 uint32_t tsn; 362 } SCTP_PACKED; 363 364 /* Shutdown Complete (SHUTDOWN COMPLETE) */ 365 struct sctp_shutdown_complete_chunk { 366 struct sctp_chunkhdr ch; 367 } SCTP_PACKED; 368 369 struct sctp_adaptation_layer_indication { 370 struct sctp_paramhdr ph; 371 uint32_t indication; 372 } SCTP_PACKED; 373 374 /* 375 * draft-ietf-tsvwg-addip-sctp 376 */ 377 /* Address/Stream Configuration Change (ASCONF) */ 378 struct sctp_asconf_chunk { 379 struct sctp_chunkhdr ch; 380 uint32_t serial_number; 381 /* lookup address parameter (mandatory) */ 382 /* asconf parameters follow */ 383 } SCTP_PACKED; 384 385 /* Address/Stream Configuration Acknowledge (ASCONF ACK) */ 386 struct sctp_asconf_ack_chunk { 387 struct sctp_chunkhdr ch; 388 uint32_t serial_number; 389 /* asconf parameters follow */ 390 } SCTP_PACKED; 391 392 /* draft-ietf-tsvwg-prsctp */ 393 /* Forward Cumulative TSN (FORWARD TSN) */ 394 struct sctp_forward_tsn_chunk { 395 struct sctp_chunkhdr ch; 396 uint32_t new_cumulative_tsn; 397 /* stream/sequence pairs (sctp_strseq) follow */ 398 } SCTP_PACKED; 399 400 struct sctp_strseq { 401 uint16_t sid; 402 uint16_t ssn; 403 } SCTP_PACKED; 404 405 struct sctp_strseq_mid { 406 uint16_t sid; 407 uint16_t flags; 408 uint32_t mid; 409 }; 410 411 struct sctp_forward_tsn_msg { 412 struct sctphdr sh; 413 struct sctp_forward_tsn_chunk msg; 414 } SCTP_PACKED; 415 416 /* should be a multiple of 4 - 1 aka 3/7/11 etc. */ 417 418 #define SCTP_NUM_DB_TO_VERIFY 31 419 420 struct sctp_chunk_desc { 421 uint8_t chunk_type; 422 uint8_t data_bytes[SCTP_NUM_DB_TO_VERIFY]; 423 uint32_t tsn_ifany; 424 } SCTP_PACKED; 425 426 struct sctp_pktdrop_chunk { 427 struct sctp_chunkhdr ch; 428 uint32_t bottle_bw; 429 uint32_t current_onq; 430 uint16_t trunc_len; 431 uint16_t reserved; 432 uint8_t data[]; 433 } SCTP_PACKED; 434 435 /**********STREAM RESET STUFF ******************/ 436 437 struct sctp_stream_reset_request { 438 struct sctp_paramhdr ph; 439 uint32_t request_seq; 440 } SCTP_PACKED; 441 442 struct sctp_stream_reset_out_request { 443 struct sctp_paramhdr ph; 444 uint32_t request_seq; /* monotonically increasing seq no */ 445 uint32_t response_seq; /* if a response, the resp seq no */ 446 uint32_t send_reset_at_tsn; /* last TSN I assigned outbound */ 447 uint16_t list_of_streams[]; /* if not all list of streams */ 448 } SCTP_PACKED; 449 450 struct sctp_stream_reset_in_request { 451 struct sctp_paramhdr ph; 452 uint32_t request_seq; 453 uint16_t list_of_streams[]; /* if not all list of streams */ 454 } SCTP_PACKED; 455 456 struct sctp_stream_reset_tsn_request { 457 struct sctp_paramhdr ph; 458 uint32_t request_seq; 459 } SCTP_PACKED; 460 461 struct sctp_stream_reset_response { 462 struct sctp_paramhdr ph; 463 uint32_t response_seq; /* if a response, the resp seq no */ 464 uint32_t result; 465 } SCTP_PACKED; 466 467 struct sctp_stream_reset_response_tsn { 468 struct sctp_paramhdr ph; 469 uint32_t response_seq; /* if a response, the resp seq no */ 470 uint32_t result; 471 uint32_t senders_next_tsn; 472 uint32_t receivers_next_tsn; 473 } SCTP_PACKED; 474 475 struct sctp_stream_reset_add_strm { 476 struct sctp_paramhdr ph; 477 uint32_t request_seq; 478 uint16_t number_of_streams; 479 uint16_t reserved; 480 } SCTP_PACKED; 481 482 #define SCTP_STREAM_RESET_RESULT_NOTHING_TO_DO 0x00000000 /* XXX: unused */ 483 #define SCTP_STREAM_RESET_RESULT_PERFORMED 0x00000001 484 #define SCTP_STREAM_RESET_RESULT_DENIED 0x00000002 485 #define SCTP_STREAM_RESET_RESULT_ERR__WRONG_SSN 0x00000003 /* XXX: unused */ 486 #define SCTP_STREAM_RESET_RESULT_ERR_IN_PROGRESS 0x00000004 487 #define SCTP_STREAM_RESET_RESULT_ERR_BAD_SEQNO 0x00000005 488 #define SCTP_STREAM_RESET_RESULT_IN_PROGRESS 0x00000006 /* XXX: unused */ 489 490 /* 491 * convience structures, note that if you are making a request for specific 492 * streams then the request will need to be an overlay structure. 493 */ 494 495 struct sctp_stream_reset_tsn_req { 496 struct sctp_chunkhdr ch; 497 struct sctp_stream_reset_tsn_request sr_req; 498 } SCTP_PACKED; 499 500 struct sctp_stream_reset_resp { 501 struct sctp_chunkhdr ch; 502 struct sctp_stream_reset_response sr_resp; 503 } SCTP_PACKED; 504 505 /* respone only valid with a TSN request */ 506 struct sctp_stream_reset_resp_tsn { 507 struct sctp_chunkhdr ch; 508 struct sctp_stream_reset_response_tsn sr_resp; 509 } SCTP_PACKED; 510 511 /****************************************************/ 512 513 /* 514 * Authenticated chunks support draft-ietf-tsvwg-sctp-auth 515 */ 516 517 /* Should we make the max be 32? */ 518 #define SCTP_RANDOM_MAX_SIZE 256 519 struct sctp_auth_random { 520 struct sctp_paramhdr ph;/* type = 0x8002 */ 521 uint8_t random_data[]; 522 } SCTP_PACKED; 523 524 struct sctp_auth_chunk_list { 525 struct sctp_paramhdr ph;/* type = 0x8003 */ 526 uint8_t chunk_types[]; 527 } SCTP_PACKED; 528 529 struct sctp_auth_hmac_algo { 530 struct sctp_paramhdr ph;/* type = 0x8004 */ 531 uint16_t hmac_ids[]; 532 } SCTP_PACKED; 533 534 struct sctp_auth_chunk { 535 struct sctp_chunkhdr ch; 536 uint16_t shared_key_id; 537 uint16_t hmac_id; 538 uint8_t hmac[]; 539 } SCTP_PACKED; 540 541 /* 542 * we pre-reserve enough room for a ECNE or CWR AND a SACK with no missing 543 * pieces. If ENCE is missing we could have a couple of blocks. This way we 544 * optimize so we MOST likely can bundle a SACK/ECN with the smallest size 545 * data chunk I will split into. We could increase throughput slightly by 546 * taking out these two but the 24-sack/8-CWR i.e. 32 bytes I pre-reserve I 547 * feel is worth it for now. 548 */ 549 #ifndef SCTP_MAX_OVERHEAD 550 #ifdef INET6 551 #define SCTP_MAX_OVERHEAD (sizeof(struct sctp_data_chunk) + \ 552 sizeof(struct sctphdr) + \ 553 sizeof(struct sctp_ecne_chunk) + \ 554 sizeof(struct sctp_sack_chunk) + \ 555 sizeof(struct ip6_hdr)) 556 557 #define SCTP_MED_OVERHEAD (sizeof(struct sctp_data_chunk) + \ 558 sizeof(struct sctphdr) + \ 559 sizeof(struct ip6_hdr)) 560 561 #define SCTP_MIN_OVERHEAD (sizeof(struct ip6_hdr) + \ 562 sizeof(struct sctphdr)) 563 564 #else 565 #define SCTP_MAX_OVERHEAD (sizeof(struct sctp_data_chunk) + \ 566 sizeof(struct sctphdr) + \ 567 sizeof(struct sctp_ecne_chunk) + \ 568 sizeof(struct sctp_sack_chunk) + \ 569 sizeof(struct ip)) 570 571 #define SCTP_MED_OVERHEAD (sizeof(struct sctp_data_chunk) + \ 572 sizeof(struct sctphdr) + \ 573 sizeof(struct ip)) 574 575 #define SCTP_MIN_OVERHEAD (sizeof(struct ip) + \ 576 sizeof(struct sctphdr)) 577 578 #endif /* INET6 */ 579 #endif /* !SCTP_MAX_OVERHEAD */ 580 581 #define SCTP_MED_V4_OVERHEAD (sizeof(struct sctp_data_chunk) + \ 582 sizeof(struct sctphdr) + \ 583 sizeof(struct ip)) 584 585 #define SCTP_MIN_V4_OVERHEAD (sizeof(struct ip) + \ 586 sizeof(struct sctphdr)) 587 588 #if defined(_WIN32) && !defined(__Userspace__) 589 #include <packoff.h> 590 #endif 591 #if defined(_WIN32) && defined(__Userspace__) 592 #pragma pack(pop) 593 #endif 594 #undef SCTP_PACKED 595 #endif /* !__sctp_header_h__ */ 596