问题
I am using OMNET++ 5.5.1 with INET 4 framework.
In INET MAC protocols, each protocol has a fixed header structure. For example in XMAcHeader.msg, the MAC header defined as below:
class XMacHeaderBase extends FieldsChunk
{
MacAddress srcAddr;
MacAddress destAddr;
XMacTypes type;
}
I want to extend this header structure where the MAC header will contain an additional bit along with the source address, destination address and type. I have to set/reset that bit before transmitting the packet to the receiver, so receiver can make some decision.
Can anyone suggest me how to create such header structure in OMNET++?
Thank you
来源:https://stackoverflow.com/questions/62707356/how-to-create-own-header-structure-in-omnet