The latest update of NetworkToolbox received a new Tool called Packet.
I implemented this Tool while I needed to monitor traffic from a Software that sends UDP packets to another software. For both programs it was possible to enter the IP Address and the Port where the UDP traffic should be sent to or come from. So the only thing I needed was a Tool that behaves like a server which waits for network traffic on a certain port and displays it.
Once that Tool was finished and did do it’s job, I added the possibility to not only display received packets but also be able to send packets and not only to use the UDP protocol but also the TCP protocol and this is now how it looks like:
In the upper part “Transmit:” you can enter the destination address, port number and select the protocol (UDP or TCP). Below you can enter the data which should be sent (in this case the text “test”) which is repeated 1 time. If you tap on HEX the text will be converted to hexadecimal digits and you can continue to enter more hexadecimal digits.
(Note: if you want to send a packet of 256 bytes of zeros, you can enter 00 in Hexadecimal and 256 for Repeat)
If you tap on Send, that data will be sent immediately and further below, at the bottom, you will see the result which might be an error if you have selected TCP and if on the given IP Address and port, no server is waiting and accepting the data.
In the “Receive:” section of this Tool, for your convenience, you will see the IP Address of your device (which is where this Tool is listening for the data). Below, you can enter the Port where to listen and you can select again if you like to use the UDP or TCP protocol. Once you tap on “Start Listen” the Tool will start a Server process that is listening on the given port and protocol.
In the example above, I did use the same IP Address, port and protocol for sending and receiving so once I sent a packet, it will be received and displayed in list at the bottom (in opposite order, newest first).
There are many use cases for such a Tool. If you have two iOS devices, you can use one for sending, the other for receiving and can check if data on a certain port will pass through, even from inside your network or outside to inside.
Or you can send wrongly formatted or too large packets to see if a server still behaves correct after receiving such packets.
Or, like in my case, where I wanted to understand the UDP data which was sent by a Software. After finishing this Tool, I was also able to modify the data and send it to the original destination software using the “Transmit:” part of this Tool. For this, I did conveniently use the “Copy RX data” button, pasted this data from the clipboard in the “Data:” field and modified it.
Regarding UDP and TCP
Some of you might wonder about TCP and UDP and the difference between those two. The definitions for these abbreviations are explained in the Glossary of this App.
But in short, you can see both protocols as a standard to transfer data between two network services. The difference is, that TCP requires an established connection for the transmission whereas UDP does not. So TCP is more robust and you always know whether or not the data has been transferred which is not the case for UDP. However, TCP has more data overhead and is slower than UDP. TCP is being used for website traffic wheras UDP is being used for Audio and Video traffic where lost packets are not that important.
I hope you will find this new Packet Tool useful.
Please don’t forget to rate my App which helps to keep it going.
Thank you all and stay safe.
(As a reminder, new Tools are always appended at the end of the Icons and may have wrapped to another page. If you like to reorder the Icons, just head to Settings → Appearance → Organizer. From here you can either sort the Tools manually or select […] reset to defaults and all Tools will be re-sorted in a way that similar Tools are grouped together)