libcoap  4.3.0
Block (Internal)

Structures, Enums and Functions that are not exposed to applications. More...

Data Structures

struct  coap_lg_range
 
struct  coap_rblock_t
 Structure to keep track of received blocks. More...
 
struct  coap_l_block1_t
 Structure to keep track of block1 specific information (Requests) More...
 
struct  coap_l_block2_t
 Structure to keep track of block2 specific information (Responses) More...
 
struct  coap_lg_xmit_t
 Structure to hold large body (many blocks) transmission information. More...
 
struct  coap_lg_crcv_t
 Structure to hold large body (many blocks) client receive information. More...
 
struct  coap_lg_srcv_t
 Structure to hold large body (many blocks) server receive information. More...
 

Macros

#define COAP_RBLOCK_CNT   4
 

Typedefs

typedef struct coap_rblock_t coap_rblock_t
 Structure to keep track of received blocks. More...
 
typedef struct coap_l_block1_t coap_l_block1_t
 Structure to keep track of block1 specific information (Requests) More...
 
typedef struct coap_l_block2_t coap_l_block2_t
 Structure to keep track of block2 specific information (Responses) More...
 

Enumerations

enum  coap_recurse_t { COAP_RECURSE_OK , COAP_RECURSE_NO }
 

Functions

coap_lg_crcv_tcoap_block_new_lg_crcv (coap_session_t *session, coap_pdu_t *pdu)
 
void coap_block_delete_lg_crcv (coap_session_t *session, coap_lg_crcv_t *lg_crcv)
 
coap_tick_t coap_block_check_lg_crcv_timeouts (coap_session_t *session, coap_tick_t now)
 
void coap_block_delete_lg_srcv (coap_session_t *session, coap_lg_srcv_t *lg_srcv)
 
coap_tick_t coap_block_check_lg_srcv_timeouts (coap_session_t *session, coap_tick_t now)
 
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)
 
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, coap_string_t *query, coap_method_handler_t h, int *added_block)
 
int coap_handle_response_send_block (coap_session_t *session, coap_pdu_t *rcvd)
 
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)
 
void coap_block_delete_lg_xmit (coap_session_t *session, coap_lg_xmit_t *lg_xmit)
 
int coap_add_data_large_internal (coap_session_t *session, coap_pdu_t *pdu, coap_resource_t *resource, const coap_string_t *query, int maxage, uint64_t etag, size_t length, const uint8_t *data, coap_release_large_data_t release_func, void *app_ptr)
 The function that does all the work for the coap_add_data_large*() functions. More...
 
void coap_check_code_lg_xmit (coap_session_t *session, coap_pdu_t *response, coap_resource_t *resource, coap_string_t *query)
 The function checks that the code in a newly formed lg_xmit created by coap_add_data_large_response() is updated. More...
 

Detailed Description

Structures, Enums and Functions that are not exposed to applications.

Macro Definition Documentation

◆ COAP_RBLOCK_CNT

#define COAP_RBLOCK_CNT   4

Definition at line 41 of file coap_block_internal.h.

Typedef Documentation

◆ coap_l_block1_t

Structure to keep track of block1 specific information (Requests)

◆ coap_l_block2_t

Structure to keep track of block2 specific information (Responses)

◆ coap_rblock_t

typedef struct coap_rblock_t coap_rblock_t

Structure to keep track of received blocks.

Enumeration Type Documentation

◆ coap_recurse_t

Enumerator
COAP_RECURSE_OK 
COAP_RECURSE_NO 

Definition at line 31 of file coap_block_internal.h.

Function Documentation

◆ coap_add_data_large_internal()

int coap_add_data_large_internal ( coap_session_t session,
coap_pdu_t pdu,
coap_resource_t resource,
const coap_string_t query,
int  maxage,
uint64_t  etag,
size_t  length,
const uint8_t *  data,
coap_release_large_data_t  release_func,
void *  app_ptr 
)

The function that does all the work for the coap_add_data_large*() functions.

Parameters
sessionThe session to associate the data with.
pduThe PDU to associate the data with.
resourceThe resource to associate the data with (BLOCK2).
queryThe query to associate the data with (BLOCK2).
maxageThe maxmimum life of the data. If -1, then there is no maxage (BLOCK2).
etagETag to use if not 0 (BLOCK2).
lengthThe length of data to transmit.
dataThe data to transmit.
release_funcThe function to call to de-allocate data or NULL if the function is not required.
app_ptrA Pointer that the application can provide for when release_func() is called.
Returns
1 if transmission initiation is successful, else 0.

Definition at line 333 of file block.c.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ coap_block_check_lg_crcv_timeouts()

coap_tick_t coap_block_check_lg_crcv_timeouts ( coap_session_t session,
coap_tick_t  now 
)

Definition at line 734 of file block.c.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ coap_block_check_lg_srcv_timeouts()

coap_tick_t coap_block_check_lg_srcv_timeouts ( coap_session_t session,
coap_tick_t  now 
)

Definition at line 788 of file block.c.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ coap_block_delete_lg_crcv()

void coap_block_delete_lg_crcv ( coap_session_t session,
coap_lg_crcv_t lg_crcv 
)

Definition at line 862 of file block.c.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ coap_block_delete_lg_srcv()

void coap_block_delete_lg_srcv ( coap_session_t session,
coap_lg_srcv_t lg_srcv 
)

Definition at line 877 of file block.c.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ coap_block_delete_lg_xmit()

void coap_block_delete_lg_xmit ( coap_session_t session,
coap_lg_xmit_t lg_xmit 
)

Definition at line 890 of file block.c.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ coap_block_new_lg_crcv()

coap_lg_crcv_t* coap_block_new_lg_crcv ( coap_session_t session,
coap_pdu_t pdu 
)

Definition at line 810 of file block.c.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ coap_check_code_lg_xmit()

void coap_check_code_lg_xmit ( coap_session_t session,
coap_pdu_t response,
coap_resource_t resource,
coap_string_t query 
)

The function checks that the code in a newly formed lg_xmit created by coap_add_data_large_response() is updated.

Parameters
sessionThe session
responseThe response PDU to to check
resourceThe requested resource
queryThe requested query

Definition at line 1948 of file block.c.

+ Here is the caller graph for this function:

◆ 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,
coap_string_t query,
coap_method_handler_t  h,
int *  added_block 
)

Definition at line 1222 of file block.c.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ 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 
)

Definition at line 951 of file block.c.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ 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 
)

Definition at line 1611 of file block.c.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ coap_handle_response_send_block()

int coap_handle_response_send_block ( coap_session_t session,
coap_pdu_t rcvd 
)

Definition at line 1447 of file block.c.

+ Here is the call graph for this function:
+ Here is the caller graph for this function: