Packet Translation
SITL provides the interface between a simulation running in Modeler and a physical network. Packets from the simulation are converted to real network packets and, conversely, real packets are converted to simulated packets.
The packet translation process works as follows. When a packet is received, whether real or simulated, SITL attempts to determine its format, that is the protocol it belongs to, and then find an appropriate translation function to use. This is done using test functions that look for a specific packet format signature in the incoming packet. Once an appropriate translation function is found, the function is applied to the packet and a converted packet is produced. Since protocols are almost always nested, packets will be nested as well. Each translation function handles one level of nesting and then recursively invokes another function to convert its payload.
The packet translation process is described further in Packet Translation Details.
SITL provides a set of built-in translation functions with their associated test functions; these are described in SITL Translation Functions. If you would like to convert packets belonging to an unsupported protocol, you can write your own translation functions, as described in Creating Custom Packet-Translation Functions.