Description of the Option
When the user Telnet connects to a remote host, it can attempt to send the terminal location number information by doing a IAC WILL TTYLOC command. If the Telnet server can use the information, it replies with a IAC DO TTYLOC command. The user Telnet then sends the TTYLOC number in the subnegotiation.
It is recommended that if sending the TTYLOC number is refused then the Telnet Terminal Location (SEND-LOCATION in RFC-779) should be attempted.
The following are two example usage scenarios:
User Side First
(User) Host1: IAC WILL TTYLOC
Host1 is asking if it can send the 64-bit terminal location number (I will send...).
(Server) Host2: IAC DO TTYLOC
Host2 indicates to Host1 that it will accept the 64-bit terminal location number in a subnegotiation (You please do ...).
(User) Host1: IAC SB TTYLOC 0 <64-bit number> IAC SE
Host1 is sending the location number to Host2 which can communicate the number to the operating system or other system components.
Server Side First
(Server) HostA: IAC DO TTYLOC
HostA indicates to HostB that it would like to know the 64-bit terminal location number (You please do ...).
(User) HostB: IAC WILL TTYLOC
HostB agrees to send the 64-bit terminal location number to HostA in a subnegotiation (I will send...).
(User) HostB: IAC SB TTYLOC 0 <64-bit number> IAC SE
HostB is sending the location number to HostA which can communicate the number to the operating system or other system components.