• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
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  ****************************************************************************
11  ****************************************************************************/
12 #ifndef _LINUX_DCCP_H
13 #define _LINUX_DCCP_H
14 
15 #include <linux/types.h>
16 #include <asm/byteorder.h>
17 
18 struct dccp_hdr {
19  __be16 dccph_sport,
20  dccph_dport;
21  __u8 dccph_doff;
22 #ifdef __LITTLE_ENDIAN_BITFIELD
23  __u8 dccph_cscov:4,
24  dccph_ccval:4;
25 #elif defined(__BIG_ENDIAN_BITFIELD)
26  __u8 dccph_ccval:4,
27  dccph_cscov:4;
28 #else
29 #error "Adjust your <asm/byteorder.h> defines"
30 #endif
31  __u16 dccph_checksum;
32 #ifdef __LITTLE_ENDIAN_BITFIELD
33  __u8 dccph_x:1,
34  dccph_type:4,
35  dccph_reserved:3;
36 #elif defined(__BIG_ENDIAN_BITFIELD)
37  __u8 dccph_reserved:3,
38  dccph_type:4,
39  dccph_x:1;
40 #else
41 #error "Adjust your <asm/byteorder.h> defines"
42 #endif
43  __u8 dccph_seq2;
44  __be16 dccph_seq;
45 };
46 
47 struct dccp_hdr_ext {
48  __be32 dccph_seq_low;
49 };
50 
51 struct dccp_hdr_request {
52  __be32 dccph_req_service;
53 };
54 
55 struct dccp_hdr_ack_bits {
56  __be16 dccph_reserved1;
57  __be16 dccph_ack_nr_high;
58  __be32 dccph_ack_nr_low;
59 };
60 
61 struct dccp_hdr_response {
62  struct dccp_hdr_ack_bits dccph_resp_ack;
63  __be32 dccph_resp_service;
64 };
65 
66 struct dccp_hdr_reset {
67  struct dccp_hdr_ack_bits dccph_reset_ack;
68  __u8 dccph_reset_code,
69  dccph_reset_data[3];
70 };
71 
72 enum dccp_pkt_type {
73  DCCP_PKT_REQUEST = 0,
74  DCCP_PKT_RESPONSE,
75  DCCP_PKT_DATA,
76  DCCP_PKT_ACK,
77  DCCP_PKT_DATAACK,
78  DCCP_PKT_CLOSEREQ,
79  DCCP_PKT_CLOSE,
80  DCCP_PKT_RESET,
81  DCCP_PKT_SYNC,
82  DCCP_PKT_SYNCACK,
83  DCCP_PKT_INVALID,
84 };
85 
86 #define DCCP_NR_PKT_TYPES DCCP_PKT_INVALID
87 
88 enum {
89  DCCPO_PADDING = 0,
90  DCCPO_MANDATORY = 1,
91  DCCPO_MIN_RESERVED = 3,
92  DCCPO_MAX_RESERVED = 31,
93  DCCPO_CHANGE_L = 32,
94  DCCPO_CONFIRM_L = 33,
95  DCCPO_CHANGE_R = 34,
96  DCCPO_CONFIRM_R = 35,
97  DCCPO_NDP_COUNT = 37,
98  DCCPO_ACK_VECTOR_0 = 38,
99  DCCPO_ACK_VECTOR_1 = 39,
100  DCCPO_TIMESTAMP = 41,
101  DCCPO_TIMESTAMP_ECHO = 42,
102  DCCPO_ELAPSED_TIME = 43,
103  DCCPO_MAX = 45,
104  DCCPO_MIN_CCID_SPECIFIC = 128,
105  DCCPO_MAX_CCID_SPECIFIC = 255,
106 };
107 
108 enum {
109  DCCPF_RESERVED = 0,
110  DCCPF_CCID = 1,
111  DCCPF_SEQUENCE_WINDOW = 3,
112  DCCPF_ACK_RATIO = 5,
113  DCCPF_SEND_ACK_VECTOR = 6,
114  DCCPF_SEND_NDP_COUNT = 7,
115 
116  DCCPF_MIN_CCID_SPECIFIC = 128,
117  DCCPF_MAX_CCID_SPECIFIC = 255,
118 };
119 
120 struct dccp_so_feat {
121  __u8 dccpsf_feat;
122  __u8 *dccpsf_val;
123  __u8 dccpsf_len;
124 };
125 
126 #define DCCP_SOCKOPT_PACKET_SIZE 1
127 #define DCCP_SOCKOPT_SERVICE 2
128 #define DCCP_SOCKOPT_CHANGE_L 3
129 #define DCCP_SOCKOPT_CHANGE_R 4
130 #define DCCP_SOCKOPT_CCID_RX_INFO 128
131 #define DCCP_SOCKOPT_CCID_TX_INFO 192
132 
133 #define DCCP_SERVICE_LIST_MAX_LEN 32
134 
135 #endif
136