31#ifndef _ETHERNET_MISC_H
32#define _ETHERNET_MISC_H
44extern const uint8_t ethPadding[64];
50 int8_t vlanPcp, int8_t vlanDei, uint16_t type);
52error_t ethDecodeVlanTag(
const uint8_t *frame,
size_t length, uint16_t *vlanId,
55error_t ethCheckDestAddr(NetInterface *interface,
const MacAddr *macAddr);
56bool_t ethTrapIgmpPacket(EthHeader *header, uint8_t *data,
size_t length);
58void ethUpdateInStats(NetInterface *interface,
const MacAddr *destMacAddr);
60void ethUpdateOutStats(NetInterface *interface,
const MacAddr *destMacAddr,
63void ethUpdateErrorStats(NetInterface *interface,
error_t error);
65uint32_t ethCalcCrc(
const void *data,
size_t length);
66uint32_t ethCalcCrcEx(
const NetBuffer *buffer,
size_t offset,
size_t length);
68error_t ethCheckCrc(NetInterface *interface,
const uint8_t *frame,
error_t
Error codes.
Definition error.h:43
Structure describing a buffer that spans multiple chunks.
Definition net_mem.h:89