The ns-3 Network Simulator Project

Transfer actual data in ns-3 packets

ns-3 provides a SetFill method in UdpEchoClient which can be used to pass actual data in ns-3 packets. examples/tutorial/first.cc is a basic C++ program provided for ns-3 beginners. A line by line explanation of first.cc is provided in the ns-3 tutorial. Understand the working of first.cc from the tutorial, and then proceed with the following steps:

  1. Copy first.cc from examples/tutorial and paste it in scratch directory.
  2. Enable PCAP tracing in first.cc and verify whether two PCAP files are generated properly.
  3. Refer examples/udp/udp-echo.cc to understand the usage of SetFill method.
  4. Modify first.cc to use SetFill method. Pass the string "Google Code In" to SetFill method, and then compile and run the program.
  5. Verify whether the string "Google Code In" appears in both the PCAP files.
  6. Submit both the PCAP files for evaluation.
  7. Submit the patch containing the changes made to first.cc for evaluation.

Task tags

  • actual data
  • c++

Students who completed this task

Parth Pratim, ErykMikolajek, Asanali, Victor Hu, sikfeng, bartekche

Task type

  • code Code
  • chrome_reader_mode Documentation / Training
  • assessment Outreach / Research
close

2018