libcoap 4.3.2rc2

coap_block_internal.h
Go to the documentation of this file.
1/*
2 * coap_block_internal.h -- Structures, Enums & Functions that are not
3 * exposed to application programming
4 *
5 * Copyright (C) 2010-2023 Olaf Bergmann <bergmann@tzi.org>
6 * Copyright (C) 2021-2023 Jon Shallow <supjps-libcoap@jpshallow.com>
7 *
8 * SPDX-License-Identifier: BSD-2-Clause
9 *
10 * This file is part of the CoAP library libcoap. Please see README for terms
11 * of use.
12 */
13
19#ifndef COAP_BLOCK_INTERNAL_H_
20#define COAP_BLOCK_INTERNAL_H_
21
22#include "coap_internal.h"
23#include "coap_pdu_internal.h"
24#include "coap_resource.h"
25
33#if COAP_Q_BLOCK_SUPPORT
34/* Internal use only and are dropped when setting block_mode */
35#define COAP_BLOCK_HAS_Q_BLOCK 0x40 /* Set when Q_BLOCK supported */
36#define COAP_BLOCK_PROBE_Q_BLOCK 0x80 /* Set when Q_BLOCK probing */
37
38#define set_block_mode_probe_q(block_mode) \
39 do { \
40 block_mode |= COAP_BLOCK_PROBE_Q_BLOCK; \
41 block_mode &= ~(COAP_BLOCK_TRY_Q_BLOCK | COAP_BLOCK_HAS_Q_BLOCK); \
42 } while (0)
43
44#define set_block_mode_has_q(block_mode) \
45 do { \
46 block_mode |= COAP_BLOCK_HAS_Q_BLOCK; \
47 block_mode &= ~(COAP_BLOCK_TRY_Q_BLOCK | COAP_BLOCK_PROBE_Q_BLOCK); \
48 } while (0)
49
50#define set_block_mode_drop_q(block_mode) \
51 do { \
52 block_mode &= ~(COAP_BLOCK_TRY_Q_BLOCK |\
53 COAP_BLOCK_PROBE_Q_BLOCK |\
54 COAP_BLOCK_HAS_Q_BLOCK | \
55 COAP_BLOCK_USE_M_Q_BLOCK); \
56 } while (0)
57
58#define COAP_SINGLE_BLOCK_OR_Q (COAP_BLOCK_SINGLE_BODY|COAP_BLOCK_HAS_Q_BLOCK)
59#else /* ! COAP_Q_BLOCK_SUPPORT */
60#define COAP_SINGLE_BLOCK_OR_Q (COAP_BLOCK_SINGLE_BODY)
61#endif /* ! COAP_Q_BLOCK_SUPPORT */
62
63 typedef enum {
64 COAP_RECURSE_OK,
65 COAP_RECURSE_NO
66} coap_recurse_t;
67
68 struct coap_lg_range {
69 uint32_t begin;
70 uint32_t end;
71};
72
73#define COAP_RBLOCK_CNT 4
77 typedef struct coap_rblock_t {
78 uint32_t used;
79 uint32_t retry;
80#if COAP_Q_BLOCK_SUPPORT
81 uint32_t processing_payload_set;
82 uint32_t latest_payload_set;
83#endif /* COAP_Q_BLOCK_SUPPORT */
84 struct coap_lg_range range[COAP_RBLOCK_CNT];
85 coap_tick_t last_seen;
86} coap_rblock_t;
87
92 typedef struct coap_l_block1_t {
93 coap_binary_t *app_token;
94 uint64_t state_token;
95 size_t bert_size;
96 uint32_t count;
97} coap_l_block1_t;
98
103 typedef struct coap_l_block2_t {
104 coap_resource_t *resource;
105 coap_string_t *query;
106 uint64_t etag;
107 coap_pdu_code_t request_method;
108 uint8_t rtag_set;
109 uint8_t rtag_length;
110 uint8_t rtag[8];
111 coap_time_t maxage_expire;
112} coap_l_block2_t;
113
117 struct coap_lg_xmit_t {
118 struct coap_lg_xmit_t *next;
119 uint8_t blk_size;
120 uint16_t option;
121 int last_block;
123 const uint8_t *data;
124 size_t length;
125 size_t offset;
126 union {
127 coap_l_block1_t b1;
128 coap_l_block2_t b2;
129 } b;
130 coap_pdu_t pdu;
131 coap_tick_t last_payload;
132 coap_tick_t last_sent;
133 coap_tick_t last_all_sent;
134 coap_tick_t last_obs;
135#if COAP_Q_BLOCK_SUPPORT
136 coap_tick_t non_timeout_random_ticks;
137#endif /* COAP_Q_BLOCK_SUPPORT */
138 coap_release_large_data_t release_func;
139 void *app_ptr;
140};
141
142#if COAP_CLIENT_SUPPORT
146 struct coap_lg_crcv_t {
147 struct coap_lg_crcv_t *next;
148 uint8_t observe[3];
149 uint8_t observe_length;
150 uint8_t observe_set;
151 uint8_t szx;
152 uint8_t etag_set;
153 uint8_t etag_length;
154 uint8_t etag[8];
155 uint16_t content_format;
156 uint8_t last_type;
157 uint8_t initial;
158 uint16_t block_option;
159 uint16_t retry_counter;
160 size_t total_len;
161 coap_binary_t *body_data;
162 coap_binary_t *app_token;
163 coap_bin_const_t **obs_token;
165 size_t obs_token_cnt;
166 uint64_t state_token;
167 coap_pdu_t pdu;
168 coap_rblock_t rec_blocks;
169 coap_tick_t last_used;
170};
171#endif /* COAP_CLIENT_SUPPORT */
172
173#if COAP_SERVER_SUPPORT
177 struct coap_lg_srcv_t {
178 struct coap_lg_srcv_t *next;
179 uint8_t observe[3];
180 uint8_t observe_length;
181 uint8_t observe_set;
182 uint8_t rtag_set;
183 uint8_t rtag_length;
184 uint8_t rtag[8];
185 uint16_t content_format;
186 uint8_t last_type;
187 uint8_t szx;
188 size_t total_len;
189 coap_binary_t *body_data;
190 size_t amount_so_far;
191 coap_resource_t *resource;
192 coap_str_const_t *uri_path;
193 coap_rblock_t rec_blocks;
194#if COAP_Q_BLOCK_SUPPORT
195 coap_bin_const_t *last_token;
196#endif /* COAP_Q_BLOCK_SUPPORT */
197 coap_mid_t last_mid;
198 coap_tick_t last_used;
199 uint16_t block_option;
200};
201#endif /* COAP_SERVER_SUPPORT */
202
203#if COAP_Q_BLOCK_SUPPORT
204 typedef enum {
205 COAP_SEND_SKIP_PDU,
206 COAP_SEND_INC_PDU
207} coap_send_pdu_t;
208#endif /* COAP_Q_BLOCK_SUPPORT */
209
210#if COAP_CLIENT_SUPPORT
211 coap_lg_crcv_t *coap_block_new_lg_crcv(coap_session_t *session,
212 coap_pdu_t *pdu,
213 coap_lg_xmit_t *lg_xmit);
214
215 void coap_block_delete_lg_crcv(coap_session_t *session,
216 coap_lg_crcv_t *lg_crcv);
217
218 int coap_block_check_lg_crcv_timeouts(coap_session_t *session,
219 coap_tick_t now,
220 coap_tick_t *tim_rem);
221
222#if COAP_Q_BLOCK_SUPPORT
223 coap_mid_t coap_send_q_block1(coap_session_t *session,
224 coap_block_b_t block,
225 coap_pdu_t *request,
226 coap_send_pdu_t send_request);
227
228 coap_tick_t coap_block_check_q_block1_xmit(coap_session_t *session,
229 coap_tick_t now);
230
231 coap_mid_t coap_block_test_q_block(coap_session_t *session, coap_pdu_t *actual);
232#endif /* COAP_Q_BLOCK_SUPPORT */
233
234#endif /* COAP_CLIENT_SUPPORT */
235
236#if COAP_Q_BLOCK_SUPPORT
237 coap_mid_t coap_send_q_blocks(coap_session_t *session,
238 coap_lg_xmit_t *lg_xmit,
239 coap_block_b_t block,
240 coap_pdu_t *pdu,
241 coap_send_pdu_t send_pdu);
242#endif /* COAP_Q_BLOCK_SUPPORT */
243
244#if COAP_SERVER_SUPPORT
245 void coap_block_delete_lg_srcv(coap_session_t *session,
246 coap_lg_srcv_t *lg_srcv);
247
248 int coap_block_check_lg_srcv_timeouts(coap_session_t *session,
249 coap_tick_t now,
250 coap_tick_t *tim_rem);
251
252#if COAP_Q_BLOCK_SUPPORT
253 coap_tick_t coap_block_check_q_block2_xmit(coap_session_t *session,
254 coap_tick_t now);
255
256 coap_mid_t coap_send_q_block2(coap_session_t *session,
257 coap_resource_t *resource,
258 const coap_string_t *query,
259 coap_pdu_code_t request_method,
260 coap_block_b_t block,
261 coap_pdu_t *response,
262 coap_send_pdu_t send_response);
263#endif /* COAP_Q_BLOCK_SUPPORT */
264
265 int coap_handle_request_send_block(coap_session_t *session,
266 coap_pdu_t *pdu,
267 coap_pdu_t *response,
268 coap_resource_t *resource,
269 coap_string_t *query);
270
271 int coap_handle_request_put_block(coap_context_t *context,
272 coap_session_t *session,
273 coap_pdu_t *pdu,
274 coap_pdu_t *response,
275 coap_resource_t *resource,
276 coap_string_t *uri_path,
277 coap_opt_t *observe,
278 int *added_block,
279 coap_lg_srcv_t **free_lg_srcv);
280
281 coap_lg_xmit_t *coap_find_lg_xmit_response(const coap_session_t *session,
282 const coap_pdu_t *request,
283 const coap_resource_t *resource,
284 const coap_string_t *query);
285#endif /* COAP_SERVER_SUPPORT */
286
287#if COAP_CLIENT_SUPPORT
288 int coap_handle_response_send_block(coap_session_t *session, coap_pdu_t *sent,
289 coap_pdu_t *rcvd);
290
291 int coap_handle_response_get_block(coap_context_t *context,
292 coap_session_t *session,
293 coap_pdu_t *sent,
294 coap_pdu_t *rcvd,
295 coap_recurse_t recursive);
296 coap_mid_t coap_retransmit_oscore_pdu(coap_session_t *session,
297 coap_pdu_t *pdu,
298 coap_opt_t *echo);
299#endif /* COAP_CLIENT_SUPPORT */
300
301 void coap_block_delete_lg_xmit(coap_session_t *session,
302 coap_lg_xmit_t *lg_xmit);
303
304 int coap_block_check_lg_xmit_timeouts(coap_session_t *session,
305 coap_tick_t now,
306 coap_tick_t *tim_rem);
307
308#if COAP_Q_BLOCK_SUPPORT
309 int coap_block_drop_resp_q_block_xmit(coap_session_t *session,
310 coap_lg_xmit_t *lg_xmit);
311
312 int coap_block_drop_resp_q_block2_crcv(coap_session_t *session,
313 coap_lg_crcv_t *lg_crcv,
314 coap_pdu_t *sent);
315#endif /* COAP_Q_BLOCK_SUPPORT */
316
327 void coap_check_code_lg_xmit(const coap_session_t *session,
328 const coap_pdu_t *request,
329 coap_pdu_t *response,
330 const coap_resource_t *resource,
331 const coap_string_t *query);
332
333#if COAP_CLIENT_SUPPORT
341 void coap_check_update_token(coap_session_t *session, coap_pdu_t *pdu);
342#else /* ! COAP_CLIENT_SUPPORT */
343#define coap_check_update_token(a,b)
344#endif /* ! COAP_CLIENT_SUPPORT */
345
348#endif /* COAP_BLOCK_INTERNAL_H_ */
coap_internal.h
Pulls together all the internal only header files.
coap_opt_t
uint8_t coap_opt_t
Use byte-oriented access methods here because sliding a complex struct coap_opt_t over the data buffe...
Definition: coap_option.h:26
coap_pdu_internal.h
CoAP PDU internal information.
coap_resource.h
Generic resource handling.
coap_rblock_t
struct coap_rblock_t coap_rblock_t
Structure to keep track of received blocks.
coap_block_delete_lg_srcv
void coap_block_delete_lg_srcv(coap_session_t *session, coap_lg_srcv_t *lg_srcv)
coap_block_check_lg_crcv_timeouts
int coap_block_check_lg_crcv_timeouts(coap_session_t *session, coap_tick_t now, coap_tick_t *tim_rem)
coap_block_check_lg_srcv_timeouts
int coap_block_check_lg_srcv_timeouts(coap_session_t *session, coap_tick_t now, coap_tick_t *tim_rem)
COAP_RBLOCK_CNT
#define COAP_RBLOCK_CNT
Definition: coap_block_internal.h:73
coap_block_delete_lg_crcv
void coap_block_delete_lg_crcv(coap_session_t *session, coap_lg_crcv_t *lg_crcv)
coap_l_block1_t
struct coap_l_block1_t coap_l_block1_t
Structure to keep track of block1 specific information (Requests)
coap_handle_response_get_block
int coap_handle_response_get_block(coap_context_t *context, coap_session_t *session, coap_pdu_t *sent, coap_pdu_t *rcvd, coap_recurse_t recursive)
coap_check_code_lg_xmit
void coap_check_code_lg_xmit(const coap_session_t *session, const coap_pdu_t *request, coap_pdu_t *response, const coap_resource_t *resource, const coap_string_t *query)
The function checks that the code in a newly formed lg_xmit created by coap_add_data_large_response()...
coap_handle_response_send_block
int coap_handle_response_send_block(coap_session_t *session, coap_pdu_t *sent, coap_pdu_t *rcvd)
coap_retransmit_oscore_pdu
coap_mid_t coap_retransmit_oscore_pdu(coap_session_t *session, coap_pdu_t *pdu, coap_opt_t *echo)
coap_check_update_token
void coap_check_update_token(coap_session_t *session, coap_pdu_t *pdu)
The function checks if the token needs to be updated before PDU is presented to the application (only...
coap_l_block2_t
struct coap_l_block2_t coap_l_block2_t
Structure to keep track of block2 specific information (Responses)
coap_recurse_t
coap_recurse_t
Definition: coap_block_internal.h:63
coap_block_delete_lg_xmit
void coap_block_delete_lg_xmit(coap_session_t *session, coap_lg_xmit_t *lg_xmit)
Definition: coap_block.c:2139
coap_handle_request_put_block
int coap_handle_request_put_block(coap_context_t *context, coap_session_t *session, coap_pdu_t *pdu, coap_pdu_t *response, coap_resource_t *resource, coap_string_t *uri_path, coap_opt_t *observe, int *added_block, coap_lg_srcv_t **free_lg_srcv)
coap_find_lg_xmit_response
coap_lg_xmit_t * coap_find_lg_xmit_response(const coap_session_t *session, const coap_pdu_t *request, const coap_resource_t *resource, const coap_string_t *query)
coap_block_new_lg_crcv
coap_lg_crcv_t * coap_block_new_lg_crcv(coap_session_t *session, coap_pdu_t *pdu, coap_lg_xmit_t *lg_xmit)
coap_handle_request_send_block
int coap_handle_request_send_block(coap_session_t *session, coap_pdu_t *pdu, coap_pdu_t *response, coap_resource_t *resource, coap_string_t *query)
coap_block_check_lg_xmit_timeouts
int coap_block_check_lg_xmit_timeouts(coap_session_t *session, coap_tick_t now, coap_tick_t *tim_rem)
Definition: coap_block.c:1138
COAP_RECURSE_OK
@ COAP_RECURSE_OK
Definition: coap_block_internal.h:64
COAP_RECURSE_NO
@ COAP_RECURSE_NO
Definition: coap_block_internal.h:65
coap_release_large_data_t
void(* coap_release_large_data_t)(coap_session_t *session, void *app_ptr)
Callback handler for de-allocating the data based on app_ptr provided to coap_add_data_large_*() func...
Definition: coap_block.h:289
coap_time_t
time_t coap_time_t
CoAP time in seconds since epoch.
Definition: coap_time.h:149
coap_tick_t
uint64_t coap_tick_t
This data type represents internal timer ticks with COAP_TICKS_PER_SECOND resolution.
Definition: coap_time.h:144
coap_mid_t
int coap_mid_t
coap_mid_t is used to store the CoAP Message ID of a CoAP PDU.
Definition: coap_pdu.h:255
coap_pdu_code_t
coap_pdu_code_t
Set of codes available for a PDU.
Definition: coap_pdu.h:318
coap_bin_const_t
CoAP binary data definition with const data.
Definition: coap_str.h:64
coap_binary_t
CoAP binary data definition.
Definition: coap_str.h:56
coap_block_b_t
Structure of Block options with BERT support.
Definition: coap_block.h:51
coap_context_t
The CoAP stack's global state is stored in a coap_context_t object.
Definition: coap_net_internal.h:49
coap_l_block1_t
Structure to keep track of block1 specific information (Requests)
Definition: coap_block_internal.h:92
coap_l_block1_t::state_token
uint64_t state_token
state token
Definition: coap_block_internal.h:94
coap_l_block1_t::bert_size
size_t bert_size
size of last BERT block
Definition: coap_block_internal.h:95
coap_l_block1_t::count
uint32_t count
the number of packets sent for payload
Definition: coap_block_internal.h:96
coap_l_block1_t::app_token
coap_binary_t * app_token
original PDU token
Definition: coap_block_internal.h:93
coap_l_block2_t
Structure to keep track of block2 specific information (Responses)
Definition: coap_block_internal.h:103
coap_l_block2_t::request_method
coap_pdu_code_t request_method
Method used to request this data.
Definition: coap_block_internal.h:107
coap_l_block2_t::rtag_length
uint8_t rtag_length
RTag length.
Definition: coap_block_internal.h:109
coap_l_block2_t::query
coap_string_t * query
Associated query for the resource.
Definition: coap_block_internal.h:105
coap_l_block2_t::etag
uint64_t etag
ETag value.
Definition: coap_block_internal.h:106
coap_l_block2_t::resource
coap_resource_t * resource
associated resource
Definition: coap_block_internal.h:104
coap_l_block2_t::maxage_expire
coap_time_t maxage_expire
When this entry expires.
Definition: coap_block_internal.h:111
coap_l_block2_t::rtag_set
uint8_t rtag_set
Set if RTag is in receive PDU.
Definition: coap_block_internal.h:108
coap_l_block2_t::rtag
uint8_t rtag[8]
RTag for block checking.
Definition: coap_block_internal.h:110
coap_lg_crcv_t
Structure to hold large body (many blocks) client receive information.
Definition: coap_block_internal.h:146
coap_lg_crcv_t::block_option
uint16_t block_option
Block option in use.
Definition: coap_block_internal.h:158
coap_lg_crcv_t::etag
uint8_t etag[8]
ETag for block checking.
Definition: coap_block_internal.h:154
coap_lg_crcv_t::etag_length
uint8_t etag_length
ETag length.
Definition: coap_block_internal.h:153
coap_lg_crcv_t::last_type
uint8_t last_type
Last request type (CON/NON)
Definition: coap_block_internal.h:156
coap_lg_crcv_t::observe_length
uint8_t observe_length
Length of observe data.
Definition: coap_block_internal.h:149
coap_lg_crcv_t::observe
uint8_t observe[3]
Observe data (if observe_set) (only 24 bits)
Definition: coap_block_internal.h:148
coap_lg_crcv_t::etag_set
uint8_t etag_set
Set if ETag is in receive PDU.
Definition: coap_block_internal.h:152
coap_lg_crcv_t::rec_blocks
coap_rblock_t rec_blocks
Definition: coap_block_internal.h:168
coap_lg_crcv_t::next
struct coap_lg_crcv_t * next
Definition: coap_block_internal.h:147
coap_lg_crcv_t::initial
uint8_t initial
If set, has not been used yet.
Definition: coap_block_internal.h:157
coap_lg_crcv_t::szx
uint8_t szx
size of individual blocks
Definition: coap_block_internal.h:151
coap_lg_crcv_t::content_format
uint16_t content_format
Content format for the set of blocks.
Definition: coap_block_internal.h:155
coap_lg_crcv_t::pdu
coap_pdu_t pdu
skeletal PDU
Definition: coap_block_internal.h:167
coap_lg_crcv_t::last_used
coap_tick_t last_used
< list of received blocks
Definition: coap_block_internal.h:169
coap_lg_crcv_t::obs_token
coap_bin_const_t ** obs_token
Tokens used in setting up Observe (to handle large FETCH)
Definition: coap_block_internal.h:163
coap_lg_crcv_t::state_token
uint64_t state_token
state token
Definition: coap_block_internal.h:166
coap_lg_crcv_t::app_token
coap_binary_t * app_token
app requesting PDU token
Definition: coap_block_internal.h:162
coap_lg_crcv_t::retry_counter
uint16_t retry_counter
Retry counter (part of state token)
Definition: coap_block_internal.h:159
coap_lg_crcv_t::body_data
coap_binary_t * body_data
Used for re-assembling entire body.
Definition: coap_block_internal.h:161
coap_lg_crcv_t::obs_token_cnt
size_t obs_token_cnt
number of tokens used to set up Observe
Definition: coap_block_internal.h:165
coap_lg_crcv_t::observe_set
uint8_t observe_set
Set if this is an observe receive PDU.
Definition: coap_block_internal.h:150
coap_lg_crcv_t::total_len
size_t total_len
Length as indicated by SIZE2 option.
Definition: coap_block_internal.h:160
coap_lg_range
Definition: coap_block_internal.h:68
coap_lg_range::end
uint32_t end
Definition: coap_block_internal.h:70
coap_lg_range::begin
uint32_t begin
Definition: coap_block_internal.h:69
coap_lg_srcv_t
Structure to hold large body (many blocks) server receive information.
Definition: coap_block_internal.h:177
coap_lg_srcv_t::rtag
uint8_t rtag[8]
RTag for block checking.
Definition: coap_block_internal.h:184
coap_lg_srcv_t::last_mid
coap_mid_t last_mid
< list of received blocks
Definition: coap_block_internal.h:197
coap_lg_srcv_t::rtag_set
uint8_t rtag_set
Set if RTag is in receive PDU.
Definition: coap_block_internal.h:182
coap_lg_srcv_t::block_option
uint16_t block_option
Block option in use.
Definition: coap_block_internal.h:199
coap_lg_srcv_t::total_len
size_t total_len
Length as indicated by SIZE1 option.
Definition: coap_block_internal.h:188
coap_lg_srcv_t::next
struct coap_lg_srcv_t * next
Definition: coap_block_internal.h:178
coap_lg_srcv_t::observe_length
uint8_t observe_length
Length of observe data.
Definition: coap_block_internal.h:180
coap_lg_srcv_t::rec_blocks
coap_rblock_t rec_blocks
set to uri_path if unknown resource
Definition: coap_block_internal.h:193
coap_lg_srcv_t::body_data
coap_binary_t * body_data
Used for re-assembling entire body.
Definition: coap_block_internal.h:189
coap_lg_srcv_t::resource
coap_resource_t * resource
associated resource
Definition: coap_block_internal.h:191
coap_lg_srcv_t::observe_set
uint8_t observe_set
Set if this is an observe receive PDU.
Definition: coap_block_internal.h:181
coap_lg_srcv_t::rtag_length
uint8_t rtag_length
RTag length.
Definition: coap_block_internal.h:183
coap_lg_srcv_t::last_type
uint8_t last_type
Last request type (CON/NON)
Definition: coap_block_internal.h:186
coap_lg_srcv_t::szx
uint8_t szx
size of individual blocks
Definition: coap_block_internal.h:187
coap_lg_srcv_t::amount_so_far
size_t amount_so_far
Amount of data seen so far.
Definition: coap_block_internal.h:190
coap_lg_srcv_t::last_used
coap_tick_t last_used
Last time data sent or 0.
Definition: coap_block_internal.h:198
coap_lg_srcv_t::observe
uint8_t observe[3]
Observe data (if set) (only 24 bits)
Definition: coap_block_internal.h:179
coap_lg_srcv_t::content_format
uint16_t content_format
Content format for the set of blocks.
Definition: coap_block_internal.h:185
coap_lg_srcv_t::uri_path
coap_str_const_t * uri_path
Definition: coap_block_internal.h:192
coap_lg_xmit_t
Structure to hold large body (many blocks) transmission information.
Definition: coap_block_internal.h:117
coap_lg_xmit_t::last_all_sent
coap_tick_t last_all_sent
Last time all data sent or 0.
Definition: coap_block_internal.h:133
coap_lg_xmit_t::release_func
coap_release_large_data_t release_func
large data de-alloc function
Definition: coap_block_internal.h:138
coap_lg_xmit_t::blk_size
uint8_t blk_size
large block transmission size
Definition: coap_block_internal.h:119
coap_lg_xmit_t::last_sent
coap_tick_t last_sent
Last time any data sent.
Definition: coap_block_internal.h:132
coap_lg_xmit_t::b
union coap_lg_xmit_t::@1 b
coap_lg_xmit_t::data
const uint8_t * data
large data ptr
Definition: coap_block_internal.h:123
coap_lg_xmit_t::last_block
int last_block
last acknowledged block number Block1 last transmitted Q-Block2
Definition: coap_block_internal.h:121
coap_lg_xmit_t::last_payload
coap_tick_t last_payload
Last time MAX_PAYLOAD was sent or 0.
Definition: coap_block_internal.h:131
coap_lg_xmit_t::offset
size_t offset
large data next offset to transmit
Definition: coap_block_internal.h:125
coap_lg_xmit_t::pdu
coap_pdu_t pdu
skeletal PDU
Definition: coap_block_internal.h:130
coap_lg_xmit_t::length
size_t length
large data length
Definition: coap_block_internal.h:124
coap_lg_xmit_t::b1
coap_l_block1_t b1
Definition: coap_block_internal.h:127
coap_lg_xmit_t::b2
coap_l_block2_t b2
Definition: coap_block_internal.h:128
coap_lg_xmit_t::option
uint16_t option
large block transmisson CoAP option
Definition: coap_block_internal.h:120
coap_lg_xmit_t::next
struct coap_lg_xmit_t * next
Definition: coap_block_internal.h:118
coap_lg_xmit_t::app_ptr
void * app_ptr
applicaton provided ptr for de-alloc function
Definition: coap_block_internal.h:139
coap_lg_xmit_t::last_obs
coap_tick_t last_obs
Last time used (Observe tracking) or 0.
Definition: coap_block_internal.h:134
coap_pdu_t
structure for CoAP PDUs
Definition: coap_pdu_internal.h:119
coap_rblock_t
Structure to keep track of received blocks.
Definition: coap_block_internal.h:77
coap_rblock_t::retry
uint32_t retry
Definition: coap_block_internal.h:79
coap_rblock_t::used
uint32_t used
Definition: coap_block_internal.h:78
coap_rblock_t::last_seen
coap_tick_t last_seen
Definition: coap_block_internal.h:85
coap_rblock_t::range
struct coap_lg_range range[COAP_RBLOCK_CNT]
Definition: coap_block_internal.h:84
coap_resource_t
Abstraction of resource that can be attached to coap_context_t.
Definition: coap_resource_internal.h:53
coap_session_t
Abstraction of virtual session that can be attached to coap_context_t (client) or coap_endpoint_t (se...
Definition: coap_session_internal.h:68
coap_str_const_t
CoAP string data definition with const data.
Definition: coap_str.h:46
coap_string_t
CoAP string data definition.
Definition: coap_str.h:38