This module accepts ephemeral SIK3, SOK3, and CCK3 keys and provides SIKZ, SOKZ, CCKZ and ZMK keys that may be longer-lasting. SIKZ, SOKZ, and CCKZ obey the SIK3, SOK3, and CCK3 protocols respectively. The supported ("Z") keys are connected transparently to the provided ("3") keys with the following exceptions. The zapper module only signals EOF on SIKZ and SOKZ when the zapper module is destroyed (not when EOF is signalled from the "3" keys). If EOF is signaled by the user of the "Z" keys, communication is ended permanently, but EOF is not signalled to the "3" keys.
See (zmc) about new zapper modules.
CCKZ
CCKZ(4;==>0;SIK3,SOK3,CCK3)
The current SIK3, SOK3, and CCK3 are returned if they exist and are available.
ZMK(0,((4,limit));CCK3,SIK3,SOK3 ==> ;) "Reconnect"
The following explains what is meant by "when a new circuit is required":
In the "Transmitting" state, if an EOF (i.e. zapper) is detected, the "Waiting for Reconnect" state is entered. If a reconnect is done, the offered SIK3 is saved and the "Reconnect Buffered" state is entered.
In the "Reconnect Buffered" state, if an EOF is detected, the "Transmitting" state is entered and the saved SIK3 is used. If another reconnect is done, the saved SIK3 is discarded and the new SIK3 is saved (and we remain in the "Reconnect Buffered" state).
The control side (CCK3) is handled similarly, but if an EOF is detected on CCK3, an EOF is sometimes presumed on SIK3.
Usage Note: Since code 2 (destroy) is not in CCK3's repretoire and code 2 on the CCK key to the zapper module results in code 2 to CCK3, then the ZM will crash upon code 2 when endowed with CCK3! Perhaps some design should be changed here.
Return code c is 0 if a zapper was sent. After this operation, no data sent on SOK3 will go to the old circuit.
Return code c is 1 if there was no circuit.
Perhaps different calls should be provided to cover the case where the resume keys might not be available at the time of the call (whether or not to wait). The return should also signify whether there was a circuit.