#ifndef cp_cl_interf_cl_interf_h #define cp_cl_interf_cl_interf_h /* Cesar project {{{ * * Copyright (C) 2008 Spidcom * * <<>> * * }}} */ /** * \file cp/cl_interf/cl_interf.h * \brief CP2 cl interface. * \ingroup cp_cl_interf */ #include "cp/mme.h" /** Forward declaration. */ typedef struct cp_cl_interf_t cp_cl_interf_t; /** * Initialise the module. * \param ctx the module context. * */ void cp_cl_interf_init (cp_t *ctx); /** * Uninitialise the module. * \param ctx the module context. * */ void cp_cl_interf_uninit (cp_t *ctx); /** * Process the MME received. * \param ctx the module context. * * It shall use the MSG function to read the header and get a mme_rx_t * context. * - If the MME is complete, it process it and store the data need in * the mme_rx_t context and call the MSG dispatch function. * - if the MMe is fragmented, it shall verify if the segment has not * already been process. * * if it was process, it shall drop it. * * If not, process it */ void cp_cl_interf_process_mme (cp_t *ctx); /** * Get the available buffer. * \param ctx the module context. * \return MME TX buffer. * * Return null if no buffers are available */ u8 * cp_cl_interf_get_buffer_tx (cp_t *ctx); /** * Send a MME over the PWL or the HLE. * \param ctx the module context. * \param mme The MME to send. * */ void cp_cl_interf_mme_send (cp_t *ctx, cp_mme_tx_t * mme); /** * Remove all oldest MME received. * \param ctx the module context. * */ void cp_cl_interf_garbage_collector (cp_t *ctx); #endif /* cp_cl_interf_cl_interf_h */