send out of band message

29 views
Skip to first unread message

Mouna

unread,
Aug 15, 2015, 1:26:59 PM8/15/15
to ns-3-users
Hi,
I have two nodes in wireless mesh network. From the same node, i want to send one packet in the first interface and supplementary information (with variable size) in the second interface (in the same time) to transfer out of band message which will complete information in the packet, it is possible?? How can i do this using  ns3 simulator???
I want your help.
Thanks in advance.

Tommaso Pecorella

unread,
Aug 15, 2015, 4:01:27 PM8/15/15
to ns-3-users
Hi,

although I deeply hate out of band channels (they just make things easier and simulations unrealistic), you can use byte tags to attach ay kind of information to the packet you're sending (don't be fooled by the name, you must use byte tags, not packet tags).
Either, simply call a function of the destination node. You can derive the node's pointer from its IP number (see a recent post) and simply call a function in the plain, old, c++ way.

Cheers,

T.

Mouna Gassara

unread,
Aug 15, 2015, 4:18:10 PM8/15/15
to ns-3-users
Before all, thank you sir for your response. But i don't understund " You can derive the node's pointer from its IP number (see a recent post) and simply call a function in the plain, old, c++ way" , can you please more explain ??
Every time, i extract the old information in the reception and i add to it the new information so the size will be bigger than the old, this is possible with byte tags or no??

--
You received this message because you are subscribed to a topic in the Google Groups "ns-3-users" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/ns-3-users/pGsI7I3U1v8/unsubscribe.
To unsubscribe from this group and all its topics, send an email to ns-3-users+...@googlegroups.com.
To post to this group, send email to ns-3-...@googlegroups.com.
Visit this group at http://groups.google.com/group/ns-3-users.
For more options, visit https://groups.google.com/d/optout.

Tommaso Pecorella

unread,
Aug 15, 2015, 4:28:55 PM8/15/15
to ns-3-users
With ByteTags it is possible, but quite hard (you'd need variable-size tags, and there's a limit on the tag size).

With direct node's function calling... well, what's hard in invoking a function with a variable buffer size as an argument ?
Again, this is simply a problem of C++ code design / programming. Once you have the node's pointers, you can do whatever you want without caring about NetDevices or packets.

Cheers,

T.

Mouna Gassara

unread,
Aug 15, 2015, 4:47:31 PM8/15/15
to ns-3-users
can you explain with a simple example and thank you very much?!!

Mouna Gassara

unread,
Aug 17, 2015, 3:50:08 AM8/17/15
to ns-3-users
Please sir , how can i create a function with a variable buffer size as an argument ?? 

* that is correct??

Buffer  add_information(Buffer const & o)
o. RemoveAtEnd( 32); // for extracting  bytes at the end of the buffer
o. AddAtEnd(  value); // for adding information at the end of the buffer

* Can i add this function in ipv4L3Protocol.cc (not in the destination node), because i want to make some changements in ip protocol in one hand and every node will automatically respect this new protocol in other hand ???

thank you in advance.


Reply all
Reply to author
Forward
0 new messages