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