EtherLib/global_state.h
Wiesner András 05288d7a3c - ARP cache auto lookup feature added
- IGMPv2 capabilities added (report membership, leave group)
- ICMP capabilities added (ping)
- Tx Message Queue added
2023-01-14 14:24:56 +01:00

31 lines
669 B
C

#ifndef ETHERLIB_GLOBAL_STATE_H
#define ETHERLIB_GLOBAL_STATE_H
#include "memory_pool.h"
#include "packet_registry.h"
#include "packet_sieve.h"
#include "eth_interface.h"
#include "timer.h"
/**
* Global EtherLib state.
*/
typedef struct {
MP * mp; ///< Memory pool for dynamic allocations
Timer * tmr; ///< Timer for internal schedule.
PcktRegistry * pcktReg; ///< Packet registry
EthInterface * ethIntf; ///< Array of Ethernet interfaces
} 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