iperf3 UDP in ns3-dce

10 views
Skip to first unread message

Kun Win

unread,
Dec 3, 2021, 5:55:25 AM12/3/21
to ns-3-users
Good afternoon everyone,

NS3 Version: 3.34
DCE Version: 1.11


I am having problem with using UDP in iperf3. The problem is the reusing of the socket when creating the new UDP socket flow after exchanging the initial parameters.

In iperf_udp.c:250,
test->prot_listener = netannounce(test->settings->domain, Pudp, test->bind_address, test->server_port);

The error is 'Address already in used', even though parameter SO_REUSEADDR was defined when creating the socket in net.c. This error occurred when bind() function was called.

I checked code in NS3-dce (uni-socket-fd.cc:477) but SO_REUSEADDR was not handle and will always give 'Unsupported setsockopt requested.'

This only happens when running iperf3 with UDP and not TCP because TCP doesn't create a new port after initial connection.

Test: Bypass the 'Address already in used' by DeAllocate(Endpoint) in ipv4-end-point-demux.cc:123
Result: Received another error in iperf_api.c:2709-> getpeername()

I would be very grateful if anyone could provide me some with some insight and point me to the right direction or even other solution that could make it work.

Thank you very much.
Reply all
Reply to author
Forward
0 new messages