Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 1 | /**************************************************************************** |
| 2 | **************************************************************************** |
| 3 | *** |
| 4 | *** This header was automatically generated from a Linux kernel header |
| 5 | *** of the same name, to make information necessary for userspace to |
| 6 | *** call into the kernel available to libc. It contains only constants, |
| 7 | *** structures, and macros generated from the original header, and thus, |
| 8 | *** contains no copyrightable information. |
| 9 | *** |
| 10 | *** To edit the content of this header, modify the corresponding |
| 11 | *** source file (e.g. under external/kernel-headers/original/) then |
| 12 | *** run bionic/libc/kernel/tools/update_all.py |
| 13 | *** |
| 14 | *** Any manual change here will be lost the next time this script will |
| 15 | *** be run. You've been warned! |
| 16 | *** |
| 17 | **************************************************************************** |
| 18 | ****************************************************************************/ |
| 19 | #ifndef _UAPI_SCTP_H |
| 20 | #define _UAPI_SCTP_H |
| 21 | #include <linux/types.h> |
| 22 | #include <linux/socket.h> |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 23 | typedef __s32 sctp_assoc_t; |
| 24 | #define SCTP_RTOINFO 0 |
| 25 | #define SCTP_ASSOCINFO 1 |
| 26 | #define SCTP_INITMSG 2 |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 27 | #define SCTP_NODELAY 3 |
| 28 | #define SCTP_AUTOCLOSE 4 |
| 29 | #define SCTP_SET_PEER_PRIMARY_ADDR 5 |
| 30 | #define SCTP_PRIMARY_ADDR 6 |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 31 | #define SCTP_ADAPTATION_LAYER 7 |
| 32 | #define SCTP_DISABLE_FRAGMENTS 8 |
| 33 | #define SCTP_PEER_ADDR_PARAMS 9 |
| 34 | #define SCTP_DEFAULT_SEND_PARAM 10 |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 35 | #define SCTP_EVENTS 11 |
| 36 | #define SCTP_I_WANT_MAPPED_V4_ADDR 12 |
| 37 | #define SCTP_MAXSEG 13 |
| 38 | #define SCTP_STATUS 14 |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 39 | #define SCTP_GET_PEER_ADDR_INFO 15 |
| 40 | #define SCTP_DELAYED_ACK_TIME 16 |
| 41 | #define SCTP_DELAYED_ACK SCTP_DELAYED_ACK_TIME |
| 42 | #define SCTP_DELAYED_SACK SCTP_DELAYED_ACK_TIME |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 43 | #define SCTP_CONTEXT 17 |
| 44 | #define SCTP_FRAGMENT_INTERLEAVE 18 |
| 45 | #define SCTP_PARTIAL_DELIVERY_POINT 19 |
| 46 | #define SCTP_MAX_BURST 20 |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 47 | #define SCTP_AUTH_CHUNK 21 |
| 48 | #define SCTP_HMAC_IDENT 22 |
| 49 | #define SCTP_AUTH_KEY 23 |
| 50 | #define SCTP_AUTH_ACTIVE_KEY 24 |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 51 | #define SCTP_AUTH_DELETE_KEY 25 |
| 52 | #define SCTP_PEER_AUTH_CHUNKS 26 |
| 53 | #define SCTP_LOCAL_AUTH_CHUNKS 27 |
| 54 | #define SCTP_GET_ASSOC_NUMBER 28 |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 55 | #define SCTP_GET_ASSOC_ID_LIST 29 |
| 56 | #define SCTP_AUTO_ASCONF 30 |
| 57 | #define SCTP_PEER_ADDR_THLDS 31 |
Christopher Ferris | 82d7504 | 2015-01-26 10:57:07 -0800 | [diff] [blame] | 58 | #define SCTP_RECVRCVINFO 32 |
Christopher Ferris | 82d7504 | 2015-01-26 10:57:07 -0800 | [diff] [blame] | 59 | #define SCTP_RECVNXTINFO 33 |
| 60 | #define SCTP_DEFAULT_SNDINFO 34 |
Christopher Ferris | 76a1d45 | 2018-06-27 14:12:29 -0700 | [diff] [blame^] | 61 | #define SCTP_AUTH_DEACTIVATE_KEY 35 |
Christopher Ferris | 82d7504 | 2015-01-26 10:57:07 -0800 | [diff] [blame] | 62 | #define SCTP_SOCKOPT_BINDX_ADD 100 |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 63 | #define SCTP_SOCKOPT_BINDX_REM 101 |
| 64 | #define SCTP_SOCKOPT_PEELOFF 102 |
| 65 | #define SCTP_SOCKOPT_CONNECTX_OLD 107 |
| 66 | #define SCTP_GET_PEER_ADDRS 108 |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 67 | #define SCTP_GET_LOCAL_ADDRS 109 |
| 68 | #define SCTP_SOCKOPT_CONNECTX 110 |
| 69 | #define SCTP_SOCKOPT_CONNECTX3 111 |
| 70 | #define SCTP_GET_ASSOC_STATS 112 |
Christopher Ferris | 49f525c | 2016-12-12 14:55:36 -0800 | [diff] [blame] | 71 | #define SCTP_PR_SUPPORTED 113 |
Christopher Ferris | 49f525c | 2016-12-12 14:55:36 -0800 | [diff] [blame] | 72 | #define SCTP_DEFAULT_PRINFO 114 |
| 73 | #define SCTP_PR_ASSOC_STATUS 115 |
Christopher Ferris | 525ce91 | 2017-07-26 13:12:53 -0700 | [diff] [blame] | 74 | #define SCTP_PR_STREAM_STATUS 116 |
| 75 | #define SCTP_RECONFIG_SUPPORTED 117 |
| 76 | #define SCTP_ENABLE_STREAM_RESET 118 |
| 77 | #define SCTP_RESET_STREAMS 119 |
| 78 | #define SCTP_RESET_ASSOC 120 |
| 79 | #define SCTP_ADD_STREAMS 121 |
Christopher Ferris | 1308ad3 | 2017-11-14 17:32:13 -0800 | [diff] [blame] | 80 | #define SCTP_SOCKOPT_PEELOFF_FLAGS 122 |
Christopher Ferris | 934ec94 | 2018-01-31 15:29:16 -0800 | [diff] [blame] | 81 | #define SCTP_STREAM_SCHEDULER 123 |
| 82 | #define SCTP_STREAM_SCHEDULER_VALUE 124 |
Christopher Ferris | 76a1d45 | 2018-06-27 14:12:29 -0700 | [diff] [blame^] | 83 | #define SCTP_INTERLEAVING_SUPPORTED 125 |
| 84 | #define SCTP_SENDMSG_CONNECT 126 |
Christopher Ferris | 49f525c | 2016-12-12 14:55:36 -0800 | [diff] [blame] | 85 | #define SCTP_PR_SCTP_NONE 0x0000 |
| 86 | #define SCTP_PR_SCTP_TTL 0x0010 |
Christopher Ferris | 49f525c | 2016-12-12 14:55:36 -0800 | [diff] [blame] | 87 | #define SCTP_PR_SCTP_RTX 0x0020 |
| 88 | #define SCTP_PR_SCTP_PRIO 0x0030 |
| 89 | #define SCTP_PR_SCTP_MAX SCTP_PR_SCTP_PRIO |
| 90 | #define SCTP_PR_SCTP_MASK 0x0030 |
Christopher Ferris | 49f525c | 2016-12-12 14:55:36 -0800 | [diff] [blame] | 91 | #define __SCTP_PR_INDEX(x) ((x >> 4) - 1) |
| 92 | #define SCTP_PR_INDEX(x) __SCTP_PR_INDEX(SCTP_PR_SCTP_ ##x) |
| 93 | #define SCTP_PR_POLICY(x) ((x) & SCTP_PR_SCTP_MASK) |
| 94 | #define SCTP_PR_SET_POLICY(flags,x) do { flags &= ~SCTP_PR_SCTP_MASK; flags |= x; } while(0) |
Christopher Ferris | 49f525c | 2016-12-12 14:55:36 -0800 | [diff] [blame] | 95 | #define SCTP_PR_TTL_ENABLED(x) (SCTP_PR_POLICY(x) == SCTP_PR_SCTP_TTL) |
| 96 | #define SCTP_PR_RTX_ENABLED(x) (SCTP_PR_POLICY(x) == SCTP_PR_SCTP_RTX) |
| 97 | #define SCTP_PR_PRIO_ENABLED(x) (SCTP_PR_POLICY(x) == SCTP_PR_SCTP_PRIO) |
Christopher Ferris | 525ce91 | 2017-07-26 13:12:53 -0700 | [diff] [blame] | 98 | #define SCTP_ENABLE_RESET_STREAM_REQ 0x01 |
| 99 | #define SCTP_ENABLE_RESET_ASSOC_REQ 0x02 |
| 100 | #define SCTP_ENABLE_CHANGE_ASSOC_REQ 0x04 |
| 101 | #define SCTP_ENABLE_STRRESET_MASK 0x07 |
| 102 | #define SCTP_STREAM_RESET_INCOMING 0x01 |
| 103 | #define SCTP_STREAM_RESET_OUTGOING 0x02 |
Christopher Ferris | 82d7504 | 2015-01-26 10:57:07 -0800 | [diff] [blame] | 104 | enum sctp_msg_flags { |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 105 | MSG_NOTIFICATION = 0x8000, |
Christopher Ferris | 82d7504 | 2015-01-26 10:57:07 -0800 | [diff] [blame] | 106 | #define MSG_NOTIFICATION MSG_NOTIFICATION |
| 107 | }; |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 108 | struct sctp_initmsg { |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 109 | __u16 sinit_num_ostreams; |
| 110 | __u16 sinit_max_instreams; |
| 111 | __u16 sinit_max_attempts; |
| 112 | __u16 sinit_max_init_timeo; |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 113 | }; |
| 114 | struct sctp_sndrcvinfo { |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 115 | __u16 sinfo_stream; |
| 116 | __u16 sinfo_ssn; |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 117 | __u16 sinfo_flags; |
| 118 | __u32 sinfo_ppid; |
| 119 | __u32 sinfo_context; |
| 120 | __u32 sinfo_timetolive; |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 121 | __u32 sinfo_tsn; |
| 122 | __u32 sinfo_cumtsn; |
| 123 | sctp_assoc_t sinfo_assoc_id; |
Christopher Ferris | 82d7504 | 2015-01-26 10:57:07 -0800 | [diff] [blame] | 124 | }; |
Christopher Ferris | 82d7504 | 2015-01-26 10:57:07 -0800 | [diff] [blame] | 125 | struct sctp_sndinfo { |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 126 | __u16 snd_sid; |
| 127 | __u16 snd_flags; |
| 128 | __u32 snd_ppid; |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 129 | __u32 snd_context; |
| 130 | sctp_assoc_t snd_assoc_id; |
Christopher Ferris | 82d7504 | 2015-01-26 10:57:07 -0800 | [diff] [blame] | 131 | }; |
| 132 | struct sctp_rcvinfo { |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 133 | __u16 rcv_sid; |
| 134 | __u16 rcv_ssn; |
| 135 | __u16 rcv_flags; |
| 136 | __u32 rcv_ppid; |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 137 | __u32 rcv_tsn; |
| 138 | __u32 rcv_cumtsn; |
| 139 | __u32 rcv_context; |
| 140 | sctp_assoc_t rcv_assoc_id; |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 141 | }; |
Christopher Ferris | 82d7504 | 2015-01-26 10:57:07 -0800 | [diff] [blame] | 142 | struct sctp_nxtinfo { |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 143 | __u16 nxt_sid; |
| 144 | __u16 nxt_flags; |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 145 | __u32 nxt_ppid; |
| 146 | __u32 nxt_length; |
| 147 | sctp_assoc_t nxt_assoc_id; |
Christopher Ferris | 82d7504 | 2015-01-26 10:57:07 -0800 | [diff] [blame] | 148 | }; |
Christopher Ferris | 76a1d45 | 2018-06-27 14:12:29 -0700 | [diff] [blame^] | 149 | struct sctp_prinfo { |
| 150 | __u16 pr_policy; |
| 151 | __u32 pr_value; |
| 152 | }; |
| 153 | struct sctp_authinfo { |
| 154 | __u16 auth_keynumber; |
| 155 | }; |
Christopher Ferris | 82d7504 | 2015-01-26 10:57:07 -0800 | [diff] [blame] | 156 | enum sctp_sinfo_flags { |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 157 | SCTP_UNORDERED = (1 << 0), |
| 158 | SCTP_ADDR_OVER = (1 << 1), |
| 159 | SCTP_ABORT = (1 << 2), |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 160 | SCTP_SACK_IMMEDIATELY = (1 << 3), |
Christopher Ferris | 76a1d45 | 2018-06-27 14:12:29 -0700 | [diff] [blame^] | 161 | SCTP_SENDALL = (1 << 6), |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 162 | SCTP_NOTIFICATION = MSG_NOTIFICATION, |
| 163 | SCTP_EOF = MSG_FIN, |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 164 | }; |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 165 | typedef union { |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 166 | __u8 raw; |
| 167 | struct sctp_initmsg init; |
| 168 | struct sctp_sndrcvinfo sndrcv; |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 169 | } sctp_cmsg_data_t; |
| 170 | typedef enum sctp_cmsg_type { |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 171 | SCTP_INIT, |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 172 | #define SCTP_INIT SCTP_INIT |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 173 | SCTP_SNDRCV, |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 174 | #define SCTP_SNDRCV SCTP_SNDRCV |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 175 | SCTP_SNDINFO, |
Christopher Ferris | 82d7504 | 2015-01-26 10:57:07 -0800 | [diff] [blame] | 176 | #define SCTP_SNDINFO SCTP_SNDINFO |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 177 | SCTP_RCVINFO, |
Christopher Ferris | 82d7504 | 2015-01-26 10:57:07 -0800 | [diff] [blame] | 178 | #define SCTP_RCVINFO SCTP_RCVINFO |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 179 | SCTP_NXTINFO, |
Christopher Ferris | 82d7504 | 2015-01-26 10:57:07 -0800 | [diff] [blame] | 180 | #define SCTP_NXTINFO SCTP_NXTINFO |
Christopher Ferris | 76a1d45 | 2018-06-27 14:12:29 -0700 | [diff] [blame^] | 181 | SCTP_PRINFO, |
| 182 | #define SCTP_PRINFO SCTP_PRINFO |
| 183 | SCTP_AUTHINFO, |
| 184 | #define SCTP_AUTHINFO SCTP_AUTHINFO |
| 185 | SCTP_DSTADDRV4, |
| 186 | #define SCTP_DSTADDRV4 SCTP_DSTADDRV4 |
| 187 | SCTP_DSTADDRV6, |
| 188 | #define SCTP_DSTADDRV6 SCTP_DSTADDRV6 |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 189 | } sctp_cmsg_t; |
| 190 | struct sctp_assoc_change { |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 191 | __u16 sac_type; |
| 192 | __u16 sac_flags; |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 193 | __u32 sac_length; |
| 194 | __u16 sac_state; |
| 195 | __u16 sac_error; |
| 196 | __u16 sac_outbound_streams; |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 197 | __u16 sac_inbound_streams; |
| 198 | sctp_assoc_t sac_assoc_id; |
| 199 | __u8 sac_info[0]; |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 200 | }; |
| 201 | enum sctp_sac_state { |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 202 | SCTP_COMM_UP, |
| 203 | SCTP_COMM_LOST, |
| 204 | SCTP_RESTART, |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 205 | SCTP_SHUTDOWN_COMP, |
| 206 | SCTP_CANT_STR_ASSOC, |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 207 | }; |
| 208 | struct sctp_paddr_change { |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 209 | __u16 spc_type; |
| 210 | __u16 spc_flags; |
| 211 | __u32 spc_length; |
| 212 | struct sockaddr_storage spc_aaddr; |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 213 | int spc_state; |
| 214 | int spc_error; |
| 215 | sctp_assoc_t spc_assoc_id; |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 216 | } __attribute__((packed, aligned(4))); |
| 217 | enum sctp_spc_state { |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 218 | SCTP_ADDR_AVAILABLE, |
| 219 | SCTP_ADDR_UNREACHABLE, |
| 220 | SCTP_ADDR_REMOVED, |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 221 | SCTP_ADDR_ADDED, |
| 222 | SCTP_ADDR_MADE_PRIM, |
| 223 | SCTP_ADDR_CONFIRMED, |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 224 | }; |
| 225 | struct sctp_remote_error { |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 226 | __u16 sre_type; |
| 227 | __u16 sre_flags; |
| 228 | __u32 sre_length; |
Christopher Ferris | 1308ad3 | 2017-11-14 17:32:13 -0800 | [diff] [blame] | 229 | __be16 sre_error; |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 230 | sctp_assoc_t sre_assoc_id; |
| 231 | __u8 sre_data[0]; |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 232 | }; |
| 233 | struct sctp_send_failed { |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 234 | __u16 ssf_type; |
| 235 | __u16 ssf_flags; |
| 236 | __u32 ssf_length; |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 237 | __u32 ssf_error; |
| 238 | struct sctp_sndrcvinfo ssf_info; |
| 239 | sctp_assoc_t ssf_assoc_id; |
| 240 | __u8 ssf_data[0]; |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 241 | }; |
| 242 | enum sctp_ssf_flags { |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 243 | SCTP_DATA_UNSENT, |
| 244 | SCTP_DATA_SENT, |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 245 | }; |
| 246 | struct sctp_shutdown_event { |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 247 | __u16 sse_type; |
| 248 | __u16 sse_flags; |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 249 | __u32 sse_length; |
| 250 | sctp_assoc_t sse_assoc_id; |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 251 | }; |
| 252 | struct sctp_adaptation_event { |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 253 | __u16 sai_type; |
| 254 | __u16 sai_flags; |
| 255 | __u32 sai_length; |
| 256 | __u32 sai_adaptation_ind; |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 257 | sctp_assoc_t sai_assoc_id; |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 258 | }; |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 259 | struct sctp_pdapi_event { |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 260 | __u16 pdapi_type; |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 261 | __u16 pdapi_flags; |
| 262 | __u32 pdapi_length; |
| 263 | __u32 pdapi_indication; |
| 264 | sctp_assoc_t pdapi_assoc_id; |
Christopher Ferris | 76a1d45 | 2018-06-27 14:12:29 -0700 | [diff] [blame^] | 265 | __u32 pdapi_stream; |
| 266 | __u32 pdapi_seq; |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 267 | }; |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 268 | enum { |
| 269 | SCTP_PARTIAL_DELIVERY_ABORTED = 0, |
| 270 | }; |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 271 | struct sctp_authkey_event { |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 272 | __u16 auth_type; |
| 273 | __u16 auth_flags; |
| 274 | __u32 auth_length; |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 275 | __u16 auth_keynumber; |
| 276 | __u16 auth_altkeynumber; |
| 277 | __u32 auth_indication; |
| 278 | sctp_assoc_t auth_assoc_id; |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 279 | }; |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 280 | enum { |
Christopher Ferris | 76a1d45 | 2018-06-27 14:12:29 -0700 | [diff] [blame^] | 281 | SCTP_AUTH_NEW_KEY, |
| 282 | #define SCTP_AUTH_NEWKEY SCTP_AUTH_NEW_KEY |
| 283 | SCTP_AUTH_FREE_KEY, |
| 284 | SCTP_AUTH_NO_AUTH, |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 285 | }; |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 286 | struct sctp_sender_dry_event { |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 287 | __u16 sender_dry_type; |
| 288 | __u16 sender_dry_flags; |
| 289 | __u32 sender_dry_length; |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 290 | sctp_assoc_t sender_dry_assoc_id; |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 291 | }; |
Christopher Ferris | 525ce91 | 2017-07-26 13:12:53 -0700 | [diff] [blame] | 292 | #define SCTP_STREAM_RESET_INCOMING_SSN 0x0001 |
| 293 | #define SCTP_STREAM_RESET_OUTGOING_SSN 0x0002 |
| 294 | #define SCTP_STREAM_RESET_DENIED 0x0004 |
| 295 | #define SCTP_STREAM_RESET_FAILED 0x0008 |
| 296 | struct sctp_stream_reset_event { |
| 297 | __u16 strreset_type; |
| 298 | __u16 strreset_flags; |
| 299 | __u32 strreset_length; |
| 300 | sctp_assoc_t strreset_assoc_id; |
| 301 | __u16 strreset_stream_list[]; |
| 302 | }; |
| 303 | #define SCTP_ASSOC_RESET_DENIED 0x0004 |
| 304 | #define SCTP_ASSOC_RESET_FAILED 0x0008 |
| 305 | struct sctp_assoc_reset_event { |
| 306 | __u16 assocreset_type; |
| 307 | __u16 assocreset_flags; |
| 308 | __u32 assocreset_length; |
| 309 | sctp_assoc_t assocreset_assoc_id; |
| 310 | __u32 assocreset_local_tsn; |
| 311 | __u32 assocreset_remote_tsn; |
| 312 | }; |
| 313 | #define SCTP_ASSOC_CHANGE_DENIED 0x0004 |
| 314 | #define SCTP_ASSOC_CHANGE_FAILED 0x0008 |
| 315 | struct sctp_stream_change_event { |
| 316 | __u16 strchange_type; |
| 317 | __u16 strchange_flags; |
| 318 | __u32 strchange_length; |
| 319 | sctp_assoc_t strchange_assoc_id; |
| 320 | __u16 strchange_instrms; |
| 321 | __u16 strchange_outstrms; |
| 322 | }; |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 323 | struct sctp_event_subscribe { |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 324 | __u8 sctp_data_io_event; |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 325 | __u8 sctp_association_event; |
| 326 | __u8 sctp_address_event; |
| 327 | __u8 sctp_send_failure_event; |
| 328 | __u8 sctp_peer_error_event; |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 329 | __u8 sctp_shutdown_event; |
| 330 | __u8 sctp_partial_delivery_event; |
| 331 | __u8 sctp_adaptation_layer_event; |
| 332 | __u8 sctp_authentication_event; |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 333 | __u8 sctp_sender_dry_event; |
Christopher Ferris | 525ce91 | 2017-07-26 13:12:53 -0700 | [diff] [blame] | 334 | __u8 sctp_stream_reset_event; |
| 335 | __u8 sctp_assoc_reset_event; |
| 336 | __u8 sctp_stream_change_event; |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 337 | }; |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 338 | union sctp_notification { |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 339 | struct { |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 340 | __u16 sn_type; |
| 341 | __u16 sn_flags; |
| 342 | __u32 sn_length; |
| 343 | } sn_header; |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 344 | struct sctp_assoc_change sn_assoc_change; |
| 345 | struct sctp_paddr_change sn_paddr_change; |
| 346 | struct sctp_remote_error sn_remote_error; |
| 347 | struct sctp_send_failed sn_send_failed; |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 348 | struct sctp_shutdown_event sn_shutdown_event; |
| 349 | struct sctp_adaptation_event sn_adaptation_event; |
| 350 | struct sctp_pdapi_event sn_pdapi_event; |
| 351 | struct sctp_authkey_event sn_authkey_event; |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 352 | struct sctp_sender_dry_event sn_sender_dry_event; |
Christopher Ferris | 525ce91 | 2017-07-26 13:12:53 -0700 | [diff] [blame] | 353 | struct sctp_stream_reset_event sn_strreset_event; |
| 354 | struct sctp_assoc_reset_event sn_assocreset_event; |
| 355 | struct sctp_stream_change_event sn_strchange_event; |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 356 | }; |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 357 | enum sctp_sn_type { |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 358 | SCTP_SN_TYPE_BASE = (1 << 15), |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 359 | SCTP_ASSOC_CHANGE, |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 360 | #define SCTP_ASSOC_CHANGE SCTP_ASSOC_CHANGE |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 361 | SCTP_PEER_ADDR_CHANGE, |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 362 | #define SCTP_PEER_ADDR_CHANGE SCTP_PEER_ADDR_CHANGE |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 363 | SCTP_SEND_FAILED, |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 364 | #define SCTP_SEND_FAILED SCTP_SEND_FAILED |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 365 | SCTP_REMOTE_ERROR, |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 366 | #define SCTP_REMOTE_ERROR SCTP_REMOTE_ERROR |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 367 | SCTP_SHUTDOWN_EVENT, |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 368 | #define SCTP_SHUTDOWN_EVENT SCTP_SHUTDOWN_EVENT |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 369 | SCTP_PARTIAL_DELIVERY_EVENT, |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 370 | #define SCTP_PARTIAL_DELIVERY_EVENT SCTP_PARTIAL_DELIVERY_EVENT |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 371 | SCTP_ADAPTATION_INDICATION, |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 372 | #define SCTP_ADAPTATION_INDICATION SCTP_ADAPTATION_INDICATION |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 373 | SCTP_AUTHENTICATION_EVENT, |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 374 | #define SCTP_AUTHENTICATION_INDICATION SCTP_AUTHENTICATION_EVENT |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 375 | SCTP_SENDER_DRY_EVENT, |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 376 | #define SCTP_SENDER_DRY_EVENT SCTP_SENDER_DRY_EVENT |
Christopher Ferris | 525ce91 | 2017-07-26 13:12:53 -0700 | [diff] [blame] | 377 | SCTP_STREAM_RESET_EVENT, |
| 378 | #define SCTP_STREAM_RESET_EVENT SCTP_STREAM_RESET_EVENT |
| 379 | SCTP_ASSOC_RESET_EVENT, |
| 380 | #define SCTP_ASSOC_RESET_EVENT SCTP_ASSOC_RESET_EVENT |
| 381 | SCTP_STREAM_CHANGE_EVENT, |
| 382 | #define SCTP_STREAM_CHANGE_EVENT SCTP_STREAM_CHANGE_EVENT |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 383 | }; |
| 384 | typedef enum sctp_sn_error { |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 385 | SCTP_FAILED_THRESHOLD, |
| 386 | SCTP_RECEIVED_SACK, |
| 387 | SCTP_HEARTBEAT_SUCCESS, |
| 388 | SCTP_RESPONSE_TO_USER_REQ, |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 389 | SCTP_INTERNAL_ERROR, |
| 390 | SCTP_SHUTDOWN_GUARD_EXPIRES, |
| 391 | SCTP_PEER_FAULTY, |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 392 | } sctp_sn_error_t; |
| 393 | struct sctp_rtoinfo { |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 394 | sctp_assoc_t srto_assoc_id; |
| 395 | __u32 srto_initial; |
| 396 | __u32 srto_max; |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 397 | __u32 srto_min; |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 398 | }; |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 399 | struct sctp_assocparams { |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 400 | sctp_assoc_t sasoc_assoc_id; |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 401 | __u16 sasoc_asocmaxrxt; |
| 402 | __u16 sasoc_number_peer_destinations; |
| 403 | __u32 sasoc_peer_rwnd; |
| 404 | __u32 sasoc_local_rwnd; |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 405 | __u32 sasoc_cookie_life; |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 406 | }; |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 407 | struct sctp_setpeerprim { |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 408 | sctp_assoc_t sspp_assoc_id; |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 409 | struct sockaddr_storage sspp_addr; |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 410 | } __attribute__((packed, aligned(4))); |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 411 | struct sctp_prim { |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 412 | sctp_assoc_t ssp_assoc_id; |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 413 | struct sockaddr_storage ssp_addr; |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 414 | } __attribute__((packed, aligned(4))); |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 415 | #define sctp_setprim sctp_prim |
| 416 | struct sctp_setadaptation { |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 417 | __u32 ssb_adaptation_ind; |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 418 | }; |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 419 | enum sctp_spp_flags { |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 420 | SPP_HB_ENABLE = 1 << 0, |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 421 | SPP_HB_DISABLE = 1 << 1, |
| 422 | SPP_HB = SPP_HB_ENABLE | SPP_HB_DISABLE, |
| 423 | SPP_HB_DEMAND = 1 << 2, |
| 424 | SPP_PMTUD_ENABLE = 1 << 3, |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 425 | SPP_PMTUD_DISABLE = 1 << 4, |
| 426 | SPP_PMTUD = SPP_PMTUD_ENABLE | SPP_PMTUD_DISABLE, |
| 427 | SPP_SACKDELAY_ENABLE = 1 << 5, |
| 428 | SPP_SACKDELAY_DISABLE = 1 << 6, |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 429 | SPP_SACKDELAY = SPP_SACKDELAY_ENABLE | SPP_SACKDELAY_DISABLE, |
| 430 | SPP_HB_TIME_IS_ZERO = 1 << 7, |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 431 | }; |
| 432 | struct sctp_paddrparams { |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 433 | sctp_assoc_t spp_assoc_id; |
| 434 | struct sockaddr_storage spp_address; |
| 435 | __u32 spp_hbinterval; |
| 436 | __u16 spp_pathmaxrxt; |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 437 | __u32 spp_pathmtu; |
| 438 | __u32 spp_sackdelay; |
| 439 | __u32 spp_flags; |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 440 | } __attribute__((packed, aligned(4))); |
| 441 | struct sctp_authchunk { |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 442 | __u8 sauth_chunk; |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 443 | }; |
| 444 | enum { |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 445 | SCTP_AUTH_HMAC_ID_SHA1 = 1, |
| 446 | SCTP_AUTH_HMAC_ID_SHA256 = 3, |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 447 | }; |
| 448 | struct sctp_hmacalgo { |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 449 | __u32 shmac_num_idents; |
| 450 | __u16 shmac_idents[]; |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 451 | }; |
| 452 | #define shmac_number_of_idents shmac_num_idents |
| 453 | struct sctp_authkey { |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 454 | sctp_assoc_t sca_assoc_id; |
| 455 | __u16 sca_keynumber; |
| 456 | __u16 sca_keylength; |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 457 | __u8 sca_key[]; |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 458 | }; |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 459 | struct sctp_authkeyid { |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 460 | sctp_assoc_t scact_assoc_id; |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 461 | __u16 scact_keynumber; |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 462 | }; |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 463 | struct sctp_sack_info { |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 464 | sctp_assoc_t sack_assoc_id; |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 465 | uint32_t sack_delay; |
| 466 | uint32_t sack_freq; |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 467 | }; |
| 468 | struct sctp_assoc_value { |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 469 | sctp_assoc_t assoc_id; |
| 470 | uint32_t assoc_value; |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 471 | }; |
Christopher Ferris | 934ec94 | 2018-01-31 15:29:16 -0800 | [diff] [blame] | 472 | struct sctp_stream_value { |
| 473 | sctp_assoc_t assoc_id; |
| 474 | uint16_t stream_id; |
| 475 | uint16_t stream_value; |
| 476 | }; |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 477 | struct sctp_paddrinfo { |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 478 | sctp_assoc_t spinfo_assoc_id; |
| 479 | struct sockaddr_storage spinfo_address; |
| 480 | __s32 spinfo_state; |
| 481 | __u32 spinfo_cwnd; |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 482 | __u32 spinfo_srtt; |
| 483 | __u32 spinfo_rto; |
| 484 | __u32 spinfo_mtu; |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 485 | } __attribute__((packed, aligned(4))); |
| 486 | enum sctp_spinfo_state { |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 487 | SCTP_INACTIVE, |
| 488 | SCTP_PF, |
| 489 | SCTP_ACTIVE, |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 490 | SCTP_UNCONFIRMED, |
| 491 | SCTP_UNKNOWN = 0xffff |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 492 | }; |
| 493 | struct sctp_status { |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 494 | sctp_assoc_t sstat_assoc_id; |
| 495 | __s32 sstat_state; |
| 496 | __u32 sstat_rwnd; |
| 497 | __u16 sstat_unackdata; |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 498 | __u16 sstat_penddata; |
| 499 | __u16 sstat_instrms; |
| 500 | __u16 sstat_outstrms; |
| 501 | __u32 sstat_fragmentation_point; |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 502 | struct sctp_paddrinfo sstat_primary; |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 503 | }; |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 504 | struct sctp_authchunks { |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 505 | sctp_assoc_t gauth_assoc_id; |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 506 | __u32 gauth_number_of_chunks; |
| 507 | uint8_t gauth_chunks[]; |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 508 | }; |
| 509 | #define guth_number_of_chunks gauth_number_of_chunks |
| 510 | enum sctp_sstat_state { |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 511 | SCTP_EMPTY = 0, |
| 512 | SCTP_CLOSED = 1, |
| 513 | SCTP_COOKIE_WAIT = 2, |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 514 | SCTP_COOKIE_ECHOED = 3, |
| 515 | SCTP_ESTABLISHED = 4, |
| 516 | SCTP_SHUTDOWN_PENDING = 5, |
| 517 | SCTP_SHUTDOWN_SENT = 6, |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 518 | SCTP_SHUTDOWN_RECEIVED = 7, |
| 519 | SCTP_SHUTDOWN_ACK_SENT = 8, |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 520 | }; |
| 521 | struct sctp_assoc_ids { |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 522 | __u32 gaids_number_of_ids; |
| 523 | sctp_assoc_t gaids_assoc_id[]; |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 524 | }; |
| 525 | struct sctp_getaddrs_old { |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 526 | sctp_assoc_t assoc_id; |
| 527 | int addr_num; |
| 528 | struct sockaddr * addrs; |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 529 | }; |
| 530 | struct sctp_getaddrs { |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 531 | sctp_assoc_t assoc_id; |
| 532 | __u32 addr_num; |
| 533 | __u8 addrs[0]; |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 534 | }; |
| 535 | struct sctp_assoc_stats { |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 536 | sctp_assoc_t sas_assoc_id; |
| 537 | struct sockaddr_storage sas_obs_rto_ipaddr; |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 538 | __u64 sas_maxrto; |
| 539 | __u64 sas_isacks; |
| 540 | __u64 sas_osacks; |
| 541 | __u64 sas_opackets; |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 542 | __u64 sas_ipackets; |
| 543 | __u64 sas_rtxchunks; |
| 544 | __u64 sas_outofseqtsns; |
| 545 | __u64 sas_idupchunks; |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 546 | __u64 sas_gapcnt; |
| 547 | __u64 sas_ouodchunks; |
| 548 | __u64 sas_iuodchunks; |
| 549 | __u64 sas_oodchunks; |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 550 | __u64 sas_iodchunks; |
| 551 | __u64 sas_octrlchunks; |
| 552 | __u64 sas_ictrlchunks; |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 553 | }; |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 554 | #define SCTP_BINDX_ADD_ADDR 0x01 |
| 555 | #define SCTP_BINDX_REM_ADDR 0x02 |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 556 | typedef struct { |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 557 | sctp_assoc_t associd; |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 558 | int sd; |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 559 | } sctp_peeloff_arg_t; |
Christopher Ferris | 1308ad3 | 2017-11-14 17:32:13 -0800 | [diff] [blame] | 560 | typedef struct { |
| 561 | sctp_peeloff_arg_t p_arg; |
| 562 | unsigned flags; |
| 563 | } sctp_peeloff_flags_arg_t; |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 564 | struct sctp_paddrthlds { |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 565 | sctp_assoc_t spt_assoc_id; |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 566 | struct sockaddr_storage spt_address; |
| 567 | __u16 spt_pathmaxrxt; |
| 568 | __u16 spt_pathpfthld; |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 569 | }; |
Christopher Ferris | 49f525c | 2016-12-12 14:55:36 -0800 | [diff] [blame] | 570 | struct sctp_prstatus { |
| 571 | sctp_assoc_t sprstat_assoc_id; |
| 572 | __u16 sprstat_sid; |
| 573 | __u16 sprstat_policy; |
Christopher Ferris | 49f525c | 2016-12-12 14:55:36 -0800 | [diff] [blame] | 574 | __u64 sprstat_abandoned_unsent; |
| 575 | __u64 sprstat_abandoned_sent; |
| 576 | }; |
| 577 | struct sctp_default_prinfo { |
Christopher Ferris | 49f525c | 2016-12-12 14:55:36 -0800 | [diff] [blame] | 578 | sctp_assoc_t pr_assoc_id; |
| 579 | __u32 pr_value; |
| 580 | __u16 pr_policy; |
| 581 | }; |
Christopher Ferris | 49f525c | 2016-12-12 14:55:36 -0800 | [diff] [blame] | 582 | struct sctp_info { |
| 583 | __u32 sctpi_tag; |
| 584 | __u32 sctpi_state; |
| 585 | __u32 sctpi_rwnd; |
Christopher Ferris | 49f525c | 2016-12-12 14:55:36 -0800 | [diff] [blame] | 586 | __u16 sctpi_unackdata; |
| 587 | __u16 sctpi_penddata; |
| 588 | __u16 sctpi_instrms; |
| 589 | __u16 sctpi_outstrms; |
Christopher Ferris | 49f525c | 2016-12-12 14:55:36 -0800 | [diff] [blame] | 590 | __u32 sctpi_fragmentation_point; |
| 591 | __u32 sctpi_inqueue; |
| 592 | __u32 sctpi_outqueue; |
| 593 | __u32 sctpi_overall_error; |
Christopher Ferris | 49f525c | 2016-12-12 14:55:36 -0800 | [diff] [blame] | 594 | __u32 sctpi_max_burst; |
| 595 | __u32 sctpi_maxseg; |
| 596 | __u32 sctpi_peer_rwnd; |
| 597 | __u32 sctpi_peer_tag; |
Christopher Ferris | 49f525c | 2016-12-12 14:55:36 -0800 | [diff] [blame] | 598 | __u8 sctpi_peer_capable; |
| 599 | __u8 sctpi_peer_sack; |
| 600 | __u16 __reserved1; |
| 601 | __u64 sctpi_isacks; |
Christopher Ferris | 49f525c | 2016-12-12 14:55:36 -0800 | [diff] [blame] | 602 | __u64 sctpi_osacks; |
| 603 | __u64 sctpi_opackets; |
| 604 | __u64 sctpi_ipackets; |
| 605 | __u64 sctpi_rtxchunks; |
Christopher Ferris | 49f525c | 2016-12-12 14:55:36 -0800 | [diff] [blame] | 606 | __u64 sctpi_outofseqtsns; |
| 607 | __u64 sctpi_idupchunks; |
| 608 | __u64 sctpi_gapcnt; |
| 609 | __u64 sctpi_ouodchunks; |
Christopher Ferris | 49f525c | 2016-12-12 14:55:36 -0800 | [diff] [blame] | 610 | __u64 sctpi_iuodchunks; |
| 611 | __u64 sctpi_oodchunks; |
| 612 | __u64 sctpi_iodchunks; |
| 613 | __u64 sctpi_octrlchunks; |
Christopher Ferris | 49f525c | 2016-12-12 14:55:36 -0800 | [diff] [blame] | 614 | __u64 sctpi_ictrlchunks; |
| 615 | struct sockaddr_storage sctpi_p_address; |
| 616 | __s32 sctpi_p_state; |
| 617 | __u32 sctpi_p_cwnd; |
Christopher Ferris | 49f525c | 2016-12-12 14:55:36 -0800 | [diff] [blame] | 618 | __u32 sctpi_p_srtt; |
| 619 | __u32 sctpi_p_rto; |
| 620 | __u32 sctpi_p_hbinterval; |
| 621 | __u32 sctpi_p_pathmaxrxt; |
Christopher Ferris | 49f525c | 2016-12-12 14:55:36 -0800 | [diff] [blame] | 622 | __u32 sctpi_p_sackdelay; |
| 623 | __u32 sctpi_p_sackfreq; |
| 624 | __u32 sctpi_p_ssthresh; |
| 625 | __u32 sctpi_p_partial_bytes_acked; |
Christopher Ferris | 49f525c | 2016-12-12 14:55:36 -0800 | [diff] [blame] | 626 | __u32 sctpi_p_flight_size; |
| 627 | __u16 sctpi_p_error; |
| 628 | __u16 __reserved2; |
| 629 | __u32 sctpi_s_autoclose; |
Christopher Ferris | 49f525c | 2016-12-12 14:55:36 -0800 | [diff] [blame] | 630 | __u32 sctpi_s_adaptation_ind; |
| 631 | __u32 sctpi_s_pd_point; |
| 632 | __u8 sctpi_s_nodelay; |
| 633 | __u8 sctpi_s_disable_fragments; |
Christopher Ferris | 49f525c | 2016-12-12 14:55:36 -0800 | [diff] [blame] | 634 | __u8 sctpi_s_v4mapped; |
| 635 | __u8 sctpi_s_frag_interleave; |
| 636 | __u32 sctpi_s_type; |
| 637 | __u32 __reserved3; |
Christopher Ferris | 49f525c | 2016-12-12 14:55:36 -0800 | [diff] [blame] | 638 | }; |
Christopher Ferris | 525ce91 | 2017-07-26 13:12:53 -0700 | [diff] [blame] | 639 | struct sctp_reset_streams { |
| 640 | sctp_assoc_t srs_assoc_id; |
| 641 | uint16_t srs_flags; |
| 642 | uint16_t srs_number_streams; |
| 643 | uint16_t srs_stream_list[]; |
| 644 | }; |
| 645 | struct sctp_add_streams { |
| 646 | sctp_assoc_t sas_assoc_id; |
| 647 | uint16_t sas_instrms; |
| 648 | uint16_t sas_outstrms; |
| 649 | }; |
Christopher Ferris | 934ec94 | 2018-01-31 15:29:16 -0800 | [diff] [blame] | 650 | enum sctp_sched_type { |
| 651 | SCTP_SS_FCFS, |
| 652 | SCTP_SS_PRIO, |
| 653 | SCTP_SS_RR, |
| 654 | SCTP_SS_MAX = SCTP_SS_RR |
| 655 | }; |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 656 | #endif |