ns3 runs the aomdv routing protocol

152 views
Skip to first unread message

yang ou

unread,
Oct 31, 2023, 3:51:06 AM10/31/23
to ns-3-users

屏幕截图 2023-10-31 141802.pnghello,During this time, I downloaded the code of Aomdv routing protocol shared by an author on GitHub, but I saw that there was only the code of the model part of aomdv in this file, and there was no code about helper, example, test, etc., so I modified this part according to the code of aodv. How to add the aomdv module to my ns3, but the following problems occurred when running. Maybe I am stupid, this problem has been bothering me for a long time, and I do not know how to modify it. I also hope that friends can give some help, my ns3 version is ns3.35. Thank you very much

Tommaso Pecorella

unread,
Oct 31, 2023, 6:54:38 AM10/31/23
to ns-3-users
You're not stupid, this is a subtle error.

PacketTags can only be added once to the packet, hence the error. How to fix it depends on which tag the code is trying to add (twice).

Now, PacketTags (and tags in general) are strange things, because they convey info that is not usually found in a packet. They're metadata that could (or could not) be realistic, so ns-3 tries to use them with a pinch of salt. Examples are:
  • Tags added to the packet to convey data inside a node (they're added in a layer, and removed by another layer, but in the same node). Good use and realistic, Operating Systems do add metadata to the packets.
  • Tags added to the packet in a node and read by another node. Not realistic and not "right", unless you're trying to do something clearly not realistic. As packet visualisation (NetAnim) or super-detailed statistics (FlowMonitor).
Said so, sometimes the devs do forget to remove a tag, and then they try to add it again. The solution is to check what tag has been added twice and remove it before adding it again., I.e., do something like:
MyTag myTag;
if (packet->PeekPacketTag(myTag))
{
// the tag is here, remove it before adding it back
packet->RemovePacketTag(myTag);
}

Note that you might want to do something more logical, like checking out why the tag was there, what it does contain, and if it makes sense to rewrite it.

yang ou

unread,
Oct 31, 2023, 7:34:28 AM10/31/23
to ns-3-users
Can I add your contact information? Do you have wechat?

Tommaso Pecorella

unread,
Oct 31, 2023, 7:40:36 AM10/31/23
to ns-3-users
Best is to use our zulip - https://ns-3.zulipchat.com (but mind that I'm terribly busy in this period)

yang ou

unread,
Oct 31, 2023, 7:47:44 AM10/31/23
to ns-3-users
Do you have this kind of contact wechat? I don't seem to understand what you sent this

yang ou

unread,
Oct 31, 2023, 7:48:56 AM10/31/23
to ns-3-users
Do you have the right aomdv routing module code to run through

Jiten Patel

unread,
Jan 2, 2025, 2:26:28 PM1/2/25
to ns-3-users
Hi, could you please share the example, helper, test sections for reference purposes?

eyasu tadese

unread,
Mar 27, 2026, 11:29:04 AM (5 days ago) Mar 27
to ns-3-users
yes can I attach to you?

Tommaso Pecorella

unread,
Mar 28, 2026, 4:52:47 AM (4 days ago) Mar 28
to ns-3-users
@tadeseeyasu184

You just replied to 14-months old message that did reply to 2+ YEARS old message.

Again, we already gave you the help we could. You have to debug the code you're using by yourself.
You're more than welcome to ask specific and punctual questions about the ns-3 functionalities.
Example:
- How do I find what tags has a packet
- What are the functions to add / remove a tag from a packet
- Where is the manual section describing the tags

Any other option will only lead to nothing - or worse. Your choice.
Reply all
Reply to author
Forward
0 new messages