11eaf0ac3Slogwang /*- 2*d4a07e70Sfengbojiang * SPDX-License-Identifier: BSD-3-Clause 3*d4a07e70Sfengbojiang * 41eaf0ac3Slogwang * Copyright (c) 2001-2008, by Cisco Systems, Inc. All rights reserved. 51eaf0ac3Slogwang * Copyright (c) 2008-2012, by Randall Stewart. All rights reserved. 61eaf0ac3Slogwang * Copyright (c) 2008-2012, by Michael Tuexen. All rights reserved. 71eaf0ac3Slogwang * 81eaf0ac3Slogwang * Redistribution and use in source and binary forms, with or without 91eaf0ac3Slogwang * modification, are permitted provided that the following conditions are met: 101eaf0ac3Slogwang * 111eaf0ac3Slogwang * a) Redistributions of source code must retain the above copyright notice, 121eaf0ac3Slogwang * this list of conditions and the following disclaimer. 131eaf0ac3Slogwang * 141eaf0ac3Slogwang * b) Redistributions in binary form must reproduce the above copyright 151eaf0ac3Slogwang * notice, this list of conditions and the following disclaimer in 161eaf0ac3Slogwang * the documentation and/or other materials provided with the distribution. 171eaf0ac3Slogwang * 181eaf0ac3Slogwang * c) Neither the name of Cisco Systems, Inc. nor the names of its 191eaf0ac3Slogwang * contributors may be used to endorse or promote products derived 201eaf0ac3Slogwang * from this software without specific prior written permission. 211eaf0ac3Slogwang * 221eaf0ac3Slogwang * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 231eaf0ac3Slogwang * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, 241eaf0ac3Slogwang * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 251eaf0ac3Slogwang * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE 261eaf0ac3Slogwang * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 271eaf0ac3Slogwang * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 281eaf0ac3Slogwang * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 291eaf0ac3Slogwang * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 301eaf0ac3Slogwang * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 311eaf0ac3Slogwang * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF 321eaf0ac3Slogwang * THE POSSIBILITY OF SUCH DAMAGE. 331eaf0ac3Slogwang */ 341eaf0ac3Slogwang 351eaf0ac3Slogwang #include <sys/cdefs.h> 361eaf0ac3Slogwang __FBSDID("$FreeBSD$"); 371eaf0ac3Slogwang 381eaf0ac3Slogwang #ifndef _NETINET_SCTP_H_ 391eaf0ac3Slogwang #define _NETINET_SCTP_H_ 401eaf0ac3Slogwang 411eaf0ac3Slogwang #include <sys/types.h> 421eaf0ac3Slogwang 431eaf0ac3Slogwang #define SCTP_PACKED __attribute__((packed)) 441eaf0ac3Slogwang 451eaf0ac3Slogwang /* 461eaf0ac3Slogwang * SCTP protocol - RFC4960. 471eaf0ac3Slogwang */ 481eaf0ac3Slogwang struct sctphdr { 491eaf0ac3Slogwang uint16_t src_port; /* source port */ 501eaf0ac3Slogwang uint16_t dest_port; /* destination port */ 511eaf0ac3Slogwang uint32_t v_tag; /* verification tag of packet */ 521eaf0ac3Slogwang uint32_t checksum; /* CRC32C checksum */ 531eaf0ac3Slogwang /* chunks follow... */ 541eaf0ac3Slogwang } SCTP_PACKED; 551eaf0ac3Slogwang 561eaf0ac3Slogwang /* 571eaf0ac3Slogwang * SCTP Chunks 581eaf0ac3Slogwang */ 591eaf0ac3Slogwang struct sctp_chunkhdr { 601eaf0ac3Slogwang uint8_t chunk_type; /* chunk type */ 611eaf0ac3Slogwang uint8_t chunk_flags; /* chunk flags */ 621eaf0ac3Slogwang uint16_t chunk_length; /* chunk length */ 631eaf0ac3Slogwang /* optional params follow */ 641eaf0ac3Slogwang } SCTP_PACKED; 651eaf0ac3Slogwang 661eaf0ac3Slogwang /* 671eaf0ac3Slogwang * SCTP chunk parameters 681eaf0ac3Slogwang */ 691eaf0ac3Slogwang struct sctp_paramhdr { 701eaf0ac3Slogwang uint16_t param_type; /* parameter type */ 711eaf0ac3Slogwang uint16_t param_length; /* parameter length */ 721eaf0ac3Slogwang } SCTP_PACKED; 731eaf0ac3Slogwang 741eaf0ac3Slogwang /* 751eaf0ac3Slogwang * user socket options: socket API defined 761eaf0ac3Slogwang */ 771eaf0ac3Slogwang /* 781eaf0ac3Slogwang * read-write options 791eaf0ac3Slogwang */ 801eaf0ac3Slogwang #define SCTP_RTOINFO 0x00000001 811eaf0ac3Slogwang #define SCTP_ASSOCINFO 0x00000002 821eaf0ac3Slogwang #define SCTP_INITMSG 0x00000003 831eaf0ac3Slogwang #define SCTP_NODELAY 0x00000004 841eaf0ac3Slogwang #define SCTP_AUTOCLOSE 0x00000005 851eaf0ac3Slogwang #define SCTP_SET_PEER_PRIMARY_ADDR 0x00000006 861eaf0ac3Slogwang #define SCTP_PRIMARY_ADDR 0x00000007 871eaf0ac3Slogwang #define SCTP_ADAPTATION_LAYER 0x00000008 881eaf0ac3Slogwang /* same as above */ 891eaf0ac3Slogwang #define SCTP_ADAPTION_LAYER 0x00000008 901eaf0ac3Slogwang #define SCTP_DISABLE_FRAGMENTS 0x00000009 911eaf0ac3Slogwang #define SCTP_PEER_ADDR_PARAMS 0x0000000a 921eaf0ac3Slogwang #define SCTP_DEFAULT_SEND_PARAM 0x0000000b 931eaf0ac3Slogwang /* ancillary data/notification interest options */ 941eaf0ac3Slogwang #define SCTP_EVENTS 0x0000000c /* deprecated */ 951eaf0ac3Slogwang /* Without this applied we will give V4 and V6 addresses on a V6 socket */ 961eaf0ac3Slogwang #define SCTP_I_WANT_MAPPED_V4_ADDR 0x0000000d 971eaf0ac3Slogwang #define SCTP_MAXSEG 0x0000000e 981eaf0ac3Slogwang #define SCTP_DELAYED_SACK 0x0000000f 991eaf0ac3Slogwang #define SCTP_FRAGMENT_INTERLEAVE 0x00000010 1001eaf0ac3Slogwang #define SCTP_PARTIAL_DELIVERY_POINT 0x00000011 1011eaf0ac3Slogwang /* authentication support */ 1021eaf0ac3Slogwang #define SCTP_AUTH_CHUNK 0x00000012 1031eaf0ac3Slogwang #define SCTP_AUTH_KEY 0x00000013 1041eaf0ac3Slogwang #define SCTP_HMAC_IDENT 0x00000014 1051eaf0ac3Slogwang #define SCTP_AUTH_ACTIVE_KEY 0x00000015 1061eaf0ac3Slogwang #define SCTP_AUTH_DELETE_KEY 0x00000016 1071eaf0ac3Slogwang #define SCTP_USE_EXT_RCVINFO 0x00000017 1081eaf0ac3Slogwang #define SCTP_AUTO_ASCONF 0x00000018 /* rw */ 1091eaf0ac3Slogwang #define SCTP_MAXBURST 0x00000019 /* rw */ 1101eaf0ac3Slogwang #define SCTP_MAX_BURST 0x00000019 /* rw */ 1111eaf0ac3Slogwang /* assoc level context */ 1121eaf0ac3Slogwang #define SCTP_CONTEXT 0x0000001a /* rw */ 1131eaf0ac3Slogwang /* explicit EOR signalling */ 1141eaf0ac3Slogwang #define SCTP_EXPLICIT_EOR 0x0000001b 1151eaf0ac3Slogwang #define SCTP_REUSE_PORT 0x0000001c /* rw */ 1161eaf0ac3Slogwang #define SCTP_AUTH_DEACTIVATE_KEY 0x0000001d 1171eaf0ac3Slogwang #define SCTP_EVENT 0x0000001e 1181eaf0ac3Slogwang #define SCTP_RECVRCVINFO 0x0000001f 1191eaf0ac3Slogwang #define SCTP_RECVNXTINFO 0x00000020 1201eaf0ac3Slogwang #define SCTP_DEFAULT_SNDINFO 0x00000021 1211eaf0ac3Slogwang #define SCTP_DEFAULT_PRINFO 0x00000022 1221eaf0ac3Slogwang #define SCTP_PEER_ADDR_THLDS 0x00000023 1231eaf0ac3Slogwang #define SCTP_REMOTE_UDP_ENCAPS_PORT 0x00000024 1241eaf0ac3Slogwang #define SCTP_ECN_SUPPORTED 0x00000025 1251eaf0ac3Slogwang #define SCTP_PR_SUPPORTED 0x00000026 1261eaf0ac3Slogwang #define SCTP_AUTH_SUPPORTED 0x00000027 1271eaf0ac3Slogwang #define SCTP_ASCONF_SUPPORTED 0x00000028 1281eaf0ac3Slogwang #define SCTP_RECONFIG_SUPPORTED 0x00000029 1291eaf0ac3Slogwang #define SCTP_NRSACK_SUPPORTED 0x00000030 1301eaf0ac3Slogwang #define SCTP_PKTDROP_SUPPORTED 0x00000031 1311eaf0ac3Slogwang #define SCTP_MAX_CWND 0x00000032 1321eaf0ac3Slogwang 1331eaf0ac3Slogwang /* 1341eaf0ac3Slogwang * read-only options 1351eaf0ac3Slogwang */ 1361eaf0ac3Slogwang #define SCTP_STATUS 0x00000100 1371eaf0ac3Slogwang #define SCTP_GET_PEER_ADDR_INFO 0x00000101 1381eaf0ac3Slogwang /* authentication support */ 1391eaf0ac3Slogwang #define SCTP_PEER_AUTH_CHUNKS 0x00000102 1401eaf0ac3Slogwang #define SCTP_LOCAL_AUTH_CHUNKS 0x00000103 1411eaf0ac3Slogwang #define SCTP_GET_ASSOC_NUMBER 0x00000104 /* ro */ 1421eaf0ac3Slogwang #define SCTP_GET_ASSOC_ID_LIST 0x00000105 /* ro */ 1431eaf0ac3Slogwang #define SCTP_TIMEOUTS 0x00000106 1441eaf0ac3Slogwang #define SCTP_PR_STREAM_STATUS 0x00000107 1451eaf0ac3Slogwang #define SCTP_PR_ASSOC_STATUS 0x00000108 1461eaf0ac3Slogwang 1471eaf0ac3Slogwang /* 1481eaf0ac3Slogwang * user socket options: BSD implementation specific 1491eaf0ac3Slogwang */ 1501eaf0ac3Slogwang /* 1511eaf0ac3Slogwang * Blocking I/O is enabled on any TCP type socket by default. For the UDP 1521eaf0ac3Slogwang * model if this is turned on then the socket buffer is shared for send 1531eaf0ac3Slogwang * resources amongst all associations. The default for the UDP model is that 1541eaf0ac3Slogwang * is SS_NBIO is set. Which means all associations have a separate send 1551eaf0ac3Slogwang * limit BUT they will NOT ever BLOCK instead you will get an error back 1561eaf0ac3Slogwang * EAGAIN if you try to send too much. If you want the blocking semantics you 1571eaf0ac3Slogwang * set this option at the cost of sharing one socket send buffer size amongst 1581eaf0ac3Slogwang * all associations. Peeled off sockets turn this option off and block. But 1591eaf0ac3Slogwang * since both TCP and peeled off sockets have only one assoc per socket this 1601eaf0ac3Slogwang * is fine. It probably does NOT make sense to set this on SS_NBIO on a TCP 1611eaf0ac3Slogwang * model OR peeled off UDP model, but we do allow you to do so. You just use 1621eaf0ac3Slogwang * the normal syscall to toggle SS_NBIO the way you want. 1631eaf0ac3Slogwang * 1641eaf0ac3Slogwang * Blocking I/O is controlled by the SS_NBIO flag on the socket state so_state 1651eaf0ac3Slogwang * field. 1661eaf0ac3Slogwang */ 1671eaf0ac3Slogwang 1681eaf0ac3Slogwang #define SCTP_ENABLE_STREAM_RESET 0x00000900 /* struct 1691eaf0ac3Slogwang * sctp_assoc_value */ 1701eaf0ac3Slogwang #define SCTP_RESET_STREAMS 0x00000901 /* struct 1711eaf0ac3Slogwang * sctp_reset_streams */ 1721eaf0ac3Slogwang #define SCTP_RESET_ASSOC 0x00000902 /* sctp_assoc_t */ 1731eaf0ac3Slogwang #define SCTP_ADD_STREAMS 0x00000903 /* struct 1741eaf0ac3Slogwang * sctp_add_streams */ 1751eaf0ac3Slogwang 1761eaf0ac3Slogwang /* For enable stream reset */ 1771eaf0ac3Slogwang #define SCTP_ENABLE_RESET_STREAM_REQ 0x00000001 1781eaf0ac3Slogwang #define SCTP_ENABLE_RESET_ASSOC_REQ 0x00000002 1791eaf0ac3Slogwang #define SCTP_ENABLE_CHANGE_ASSOC_REQ 0x00000004 1801eaf0ac3Slogwang #define SCTP_ENABLE_VALUE_MASK 0x00000007 1811eaf0ac3Slogwang /* For reset streams */ 1821eaf0ac3Slogwang #define SCTP_STREAM_RESET_INCOMING 0x00000001 1831eaf0ac3Slogwang #define SCTP_STREAM_RESET_OUTGOING 0x00000002 1841eaf0ac3Slogwang 1851eaf0ac3Slogwang /* here on down are more implementation specific */ 1861eaf0ac3Slogwang #define SCTP_SET_DEBUG_LEVEL 0x00001005 1871eaf0ac3Slogwang #define SCTP_CLR_STAT_LOG 0x00001007 1881eaf0ac3Slogwang /* CMT ON/OFF socket option */ 1891eaf0ac3Slogwang #define SCTP_CMT_ON_OFF 0x00001200 1901eaf0ac3Slogwang #define SCTP_CMT_USE_DAC 0x00001201 1911eaf0ac3Slogwang /* JRS - Pluggable Congestion Control Socket option */ 1921eaf0ac3Slogwang #define SCTP_PLUGGABLE_CC 0x00001202 1931eaf0ac3Slogwang /* RS - Pluggable Stream Scheduling Socket option */ 1941eaf0ac3Slogwang #define SCTP_PLUGGABLE_SS 0x00001203 1951eaf0ac3Slogwang #define SCTP_SS_VALUE 0x00001204 1961eaf0ac3Slogwang #define SCTP_CC_OPTION 0x00001205 /* Options for CC 1971eaf0ac3Slogwang * modules */ 1981eaf0ac3Slogwang /* For I-DATA */ 1991eaf0ac3Slogwang #define SCTP_INTERLEAVING_SUPPORTED 0x00001206 2001eaf0ac3Slogwang 2011eaf0ac3Slogwang /* read only */ 2021eaf0ac3Slogwang #define SCTP_GET_SNDBUF_USE 0x00001101 2031eaf0ac3Slogwang #define SCTP_GET_STAT_LOG 0x00001103 2041eaf0ac3Slogwang #define SCTP_PCB_STATUS 0x00001104 2051eaf0ac3Slogwang #define SCTP_GET_NONCE_VALUES 0x00001105 2061eaf0ac3Slogwang 2071eaf0ac3Slogwang /* Special hook for dynamically setting primary for all assoc's, 2081eaf0ac3Slogwang * this is a write only option that requires root privilege. 2091eaf0ac3Slogwang */ 2101eaf0ac3Slogwang #define SCTP_SET_DYNAMIC_PRIMARY 0x00002001 2111eaf0ac3Slogwang 2121eaf0ac3Slogwang /* VRF (virtual router feature) and multi-VRF support 2131eaf0ac3Slogwang * options. VRF's provide splits within a router 2141eaf0ac3Slogwang * that give the views of multiple routers. A 2151eaf0ac3Slogwang * standard host, without VRF support, is just 2161eaf0ac3Slogwang * a single VRF. If VRF's are supported then 2171eaf0ac3Slogwang * the transport must be VRF aware. This means 2181eaf0ac3Slogwang * that every socket call coming in must be directed 2191eaf0ac3Slogwang * within the endpoint to one of the VRF's it belongs 2201eaf0ac3Slogwang * to. The endpoint, before binding, may select 2211eaf0ac3Slogwang * the "default" VRF it is in by using a set socket 2221eaf0ac3Slogwang * option with SCTP_VRF_ID. This will also 2231eaf0ac3Slogwang * get propagated to the default VRF. Once the 2241eaf0ac3Slogwang * endpoint binds an address then it CANNOT add 2251eaf0ac3Slogwang * additional VRF's to become a Multi-VRF endpoint. 2261eaf0ac3Slogwang * 2271eaf0ac3Slogwang * Before BINDING additional VRF's can be added with 2281eaf0ac3Slogwang * the SCTP_ADD_VRF_ID call or deleted with 2291eaf0ac3Slogwang * SCTP_DEL_VRF_ID. 2301eaf0ac3Slogwang * 2311eaf0ac3Slogwang * Associations are ALWAYS contained inside a single 2321eaf0ac3Slogwang * VRF. They cannot reside in two (or more) VRF's. Incoming 2331eaf0ac3Slogwang * packets, assuming the router is VRF aware, can always 2341eaf0ac3Slogwang * tell us what VRF they arrived on. A host not supporting 2351eaf0ac3Slogwang * any VRF's will find that the packets always arrived on the 2361eaf0ac3Slogwang * single VRF that the host has. 2371eaf0ac3Slogwang * 2381eaf0ac3Slogwang */ 2391eaf0ac3Slogwang 2401eaf0ac3Slogwang #define SCTP_VRF_ID 0x00003001 2411eaf0ac3Slogwang #define SCTP_ADD_VRF_ID 0x00003002 2421eaf0ac3Slogwang #define SCTP_GET_VRF_IDS 0x00003003 2431eaf0ac3Slogwang #define SCTP_GET_ASOC_VRF 0x00003004 2441eaf0ac3Slogwang #define SCTP_DEL_VRF_ID 0x00003005 2451eaf0ac3Slogwang 2461eaf0ac3Slogwang /* 2471eaf0ac3Slogwang * If you enable packet logging you can get 2481eaf0ac3Slogwang * a poor mans ethereal output in binary 2491eaf0ac3Slogwang * form. Note this is a compile option to 2501eaf0ac3Slogwang * the kernel, SCTP_PACKET_LOGGING, and 2511eaf0ac3Slogwang * without it in your kernel you 2521eaf0ac3Slogwang * will get a EOPNOTSUPP 2531eaf0ac3Slogwang */ 2541eaf0ac3Slogwang #define SCTP_GET_PACKET_LOG 0x00004001 2551eaf0ac3Slogwang 2561eaf0ac3Slogwang /* 2571eaf0ac3Slogwang * hidden implementation specific options these are NOT user visible (should 2581eaf0ac3Slogwang * move out of sctp.h) 2591eaf0ac3Slogwang */ 2601eaf0ac3Slogwang /* sctp_bindx() flags as hidden socket options */ 2611eaf0ac3Slogwang #define SCTP_BINDX_ADD_ADDR 0x00008001 2621eaf0ac3Slogwang #define SCTP_BINDX_REM_ADDR 0x00008002 2631eaf0ac3Slogwang /* Hidden socket option that gets the addresses */ 2641eaf0ac3Slogwang #define SCTP_GET_PEER_ADDRESSES 0x00008003 2651eaf0ac3Slogwang #define SCTP_GET_LOCAL_ADDRESSES 0x00008004 2661eaf0ac3Slogwang /* return the total count in bytes needed to hold all local addresses bound */ 2671eaf0ac3Slogwang #define SCTP_GET_LOCAL_ADDR_SIZE 0x00008005 2681eaf0ac3Slogwang /* Return the total count in bytes needed to hold the remote address */ 2691eaf0ac3Slogwang #define SCTP_GET_REMOTE_ADDR_SIZE 0x00008006 2701eaf0ac3Slogwang /* hidden option for connectx */ 2711eaf0ac3Slogwang #define SCTP_CONNECT_X 0x00008007 2721eaf0ac3Slogwang /* hidden option for connectx_delayed, part of sendx */ 2731eaf0ac3Slogwang #define SCTP_CONNECT_X_DELAYED 0x00008008 2741eaf0ac3Slogwang #define SCTP_CONNECT_X_COMPLETE 0x00008009 2751eaf0ac3Slogwang /* hidden socket option based sctp_peeloff */ 2761eaf0ac3Slogwang #define SCTP_PEELOFF 0x0000800a 2771eaf0ac3Slogwang /* the real worker for sctp_getaddrlen() */ 2781eaf0ac3Slogwang #define SCTP_GET_ADDR_LEN 0x0000800b 2791eaf0ac3Slogwang /* Debug things that need to be purged */ 2801eaf0ac3Slogwang #define SCTP_SET_INITIAL_DBG_SEQ 0x00009f00 2811eaf0ac3Slogwang 2821eaf0ac3Slogwang /* JRS - Supported congestion control modules for pluggable 2831eaf0ac3Slogwang * congestion control 2841eaf0ac3Slogwang */ 2851eaf0ac3Slogwang /* Standard TCP Congestion Control */ 2861eaf0ac3Slogwang #define SCTP_CC_RFC2581 0x00000000 2871eaf0ac3Slogwang /* High Speed TCP Congestion Control (Floyd) */ 2881eaf0ac3Slogwang #define SCTP_CC_HSTCP 0x00000001 2891eaf0ac3Slogwang /* HTCP Congestion Control */ 2901eaf0ac3Slogwang #define SCTP_CC_HTCP 0x00000002 2911eaf0ac3Slogwang /* RTCC Congestion Control - RFC2581 plus */ 2921eaf0ac3Slogwang #define SCTP_CC_RTCC 0x00000003 2931eaf0ac3Slogwang 2941eaf0ac3Slogwang #define SCTP_CC_OPT_RTCC_SETMODE 0x00002000 2951eaf0ac3Slogwang #define SCTP_CC_OPT_USE_DCCC_ECN 0x00002001 2961eaf0ac3Slogwang #define SCTP_CC_OPT_STEADY_STEP 0x00002002 2971eaf0ac3Slogwang 2981eaf0ac3Slogwang #define SCTP_CMT_OFF 0 2991eaf0ac3Slogwang #define SCTP_CMT_BASE 1 3001eaf0ac3Slogwang #define SCTP_CMT_RPV1 2 3011eaf0ac3Slogwang #define SCTP_CMT_RPV2 3 3021eaf0ac3Slogwang #define SCTP_CMT_MPTCP 4 3031eaf0ac3Slogwang #define SCTP_CMT_MAX SCTP_CMT_MPTCP 3041eaf0ac3Slogwang 3051eaf0ac3Slogwang /* RS - Supported stream scheduling modules for pluggable 3061eaf0ac3Slogwang * stream scheduling 3071eaf0ac3Slogwang */ 3081eaf0ac3Slogwang /* Default simple round-robin */ 3091eaf0ac3Slogwang #define SCTP_SS_DEFAULT 0x00000000 3101eaf0ac3Slogwang /* Real round-robin */ 3111eaf0ac3Slogwang #define SCTP_SS_ROUND_ROBIN 0x00000001 3121eaf0ac3Slogwang /* Real round-robin per packet */ 3131eaf0ac3Slogwang #define SCTP_SS_ROUND_ROBIN_PACKET 0x00000002 3141eaf0ac3Slogwang /* Priority */ 3151eaf0ac3Slogwang #define SCTP_SS_PRIORITY 0x00000003 3161eaf0ac3Slogwang /* Fair Bandwidth */ 3171eaf0ac3Slogwang #define SCTP_SS_FAIR_BANDWITH 0x00000004 3181eaf0ac3Slogwang /* First-come, first-serve */ 3191eaf0ac3Slogwang #define SCTP_SS_FIRST_COME 0x00000005 3201eaf0ac3Slogwang 3211eaf0ac3Slogwang /* fragment interleave constants 3221eaf0ac3Slogwang * setting must be one of these or 3231eaf0ac3Slogwang * EINVAL returned. 3241eaf0ac3Slogwang */ 3251eaf0ac3Slogwang #define SCTP_FRAG_LEVEL_0 0x00000000 3261eaf0ac3Slogwang #define SCTP_FRAG_LEVEL_1 0x00000001 3271eaf0ac3Slogwang #define SCTP_FRAG_LEVEL_2 0x00000002 3281eaf0ac3Slogwang 3291eaf0ac3Slogwang /* 3301eaf0ac3Slogwang * user state values 3311eaf0ac3Slogwang */ 3321eaf0ac3Slogwang #define SCTP_CLOSED 0x0000 3331eaf0ac3Slogwang #define SCTP_BOUND 0x1000 3341eaf0ac3Slogwang #define SCTP_LISTEN 0x2000 3351eaf0ac3Slogwang #define SCTP_COOKIE_WAIT 0x0002 3361eaf0ac3Slogwang #define SCTP_COOKIE_ECHOED 0x0004 3371eaf0ac3Slogwang #define SCTP_ESTABLISHED 0x0008 3381eaf0ac3Slogwang #define SCTP_SHUTDOWN_SENT 0x0010 3391eaf0ac3Slogwang #define SCTP_SHUTDOWN_RECEIVED 0x0020 3401eaf0ac3Slogwang #define SCTP_SHUTDOWN_ACK_SENT 0x0040 3411eaf0ac3Slogwang #define SCTP_SHUTDOWN_PENDING 0x0080 3421eaf0ac3Slogwang 3431eaf0ac3Slogwang /* 3441eaf0ac3Slogwang * SCTP operational error codes (user visible) 3451eaf0ac3Slogwang */ 3461eaf0ac3Slogwang #define SCTP_CAUSE_NO_ERROR 0x0000 3471eaf0ac3Slogwang #define SCTP_CAUSE_INVALID_STREAM 0x0001 3481eaf0ac3Slogwang #define SCTP_CAUSE_MISSING_PARAM 0x0002 3491eaf0ac3Slogwang #define SCTP_CAUSE_STALE_COOKIE 0x0003 3501eaf0ac3Slogwang #define SCTP_CAUSE_OUT_OF_RESC 0x0004 3511eaf0ac3Slogwang #define SCTP_CAUSE_UNRESOLVABLE_ADDR 0x0005 3521eaf0ac3Slogwang #define SCTP_CAUSE_UNRECOG_CHUNK 0x0006 3531eaf0ac3Slogwang #define SCTP_CAUSE_INVALID_PARAM 0x0007 3541eaf0ac3Slogwang #define SCTP_CAUSE_UNRECOG_PARAM 0x0008 3551eaf0ac3Slogwang #define SCTP_CAUSE_NO_USER_DATA 0x0009 3561eaf0ac3Slogwang #define SCTP_CAUSE_COOKIE_IN_SHUTDOWN 0x000a 3571eaf0ac3Slogwang #define SCTP_CAUSE_RESTART_W_NEWADDR 0x000b 3581eaf0ac3Slogwang #define SCTP_CAUSE_USER_INITIATED_ABT 0x000c 3591eaf0ac3Slogwang #define SCTP_CAUSE_PROTOCOL_VIOLATION 0x000d 3601eaf0ac3Slogwang 3611eaf0ac3Slogwang /* Error causes from RFC5061 */ 3621eaf0ac3Slogwang #define SCTP_CAUSE_DELETING_LAST_ADDR 0x00a0 3631eaf0ac3Slogwang #define SCTP_CAUSE_RESOURCE_SHORTAGE 0x00a1 3641eaf0ac3Slogwang #define SCTP_CAUSE_DELETING_SRC_ADDR 0x00a2 3651eaf0ac3Slogwang #define SCTP_CAUSE_ILLEGAL_ASCONF_ACK 0x00a3 3661eaf0ac3Slogwang #define SCTP_CAUSE_REQUEST_REFUSED 0x00a4 3671eaf0ac3Slogwang 3681eaf0ac3Slogwang /* Error causes from nat-draft */ 3691eaf0ac3Slogwang #define SCTP_CAUSE_NAT_COLLIDING_STATE 0x00b0 3701eaf0ac3Slogwang #define SCTP_CAUSE_NAT_MISSING_STATE 0x00b1 3711eaf0ac3Slogwang 3721eaf0ac3Slogwang /* Error causes from RFC4895 */ 3731eaf0ac3Slogwang #define SCTP_CAUSE_UNSUPPORTED_HMACID 0x0105 3741eaf0ac3Slogwang 3751eaf0ac3Slogwang /* 3761eaf0ac3Slogwang * error cause parameters (user visible) 3771eaf0ac3Slogwang */ 3781eaf0ac3Slogwang struct sctp_gen_error_cause { 3791eaf0ac3Slogwang uint16_t code; 3801eaf0ac3Slogwang uint16_t length; 3811eaf0ac3Slogwang uint8_t info[]; 3821eaf0ac3Slogwang } SCTP_PACKED; 3831eaf0ac3Slogwang 3841eaf0ac3Slogwang struct sctp_error_cause { 3851eaf0ac3Slogwang uint16_t code; 3861eaf0ac3Slogwang uint16_t length; 3871eaf0ac3Slogwang /* optional cause-specific info may follow */ 3881eaf0ac3Slogwang } SCTP_PACKED; 3891eaf0ac3Slogwang 3901eaf0ac3Slogwang struct sctp_error_invalid_stream { 3911eaf0ac3Slogwang struct sctp_error_cause cause; /* code=SCTP_CAUSE_INVALID_STREAM */ 3921eaf0ac3Slogwang uint16_t stream_id; /* stream id of the DATA in error */ 3931eaf0ac3Slogwang uint16_t reserved; 3941eaf0ac3Slogwang } SCTP_PACKED; 3951eaf0ac3Slogwang 3961eaf0ac3Slogwang struct sctp_error_missing_param { 3971eaf0ac3Slogwang struct sctp_error_cause cause; /* code=SCTP_CAUSE_MISSING_PARAM */ 3981eaf0ac3Slogwang uint32_t num_missing_params; /* number of missing parameters */ 3991eaf0ac3Slogwang uint16_t type[]; 4001eaf0ac3Slogwang } SCTP_PACKED; 4011eaf0ac3Slogwang 4021eaf0ac3Slogwang struct sctp_error_stale_cookie { 4031eaf0ac3Slogwang struct sctp_error_cause cause; /* code=SCTP_CAUSE_STALE_COOKIE */ 4041eaf0ac3Slogwang uint32_t stale_time; /* time in usec of staleness */ 4051eaf0ac3Slogwang } SCTP_PACKED; 4061eaf0ac3Slogwang 4071eaf0ac3Slogwang struct sctp_error_out_of_resource { 4081eaf0ac3Slogwang struct sctp_error_cause cause; /* code=SCTP_CAUSE_OUT_OF_RESOURCES */ 4091eaf0ac3Slogwang } SCTP_PACKED; 4101eaf0ac3Slogwang 4111eaf0ac3Slogwang struct sctp_error_unresolv_addr { 4121eaf0ac3Slogwang struct sctp_error_cause cause; /* code=SCTP_CAUSE_UNRESOLVABLE_ADDR */ 4131eaf0ac3Slogwang } SCTP_PACKED; 4141eaf0ac3Slogwang 4151eaf0ac3Slogwang struct sctp_error_unrecognized_chunk { 4161eaf0ac3Slogwang struct sctp_error_cause cause; /* code=SCTP_CAUSE_UNRECOG_CHUNK */ 4171eaf0ac3Slogwang struct sctp_chunkhdr ch; /* header from chunk in error */ 4181eaf0ac3Slogwang } SCTP_PACKED; 4191eaf0ac3Slogwang 4201eaf0ac3Slogwang struct sctp_error_no_user_data { 4211eaf0ac3Slogwang struct sctp_error_cause cause; /* code=SCTP_CAUSE_NO_USER_DATA */ 4221eaf0ac3Slogwang uint32_t tsn; /* TSN of the empty data chunk */ 4231eaf0ac3Slogwang } SCTP_PACKED; 4241eaf0ac3Slogwang 4251eaf0ac3Slogwang struct sctp_error_auth_invalid_hmac { 4261eaf0ac3Slogwang struct sctp_error_cause cause; /* code=SCTP_CAUSE_UNSUPPORTED_HMACID */ 4271eaf0ac3Slogwang uint16_t hmac_id; 4281eaf0ac3Slogwang } SCTP_PACKED; 4291eaf0ac3Slogwang 4301eaf0ac3Slogwang /* 4311eaf0ac3Slogwang * Main SCTP chunk types we place these here so natd and f/w's in user land 4321eaf0ac3Slogwang * can find them. 4331eaf0ac3Slogwang */ 4341eaf0ac3Slogwang /************0x00 series ***********/ 4351eaf0ac3Slogwang #define SCTP_DATA 0x00 4361eaf0ac3Slogwang #define SCTP_INITIATION 0x01 4371eaf0ac3Slogwang #define SCTP_INITIATION_ACK 0x02 4381eaf0ac3Slogwang #define SCTP_SELECTIVE_ACK 0x03 4391eaf0ac3Slogwang #define SCTP_HEARTBEAT_REQUEST 0x04 4401eaf0ac3Slogwang #define SCTP_HEARTBEAT_ACK 0x05 4411eaf0ac3Slogwang #define SCTP_ABORT_ASSOCIATION 0x06 4421eaf0ac3Slogwang #define SCTP_SHUTDOWN 0x07 4431eaf0ac3Slogwang #define SCTP_SHUTDOWN_ACK 0x08 4441eaf0ac3Slogwang #define SCTP_OPERATION_ERROR 0x09 4451eaf0ac3Slogwang #define SCTP_COOKIE_ECHO 0x0a 4461eaf0ac3Slogwang #define SCTP_COOKIE_ACK 0x0b 4471eaf0ac3Slogwang #define SCTP_ECN_ECHO 0x0c 4481eaf0ac3Slogwang #define SCTP_ECN_CWR 0x0d 4491eaf0ac3Slogwang #define SCTP_SHUTDOWN_COMPLETE 0x0e 4501eaf0ac3Slogwang /* RFC4895 */ 4511eaf0ac3Slogwang #define SCTP_AUTHENTICATION 0x0f 4521eaf0ac3Slogwang /* EY nr_sack chunk id*/ 4531eaf0ac3Slogwang #define SCTP_NR_SELECTIVE_ACK 0x10 4541eaf0ac3Slogwang /************0x40 series ***********/ 4551eaf0ac3Slogwang #define SCTP_IDATA 0x40 4561eaf0ac3Slogwang /************0x80 series ***********/ 4571eaf0ac3Slogwang /* RFC5061 */ 4581eaf0ac3Slogwang #define SCTP_ASCONF_ACK 0x80 4591eaf0ac3Slogwang /* draft-ietf-stewart-pktdrpsctp */ 4601eaf0ac3Slogwang #define SCTP_PACKET_DROPPED 0x81 4611eaf0ac3Slogwang /* draft-ietf-stewart-strreset-xxx */ 4621eaf0ac3Slogwang #define SCTP_STREAM_RESET 0x82 4631eaf0ac3Slogwang 4641eaf0ac3Slogwang /* RFC4820 */ 4651eaf0ac3Slogwang #define SCTP_PAD_CHUNK 0x84 4661eaf0ac3Slogwang /************0xc0 series ***********/ 4671eaf0ac3Slogwang /* RFC3758 */ 4681eaf0ac3Slogwang #define SCTP_FORWARD_CUM_TSN 0xc0 4691eaf0ac3Slogwang /* RFC5061 */ 4701eaf0ac3Slogwang #define SCTP_ASCONF 0xc1 4711eaf0ac3Slogwang #define SCTP_IFORWARD_CUM_TSN 0xc2 4721eaf0ac3Slogwang 4731eaf0ac3Slogwang /* ABORT and SHUTDOWN COMPLETE FLAG */ 4741eaf0ac3Slogwang #define SCTP_HAD_NO_TCB 0x01 4751eaf0ac3Slogwang 4761eaf0ac3Slogwang /* Packet dropped flags */ 4771eaf0ac3Slogwang #define SCTP_FROM_MIDDLE_BOX SCTP_HAD_NO_TCB 4781eaf0ac3Slogwang #define SCTP_BADCRC 0x02 4791eaf0ac3Slogwang #define SCTP_PACKET_TRUNCATED 0x04 4801eaf0ac3Slogwang 4811eaf0ac3Slogwang /* Flag for ECN -CWR */ 4821eaf0ac3Slogwang #define SCTP_CWR_REDUCE_OVERRIDE 0x01 4831eaf0ac3Slogwang #define SCTP_CWR_IN_SAME_WINDOW 0x02 4841eaf0ac3Slogwang 4851eaf0ac3Slogwang #define SCTP_SAT_NETWORK_MIN 400 /* min ms for RTT to set satellite 4861eaf0ac3Slogwang * time */ 4871eaf0ac3Slogwang #define SCTP_SAT_NETWORK_BURST_INCR 2 /* how many times to multiply maxburst 4881eaf0ac3Slogwang * in sat */ 4891eaf0ac3Slogwang 4901eaf0ac3Slogwang /* Data Chuck Specific Flags */ 4911eaf0ac3Slogwang #define SCTP_DATA_FRAG_MASK 0x03 4921eaf0ac3Slogwang #define SCTP_DATA_MIDDLE_FRAG 0x00 4931eaf0ac3Slogwang #define SCTP_DATA_LAST_FRAG 0x01 4941eaf0ac3Slogwang #define SCTP_DATA_FIRST_FRAG 0x02 4951eaf0ac3Slogwang #define SCTP_DATA_NOT_FRAG 0x03 4961eaf0ac3Slogwang #define SCTP_DATA_UNORDERED 0x04 4971eaf0ac3Slogwang #define SCTP_DATA_SACK_IMMEDIATELY 0x08 4981eaf0ac3Slogwang /* ECN Nonce: SACK Chunk Specific Flags */ 4991eaf0ac3Slogwang #define SCTP_SACK_NONCE_SUM 0x01 5001eaf0ac3Slogwang 5011eaf0ac3Slogwang /* CMT DAC algorithm SACK flag */ 5021eaf0ac3Slogwang #define SCTP_SACK_CMT_DAC 0x80 5031eaf0ac3Slogwang 5041eaf0ac3Slogwang /* 5051eaf0ac3Slogwang * PCB flags (in sctp_flags bitmask). 5061eaf0ac3Slogwang * Note the features and flags are meant 5071eaf0ac3Slogwang * for use by netstat. 5081eaf0ac3Slogwang */ 5091eaf0ac3Slogwang #define SCTP_PCB_FLAGS_UDPTYPE 0x00000001 5101eaf0ac3Slogwang #define SCTP_PCB_FLAGS_TCPTYPE 0x00000002 5111eaf0ac3Slogwang #define SCTP_PCB_FLAGS_BOUNDALL 0x00000004 5121eaf0ac3Slogwang #define SCTP_PCB_FLAGS_ACCEPTING 0x00000008 5131eaf0ac3Slogwang #define SCTP_PCB_FLAGS_UNBOUND 0x00000010 514*d4a07e70Sfengbojiang #define SCTP_PCB_FLAGS_SND_ITERATOR_UP 0x00000020 5151eaf0ac3Slogwang #define SCTP_PCB_FLAGS_CLOSE_IP 0x00040000 5161eaf0ac3Slogwang #define SCTP_PCB_FLAGS_WAS_CONNECTED 0x00080000 5171eaf0ac3Slogwang #define SCTP_PCB_FLAGS_WAS_ABORTED 0x00100000 5181eaf0ac3Slogwang /* TCP model support */ 5191eaf0ac3Slogwang 5201eaf0ac3Slogwang #define SCTP_PCB_FLAGS_CONNECTED 0x00200000 5211eaf0ac3Slogwang #define SCTP_PCB_FLAGS_IN_TCPPOOL 0x00400000 5221eaf0ac3Slogwang #define SCTP_PCB_FLAGS_DONT_WAKE 0x00800000 5231eaf0ac3Slogwang #define SCTP_PCB_FLAGS_WAKEOUTPUT 0x01000000 5241eaf0ac3Slogwang #define SCTP_PCB_FLAGS_WAKEINPUT 0x02000000 5251eaf0ac3Slogwang #define SCTP_PCB_FLAGS_BOUND_V6 0x04000000 5261eaf0ac3Slogwang #define SCTP_PCB_FLAGS_BLOCKING_IO 0x08000000 5271eaf0ac3Slogwang #define SCTP_PCB_FLAGS_SOCKET_GONE 0x10000000 5281eaf0ac3Slogwang #define SCTP_PCB_FLAGS_SOCKET_ALLGONE 0x20000000 5291eaf0ac3Slogwang #define SCTP_PCB_FLAGS_SOCKET_CANT_READ 0x40000000 5301eaf0ac3Slogwang 5311eaf0ac3Slogwang /* flags to copy to new PCB */ 5321eaf0ac3Slogwang #define SCTP_PCB_COPY_FLAGS (SCTP_PCB_FLAGS_BOUNDALL|\ 5331eaf0ac3Slogwang SCTP_PCB_FLAGS_WAKEINPUT|\ 5341eaf0ac3Slogwang SCTP_PCB_FLAGS_BOUND_V6) 5351eaf0ac3Slogwang 5361eaf0ac3Slogwang /* 5371eaf0ac3Slogwang * PCB Features (in sctp_features bitmask) 5381eaf0ac3Slogwang */ 5391eaf0ac3Slogwang #define SCTP_PCB_FLAGS_DO_NOT_PMTUD 0x0000000000000001 5401eaf0ac3Slogwang #define SCTP_PCB_FLAGS_EXT_RCVINFO 0x0000000000000002 /* deprecated */ 5411eaf0ac3Slogwang #define SCTP_PCB_FLAGS_DONOT_HEARTBEAT 0x0000000000000004 5421eaf0ac3Slogwang #define SCTP_PCB_FLAGS_FRAG_INTERLEAVE 0x0000000000000008 5431eaf0ac3Slogwang #define SCTP_PCB_FLAGS_INTERLEAVE_STRMS 0x0000000000000010 5441eaf0ac3Slogwang #define SCTP_PCB_FLAGS_DO_ASCONF 0x0000000000000020 5451eaf0ac3Slogwang #define SCTP_PCB_FLAGS_AUTO_ASCONF 0x0000000000000040 5461eaf0ac3Slogwang /* socket options */ 5471eaf0ac3Slogwang #define SCTP_PCB_FLAGS_NODELAY 0x0000000000000100 5481eaf0ac3Slogwang #define SCTP_PCB_FLAGS_AUTOCLOSE 0x0000000000000200 5491eaf0ac3Slogwang #define SCTP_PCB_FLAGS_RECVDATAIOEVNT 0x0000000000000400 /* deprecated */ 5501eaf0ac3Slogwang #define SCTP_PCB_FLAGS_RECVASSOCEVNT 0x0000000000000800 5511eaf0ac3Slogwang #define SCTP_PCB_FLAGS_RECVPADDREVNT 0x0000000000001000 5521eaf0ac3Slogwang #define SCTP_PCB_FLAGS_RECVPEERERR 0x0000000000002000 5531eaf0ac3Slogwang #define SCTP_PCB_FLAGS_RECVSENDFAILEVNT 0x0000000000004000 /* deprecated */ 5541eaf0ac3Slogwang #define SCTP_PCB_FLAGS_RECVSHUTDOWNEVNT 0x0000000000008000 5551eaf0ac3Slogwang #define SCTP_PCB_FLAGS_ADAPTATIONEVNT 0x0000000000010000 5561eaf0ac3Slogwang #define SCTP_PCB_FLAGS_PDAPIEVNT 0x0000000000020000 5571eaf0ac3Slogwang #define SCTP_PCB_FLAGS_AUTHEVNT 0x0000000000040000 5581eaf0ac3Slogwang #define SCTP_PCB_FLAGS_STREAM_RESETEVNT 0x0000000000080000 5591eaf0ac3Slogwang #define SCTP_PCB_FLAGS_NO_FRAGMENT 0x0000000000100000 5601eaf0ac3Slogwang #define SCTP_PCB_FLAGS_EXPLICIT_EOR 0x0000000000400000 5611eaf0ac3Slogwang #define SCTP_PCB_FLAGS_NEEDS_MAPPED_V4 0x0000000000800000 5621eaf0ac3Slogwang #define SCTP_PCB_FLAGS_MULTIPLE_ASCONFS 0x0000000001000000 5631eaf0ac3Slogwang #define SCTP_PCB_FLAGS_PORTREUSE 0x0000000002000000 5641eaf0ac3Slogwang #define SCTP_PCB_FLAGS_DRYEVNT 0x0000000004000000 5651eaf0ac3Slogwang #define SCTP_PCB_FLAGS_RECVRCVINFO 0x0000000008000000 5661eaf0ac3Slogwang #define SCTP_PCB_FLAGS_RECVNXTINFO 0x0000000010000000 5671eaf0ac3Slogwang #define SCTP_PCB_FLAGS_ASSOC_RESETEVNT 0x0000000020000000 5681eaf0ac3Slogwang #define SCTP_PCB_FLAGS_STREAM_CHANGEEVNT 0x0000000040000000 5691eaf0ac3Slogwang #define SCTP_PCB_FLAGS_RECVNSENDFAILEVNT 0x0000000080000000 5701eaf0ac3Slogwang 5711eaf0ac3Slogwang /*- 5721eaf0ac3Slogwang * mobility_features parameters (by micchie).Note 5731eaf0ac3Slogwang * these features are applied against the 5741eaf0ac3Slogwang * sctp_mobility_features flags.. not the sctp_features 5751eaf0ac3Slogwang * flags. 5761eaf0ac3Slogwang */ 5771eaf0ac3Slogwang #define SCTP_MOBILITY_BASE 0x00000001 5781eaf0ac3Slogwang #define SCTP_MOBILITY_FASTHANDOFF 0x00000002 5791eaf0ac3Slogwang #define SCTP_MOBILITY_PRIM_DELETED 0x00000004 5801eaf0ac3Slogwang 581*d4a07e70Sfengbojiang /* Smallest PMTU allowed when disabling PMTU discovery */ 582*d4a07e70Sfengbojiang #define SCTP_SMALLEST_PMTU 512 583*d4a07e70Sfengbojiang /* Largest PMTU allowed when disabling PMTU discovery */ 584*d4a07e70Sfengbojiang #define SCTP_LARGEST_PMTU 65536 5851eaf0ac3Slogwang 5861eaf0ac3Slogwang #undef SCTP_PACKED 5871eaf0ac3Slogwang 5881eaf0ac3Slogwang #include <netinet/sctp_uio.h> 5891eaf0ac3Slogwang 5901eaf0ac3Slogwang /* This dictates the size of the packet 5911eaf0ac3Slogwang * collection buffer. This only applies 5921eaf0ac3Slogwang * if SCTP_PACKET_LOGGING is enabled in 5931eaf0ac3Slogwang * your config. 5941eaf0ac3Slogwang */ 5951eaf0ac3Slogwang #define SCTP_PACKET_LOG_SIZE 65536 5961eaf0ac3Slogwang 5971eaf0ac3Slogwang /* Maximum delays and such a user can set for options that 5981eaf0ac3Slogwang * take ms. 5991eaf0ac3Slogwang */ 6001eaf0ac3Slogwang #define SCTP_MAX_SACK_DELAY 500 /* per RFC4960 */ 6011eaf0ac3Slogwang #define SCTP_MAX_HB_INTERVAL 14400000 /* 4 hours in ms */ 602*d4a07e70Sfengbojiang #define SCTP_MIN_COOKIE_LIFE 1000 /* 1 second in ms */ 6031eaf0ac3Slogwang #define SCTP_MAX_COOKIE_LIFE 3600000 /* 1 hour in ms */ 6041eaf0ac3Slogwang 6051eaf0ac3Slogwang /* Types of logging/KTR tracing that can be enabled via the 6061eaf0ac3Slogwang * sysctl net.inet.sctp.sctp_logging. You must also enable 6071eaf0ac3Slogwang * SUBSYS tracing. 6081eaf0ac3Slogwang * Note that you must have the SCTP option in the kernel 6091eaf0ac3Slogwang * to enable these as well. 6101eaf0ac3Slogwang */ 6111eaf0ac3Slogwang #define SCTP_BLK_LOGGING_ENABLE 0x00000001 6121eaf0ac3Slogwang #define SCTP_CWND_MONITOR_ENABLE 0x00000002 6131eaf0ac3Slogwang #define SCTP_CWND_LOGGING_ENABLE 0x00000004 6141eaf0ac3Slogwang #define SCTP_FLIGHT_LOGGING_ENABLE 0x00000020 6151eaf0ac3Slogwang #define SCTP_FR_LOGGING_ENABLE 0x00000040 6161eaf0ac3Slogwang #define SCTP_LOCK_LOGGING_ENABLE 0x00000080 6171eaf0ac3Slogwang #define SCTP_MAP_LOGGING_ENABLE 0x00000100 6181eaf0ac3Slogwang #define SCTP_MBCNT_LOGGING_ENABLE 0x00000200 6191eaf0ac3Slogwang #define SCTP_MBUF_LOGGING_ENABLE 0x00000400 6201eaf0ac3Slogwang #define SCTP_NAGLE_LOGGING_ENABLE 0x00000800 6211eaf0ac3Slogwang #define SCTP_RECV_RWND_LOGGING_ENABLE 0x00001000 6221eaf0ac3Slogwang #define SCTP_RTTVAR_LOGGING_ENABLE 0x00002000 6231eaf0ac3Slogwang #define SCTP_SACK_LOGGING_ENABLE 0x00004000 6241eaf0ac3Slogwang #define SCTP_SACK_RWND_LOGGING_ENABLE 0x00008000 6251eaf0ac3Slogwang #define SCTP_SB_LOGGING_ENABLE 0x00010000 6261eaf0ac3Slogwang #define SCTP_STR_LOGGING_ENABLE 0x00020000 6271eaf0ac3Slogwang #define SCTP_WAKE_LOGGING_ENABLE 0x00040000 6281eaf0ac3Slogwang #define SCTP_LOG_MAXBURST_ENABLE 0x00080000 6291eaf0ac3Slogwang #define SCTP_LOG_RWND_ENABLE 0x00100000 6301eaf0ac3Slogwang #define SCTP_LOG_SACK_ARRIVALS_ENABLE 0x00200000 6311eaf0ac3Slogwang #define SCTP_LTRACE_CHUNK_ENABLE 0x00400000 6321eaf0ac3Slogwang #define SCTP_LTRACE_ERROR_ENABLE 0x00800000 6331eaf0ac3Slogwang #define SCTP_LAST_PACKET_TRACING 0x01000000 6341eaf0ac3Slogwang #define SCTP_THRESHOLD_LOGGING 0x02000000 6351eaf0ac3Slogwang #define SCTP_LOG_AT_SEND_2_SCTP 0x04000000 6361eaf0ac3Slogwang #define SCTP_LOG_AT_SEND_2_OUTQ 0x08000000 6371eaf0ac3Slogwang #define SCTP_LOG_TRY_ADVANCE 0x10000000 6381eaf0ac3Slogwang 6391eaf0ac3Slogwang #endif /* !_NETINET_SCTP_H_ */ 640