The TELNET Synch mechanism is used to clear the data path and regain control from a "runaway" process. It works by combining a TCP Urgent notification with the TELNET command DATA MARK (DM).
When a Synch is active, the data stream is immediately scanned for "interesting" signals (like IP, AO, or AYT), and intervening data is discarded. The DM command acts as the synchronizing mark, indicating that the recipient can return to normal data processing.
To implement a Synch, send the DM as the only character in a TCP urgent mode send operation. If a protocol needs to ensure a specific command (like IP) gets through a blocked connection, it should follow this sequence:
- Send the TELNET
IP character. - Send the TELNET SYNC sequence (the
DM character in TCP urgent mode). - Send the target command string.
- Send the protocol's analog of the TELNET
DM, if applicable.
# Example Synch Sequence for a custom protocol
1. Send TELNET IP
2. Send DM (via TCP Urgent)
3. Send 'STOP' (custom command)
4. Send protocol-specific DM