@@ -85,7 +85,7 @@ struct bt_att_info_128 {
85
85
#define BT_ATT_OP_FIND_INFO_RSP 0x05
86
86
struct bt_att_find_info_rsp {
87
87
uint8_t format ;
88
- uint8_t info [0 ];
88
+ uint8_t info [];
89
89
} __packed ;
90
90
91
91
/* Find By Type Value Request */
@@ -94,7 +94,7 @@ struct bt_att_find_type_req {
94
94
uint16_t start_handle ;
95
95
uint16_t end_handle ;
96
96
uint16_t type ;
97
- uint8_t value [0 ];
97
+ uint8_t value [];
98
98
} __packed ;
99
99
100
100
struct bt_att_handle_group {
@@ -105,27 +105,27 @@ struct bt_att_handle_group {
105
105
/* Find By Type Value Response */
106
106
#define BT_ATT_OP_FIND_TYPE_RSP 0x07
107
107
struct bt_att_find_type_rsp {
108
- struct bt_att_handle_group list [ 0 ] ;
108
+ FLEXIBLE_ARRAY_DECLARE ( struct bt_att_handle_group , list ) ;
109
109
} __packed ;
110
110
111
111
/* Read By Type Request */
112
112
#define BT_ATT_OP_READ_TYPE_REQ 0x08
113
113
struct bt_att_read_type_req {
114
114
uint16_t start_handle ;
115
115
uint16_t end_handle ;
116
- uint8_t uuid [0 ];
116
+ uint8_t uuid [];
117
117
} __packed ;
118
118
119
119
struct bt_att_data {
120
120
uint16_t handle ;
121
- uint8_t value [0 ];
121
+ uint8_t value [];
122
122
} __packed ;
123
123
124
124
/* Read By Type Response */
125
125
#define BT_ATT_OP_READ_TYPE_RSP 0x09
126
126
struct bt_att_read_type_rsp {
127
127
uint8_t len ;
128
- struct bt_att_data data [0 ];
128
+ struct bt_att_data data [];
129
129
} __packed ;
130
130
131
131
/* Read Request */
@@ -137,7 +137,7 @@ struct bt_att_read_req {
137
137
/* Read Response */
138
138
#define BT_ATT_OP_READ_RSP 0x0b
139
139
struct bt_att_read_rsp {
140
- uint8_t value [ 0 ] ;
140
+ FLEXIBLE_ARRAY_DECLARE ( uint8_t , value ) ;
141
141
} __packed ;
142
142
143
143
/* Read Blob Request */
@@ -150,49 +150,49 @@ struct bt_att_read_blob_req {
150
150
/* Read Blob Response */
151
151
#define BT_ATT_OP_READ_BLOB_RSP 0x0d
152
152
struct bt_att_read_blob_rsp {
153
- uint8_t value [ 0 ] ;
153
+ FLEXIBLE_ARRAY_DECLARE ( uint8_t , value ) ;
154
154
} __packed ;
155
155
156
156
/* Read Multiple Request */
157
157
#define BT_ATT_READ_MULT_MIN_LEN_REQ 0x04
158
158
159
159
#define BT_ATT_OP_READ_MULT_REQ 0x0e
160
160
struct bt_att_read_mult_req {
161
- uint16_t handles [ 0 ] ;
161
+ FLEXIBLE_ARRAY_DECLARE ( uint16_t , handles ) ;
162
162
} __packed ;
163
163
164
164
/* Read Multiple Response */
165
165
#define BT_ATT_OP_READ_MULT_RSP 0x0f
166
166
struct bt_att_read_mult_rsp {
167
- uint8_t value [ 0 ] ;
167
+ FLEXIBLE_ARRAY_DECLARE ( uint8_t , value ) ;
168
168
} __packed ;
169
169
170
170
/* Read by Group Type Request */
171
171
#define BT_ATT_OP_READ_GROUP_REQ 0x10
172
172
struct bt_att_read_group_req {
173
173
uint16_t start_handle ;
174
174
uint16_t end_handle ;
175
- uint8_t uuid [0 ];
175
+ uint8_t uuid [];
176
176
} __packed ;
177
177
178
178
struct bt_att_group_data {
179
179
uint16_t start_handle ;
180
180
uint16_t end_handle ;
181
- uint8_t value [0 ];
181
+ uint8_t value [];
182
182
} __packed ;
183
183
184
184
/* Read by Group Type Response */
185
185
#define BT_ATT_OP_READ_GROUP_RSP 0x11
186
186
struct bt_att_read_group_rsp {
187
187
uint8_t len ;
188
- struct bt_att_group_data data [0 ];
188
+ struct bt_att_group_data data [];
189
189
} __packed ;
190
190
191
191
/* Write Request */
192
192
#define BT_ATT_OP_WRITE_REQ 0x12
193
193
struct bt_att_write_req {
194
194
uint16_t handle ;
195
- uint8_t value [0 ];
195
+ uint8_t value [];
196
196
} __packed ;
197
197
198
198
/* Write Response */
@@ -203,15 +203,15 @@ struct bt_att_write_req {
203
203
struct bt_att_prepare_write_req {
204
204
uint16_t handle ;
205
205
uint16_t offset ;
206
- uint8_t value [0 ];
206
+ uint8_t value [];
207
207
} __packed ;
208
208
209
209
/* Prepare Write Respond */
210
210
#define BT_ATT_OP_PREPARE_WRITE_RSP 0x17
211
211
struct bt_att_prepare_write_rsp {
212
212
uint16_t handle ;
213
213
uint16_t offset ;
214
- uint8_t value [0 ];
214
+ uint8_t value [];
215
215
} __packed ;
216
216
217
217
/* Execute Write Request */
@@ -230,14 +230,14 @@ struct bt_att_exec_write_req {
230
230
#define BT_ATT_OP_NOTIFY 0x1b
231
231
struct bt_att_notify {
232
232
uint16_t handle ;
233
- uint8_t value [0 ];
233
+ uint8_t value [];
234
234
} __packed ;
235
235
236
236
/* Handle Value Indication */
237
237
#define BT_ATT_OP_INDICATE 0x1d
238
238
struct bt_att_indicate {
239
239
uint16_t handle ;
240
- uint8_t value [0 ];
240
+ uint8_t value [];
241
241
} __packed ;
242
242
243
243
/* Handle Value Confirm */
@@ -249,36 +249,36 @@ struct bt_att_signature {
249
249
250
250
#define BT_ATT_OP_READ_MULT_VL_REQ 0x20
251
251
struct bt_att_read_mult_vl_req {
252
- uint16_t handles [ 0 ] ;
252
+ FLEXIBLE_ARRAY_DECLARE ( uint16_t , handles ) ;
253
253
} __packed ;
254
254
255
255
/* Read Multiple Response */
256
256
#define BT_ATT_OP_READ_MULT_VL_RSP 0x21
257
257
struct bt_att_read_mult_vl_rsp {
258
258
uint16_t len ;
259
- uint8_t value [0 ];
259
+ uint8_t value [];
260
260
} __packed ;
261
261
262
262
/* Handle Multiple Value Notification */
263
263
#define BT_ATT_OP_NOTIFY_MULT 0x23
264
264
struct bt_att_notify_mult {
265
265
uint16_t handle ;
266
266
uint16_t len ;
267
- uint8_t value [0 ];
267
+ uint8_t value [];
268
268
} __packed ;
269
269
270
270
/* Write Command */
271
271
#define BT_ATT_OP_WRITE_CMD 0x52
272
272
struct bt_att_write_cmd {
273
273
uint16_t handle ;
274
- uint8_t value [0 ];
274
+ uint8_t value [];
275
275
} __packed ;
276
276
277
277
/* Signed Write Command */
278
278
#define BT_ATT_OP_SIGNED_WRITE_CMD 0xd2
279
279
struct bt_att_signed_write_cmd {
280
280
uint16_t handle ;
281
- uint8_t value [0 ];
281
+ uint8_t value [];
282
282
} __packed ;
283
283
284
284
typedef void (* bt_att_func_t )(struct bt_conn * conn , int err ,
0 commit comments