On Time RTOS-32 Documentation
Welcome
RTTarget-32
RTKernel-32
RTFiles-32
RTIP-32
RTIP-32 Programming Manual
Introduction
TCP/IP Networking
Programming with RTIP-32
Demo Programs
PPP
DHCP Client
DHCP Server
FTP Client
FTP Server
TFTP Client
TFTP Server
Telnet Client
Protocol Overview
Telnet Server
Web Server
SNMP Agent
POP3 Client
SMTP Client
SNTP Client
SMB Server
SMB Client
SMB3 Server
SMB3 Client
WLAN Driver
RTIP-32 Reference Manual
RTPEG-32
RTUSB-32
|
Protocol Overview
The Telnet client waits for the user to enter characters at the console, and sends the characters over the network to the Telnet server. When the Telnet server sends characters to the client, the client prints them on the screen. In this way, it is possible for the user to access a remote workstation as if he were logged into it directly (i.e. through a terminal).
The Telnet session can end when the user logs out, when the server's host has to be rebooted or shut down, or when the user forcibly closes the Telnet client (via Alt-X or something similar).
The standard for Telnet option negotiation is specified in RFC 854, with additional information in RFC 855. The negotiation relies upon a set of special characters described in the table below:
Char Name |
Value |
Meaning |
IAC |
255 |
The Telnet IAC (Interpret As Command) character works like an escape character. What follows is either a two-byte option negotiation sequence, (i.e. IAC WILL xxx, IAC WONT xxx, IAC DO xxx, or IAC DONT xxx), a subnegotiation of the form: IAC SB <subnegotiation data> SE, or a go-ahead signal of the form: IAC GA. |
SB |
250 |
The SB (Subnegotiation) character is used following the IAC to begin a subnegotiation. Subnegotiation is used to send option values after both sides agree to an option (see Terminal-Type and NAWS examples in the Option Negotiation Examples Section). |
SE |
240 |
The SE character terminates the subnegotiation begun with IAC SB. |
GA |
249 |
IAC GA is the go-ahead signal sent by servers (see SUPPRESS-GO-AHEAD option). |
WILL |
251 |
Part of an option negotiation, indicating that the sender will do an option, i.e. IAC WILL xxx means the sender will do option xxx. The remote host will reply with a DO or a DONT command. |
WONT |
252 |
IAC WONT xxx means the sender won't do option xxx. The remote host will reply with a DO or a DONT command. |
DO |
253 |
IAC DO xxx means the sender wants the remote side to do option xxx. The remote host will reply with a DO or a DONT command. |
DONT |
254 |
IAC DONT xxx means the sender doesn't want the remote side to do option xxx. The remote host will reply with a WILL or a WONT command. |
In general, the DO command is a request that the receiver starts performing some service, the WILL command is an indication that the sender will start performing some service, the DONT command is a request that the receiver not perform some service, and the WONT command is an indication that the sender will not start performing some service. Either the client or server can initiate the option negotiation, and either DO, DONT, WILL, or WONT can be the first sequence sent.
The option codes for the various options supported by the RTIP-32 Telnet client are described in the table below. The options may be sent at any time during a telnet session and either the client or server can initiate negotiation of any option.
Name |
Value |
RFC |
Default |
Meaning |
ECHO |
1 |
857 |
No Echo |
If the Telnet ECHO option is on, the server echoes characters it receives over the Telnet connection back to the client. |
SUPPRESS-
GO_AHEAD |
3 |
858 |
No Suppress |
If this option is active, the server does not send go-ahead signals to the client. Go-aheads are necessary for single-tasking clients that block waiting for console input. They are not useful for most modern clients, including the RTIP-32 Telnet client. RTIP-32's client always sends this option. |
TERMINAL-
_TYPE |
24 |
1091 |
Text Mode |
If this option is active, then a subnegotiation will follow in which the Telnet client tells the server its terminal type (VT100, ANSI, etc.). |
NAWS |
31 |
1073 |
Client's Default
Window Size |
If this option is active, then a subnegotiation will follow in which the Telnet client tells the server its window size (number of columns, number of rows). |
By default, the characters the server sends the client are simply printed on the user's terminal. It is possible, however, for more sophisticated mechanisms to be used in which certain escape codes represent commands to move the cursor, clear the screen, etc. VT52, VT100, and ANSI are some of the many specifications that allow for this behavior. As an example, the sequence: ESC [ 2J sent to a VT100 client causes the client to clear the screen.
Telnet Client
|