The ns-3 Network Simulator Project

Transfer real 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 "GCI 2019" to SetFill method, and then compile and run the program.
  5. Verify whether the string "GCI 2019" 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

  • real-data
  • pcap
  • tcpdump
  • c++
  • wireshark

Students who completed this task

Kr0n0s, SaiMyGuy, hax0kartik, howie

Task type

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

2019