sctp.h revision 169352
1285169Scy/*- 2132451Sroberto * Copyright (c) 2001-2006, Cisco Systems, Inc. All rights reserved. 3132451Sroberto * 4285169Scy * Redistribution and use in source and binary forms, with or without 5285169Scy * modification, are permitted provided that the following conditions are met: 6132451Sroberto * 7132451Sroberto * a) Redistributions of source code must retain the above copyright notice, 8132451Sroberto * this list of conditions and the following disclaimer. 9132451Sroberto * 10132451Sroberto * b) Redistributions in binary form must reproduce the above copyright 11132451Sroberto * notice, this list of conditions and the following disclaimer in 12132451Sroberto * the documentation and/or other materials provided with the distribution. 13132451Sroberto * 14132451Sroberto * c) Neither the name of Cisco Systems, Inc. nor the names of its 15132451Sroberto * contributors may be used to endorse or promote products derived 16132451Sroberto * from this software without specific prior written permission. 17132451Sroberto * 18285169Scy * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 19285169Scy * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, 20285169Scy * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 21285169Scy * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE 22285169Scy * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 23285169Scy * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 24285169Scy * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 25285169Scy * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 26285169Scy * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 27285169Scy * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF 28285169Scy * THE POSSIBILITY OF SUCH DAMAGE. 29285169Scy */ 30285169Scy/* $KAME: sctp.h,v 1.18 2005/03/06 16:04:16 itojun Exp $ */ 31285169Scy 32285169Scy#include <sys/cdefs.h> 33285169Scy__FBSDID("$FreeBSD: head/sys/netinet/sctp.h 169352 2007-05-08 00:21:05Z rrs $"); 34285169Scy 35285169Scy#ifndef _NETINET_SCTP_H_ 36285169Scy#define _NETINET_SCTP_H_ 37285169Scy 38285169Scy#include <sys/types.h> 39285169Scy 40285169Scy/* 41285169Scy * SCTP protocol - RFC2960. 42285169Scy */ 43285169Scy 44285169Scystruct sctphdr { 45285169Scy uint16_t src_port; /* source port */ 46285169Scy uint16_t dest_port; /* destination port */ 47285169Scy uint32_t v_tag; /* verification tag of packet */ 48285169Scy uint32_t checksum; /* Adler32 C-Sum */ 49285169Scy /* chunks follow... */ 50285169Scy}; 51285169Scy 52285169Scy/* 53285169Scy * SCTP Chunks 54285169Scy */ 55285169Scystruct sctp_chunkhdr { 56285169Scy uint8_t chunk_type; /* chunk type */ 57285169Scy uint8_t chunk_flags; /* chunk flags */ 58285169Scy uint16_t chunk_length; /* chunk length */ 59285169Scy /* optional params follow */ 60285169Scy}; 61285169Scy 62285169Scy/* 63285169Scy * SCTP chunk parameters 64285169Scy */ 65285169Scystruct sctp_paramhdr { 66285169Scy uint16_t param_type; /* parameter type */ 67285169Scy uint16_t param_length; /* parameter length */ 68285169Scy}; 69285169Scy 70285169Scy/* 71285169Scy * user socket options: socket API defined 72285169Scy */ 73132451Sroberto/* 74200576Sroberto * read-write options 75132451Sroberto */ 76200576Sroberto#define SCTP_RTOINFO 0x00000001 77132451Sroberto#define SCTP_ASSOCINFO 0x00000002 78132451Sroberto#define SCTP_INITMSG 0x00000003 79132451Sroberto#define SCTP_NODELAY 0x00000004 80132451Sroberto#define SCTP_AUTOCLOSE 0x00000005 81132451Sroberto#define SCTP_SET_PEER_PRIMARY_ADDR 0x00000006 82132451Sroberto#define SCTP_PRIMARY_ADDR 0x00000007 83132451Sroberto#define SCTP_ADAPTATION_LAYER 0x00000008 84132451Sroberto/* same as above */ 85132451Sroberto#define SCTP_ADAPTION_LAYER 0x00000008 86132451Sroberto#define SCTP_DISABLE_FRAGMENTS 0x00000009 87132451Sroberto#define SCTP_PEER_ADDR_PARAMS 0x0000000a 88132451Sroberto#define SCTP_DEFAULT_SEND_PARAM 0x0000000b 89132451Sroberto/* ancillary data/notification interest options */ 90132451Sroberto#define SCTP_EVENTS 0x0000000c 91182007Sroberto/* Without this applied we will give V4 and V6 addresses on a V6 socket */ 92182007Sroberto#define SCTP_I_WANT_MAPPED_V4_ADDR 0x0000000d 93280849Scy#define SCTP_MAXSEG 0x0000000e 94280849Scy#define SCTP_DELAYED_ACK_TIME 0x0000000f 95282408Scy#define SCTP_FRAGMENT_INTERLEAVE 0x00000010 96280849Scy#define SCTP_PARTIAL_DELIVERY_POINT 0x00000011 97280849Scy/* authentication support */ 98280849Scy#define SCTP_AUTH_CHUNK 0x00000012 99280849Scy#define SCTP_AUTH_KEY 0x00000013 100280849Scy#define SCTP_HMAC_IDENT 0x00000014 101280849Scy#define SCTP_AUTH_ACTIVE_KEY 0x00000015 102280849Scy#define SCTP_AUTH_DELETE_KEY 0x00000016 103280849Scy#define SCTP_USE_EXT_RCVINFO 0x00000017 104280849Scy#define SCTP_AUTO_ASCONF 0x00000018 /* rw */ 105280849Scy#define SCTP_MAXBURST 0x00000019 /* rw */ 106280849Scy/* assoc level context */ 107280849Scy#define SCTP_CONTEXT 0x0000001a /* rw */ 108280849Scy/* explict EOR signalling */ 109280849Scy#define SCTP_EXPLICIT_EOR 0x0000001b 110280849Scy 111316722Sdelphij/* 112280849Scy * read-only options 113280849Scy */ 114280849Scy#define SCTP_STATUS 0x00000100 115280849Scy#define SCTP_GET_PEER_ADDR_INFO 0x00000101 116280849Scy/* authentication support */ 117280849Scy#define SCTP_PEER_AUTH_CHUNKS 0x00000102 118280849Scy#define SCTP_LOCAL_AUTH_CHUNKS 0x00000103 119280849Scy 120289764Sglebius 121280849Scy/* 122280849Scy * user socket options: BSD implementation specific 123280849Scy */ 124285169Scy/* 125280849Scy * Blocking I/O is enabled on any TCP type socket by default. For the UDP 126280849Scy * model if this is turned on then the socket buffer is shared for send 127282408Scy * resources amongst all associations. The default for the UDP model is that 128282408Scy * is SS_NBIO is set. Which means all associations have a seperate send 129280849Scy * limit BUT they will NOT ever BLOCK instead you will get an error back 130280849Scy * EAGAIN if you try to send to much. If you want the blocking symantics you 131280849Scy * set this option at the cost of sharing one socket send buffer size amongst 132182007Sroberto * all associations. Peeled off sockets turn this option off and block. But 133182007Sroberto * since both TCP and peeled off sockets have only one assoc per socket this 134285169Scy * is fine. It probably does NOT make sense to set this on SS_NBIO on a TCP 135285169Scy * model OR peeled off UDP model, but we do allow you to do so. You just use 136182007Sroberto * the normal syscall to toggle SS_NBIO the way you want. 137182007Sroberto * 138182007Sroberto * Blocking I/O is controled by the SS_NBIO flag on the socket state so_state 139200576Sroberto * field. 140285169Scy */ 141285169Scy 142285169Scy/* these should probably go into sockets API */ 143285169Scy#define SCTP_RESET_STREAMS 0x00001004 /* wo */ 144285169Scy 145285169Scy 146285169Scy/* here on down are more implementation specific */ 147285169Scy#define SCTP_SET_DEBUG_LEVEL 0x00001005 148285169Scy#define SCTP_CLR_STAT_LOG 0x00001007 149285169Scy/* CMT ON/OFF socket option */ 150280849Scy#define SCTP_CMT_ON_OFF 0x00001200 151285169Scy#define SCTP_CMT_USE_DAC 0x00001201 152182007Sroberto 153182007Sroberto/* read only */ 154285169Scy#define SCTP_GET_SNDBUF_USE 0x00001101 155285169Scy#define SCTP_GET_STAT_LOG 0x00001103 156285169Scy#define SCTP_GET_ASOC_ID_LIST 0x00001104 /* ro */ 157285169Scy#define SCTP_PCB_STATUS 0x00001105 158285169Scy#define SCTP_GET_NONCE_VALUES 0x00001106 159182007Sroberto 160285169Scy/* Special hook for dynamically setting primary for all assoc's, 161285169Scy * this is a write only option that requires root privledge. 162285169Scy */ 163285169Scy#define SCTP_SET_DYNAMIC_PRIMARY 0x00002001 164285169Scy 165285169Scy/* VRF (virtual router feature) and multi-VRF support 166285169Scy * options. VRF's provide splits within a router 167285169Scy * that give the views of multiple routers. A 168285169Scy * standard host, without VRF support, is just 169285169Scy * a single VRF. If VRF's are supported then 170285169Scy * the transport must be VRF aware. This means 171285169Scy * that every socket call coming in must be directed 172285169Scy * within the endpoint to one of the VRF's it belongs 173285169Scy * to. The endpoint, before binding, may select 174285169Scy * the "default" VRF it is in by using a set socket 175285169Scy * option with SCTP_VRF_ID. This will also 176285169Scy * get propegated to the default VRF. Once the 177182007Sroberto * endpoint binds an address then it CANNOT add 178182007Sroberto * additional VRF's to become a Multi-VRF endpoint. 179285169Scy * 180182007Sroberto * Before BINDING additional VRF's can be added with 181132451Sroberto * the SCTP_ADD_VRF_ID call or deleted with 182280849Scy * SCTP_DEL_VRF_ID. 183132451Sroberto * 184280849Scy * Associations are ALWAYS contained inside a single 185182007Sroberto * VRF. They cannot reside in two (or more) VRF's. Incoming 186132451Sroberto * packets, assuming the router is VRF aware, can always 187132451Sroberto * tell us what VRF they arrived on. A host not supporting 188132451Sroberto * any VRF's will find that the packets always arrived on the 189132451Sroberto * single VRF that the host has. 190289764Sglebius * 191280849Scy */ 192280849Scy 193280849Scy#define SCTP_VRF_ID 0x00003001 194280849Scy#define SCTP_ADD_VRF_ID 0x00003002 195280849Scy#define SCTP_GET_VRF_IDS 0x00003003 196132451Sroberto#define SCTP_GET_ASOC_VRF 0x00003004 197132451Sroberto#define SCTP_DEL_VRF_ID 0x00003005 198132451Sroberto/* 199289764Sglebius * hidden implementation specific options these are NOT user visible (should 200280849Scy * move out of sctp.h) 201132451Sroberto */ 202280849Scy/* sctp_bindx() flags as hidden socket options */ 203132451Sroberto#define SCTP_BINDX_ADD_ADDR 0x00008001 204132451Sroberto#define SCTP_BINDX_REM_ADDR 0x00008002 205280849Scy/* Hidden socket option that gets the addresses */ 206280849Scy#define SCTP_GET_PEER_ADDRESSES 0x00008003 207132451Sroberto#define SCTP_GET_LOCAL_ADDRESSES 0x00008004 208132451Sroberto/* return the total count in bytes needed to hold all local addresses bound */ 209132451Sroberto#define SCTP_GET_LOCAL_ADDR_SIZE 0x00008005 210132451Sroberto/* Return the total count in bytes needed to hold the remote address */ 211280849Scy#define SCTP_GET_REMOTE_ADDR_SIZE 0x00008006 212280849Scy/* hidden option for connectx */ 213280849Scy#define SCTP_CONNECT_X 0x00008007 214132451Sroberto/* hidden option for connectx_delayed, part of sendx */ 215132451Sroberto#define SCTP_CONNECT_X_DELAYED 0x00008008 216132451Sroberto#define SCTP_CONNECT_X_COMPLETE 0x00008009 217280849Scy/* hidden socket option based sctp_peeloff */ 218132451Sroberto#define SCTP_PEELOFF 0x0000800a 219132451Sroberto/* the real worker for sctp_getaddrlen() */ 220280849Scy#define SCTP_GET_ADDR_LEN 0x0000800b 221200576Sroberto/* temporary workaround for Apple listen() issue, no args used */ 222280849Scy#define SCTP_LISTEN_FIX 0x0000800c 223280849Scy/* Debug things that need to be purged */ 224280849Scy#define SCTP_SET_INITIAL_DBG_SEQ 0x00009f00 225280849Scy 226280849Scy 227200576Sroberto/* fragment interleave constants 228285169Scy * setting must be one of these or 229280849Scy * EINVAL returned. 230280849Scy */ 231200576Sroberto#define SCTP_FRAG_LEVEL_0 0x00000000 232132451Sroberto#define SCTP_FRAG_LEVEL_1 0x00000001 233132451Sroberto#define SCTP_FRAG_LEVEL_2 0x00000002 234132451Sroberto 235132451Sroberto/* 236280849Scy * user state values 237280849Scy */ 238280849Scy#define SCTP_CLOSED 0x0000 239280849Scy#define SCTP_BOUND 0x1000 240280849Scy#define SCTP_LISTEN 0x2000 241280849Scy#define SCTP_COOKIE_WAIT 0x0002 242132451Sroberto#define SCTP_COOKIE_ECHOED 0x0004 243280849Scy#define SCTP_ESTABLISHED 0x0008 244280849Scy#define SCTP_SHUTDOWN_SENT 0x0010 245280849Scy#define SCTP_SHUTDOWN_RECEIVED 0x0020 246132451Sroberto#define SCTP_SHUTDOWN_ACK_SENT 0x0040 247182007Sroberto#define SCTP_SHUTDOWN_PENDING 0x0080 248182007Sroberto 249182007Sroberto/* 250132451Sroberto * SCTP operational error codes (user visible) 251132451Sroberto */ 252182007Sroberto#define SCTP_CAUSE_NO_ERROR 0x0000 253280849Scy#define SCTP_CAUSE_INVALID_STREAM 0x0001 254280849Scy#define SCTP_CAUSE_MISSING_PARAM 0x0002 255132451Sroberto#define SCTP_CAUSE_STALE_COOKIE 0x0003 256200576Sroberto#define SCTP_CAUSE_OUT_OF_RESC 0x0004 257289764Sglebius#define SCTP_CAUSE_UNRESOLVABLE_ADDR 0x0005 258132451Sroberto#define SCTP_CAUSE_UNRECOG_CHUNK 0x0006 259316722Sdelphij#define SCTP_CAUSE_INVALID_PARAM 0x0007 260132451Sroberto#define SCTP_CAUSE_UNRECOG_PARAM 0x0008 261132451Sroberto#define SCTP_CAUSE_NO_USER_DATA 0x0009 262182007Sroberto#define SCTP_CAUSE_COOKIE_IN_SHUTDOWN 0x000a 263132451Sroberto#define SCTP_CAUSE_RESTART_W_NEWADDR 0x000b 264132451Sroberto#define SCTP_CAUSE_USER_INITIATED_ABT 0x000c 265132451Sroberto#define SCTP_CAUSE_PROTOCOL_VIOLATION 0x000d 266132451Sroberto 267132451Sroberto/* Error causes from draft-ietf-tsvwg-addip-sctp */ 268280849Scy#define SCTP_CAUSE_DELETING_LAST_ADDR 0x0100 269132451Sroberto#define SCTP_CAUSE_RESOURCE_SHORTAGE 0x0101 270132451Sroberto#define SCTP_CAUSE_DELETING_SRC_ADDR 0x0102 271132451Sroberto#define SCTP_CAUSE_ILLEGAL_ASCONF_ACK 0x0103 272132451Sroberto#define SCTP_CAUSE_REQUEST_REFUSED 0x0104 273280849Scy 274280849Scy/* Error causes from draft-ietf-tsvwg-sctp-auth */ 275200576Sroberto#define SCTP_CAUSE_UNSUPPORTED_HMACID 0x0105 276280849Scy 277280849Scy/* 278280849Scy * error cause parameters (user visisble) 279280849Scy */ 280280849Scystruct sctp_error_cause { 281280849Scy uint16_t code; 282280849Scy uint16_t length; 283280849Scy /* optional cause-specific info may follow */ 284280849Scy}; 285280849Scy 286280849Scystruct sctp_error_invalid_stream { 287280849Scy struct sctp_error_cause cause; /* code=SCTP_ERROR_INVALID_STREAM */ 288280849Scy uint16_t stream_id; /* stream id of the DATA in error */ 289280849Scy uint16_t reserved; 290280849Scy}; 291280849Scy 292280849Scystruct sctp_error_missing_param { 293280849Scy struct sctp_error_cause cause; /* code=SCTP_ERROR_MISSING_PARAM */ 294280849Scy uint32_t num_missing_params; /* number of missing parameters */ 295280849Scy /* uint16_t param_type's follow */ 296280849Scy}; 297280849Scy 298280849Scystruct sctp_error_stale_cookie { 299280849Scy struct sctp_error_cause cause; /* code=SCTP_ERROR_STALE_COOKIE */ 300280849Scy uint32_t stale_time; /* time in usec of staleness */ 301280849Scy}; 302280849Scy 303280849Scystruct sctp_error_out_of_resource { 304280849Scy struct sctp_error_cause cause; /* code=SCTP_ERROR_OUT_OF_RESOURCES */ 305280849Scy}; 306280849Scy 307280849Scystruct sctp_error_unresolv_addr { 308280849Scy struct sctp_error_cause cause; /* code=SCTP_ERROR_UNRESOLVABLE_ADDR */ 309280849Scy 310280849Scy}; 311280849Scy 312280849Scystruct sctp_error_unrecognized_chunk { 313280849Scy struct sctp_error_cause cause; /* code=SCTP_ERROR_UNRECOG_CHUNK */ 314280849Scy struct sctp_chunkhdr ch;/* header from chunk in error */ 315280849Scy}; 316280849Scy 317280849Scy#define HAVE_SCTP 1 318280849Scy#define HAVE_KERNEL_SCTP 1 319280849Scy#define HAVE_SCTP_PRSCTP 1 320280849Scy#define HAVE_SCTP_ADDIP 1 321280849Scy#define HAVE_SCTP_CANSET_PRIMARY 1 322280849Scy#define HAVE_SCTP_SAT_CAPABILITY 1 323316722Sdelphij#define HAVE_SCTP_MULTIBUF 1 324316722Sdelphij#define HAVE_SCTP_NOCONNECT 0 325316722Sdelphij#define HAVE_SCTP_ECN_NONCE 1 /* ECN Nonce option */ 326280849Scy#define HAVE_SCTP_AUTH 1 327280849Scy#define HAVE_SCTP_EXT_RCVINFO 1 328280849Scy#define HAVE_SCTP_CONNECTX 1 329280849Scy/* 330280849Scy * Main SCTP chunk types we place these here so natd and f/w's in user land 331280849Scy * can find them. 332280849Scy */ 333280849Scy/************0x00 series ***********/ 334280849Scy#define SCTP_DATA 0x00 335280849Scy#define SCTP_INITIATION 0x01 336280849Scy#define SCTP_INITIATION_ACK 0x02 337280849Scy#define SCTP_SELECTIVE_ACK 0x03 338132451Sroberto#define SCTP_HEARTBEAT_REQUEST 0x04 339280849Scy#define SCTP_HEARTBEAT_ACK 0x05 340280849Scy#define SCTP_ABORT_ASSOCIATION 0x06 341132451Sroberto#define SCTP_SHUTDOWN 0x07 342132451Sroberto#define SCTP_SHUTDOWN_ACK 0x08 343132451Sroberto#define SCTP_OPERATION_ERROR 0x09 344132451Sroberto#define SCTP_COOKIE_ECHO 0x0a 345132451Sroberto#define SCTP_COOKIE_ACK 0x0b 346200576Sroberto#define SCTP_ECN_ECHO 0x0c 347132451Sroberto#define SCTP_ECN_CWR 0x0d 348280849Scy#define SCTP_SHUTDOWN_COMPLETE 0x0e 349132451Sroberto/* draft-ietf-tsvwg-sctp-auth */ 350285169Scy#define SCTP_AUTHENTICATION 0x0f 351132451Sroberto/************0x40 series ***********/ 352280849Scy/************0x80 series ***********/ 353280849Scy/* draft-ietf-tsvwg-addip-sctp */ 354280849Scy#define SCTP_ASCONF_ACK 0x80 355280849Scy/* draft-ietf-stewart-pktdrpsctp */ 356132451Sroberto#define SCTP_PACKET_DROPPED 0x81 357280849Scy/* draft-ietf-stewart-strreset-xxx */ 358132451Sroberto#define SCTP_STREAM_RESET 0x82 359280849Scy/************0xc0 series ***********/ 360132451Sroberto/* RFC3758 */ 361132451Sroberto#define SCTP_FORWARD_CUM_TSN 0xc0 362280849Scy/* draft-ietf-tsvwg-addip-sctp */ 363280849Scy#define SCTP_ASCONF 0xc1 364280849Scy 365280849Scy 366280849Scy/* ABORT and SHUTDOWN COMPLETE FLAG */ 367280849Scy#define SCTP_HAD_NO_TCB 0x01 368280849Scy 369280849Scy/* Packet dropped flags */ 370280849Scy#define SCTP_FROM_MIDDLE_BOX SCTP_HAD_NO_TCB 371280849Scy#define SCTP_BADCRC 0x02 372132451Sroberto#define SCTP_PACKET_TRUNCATED 0x04 373132451Sroberto 374280849Scy#define SCTP_SAT_NETWORK_MIN 400 /* min ms for RTT to set satellite 375280849Scy * time */ 376280849Scy#define SCTP_SAT_NETWORK_BURST_INCR 2 /* how many times to multiply maxburst 377280849Scy * in sat */ 378280849Scy 379280849Scy/* Data Chuck Specific Flags */ 380280849Scy#define SCTP_DATA_FRAG_MASK 0x03 381280849Scy#define SCTP_DATA_MIDDLE_FRAG 0x00 382280849Scy#define SCTP_DATA_LAST_FRAG 0x01 383280849Scy#define SCTP_DATA_FIRST_FRAG 0x02 384282408Scy#define SCTP_DATA_NOT_FRAG 0x03 385282408Scy#define SCTP_DATA_UNORDERED 0x04 386282408Scy 387282408Scy/* ECN Nonce: SACK Chunk Specific Flags */ 388282408Scy#define SCTP_SACK_NONCE_SUM 0x01 389132451Sroberto 390280849Scy/* CMT DAC algorithm SACK flag */ 391280849Scy#define SCTP_SACK_CMT_DAC 0x80 392280849Scy 393200576Sroberto/* 394200576Sroberto * PCB flags (in sctp_flags bitmask). 395200576Sroberto * Note the features and flags are meant 396200576Sroberto * for use by netstat. 397280849Scy */ 398132451Sroberto#define SCTP_PCB_FLAGS_UDPTYPE 0x00000001 399280849Scy#define SCTP_PCB_FLAGS_TCPTYPE 0x00000002 400132451Sroberto#define SCTP_PCB_FLAGS_BOUNDALL 0x00000004 401132451Sroberto#define SCTP_PCB_FLAGS_ACCEPTING 0x00000008 402132451Sroberto#define SCTP_PCB_FLAGS_UNBOUND 0x00000010 403182007Sroberto#define SCTP_PCB_FLAGS_LISTENING 0x00000020 404182007Sroberto#define SCTP_PCB_FLAGS_CLOSE_IP 0x00040000 405132451Sroberto#define SCTP_PCB_FLAGS_WAS_CONNECTED 0x00080000 406132451Sroberto#define SCTP_PCB_FLAGS_WAS_ABORTED 0x00100000 407132451Sroberto/* TCP model support */ 408132451Sroberto 409132451Sroberto#define SCTP_PCB_FLAGS_CONNECTED 0x00200000 410132451Sroberto#define SCTP_PCB_FLAGS_IN_TCPPOOL 0x00400000 411200576Sroberto#define SCTP_PCB_FLAGS_DONT_WAKE 0x00800000 412132451Sroberto#define SCTP_PCB_FLAGS_WAKEOUTPUT 0x01000000 413200576Sroberto#define SCTP_PCB_FLAGS_WAKEINPUT 0x02000000 414200576Sroberto#define SCTP_PCB_FLAGS_BOUND_V6 0x04000000 415200576Sroberto#define SCTP_PCB_FLAGS_NEEDS_MAPPED_V4 0x08000000 416132451Sroberto#define SCTP_PCB_FLAGS_BLOCKING_IO 0x10000000 417132451Sroberto#define SCTP_PCB_FLAGS_SOCKET_GONE 0x20000000 418132451Sroberto#define SCTP_PCB_FLAGS_SOCKET_ALLGONE 0x40000000 419132451Sroberto/* flags to copy to new PCB */ 420132451Sroberto#define SCTP_PCB_COPY_FLAGS 0x0e000004 421132451Sroberto 422200576Sroberto 423132451Sroberto/* 424132451Sroberto * PCB Features (in sctp_features bitmask) 425132451Sroberto */ 426132451Sroberto#define SCTP_PCB_FLAGS_EXT_RCVINFO 0x00000002 427132451Sroberto#define SCTP_PCB_FLAGS_DONOT_HEARTBEAT 0x00000004 428200576Sroberto#define SCTP_PCB_FLAGS_FRAG_INTERLEAVE 0x00000008 429132451Sroberto#define SCTP_PCB_FLAGS_INTERLEAVE_STRMS 0x00000010 430132451Sroberto#define SCTP_PCB_FLAGS_DO_ASCONF 0x00000020 431182007Sroberto#define SCTP_PCB_FLAGS_AUTO_ASCONF 0x00000040 432132451Sroberto#define SCTP_PCB_FLAGS_ZERO_COPY_ACTIVE 0x00000080 433200576Sroberto 434132451Sroberto/* socket options */ 435132451Sroberto#define SCTP_PCB_FLAGS_NODELAY 0x00000100 436200576Sroberto#define SCTP_PCB_FLAGS_AUTOCLOSE 0x00000200 437132451Sroberto#define SCTP_PCB_FLAGS_RECVDATAIOEVNT 0x00000400 438132451Sroberto#define SCTP_PCB_FLAGS_RECVASSOCEVNT 0x00000800 439200576Sroberto#define SCTP_PCB_FLAGS_RECVPADDREVNT 0x00001000 440132451Sroberto#define SCTP_PCB_FLAGS_RECVPEERERR 0x00002000 441132451Sroberto#define SCTP_PCB_FLAGS_RECVSENDFAILEVNT 0x00004000 442132451Sroberto#define SCTP_PCB_FLAGS_RECVSHUTDOWNEVNT 0x00008000 443200576Sroberto#define SCTP_PCB_FLAGS_ADAPTATIONEVNT 0x00010000 444200576Sroberto#define SCTP_PCB_FLAGS_PDAPIEVNT 0x00020000 445200576Sroberto#define SCTP_PCB_FLAGS_AUTHEVNT 0x00040000 446280849Scy#define SCTP_PCB_FLAGS_STREAM_RESETEVNT 0x00080000 447132451Sroberto#define SCTP_PCB_FLAGS_NO_FRAGMENT 0x00100000 448280849Scy#define SCTP_PCB_FLAGS_EXPLICIT_EOR 0x00400000 449280849Scy 450132451Sroberto#include <netinet/sctp_uio.h> 451132451Sroberto 452132451Sroberto#endif /* !_NETINET_SCTP_H_ */ 453132451Sroberto