EtherLib/connection_block.h

27 lines
692 B
C

#ifndef ETHERLIB_CONNECTION_BLOCK_H
#define ETHERLIB_CONNECTION_BLOCK_H
#include "packet_sieve.h"
#include "eth_interface.h"
struct ConnBlock_;
typedef int (*ConnBlockTransmitFn)(EthInterface * intf, const uint8_t * data, uint32_t size, const struct ConnBlock_ * connBlock);
/**
* Connection block.
*/
typedef struct ConnBlock_ {
EthInterface * intf; ///< Ethernet interface
PcktSieveLayer * sieveLayer; ///< Sieve layer
ConnBlockTransmitFn transmitFn; ///< Conn-block related transmit function
} ConnBlock;
/**
* Remove connection block.
* @param connb pointer to existing connection block
*/
void connb_remove(ConnBlock * connb);
#endif //ETHERLIB_CONNECTION_BLOCK_H