EtherLib/global_state.h

24 lines
421 B
C

#ifndef ETHERLIB_GLOBAL_STATE_H
#define ETHERLIB_GLOBAL_STATE_H
#include "memory_pool.h"
#include "packet_registry.h"
/**
* Global EtherLib state.
*/
typedef struct {
MP * mp; ///< Memory pool for synamic allocations.
PcktRegistry pcktReg; ///< Packet registry.
} EthState;
extern EthState gEthState;
#define E (gEthState)
/**
* Initialize EthLib.
*/
void ethlib_init();
#endif //ETHERLIB_GLOBAL_STATE_H