Skip to content

zencatalyst/simple-2layer-network-simulator

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

21 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Welcome to the README of Simple 2-Layer Network Simulator 👋

Simple 2-Layer Network Simulator is a very basic computer network simulator that uses 2 layers (i.e. application and transport) to perform a bidirectional multi-message simulation between 4 processes across 2 nodes.

Build instructions

Clone the repository. Then navigate to simple-2layer-network-simulator/. Then run:

$ make -C src/

The executable will appear inside simple-2layer-network-simulator/build/release/ or simple-2layer-network-simulator/build/debug/ depending on the build command (release, debug, etc.) executed.

🚀 How to use the program:

Just run the program in the shell:

$ ./build/release/Simple-2Layer-Network-Simulator

Additionally, 8 command-line options can be used:

  1. --layers-delays=on: adds delays to the execution of the layers by putting them to sleep for short amounts of time
  2. -d: same as above
  3. --layers-delays=off: no added delays in the layers
  4. --channel-faults=on: channel will occasionally have faults when transferring bits from one node to the other causing the dependent ongoing connection to be closed
  5. -f: same as above
  6. --channel-faults=off: zero faults in the channel
  7. --help: displays help info
  8. --version: displays version info

Example:

$ ./build/release/Simple-2Layer-Network-Simulator -f

Contributing

Contributions, issues, and feature requests are welcome.

Author

👤 Kasra Hashemi

C++ language support

  • Simple 2-Layer Network Simulator requires at least C++23.

Third-party

License

Simple 2-Layer Network Simulator is licensed under the terms of the MIT license.