https://cdn.hackaday.io/files/1380505906331200/udptest2.c
This program began life many years ago when the lion kingdom was trying to speed up ethernet by using UDP instead of TCP. Lions quickly realized this was useless, so it became manely a way of testing UDP connections through large file transfers. It also works with IPV6, but lions only tested it with numeric IPV6 addresses.
The general idea is it sends a certain number of packets at a time & waits for an ACK. There's no windowing or asychronous communication. It's useful for half duplex like radios. It uses the same port for receiving on the source & destination. This was necessary to get around a certain firewall. The packet size is hard coded.
The journey begins by starting the receiver on the destination.
udptest -6 -r 1234
This waits for connections on IPV6, all interfaces, port 1234. Then the transmitter starts on the source.
udptest -6 2017:0000:0000:0000:7690:5000:0000:0001 1234 file.txt
This sends a file over IPV6. By default, it sends 1 packet & waits for an ACK. Leave out the -6 to use IPV4.
udptest -r 1234
udptest 10.0.0.14 1234 file.txt
To increase the number of packets per ACK, provide the -n option to the receiver.
udptest -r -n 8 1234
udptest 10.0.0.14 1234 file.txt
Discussions
Become a Hackaday.io Member
Create an account to leave a comment. Already have an account? Log In.