libcoap 4.3.4-develop-749e16f
Block Transfer

Internal API for Block Transfer (RC7959) More...

+ Collaboration diagram for Block Transfer:

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_SINGLE_BLOCK_OR_Q   (COAP_BLOCK_SINGLE_BODY)
 
#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, coap_lg_xmit_t *lg_xmit)
 
void coap_block_delete_lg_crcv (coap_session_t *session, coap_lg_crcv_t *lg_crcv)
 
int coap_block_check_lg_crcv_timeouts (coap_session_t *session, coap_tick_t now, coap_tick_t *tim_rem)
 
void coap_block_delete_lg_srcv (coap_session_t *session, coap_lg_srcv_t *lg_srcv)
 
int coap_block_check_lg_srcv_timeouts (coap_session_t *session, coap_tick_t now, coap_tick_t *tim_rem)
 
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, int *added_block, coap_lg_srcv_t **free_lg_srcv)
 
coap_lg_xmit_tcoap_find_lg_xmit_response (const coap_session_t *session, const coap_pdu_t *request, const coap_resource_t *resource, const coap_string_t *query)
 
int coap_handle_response_send_block (coap_session_t *session, coap_pdu_t *sent, 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)
 
coap_mid_t coap_retransmit_oscore_pdu (coap_session_t *session, coap_pdu_t *pdu, coap_opt_t *echo)
 
void coap_block_delete_lg_xmit (coap_session_t *session, coap_lg_xmit_t *lg_xmit)
 
int coap_block_check_lg_xmit_timeouts (coap_session_t *session, coap_tick_t now, coap_tick_t *tim_rem)
 
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() is updated. More...
 
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 relevant to clients). More...
 

Detailed Description

Internal API for Block Transfer (RC7959)

Macro Definition Documentation

◆ COAP_RBLOCK_CNT

#define COAP_RBLOCK_CNT   4

Definition at line 73 of file coap_block_internal.h.

◆ COAP_SINGLE_BLOCK_OR_Q

#define COAP_SINGLE_BLOCK_OR_Q   (COAP_BLOCK_SINGLE_BODY)

Definition at line 60 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 63 of file coap_block_internal.h.

Function Documentation

◆ 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 
)
+ Here is the caller graph for this function:

◆ 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 
)
+ Here is the caller graph for this function:

◆ 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 at line 1206 of file coap_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 
)
+ 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 
)
+ 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 2211 of file coap_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,
coap_lg_xmit_t lg_xmit 
)
+ Here is the caller graph for this function:

◆ 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() is updated.

Parameters
sessionThe session.
requestThe request PDU to to check.
responseThe response PDU to to update with response->code.
resourceThe requested resource.
queryThe requested query.

◆ 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 relevant to clients).

Parameters
sessionThe session.
pduThe PDU to to check for updating.
+ Here is the caller graph for this function:

◆ 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 
)
+ 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,
int *  added_block,
coap_lg_srcv_t **  free_lg_srcv 
)

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