- Timestamping management added - Errors due to reading uninitialized data in ARP fixed - EthInterface reworked, incoming packet notification and payload readout separated (through which fixing concurrent access problems) - RX and TX offloads added - Capability to add a packet sieve layer without prior registration of specific packet class added (this makes it possible to register arbitrary EtherType connection blocks, for example)
31 lines
717 B
C
31 lines
717 B
C
#ifndef ETHERLIB_CONNECTION_BLOCK_H
|
|
#define ETHERLIB_CONNECTION_BLOCK_H
|
|
|
|
#include "packet_sieve.h"
|
|
|
|
struct ConnBlock_;
|
|
|
|
typedef int (*ConnBlockTransmitFn)(struct EthInterface_ * intf, const uint8_t * data, uint32_t size, const struct ConnBlock_ * connBlock);
|
|
|
|
/**
|
|
* Connection block.
|
|
*/
|
|
typedef struct ConnBlock_ {
|
|
PcktSieve * sieve; ///< Ethernet interface
|
|
PcktSieveLayer * sieveLayer; ///< Sieve layer
|
|
} ConnBlock;
|
|
|
|
/**
|
|
* Initialize non-mandatory fields to default values.
|
|
* @param connb
|
|
*/
|
|
void connb_init_defaults(ConnBlock * connb);
|
|
|
|
/**
|
|
* Remove connection block.
|
|
* @param connb pointer to existing connection block
|
|
*/
|
|
void connb_remove(ConnBlock * connb);
|
|
|
|
#endif //ETHERLIB_CONNECTION_BLOCK_H
|