tschak909 Posted November 5, 2020 Share Posted November 5, 2020 For anyone who can help. FujiNet needs to be able to support TELNET connections properly. We need a library that fits into lib/ that can be jumped into when enabled, and when an $FF byte is received. Once inside, it starts a state machine that parses IAC control code sequences, you can see some of these when you run a telnet client with option processing: $ telnet.exe telnet> set option on Will show option processing. telnet> open tnfs Trying 192.168.1.12... Connected to tnfs. Escape character is '^]'. SENT DO SUPPRESS GO AHEAD SENT WILL TERMINAL TYPE SENT WILL NAWS SENT WILL TSPEED SENT WILL LFLOW SENT WILL LINEMODE SENT WILL NEW-ENVIRON SENT DO STATUS RCVD DO TERMINAL TYPE RCVD DO TSPEED RCVD DO XDISPLOC SENT WONT XDISPLOC RCVD DO NEW-ENVIRON RCVD WILL SUPPRESS GO AHEAD RCVD DO NAWS SENT IAC SB NAWS 0 173 (173) 0 52 (52) RCVD DO LFLOW RCVD DONT LINEMODE RCVD WILL STATUS RCVD IAC SB TERMINAL-SPEED SEND SENT IAC SB TERMINAL-SPEED IS 38400,38400 RCVD IAC SB NEW-ENVIRON SEND SENT IAC SB NEW-ENVIRON IS VAR "PRINTER" VALUE "Samsung CLP-510 (USB001)" RCVD IAC SB TERMINAL-TYPE SEND SENT IAC SB TERMINAL-TYPE IS "XTERM" RCVD DO ECHO SENT WONT ECHO RCVD WILL ECHO SENT DO ECHO Raspbian GNU/Linux 10 tnfs login: telnet> close Connection closed. telnet> A complete explanation of TELNET IAC processing can be found here: http://mars.netanya.ac.il/~unesco/cdrom/booklet/HTML/NETWORKING/node300.html -Thom Quote Link to comment Share on other sites More sharing options...
brain Posted November 6, 2020 Share Posted November 6, 2020 There's a IAC parser in tcpser: https://github.com/go4retro/tcpser nvt.c Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.