slc¶
Special Line Character support for Telnet Linemode Option (RFC 1184).
-
generate_slctab
(tabset={b'\x01': <telnetlib3.slc.SLC object>, b'\x02': <telnetlib3.slc.SLC object>, b'\x03': <telnetlib3.slc.SLC object>, b'\x04': <telnetlib3.slc.SLC object>, b'\x05': <telnetlib3.slc.SLC object>, b'\x06': <telnetlib3.slc.SLC object>, b'\x07': <telnetlib3.slc.SLC object>, b'\x08': <telnetlib3.slc.SLC object>, b'\t': <telnetlib3.slc.SLC object>, b'\n': <telnetlib3.slc.SLC object>, b'\x0b': <telnetlib3.slc.SLC object>, b'\x0c': <telnetlib3.slc.SLC object>, b'\r': <telnetlib3.slc.SLC object>, b'\x0e': <telnetlib3.slc.SLC object>, b'\x0f': <telnetlib3.slc.SLC object>, b'\x10': <telnetlib3.slc.SLC object>, b'\x11': <telnetlib3.slc.SLC_nosupport object>, b'\x12': <telnetlib3.slc.SLC_nosupport object>})[source]¶ Returns full ‘SLC Tab’ for definitions found using
tabset
. Functions not listed intabset
are set as SLC_NOSUPPORT.
-
class
Linemode
(mask=b'\x00')[source]¶ A mask of
LMODE_MODE_LOCAL
means that all line editing is performed on the client side (default). A mask of theNULL () indicates that editing is performed on the remote side. Valid bit flags of mask are:LMODE_MODE_TRAPSIG
,LMODE_MODE_ACK
,LMODE_MODE_SOFT_TAB
, andLMODE_MODE_LIT_ECHO
.-
property
local
¶ True if linemode is local.
-
property
remote
¶ True if linemode is remote.
-
property
trapsig
¶ True if signals are trapped by client.
-
property
ack
¶ Returns True if mode has been acknowledged.
-
property
soft_tab
¶ Returns True if client will expand horizontal tab ( ).
-
property
lit_echo
¶ Returns True if non-printable characters are displayed as-is.
-
property
-
snoop
(byte, slctab, slc_callbacks)[source]¶ Scan
slctab
for matchingbyte
values.Returns (callback, func_byte, slc_definition) on match. Otherwise, (None, None, None). If no callback is assigned, the value of callback is always None.
-
generate_forwardmask
(binary_mode, tabset, ack=False)[source]¶ Generate a
Forwardmask
instance.Generate a 32-byte (
binary_mode
is 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 or not they should be “forwarded” by the client on the transport stream