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> 23 struct dccp_hdr { 24 __be16 dccph_sport, dccph_dport; 25 __u8 dccph_doff; 26 #ifdef __LITTLE_ENDIAN_BITFIELD 27 __u8 dccph_cscov : 4, dccph_ccval : 4; 28 #elif defined(__BIG_ENDIAN_BITFIELD) 29 __u8 dccph_ccval : 4, dccph_cscov : 4; 30 #else 31 #error "Adjust your <asm/byteorder.h> defines" 32 #endif 33 __sum16 dccph_checksum; 34 #ifdef __LITTLE_ENDIAN_BITFIELD 35 __u8 dccph_x : 1, dccph_type : 4, dccph_reserved : 3; 36 #elif defined(__BIG_ENDIAN_BITFIELD) 37 __u8 dccph_reserved : 3, dccph_type : 4, dccph_x : 1; 38 #else 39 #error "Adjust your <asm/byteorder.h> defines" 40 #endif 41 __u8 dccph_seq2; 42 __be16 dccph_seq; 43 }; 44 struct dccp_hdr_ext { 45 __be32 dccph_seq_low; 46 }; 47 struct dccp_hdr_request { 48 __be32 dccph_req_service; 49 }; 50 struct dccp_hdr_ack_bits { 51 __be16 dccph_reserved1; 52 __be16 dccph_ack_nr_high; 53 __be32 dccph_ack_nr_low; 54 }; 55 struct dccp_hdr_response { 56 struct dccp_hdr_ack_bits dccph_resp_ack; 57 __be32 dccph_resp_service; 58 }; 59 struct dccp_hdr_reset { 60 struct dccp_hdr_ack_bits dccph_reset_ack; 61 __u8 dccph_reset_code, dccph_reset_data[3]; 62 }; 63 enum dccp_pkt_type { 64 DCCP_PKT_REQUEST = 0, 65 DCCP_PKT_RESPONSE, 66 DCCP_PKT_DATA, 67 DCCP_PKT_ACK, 68 DCCP_PKT_DATAACK, 69 DCCP_PKT_CLOSEREQ, 70 DCCP_PKT_CLOSE, 71 DCCP_PKT_RESET, 72 DCCP_PKT_SYNC, 73 DCCP_PKT_SYNCACK, 74 DCCP_PKT_INVALID, 75 }; 76 #define DCCP_NR_PKT_TYPES DCCP_PKT_INVALID 77 enum dccp_reset_codes { 78 DCCP_RESET_CODE_UNSPECIFIED = 0, 79 DCCP_RESET_CODE_CLOSED, 80 DCCP_RESET_CODE_ABORTED, 81 DCCP_RESET_CODE_NO_CONNECTION, 82 DCCP_RESET_CODE_PACKET_ERROR, 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, 87 DCCP_RESET_CODE_TOO_BUSY, 88 DCCP_RESET_CODE_BAD_INIT_COOKIE, 89 DCCP_RESET_CODE_AGGRESSION_PENALTY, 90 DCCP_MAX_RESET_CODES 91 }; 92 enum { 93 DCCPO_PADDING = 0, 94 DCCPO_MANDATORY = 1, 95 DCCPO_MIN_RESERVED = 3, 96 DCCPO_MAX_RESERVED = 31, 97 DCCPO_CHANGE_L = 32, 98 DCCPO_CONFIRM_L = 33, 99 DCCPO_CHANGE_R = 34, 100 DCCPO_CONFIRM_R = 35, 101 DCCPO_NDP_COUNT = 37, 102 DCCPO_ACK_VECTOR_0 = 38, 103 DCCPO_ACK_VECTOR_1 = 39, 104 DCCPO_TIMESTAMP = 41, 105 DCCPO_TIMESTAMP_ECHO = 42, 106 DCCPO_ELAPSED_TIME = 43, 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, 111 DCCPO_MAX_TX_CCID_SPECIFIC = 255, 112 }; 113 #define DCCP_SINGLE_OPT_MAXLEN 253 114 enum { 115 DCCPC_CCID2 = 2, 116 DCCPC_CCID3 = 3, 117 }; 118 enum dccp_feature_numbers { 119 DCCPF_RESERVED = 0, 120 DCCPF_CCID = 1, 121 DCCPF_SHORT_SEQNOS = 2, 122 DCCPF_SEQUENCE_WINDOW = 3, 123 DCCPF_ECN_INCAPABLE = 4, 124 DCCPF_ACK_RATIO = 5, 125 DCCPF_SEND_ACK_VECTOR = 6, 126 DCCPF_SEND_NDP_COUNT = 7, 127 DCCPF_MIN_CSUM_COVER = 8, 128 DCCPF_DATA_CHECKSUM = 9, 129 DCCPF_MIN_CCID_SPECIFIC = 128, 130 DCCPF_SEND_LEV_RATE = 192, 131 DCCPF_MAX_CCID_SPECIFIC = 255, 132 }; 133 enum dccp_cmsg_type { 134 DCCP_SCM_PRIORITY = 1, 135 DCCP_SCM_QPOLICY_MAX = 0xFFFF, 136 DCCP_SCM_MAX 137 }; 138 enum dccp_packet_dequeueing_policy { 139 DCCPQ_POLICY_SIMPLE, 140 DCCPQ_POLICY_PRIO, 141 DCCPQ_POLICY_MAX 142 }; 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 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 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 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 159 #define DCCP_SERVICE_LIST_MAX_LEN 32 160 #endif 161