The async node type performs conversion between synchronous frames and asynchronous frames, as defined for the PPP protocol in RFC 1662. Asynchronous framing uses flag bytes and octet-stuffing to simulate a frame oriented connection over an octet-oriented asynchronous serial line.
The node transmits and receives asynchronous data on the async hook. Mbuf boundaries of incoming data are ignored. Once a complete packet has been received, it is decoded and stripped of all framing bytes, and transmitted out the sync hook as a single frame.
Synchronous frames are transmitted and received on the sync hook. Packets received on this hook are encoded as asynchronous frames and sent out on async. Received packets should start with the address and control fields, or the PPP protocol field if address and control field compression is employed, and contain no checksum field. If the first four bytes are "0xff 0x03 0xc0 0x21" (an LCP protocol frame) then complete control character escaping is enabled for that frame (in PPP, LCP packets are always sent with no address and control field compression and all control characters escaped).
This node supports "flag sharing" for packets transmitted on async. This is an optimization where the trailing flag byte of one frame is shared with the opening flag byte of the next. Flag sharing between frames is disabled after one second of transmit idle time.
This node type supports the following hooks: