This article directory
1. iperf3 code download compilation and overall architecture analysis
content | illustrate |
---|---|
Source code download | How to get code from code hosting repository |
Source code compilation and installation | Basic knowledge Know how to compile and test your own modified code |
main main function architecture analysis | The main architecture analysis of iperf code is the basis for the following analysis and specific testing of various processes |
Server-client interaction process and state machine migration | The business process of iperf code, as well as the detailed explanation of the interaction between the server and the client and the state machine migration process in the tested species |
Source code analysis: TCP test connection management | iperf3 supports the -P parameter, which can support simultaneous testing of multiple parallel streams. This article analyzes how iperf3 manages test connections. |
Source code analysis: Synchronous exchange of server and client parameters | How to synchronize configuration parameters between iperf3 server and client |
2. Code analysis in normal working mode of iperf3
It supports three protocols: TCP, UDP and SCP, and each protocol is divided into two roles: server and client. A total of 2×3=6 working modes. Usually, the client is used as the connection initiator, and the client sends the data stream to the server.
Operating mode | protocol | Role | source code analysis | source code analysis |
---|---|---|---|---|
TCP server | TCP | Server | Source code analysis of TCP server startup process | Analysis of source code of finite state machine in TCP server test process |
TCP client | TCP | client | Source code analysis of TCP client startup process | Analysis of source code of finite state machine in TCP client testing process |
UDP server | UDP | Server | unfinished, to be continued | |
UDP client | UDP | client | unfinished, to be continued | |
SCTP server | SCTP | Server | unfinished, to be continued | |
SCTP client | SCTP | client | unfinished, to be continued |
3. iperf3 also supports reverse test mode
That is, the server sends data to the receiver, using the -R parameter. In the reverse test mode and the normal work mode, it also supports 6 work modes.
Four, iperf3 also supports two-way test mode
That is, the server and the client can send and receive data in both directions at the same time, and also support 6 working modes.