RFC 946

Telnet terminal location number option

πŸ“… published May 1985, from ietf

RFC 946: TELNET TERMINAL LOCATION NUMBER OPTION πŸŽ€

okay bestie, the title block tea β˜•: this is RFC 946, written by R. Nedved at Carnegie-Mellon University in the Network Working Group, dated May 1985. It's a proposal for a new Telnet option, so it's asking for discussion and suggestions for improvements πŸ’…. This copy doesn't list anything it obsoletes or updates, so no drama there ✨

Status of this Memo πŸ¦‹

This RFC proposes a new Telnet option for the ARPA-Internet community and is literally begging for discussion and suggestions for improvements πŸ™. Distribution of this memo is unlimited 🌈.

Overview 🌸

When a group of users shares a lot of the same facilities, it's often a huge win to use some common feature to boost software performance and cut down on implementation costs πŸ’°.

Back in March 1982, CMU built a terminal location database on its growing PUP-based network and tweaked existing network software to handle a 64-bit number. Some people call it the Terminal Location Number, or TTYLOC for short 🧚. It stores neatly in operating system tables and can get passed between different layers of OS and networking with minimal changes to existing software. When they first looked at sending an unfixed or reasonable-length terminal location string instead, it seemed expensive 😭.

CMU now wants to bring this mechanism into the TCP-based networking support that's replacing the existing PUP-based software. It's not meant to replace the Telnet Terminal Location (SEND-LOCATION) Option. It's more of a shorthand mechanism for hosts in the same community 🫢.

TTYLOC Number πŸ”₯

The TTYLOC number is a 64-bit number made of two 32-bit numbers, so two (2) pieces total. The first is the 32-bit official ARPA Internet host address, which can be any one of the addresses for a multi-homed host. The second is a 32-bit number that stands for the terminal on that host πŸ‘‘.

Some values have special meanings. The host address [0.0.0.0] is defined to be "unknown". The terminal number FFFFFFFF (hex, or -1 in decimal) is defined to be "unknown". The terminal number FFFFFFFE (hex, or -2 in decimal) is defined to be "detached", which is for processes that aren't attached to a terminal ⭐.

1. Command Name and Option Code ✨

TTYLOC  28

2. Command Meanings πŸ’–

The following messages are the commands. Here's what each one means:

IAC WILL TTYLOC

The sender offers to send the TTYLOC information, or confirms that it can send it.

IAC WON'T TTYLOC

The sender refuses to send the TTYLOC information.

IAC DO TTYLOC

The sender requests to receive the TTYLOC information, or confirms that it will receive it.

IAC DON'T TTYLOC

The sender refuses to receive the TTYLOC information.

IAC SB TTYLOC <format> <TTYLOC number with IAC doubling> IAC SE

The sender is transmitting the TTYLOC information. The 64-bit TTYLOC number has format 0. The first 32 bits are the Internet host number, and the second 32 bits are the line on that Internet host. The bytes go from most significant 8-bit byte to least significant byte πŸ“.

3. Default Specification 🧚

By default, the option is off in both directions:

WON'T TTYLOC

TTYLOC information will not be sent.

DON'T TTYLOC

TTYLOC information will not be received.

4. Motivation πŸ’œ

Lots of systems can tell you where a user is logged in from, usually including the telephone extension and the names of the office occupants. That info is super useful for physically finding people or calling them πŸ“ž.

For incoming network connections to a host, though, only the remote host's name is available. This option, along with the Telnet Terminal Location option (RFC-779), gives the system the info it needs so it can pass it along to things like FINGER and WHOIS πŸ”.

5. Description of the Option πŸŽ€

When a user's Telnet connects to a remote host, it can try to send the terminal location number by sending IAC WILL TTYLOC. If the Telnet server can use the info, it replies with IAC DO TTYLOC. Then the user's Telnet sends the TTYLOC number in the subnegotiation ✨.

If sending the TTYLOC number gets refused, it is recommended to try the Telnet Terminal Location (SEND-LOCATION in RFC-779) instead.

Here are two example 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 tells 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 sends the location number to Host2, which can pass the number along to the operating system or other system components πŸ’….

Server Side First:

(Server) HostA: IAC DO TTYLOC

HostA tells 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 sends the location number to HostA, which can pass the number along to the operating system or other system components 🫢🌈.

πŸ“¦ where this page comes from