This file contains the Buffer Management Module definitions.
#include <stdint.h>
#include <stdbool.h>
Data Structures | |
struct | buffer_tag |
Buffer structure holding information of each buffer. More... | |
Macros | |
#define | BMM_BUFFER_POINTER(buf) ((buf)->body) |
This macro provides the pointer to the corresponding body of the supplied buffer header. More... | |
Typedefs | |
typedef struct buffer_tag | buffer_t |
Buffer structure holding information of each buffer. More... | |
Functions | |
buffer_t * | bmm_buffer_alloc (uint8_t size) |
Allocates a buffer. More... | |
void | bmm_buffer_free (buffer_t *pbuffer) |
Frees up a buffer. More... | |
void | bmm_buffer_init (void) |
Initializes the buffer module. More... | |
#define BMM_BUFFER_POINTER | ( | buf | ) | ((buf)->body) |
This macro provides the pointer to the corresponding body of the supplied buffer header.
Referenced by dispatch_event(), find_buffer_cb(), gen_mlme_start_conf(), handle_gts_data_req(), handle_received_frame_irq(), mac_gen_mcps_data_conf(), mac_gen_mlme_gts_conf(), mac_gts_table_update(), mac_process_data_frame(), mac_process_gts_request(), mac_process_tal_data_ind(), mac_process_tal_tx_status(), mac_send_gts_ind(), mac_tx_gts_data(), mcps_data_conf(), mcps_data_ind(), mcps_data_request(), mlme_gts_conf(), mlme_gts_ind(), mlme_gts_request(), mlme_reset_conf(), mlme_reset_request(), mlme_set_conf(), mlme_set_request(), mlme_start_request(), parse_mpdu(), process_deallocate_data_q(), process_incoming_frame(), send_reset_conf(), wpan_mcps_data_req(), wpan_mlme_reset_req(), and wpan_mlme_set_req().
typedef struct buffer_tag buffer_t |
Buffer structure holding information of each buffer.
buffer_t* bmm_buffer_alloc | ( | uint8_t | size | ) |
Allocates a buffer.
This function allocates a buffer and returns a pointer to the buffer. The same pointer should be used while freeing the buffer.User should call BMM_BUFFER_POINTER(buf) to get the pointer to buffer user area.
size | size of buffer to be allocated. |
Referenced by handle_received_frame_irq(), mac_gts_table_update(), mac_send_gts_ind(), parse_mpdu(), tal_init(), tal_task(), wpan_mcps_data_req(), wpan_mlme_reset_req(), and wpan_mlme_set_req().
void bmm_buffer_free | ( | buffer_t * | pbuffer | ) |
Frees up a buffer.
This function frees up a buffer. The pointer passed to this function should be the pointer returned during buffer allocation. The result is unpredictable if an incorrect pointer is passed.
pbuffer | Pointer to buffer that has to be freed. |
Referenced by dispatch_event(), mac_process_data_frame(), mac_process_gts_request(), mac_process_tal_data_ind(), mac_process_tal_tx_status(), mcps_data_conf(), mcps_data_ind(), mlme_gts_conf(), mlme_gts_ind(), mlme_reset_conf(), mlme_set_conf(), process_data_ind_not_transient(), tal_reset(), tal_rx_frame_cb(), wpan_mcps_data_req(), wpan_mlme_reset_req(), and wpan_mlme_set_req().
void bmm_buffer_init | ( | void | ) |
Initializes the buffer module.
This function initializes the buffer module. This function should be called before using any other functionality of buffer module.
Referenced by tal_init().