#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 dynamic allocations PcktRegistry * pcktReg; ///< Packet registry } EthState; extern EthState gEthState; #define E (gEthState) /** * Initialize EthLib. */ void ethlib_init(); void process_raw_packet(const uint8_t * data, uint32_t size); #endif //ETHERLIB_GLOBAL_STATE_H