slc
Special Line Character support for Telnet Linemode Option (RFC 1184).
- class Forwardmask(value, ack=False)[source]
Forwardmask object using the bytemask value received by server.
Initialize Forwardmask with the given value.
- generate_forwardmask(binary_mode, tabset, ack=False)[source]
Generate a Forwardmask instance.
Generate a 32-byte (
binary_modeis True) or 16-byte (False) Forwardmask instance appropriate for the specifiedslctab. A Forwardmask is formed by a bitmask of all 256 possible 8-bit keyboard ascii input, or, when not ‘outbinary’, a 16-byte 7-bit representation of each value, and whether they should be “forwarded” by the client on the transport stream- Return type:
- generate_slctab(tabset=None)[source]
Returns full ‘SLC Tab’ for definitions found using
tabset.Functions not listed in
tabsetare set as SLC_NOSUPPORT.
- class Linemode(mask=b'\\x00')[source]
Represents the LINEMODE negotiation state.
A mask of
LMODE_MODE_LOCALmeans that all line editing is performed on the client side (default). A mask of theNULL (\x00) indicates that editing is performed on the remote side.Initialize Linemode with the given mask.
Valid bit flags of mask are:
LMODE_MODE_TRAPSIG,LMODE_MODE_ACK,LMODE_MODE_SOFT_TAB, andLMODE_MODE_LIT_ECHO.
- LMODE_MODE_EDIT = b'\x01'
RFC 1184’s name for LMODE_MODE_LOCAL (EDIT bit)
- class SLC(mask=b'\\x03', value=b'\\x00')[source]
Defines the willingness to support a Special Linemode Character.
Initialize SLC with the given mask and value.
Defined by its SLC support level,
maskand default keyboard ASCII bytevalue(may be negotiated by client).
- class SLC_nosupport[source]
SLC definition inferring our unwillingness to support the option.
Initialize SLC_nosupport with NOSUPPORT level and disabled value.