Join GitHub today
GitHub is home to over 36 million developers working together to host and review code, manage projects, and build software together.Sign up
Dynamic Port #147
That is how TCP normally works. The source port is always dynamic while the target port of the server remains fixed.
You can set Packet Sender's server port using (on Mac) PacketSender --> Preferences.
Then changing the server port away from zero (which means random).
If your testing requires a fixed source port when using TCP, you may do so on the command line using the -b option.
Navigate to the executable. Assuming default location, it is here:
This example command says to use hex notation, waits 500 ms for a response, binds source port to port 5000, and sends to address 127.0.01, port 15000, hex stream AA BB CC DD EE FF, using TCP.
You can use "--help" to get the complete help output.
If you want to use a fixed port for both source and destination port for TCP (like Packet Sender does for UDP), the only way to do this is through the command line interface using the -b option.
Packet Sender's UDP source and client is a fixed port on both sides because that is the only reliable way to collect responses. TCP does not need that since it is session-based. The GUI client for TCP will always request a dynamic port to connect a client to a server. This is how normal TCP operates, which is why your specialized use case is on the command line only (at least it is for now --you are not the first user needing to do this test).