1 #ifndef PACKETPP_ETH_LAYER 2 #define PACKETPP_ETH_LAYER 35 #define PCPP_ETHERTYPE_IP 0x0800 37 #define PCPP_ETHERTYPE_ARP 0x0806 39 #define PCPP_ETHERTYPE_ETHBRIDGE 0x6558 41 #define PCPP_ETHERTYPE_REVARP 0x8035 43 #define PCPP_ETHERTYPE_AT 0x809B 45 #define PCPP_ETHERTYPE_AARP 0x80F3 47 #define PCPP_ETHERTYPE_VLAN 0x8100 49 #define PCPP_ETHERTYPE_IPX 0x8137 51 #define PCPP_ETHERTYPE_IPV6 0x86dd 53 #define PCPP_ETHERTYPE_LOOPBACK 0x9000 55 #define PCPP_ETHERTYPE_PPPOED 0x8863 57 #define PCPP_ETHERTYPE_PPPOES 0x8864 59 #define PCPP_ETHERTYPE_MPLS 0x8847 61 #define PCPP_ETHERTYPE_PPP 0x880B 63 #define PCPP_ETHERTYPE_ROCEV1 0x8915 65 #define PCPP_ETHERTYPE_IEEE_802_1AD 0x88A8 67 #define PCPP_ETHERTYPE_WAKE_ON_LAN 0x0842 141 void parseNextLayer();
151 void computeCalculateFields();
153 std::string toString()
const;
163 static bool isDataValid(
const uint8_t* data,
size_t dataLen);
The main namespace for the PcapPlusPlus lib.
OsiModelLayer
Definition: ProtocolType.h:333
size_t getHeaderLen() const
Definition: EthLayer.h:146
EthLayer(uint8_t *data, size_t dataLen, Layer *prevLayer, Packet *packet)
Definition: EthLayer.h:92
Definition: ProtocolType.h:338
EthLayer(uint8_t *data, size_t dataLen, Packet *packet)
Definition: EthLayer.h:83
OsiModelLayer getOsiModelLayer() const
Definition: EthLayer.h:155
ether_header * getEthHeader() const
Definition: EthLayer.h:108
void copyTo(uint8_t **arr) const
Definition: MacAddress.h:146
Definition: EthLayer.h:74
const ProtocolType Ethernet
Definition: ProtocolType.h:28
MacAddress getSourceMac() const
Definition: EthLayer.h:114
MacAddress getDestMac() const
Definition: EthLayer.h:126
Definition: MacAddress.h:28
void setSourceMac(const MacAddress &sourceMac)
Definition: EthLayer.h:120
void setDestMac(const MacAddress &destMac)
Definition: EthLayer.h:132