Skip to first unread message

Philipp

unread,
Jun 5, 2017, 3:29:27 AM6/5/17
to ns-3-users
Hi there,

first of all, it's a great tool you have created here. I'm still learning and got the feeling I've only seen the tip of the iceberg :)

Now to my question:
I wondered what the preferred way is to send data between applications on different node. 
For example, I do have a UDP Client, and a UDP Server similar to the request-response example.

Now, my question might be more network related than ns3 related:
Anyway, let's say I want to send application related data (e.g., as an object instance or a struct) via UDP. What is the best practice to do so?
What I have seen sofar is, that I can either 
 1) add it as a byte buffer "into" the packet payload, 
 2) create custom tags to the packet
 3) or add headers

I think 3 is out of the game, but is there a best practice or is that totally up to me?

Cheers,
Philipp

Konstantinos

unread,
Jun 5, 2017, 4:48:13 AM6/5/17
to ns-3-users
Dear Philipp,

If you refer to a real system, and you want to send real data between two nodes, then you need to add real data and not meta-data.
a) If you have a steam of data to send (like a variable string), you may use the buffer option
b) If you have fixed format to send, e.g. a single (or multiple) values, I would recommend to use the header option. This can be seen as 'application header', a structured packer format. It puts real data to the packet, i.e. increased the packet size. In addition, you can create a standardised API to set/get the values, whereas with the buffer, you do not have such flexibility.

Regards,
K

Philipp

unread,
Jun 7, 2017, 8:38:05 PM6/7/17
to ns-3-users
Thanks Konstantinos for your help. I wasn't aware of the FAQ link :) 
Reply all
Reply to author
Forward
0 new messages