How to create own header structure in OMNET++

一笑奈何 提交于 2020-07-08 03:46:17

问题


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

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!