#ifndef __ethernet_h__ #define __ethernet_h__ #include "type.h" struct Ethernet { static const U32 MTU=1500; struct Address { U8 bytes[6]; inline void operator=(const Address& ad) { *(U32*)&this->bytes[0]=*(U32*)&ad.bytes[0]; *(U16*)&this->bytes[4]=*(U16*)&ad.bytes[4]; } inline bool operator==(const Address& ad) { return *(U32*)&this->bytes[0]==*(U32*)&ad.bytes[0] && *(U16*)&this->bytes[4]==*(U16*)&ad.bytes[4]; } inline bool operator!=(const Address& ad) { return !(*this==ad); } }; RelativeRef
destination; RelativeRef source; Relative