Skip to content

Conversation

@davidBar-On
Copy link
Contributor

@davidBar-On davidBar-On commented Mar 16, 2025

  • Version of iperf3 (or development branch, such as master or
    3.1-STABLE) to which this pull request applies:
    master

  • Issues fixed (if any): Add the IP address when the server starts #1845

  • Brief description of code changes (suitable for use as a commit message):

Suggested way for the Server to display the IP addresses is is listening to, after displaying the "Server listening on ..." message. For example:

-----------------------------------------------------------
Server listening on 5201 (test #1)
Available Interfaces: lo__127.0.0.1
                      lo__10.255.255.254
                      eth0__123.45.67.204
                      lo__::1
                      eth0__ab80::123:cdff:efa3:b7cd
-----------------------------------------------------------

Few comments to the approach used:

  1. The IPs are displayed only in Verbose mode, to keep backward compatibility. It may be that displaying the data always is better.
  2. The IPs display format is: "<interface>__<ip addr>", as I didn't find a "standard" way to display this information. The "__" separator is used and not ":", since ":" can be confused with the "::" in IPv6 addresses.
  3. I tested the code in Ubuntu Linux and Windows (Cygwin), but my understanding is that getifaddrs() should be available on all OSs.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant