libcoap  4.1.1
 All Data Structures Files Functions Variables Typedefs Macros Groups Pages
Macros | Functions
block.c File Reference
#include "config.h"
#include <assert.h>
#include "debug.h"
#include "block.h"

Go to the source code of this file.

Macros

#define min(a, b)   ((a) < (b) ? (a) : (b))
 

Functions

unsigned int coap_opt_block_num (const coap_opt_t *block_opt)
 Returns the value of field num in the given block option block_opt. More...
 
int coap_get_block (coap_pdu_t *pdu, unsigned short type, coap_block_t *block)
 Initializes block from pdu. More...
 
int coap_write_block_opt (coap_block_t *block, unsigned short type, coap_pdu_t *pdu, size_t data_length)
 Writes a block option of type type to message pdu. More...
 
int coap_add_block (coap_pdu_t *pdu, unsigned int len, const unsigned char *data, unsigned int block_num, unsigned char block_szx)
 Adds the block_num block of size 1 << (block_szx + 4) from source data to pdu. More...
 

Macro Definition Documentation

#define min (   a,
 
)    ((a) < (b) ? (a) : (b))

Definition at line 18 of file block.c.