23 lines
548 B
C
23 lines
548 B
C
//
|
|
// Created by epagris on 2022.10.20..
|
|
//
|
|
|
|
#include "eth_interface.h"
|
|
#include "dynmem.h"
|
|
#include "utils.h"
|
|
|
|
EthInterface *ethintf_new() {
|
|
EthInterface * ethIntf = (EthInterface *)dynmem_alloc(sizeof(EthInterface));
|
|
ASSERT_NULL(ethIntf);
|
|
memset(ðIntf->sieve.layer0, 0, sizeof(PcktSieveLayer));
|
|
return ethIntf;
|
|
}
|
|
|
|
void ethinf_receive(EthInterface *intf, const RawPckt *rawPckt) {
|
|
packsieve_input(&intf->sieve, rawPckt);
|
|
}
|
|
|
|
void ethinf_transmit(EthInterface *intf, const RawPckt *rawPckt) {
|
|
intf->ioDef.llTx(rawPckt);
|
|
}
|