A network simulation project implementing a reliable data transfer protocol using OMNeT++ framework. The implementation includes selective repeat ARQ with sliding window mechanism for error control and flow control.
- Selective Repeat ARQ protocol implementation
- Sliding window mechanism
- Error simulation including:
- Message modification
- Message loss
- Message duplication
- Message delay
- ACK/NACK control frames
- Timeout-based retransmission
- Frame checksum verification
- Byte stuffing for frame delimiting
-
src/- Source code filesnode.{h,cc}- Node implementation for sender/receivercoordinator.{h,cc}- Coordinator module for simulation controlCustomMessage.msg- Message definitionutilities.{h,cc}- Helper functionsLogger.{h,cc}- Logging functionalityErroredMsg.{h,cc}- Error simulation
-
simulations/- Simulation configurationomnetpp.ini- Main configuration filepackage.ned- Network definition
-
inputs/- Test input files
The following parameters can be configured in omnetpp.ini:
WS- Window size (default: 3)TO- Timeout duration (default: 10.0)PT- Processing time (default: 0.5)TD- Transmission delay (default: 1.0)ED- Extra delay for delayed messages (default: 5.0)DD- Duplication delay (default: 0.1)LP- Loss probability (default: 0.3)
- Install OMNeT++ 6.0 or later
- Build the project:
make- Run simulation:
./simulations/runMessages in input files use 4-bit error codes in the format:
[Modification, Loss, Duplication, Delay]
For example:
1000- Message modification only0011- Message duplication and delay0100- Message loss only
The project includes various test scenarios in the tests.txt file covering:
- Simple timeouts
- NACK retransmissions
- Different error combinations
- ACK/NACK loss scenarios
- Window sliding behavior