28#ifndef SIM_TO_DUT_INTERFACE_ETHERNETPACKET_H
29#define SIM_TO_DUT_INTERFACE_ETHERNETPACKET_H
34#include <linux/if_ether.h>
36#include <boost/variant.hpp>
77 std::vector<unsigned char>
toBytes(
unsigned short ethernetFrameType);
83 std::string sourceMAC;
88 std::string destinationMAC;
93 std::vector<unsigned char> payload;
100 void extractEthernetHeader(std::vector<unsigned char> rawData);
108 static std::string getHexEncodedMAC(
unsigned char bytes[]);
116 static std::vector<unsigned char> getBytesOfHexEncodedMAC(std::string hex);
A single ethernet packet, wrapper to convert between raw bytes from socket and packet from simulation
Definition: EthernetPacket.h:44
std::vector< unsigned char > toBytes(unsigned short ethernetFrameType)
Definition: EthernetPacket.cpp:73
EthernetPacket(const std::string &text_archive)
Definition: EthernetPacket.cpp:34
std::string getPacketAsArchive()
Definition: EthernetPacket.cpp:60
Definition: EthernetPacket.cpp:33