Common Lisp Package: TELNETLIB

README:

FUNCTION

Public

EXPECT (TN REGEXP &OPTIONAL (TIMEOUT 600))

Read until one from a list of a regular expressions matches or until timeout. When no match is found, return nil with a :eof or :timeout, and the all the received data will still stay in the cookedq vector.

PEEK-AVAILABLE-DATA (TN &OPTIONAL BLOCK-READ)

Just take a look at the available data.

PEEK-SBDATA (TN)

READ-AVAILABLE-DATA (TN &OPTIONAL BLOCK-READ)

Read all the available data. If block-read is not nil, block the reading until at least a char arrives at the socket stream.

READ-UNTIL (TN STR &KEY (TIMEOUT 600) CASE-INSENSITIVE-MODE)

Read until a given string is encountered or until timeout. When no match is found, return nil with a :eof or :timeout, and the all the received data will still stay in the cookedq vector.

READ-UNTIL-2 (TN STRINGS &KEY (TIMEOUT 600) CASE-INSENSITIVE-MODE)

Read until one from a list of strings is encountered or until timeout. When no match is found, return nil with a :eof or :timeout, and the all the received data will still stay in the cookedq vector.

READ-UNTIL-2-IND (TN STRINGS &KEY (TIMEOUT 600) CASE-INSENSITIVE-MODE)

Sometimes, we more care about which string is matched.

Undocumented

CLOSE-TELNET-SESSION (TN)

EOF-TN (TN)

FORMAT-TN (TN CONTROL-STRING &REST FORMAT-ARGUMENTS)

OPEN-TELNET-SESSION (HOST &OPTIONAL PORT)

SET-TELNET-SESSION-OPTION (TN &KEY (REMOVE-RETURN-CHAR NIL R-R-C-P) (DEBUG-ON NIL DEBUG-ON-P) (CHAR-CALLBACK NIL CHAR-CALLBACK-P) (OPTION-CALLBACK NIL OPTION-CALLBACK-P) (SB-OPTION-CALLBACK NIL SB-OPTION-CALLBACK-P))

WRITE-LN (TN STR)

WRITE-LN-CRLR (TN STR)

Private

DEFAULT-OPTION-CALLBACK% (S CMD CODE)

DEFAULT-SB-OPTION-CALLBACK% (S SBDATA)

PROCESS-SOCK-STREAM% (TN &OPTIONAL (BLOCK-READ NIL))

Internal procedure to read all the available data from the socket stream to cookedq. Return :no-data when no data filled the cookeq. Return :old-data when no new data read from socket stream but cookeq has old data. Return :new-data when new data are read from socket stream to cookeq.

READ-COOKEDQ% (TN END-POS)

Read the cookedq vector from 0 to end-pos.

Undocumented

CHAR-EQUAL-CASE-INSENSITIVE% (C1 C2)

SEND-SUB-TERMINAL-TYPE-IS% (S &OPTIONAL (TTYPE UNKNOWN))

WAIT-UNTIL-READABLE% (STREAM &OPTIONAL (TIMEOUT 600) DEBUG-ON)

MACRO

Public

Undocumented

WITH-TELNET-SESSION ((TN HOST &OPTIONAL PORT) &BODY BODY)

SLOT-ACCESSOR

Private

Undocumented

CHAR-CALLBACK (OBJECT)

SETFCHAR-CALLBACK (NEW-VALUE OBJECT)

COOKEDQ (OBJECT)

SETFCOOKEDQ (NEW-VALUE OBJECT)

DEBUG-ON (OBJECT)

SETFDEBUG-ON (NEW-VALUE OBJECT)

EOF (OBJECT)

SETFEOF (NEW-VALUE OBJECT)

HOST (OBJECT)

SETFHOST (NEW-VALUE OBJECT)

IACSEQ (OBJECT)

SETFIACSEQ (NEW-VALUE OBJECT)

OPTION-CALLBACK (OBJECT)

SETFOPTION-CALLBACK (NEW-VALUE OBJECT)

PORT (OBJECT)

SETFPORT (NEW-VALUE OBJECT)

REMOVE-RETURN-CHAR (OBJECT)

SETFREMOVE-RETURN-CHAR (NEW-VALUE OBJECT)

SB (OBJECT)

SETFSB (NEW-VALUE OBJECT)

SB-OPTION-CALLBACK (OBJECT)

SETFSB-OPTION-CALLBACK (NEW-VALUE OBJECT)

SBDATAQ (OBJECT)

SETFSBDATAQ (NEW-VALUE OBJECT)

SOCK-STREAM (OBJECT)

SETFSOCK-STREAM (NEW-VALUE OBJECT)

VARIABLE

Private

Undocumented

*TN-INTERNAL-DEBUG*

CLASS

Private

Undocumented

TELNET

CONDITION

Public

Undocumented

TELNET-EOF

TELNET-READ-TIMEOUT

CONSTANT

Private

Undocumented

+AO+

+AUTHENTICATION+

+AYT+

+BINARY+

+BM+

+BRK+

+CHARSET+

+COM_PORT_OPTION+

+DET+

+DM+

+DO+

+DONT+

+EC+

+ECHO+

+EL+

+ENCRYPT+

+EOR+

+EXOPL+

+FORWARD_X+

+GA+

+IAC+

+IP+

+KERMIT+

+LFLOW+

+LINEMODE+

+LOGOUT+

+NAMS+

+NAOCRD+

+NAOFFD+

+NAOHTD+

+NAOHTS+

+NAOL+

+NAOLFD+

+NAOP+

+NAOVTD+

+NAOVTS+

+NAWS+

+NEW_ENVIRON+

+NOOPT+

+NOP+

+OLD_ENVIRON+

+OUTMRK+

+PRAGMA_HEARTBEAT+

+PRAGMA_LOGON+

+RCP+

+RCTE+

+RSP+

+SB+

+SE+

+SEND_URL+

+SGA+

+SNDLOC+

+SSPI_LOGON+

+STATUS+

+SUPDUP+

+SUPDUPOUTPUT+

+SUPPRESS_LOCAL_ECHO+

+TELNET-PORT+

+THENULL+

+TLS+

+TM+

+TN3270E+

+TSPEED+

+TTYLOC+

+TTYPE+

+TUID+

+VT3270REGIME+

+WILL+

+WONT+

+X3PAD+

+XASCII+

+XAUTH+

+XDISPLOC+