Writing and reading addresses from a Packet and how scheduling works in NS3

39 views
Skip to first unread message

Nwa Obi

unread,
Apr 3, 2014, 7:20:06 AM4/3/14
to ns-3-...@googlegroups.com
Hello Guys,

Is there any sample code where you can write and read addresses from a packet and also I have a design where a central node receives packets from several nodes over a point to point channel with each node and I want the central node to be able to respond to each node and how can I schedule each event(i.e receiving packet and response). If there is any ns3 example code I can use it will be helpful.

Konstantinos

unread,
Apr 3, 2014, 7:30:57 AM4/3/14
to ns-3-...@googlegroups.com
The topology you want to simulate is a star. There is a class to help you build such a topology, see point-to-point-layout module. 
You do not schedule the receive event. A receive event will happen when someone sends something! You can't say "now I am receiving a packet" if nobody has sent you one. 

I would suggest to look at the application module. There are sample applications (a) to send packets, and (b) receive packets. Also, the Ping application will reply back when it receives a packet (i.e. response). 

Nwa Obi

unread,
Apr 3, 2014, 7:39:25 AM4/3/14
to ns-3-...@googlegroups.com
Thanks, I will look into that now 
Reply all
Reply to author
Forward
0 new messages