| 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_LINUX_DCCP_H | 
|  | 20 | #define _UAPI_LINUX_DCCP_H | 
|  | 21 | #include <linux/types.h> | 
|  | 22 | #include <asm/byteorder.h> | 
| Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 23 | struct dccp_hdr { | 
| Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 24 | __be16 dccph_sport, dccph_dport; | 
|  | 25 | __u8 dccph_doff; | 
| Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 26 | #ifdef __LITTLE_ENDIAN_BITFIELD | 
| Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 27 | __u8 dccph_cscov : 4, dccph_ccval : 4; | 
| Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 28 | #elif defined(__BIG_ENDIAN_BITFIELD) | 
| Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 29 | __u8 dccph_ccval : 4, dccph_cscov : 4; | 
| Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 30 | #else | 
| Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 31 | #error "Adjust your <asm/byteorder.h> defines" | 
| Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 32 | #endif | 
| Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 33 | __sum16 dccph_checksum; | 
| Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 34 | #ifdef __LITTLE_ENDIAN_BITFIELD | 
| Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 35 | __u8 dccph_x : 1, dccph_type : 4, dccph_reserved : 3; | 
| Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 36 | #elif defined(__BIG_ENDIAN_BITFIELD) | 
| Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 37 | __u8 dccph_reserved : 3, dccph_type : 4, dccph_x : 1; | 
| Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 38 | #else | 
| Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 39 | #error "Adjust your <asm/byteorder.h> defines" | 
| Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 40 | #endif | 
| Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 41 | __u8 dccph_seq2; | 
|  | 42 | __be16 dccph_seq; | 
| Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 43 | }; | 
| Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 44 | struct dccp_hdr_ext { | 
| Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 45 | __be32 dccph_seq_low; | 
| Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 46 | }; | 
| Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 47 | struct dccp_hdr_request { | 
|  | 48 | __be32 dccph_req_service; | 
| Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 49 | }; | 
|  | 50 | struct dccp_hdr_ack_bits { | 
| Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 51 | __be16 dccph_reserved1; | 
|  | 52 | __be16 dccph_ack_nr_high; | 
|  | 53 | __be32 dccph_ack_nr_low; | 
| Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 54 | }; | 
|  | 55 | struct dccp_hdr_response { | 
| Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 56 | struct dccp_hdr_ack_bits dccph_resp_ack; | 
|  | 57 | __be32 dccph_resp_service; | 
| Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 58 | }; | 
| Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 59 | struct dccp_hdr_reset { | 
|  | 60 | struct dccp_hdr_ack_bits dccph_reset_ack; | 
|  | 61 | __u8 dccph_reset_code, dccph_reset_data[3]; | 
| Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 62 | }; | 
| Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 63 | enum dccp_pkt_type { | 
| Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 64 | DCCP_PKT_REQUEST = 0, | 
|  | 65 | DCCP_PKT_RESPONSE, | 
|  | 66 | DCCP_PKT_DATA, | 
| Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 67 | DCCP_PKT_ACK, | 
|  | 68 | DCCP_PKT_DATAACK, | 
|  | 69 | DCCP_PKT_CLOSEREQ, | 
|  | 70 | DCCP_PKT_CLOSE, | 
| Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 71 | DCCP_PKT_RESET, | 
|  | 72 | DCCP_PKT_SYNC, | 
|  | 73 | DCCP_PKT_SYNCACK, | 
|  | 74 | DCCP_PKT_INVALID, | 
| Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 75 | }; | 
|  | 76 | #define DCCP_NR_PKT_TYPES DCCP_PKT_INVALID | 
|  | 77 | enum dccp_reset_codes { | 
| Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 78 | DCCP_RESET_CODE_UNSPECIFIED = 0, | 
| Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 79 | DCCP_RESET_CODE_CLOSED, | 
|  | 80 | DCCP_RESET_CODE_ABORTED, | 
|  | 81 | DCCP_RESET_CODE_NO_CONNECTION, | 
|  | 82 | DCCP_RESET_CODE_PACKET_ERROR, | 
| Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 83 | DCCP_RESET_CODE_OPTION_ERROR, | 
|  | 84 | DCCP_RESET_CODE_MANDATORY_ERROR, | 
|  | 85 | DCCP_RESET_CODE_CONNECTION_REFUSED, | 
|  | 86 | DCCP_RESET_CODE_BAD_SERVICE_CODE, | 
| Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 87 | DCCP_RESET_CODE_TOO_BUSY, | 
|  | 88 | DCCP_RESET_CODE_BAD_INIT_COOKIE, | 
|  | 89 | DCCP_RESET_CODE_AGGRESSION_PENALTY, | 
|  | 90 | DCCP_MAX_RESET_CODES | 
| Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 91 | }; | 
|  | 92 | enum { | 
| Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 93 | DCCPO_PADDING = 0, | 
|  | 94 | DCCPO_MANDATORY = 1, | 
| Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 95 | DCCPO_MIN_RESERVED = 3, | 
|  | 96 | DCCPO_MAX_RESERVED = 31, | 
|  | 97 | DCCPO_CHANGE_L = 32, | 
|  | 98 | DCCPO_CONFIRM_L = 33, | 
| Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 99 | DCCPO_CHANGE_R = 34, | 
|  | 100 | DCCPO_CONFIRM_R = 35, | 
|  | 101 | DCCPO_NDP_COUNT = 37, | 
|  | 102 | DCCPO_ACK_VECTOR_0 = 38, | 
| Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 103 | DCCPO_ACK_VECTOR_1 = 39, | 
|  | 104 | DCCPO_TIMESTAMP = 41, | 
|  | 105 | DCCPO_TIMESTAMP_ECHO = 42, | 
|  | 106 | DCCPO_ELAPSED_TIME = 43, | 
| Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 107 | DCCPO_MAX = 45, | 
|  | 108 | DCCPO_MIN_RX_CCID_SPECIFIC = 128, | 
|  | 109 | DCCPO_MAX_RX_CCID_SPECIFIC = 191, | 
|  | 110 | DCCPO_MIN_TX_CCID_SPECIFIC = 192, | 
| Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 111 | DCCPO_MAX_TX_CCID_SPECIFIC = 255, | 
| Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 112 | }; | 
|  | 113 | #define DCCP_SINGLE_OPT_MAXLEN 253 | 
|  | 114 | enum { | 
| Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 115 | DCCPC_CCID2 = 2, | 
|  | 116 | DCCPC_CCID3 = 3, | 
| Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 117 | }; | 
|  | 118 | enum dccp_feature_numbers { | 
| Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 119 | DCCPF_RESERVED = 0, | 
|  | 120 | DCCPF_CCID = 1, | 
|  | 121 | DCCPF_SHORT_SEQNOS = 2, | 
|  | 122 | DCCPF_SEQUENCE_WINDOW = 3, | 
| Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 123 | DCCPF_ECN_INCAPABLE = 4, | 
|  | 124 | DCCPF_ACK_RATIO = 5, | 
|  | 125 | DCCPF_SEND_ACK_VECTOR = 6, | 
|  | 126 | DCCPF_SEND_NDP_COUNT = 7, | 
| Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 127 | DCCPF_MIN_CSUM_COVER = 8, | 
|  | 128 | DCCPF_DATA_CHECKSUM = 9, | 
|  | 129 | DCCPF_MIN_CCID_SPECIFIC = 128, | 
|  | 130 | DCCPF_SEND_LEV_RATE = 192, | 
| Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 131 | DCCPF_MAX_CCID_SPECIFIC = 255, | 
| Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 132 | }; | 
|  | 133 | enum dccp_cmsg_type { | 
| Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 134 | DCCP_SCM_PRIORITY = 1, | 
| Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 135 | DCCP_SCM_QPOLICY_MAX = 0xFFFF, | 
|  | 136 | DCCP_SCM_MAX | 
| Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 137 | }; | 
|  | 138 | enum dccp_packet_dequeueing_policy { | 
| Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 139 | DCCPQ_POLICY_SIMPLE, | 
|  | 140 | DCCPQ_POLICY_PRIO, | 
|  | 141 | DCCPQ_POLICY_MAX | 
| Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 142 | }; | 
| Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 143 | #define DCCP_SOCKOPT_PACKET_SIZE 1 | 
|  | 144 | #define DCCP_SOCKOPT_SERVICE 2 | 
|  | 145 | #define DCCP_SOCKOPT_CHANGE_L 3 | 
|  | 146 | #define DCCP_SOCKOPT_CHANGE_R 4 | 
| Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 147 | #define DCCP_SOCKOPT_GET_CUR_MPS 5 | 
|  | 148 | #define DCCP_SOCKOPT_SERVER_TIMEWAIT 6 | 
|  | 149 | #define DCCP_SOCKOPT_SEND_CSCOV 10 | 
|  | 150 | #define DCCP_SOCKOPT_RECV_CSCOV 11 | 
| Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 151 | #define DCCP_SOCKOPT_AVAILABLE_CCIDS 12 | 
|  | 152 | #define DCCP_SOCKOPT_CCID 13 | 
|  | 153 | #define DCCP_SOCKOPT_TX_CCID 14 | 
|  | 154 | #define DCCP_SOCKOPT_RX_CCID 15 | 
| Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 155 | #define DCCP_SOCKOPT_QPOLICY_ID 16 | 
|  | 156 | #define DCCP_SOCKOPT_QPOLICY_TXQLEN 17 | 
|  | 157 | #define DCCP_SOCKOPT_CCID_RX_INFO 128 | 
|  | 158 | #define DCCP_SOCKOPT_CCID_TX_INFO 192 | 
| Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 159 | #define DCCP_SERVICE_LIST_MAX_LEN 32 | 
|  | 160 | #endif |