Distinguish data packets from control packets (OLSR)

66 views
Skip to first unread message

Marimar

unread,
Dec 10, 2017, 5:23:28 AM12/10/17
to ns-3-users
Hi,
i'm using an onoff application to broadcast a traffic over a wireless network. I need to do some specific measurements over this traffic. However, as they are broadcast packets, i can't distinguish them from other control packets such as OLSR packets by there destination address. I tried to add a packet-tag in the send function of the onoff application but it didn't work : i can't find the tag afterwards.
Is there a solution for this packet-tag problem or is there another way to distinguish these packets?
Another question is how to modify the payload of a packet before sending it (replace the payload with a different one for some specific packets)?
Best Regards,
Marimar.

Tommaso Pecorella

unread,
Dec 10, 2017, 5:25:31 PM12/10/17
to ns-3-users
OLSR packets are broadcast.
Data packets are unicast.

T.

Tommaso Pecorella

unread,
Dec 10, 2017, 5:26:12 PM12/10/17
to ns-3-users
Forgot.
How to modify a packet payload has been discussed previously. Please search the group.


On Sunday, December 10, 2017 at 11:23:28 AM UTC+1, Marimar wrote:

Marimar

unread,
Dec 11, 2017, 3:32:39 AM12/11/17
to ns-3-users
Hi, 
thank you Tommaso for your answer. However, the problem is that i have some data packets that are also broadcasted. So i have two types of broadcast traffic : OLSR and Data (from on-off application). Is there a way to tag the on-off application packets before sending them for exapmle? for now, this solution can help me. 
Thanks,
Marimar.

Tommaso Pecorella

unread,
Dec 11, 2017, 6:14:14 PM12/11/17
to ns-3-users
Use ByteTags. PacketTags are usually removed by lower layers.

T.

Marimar

unread,
Dec 19, 2017, 8:11:06 AM12/19/17
to ns-3-users
Hello Tommaso,
Thank you for your suggestion. However,i tried with ByteTags but unfortunately, it didn't work too. Actually, the bytetags neither for the onoffapplication nor for the other packets. What i did is add the bytetags at the send () of ipv4-l3-protocol.cc and the SendPacket () of the onoff-application.cc. When i check the packet after adding the ByteTag, i can find them. But when i receive the packet, i can't find any ByteTag. I don't know where is my fault.
Can you help me out please?
Best Regards,
Marimar

Tommaso Pecorella

unread,
Dec 23, 2017, 6:48:28 PM12/23/17
to ns-3-users
Hi,

not really, unless you send me a simple script.
As a side note, marking them in the application should be more than enough.

T.
Reply all
Reply to author
Forward
0 new messages