RFC 658

Telnet output linefeed disposition

πŸ“… published October 1974, from ietf

RFC 658: TELNET OUTPUT LINEFEED DISPOSITION πŸŽ€

Author: D. Crocker (UCLA-NMC) πŸ’– Number: RFC 658, NIC 31161 🌸 Date: Oct. 25, 1974 πŸ“… Online file: [ISI]<DCROCKER>NAOLFD.TXT πŸ¦‹ Category/status: the header doesn't say πŸ€·β€β™€οΈ Obsoletes/Updates: the header doesn't list any πŸ’…


1. Command name and code ✨

okay so the option is called NAOLFD and its code is 16 πŸ”₯

NAOLFD 16
   (Negotiate About Output Linefeed Disposition)

2. Command meanings πŸ’…

bestie, we're talking about a simplex connection here, the kind described in the NAOL and NAOP Telnet Options 🧚 so each command below is one direction of the convo, and the sender and receiver each have their own lane πŸ›£οΈ

IAC DO NAOLFD

the data sender requests or agrees to negotiate about output linefeed disposition with the data receiver πŸ™Œ if they agree and there are no further subnegotiations, the data receiver is assumed to be handling output linefeed considerations 🌈

IAC DON'T NAOLFD

the data sender refuses to negotiate about output linefeed disposition with the data receiver, or demands a return to the unnegotiated default mode πŸ™…β€β™€οΈ that's a hard no, babe πŸ’€

IAC WILL NAOLFD

the data receiver requests or agrees to negotiate about output linefeed disposition with the sender πŸ’œ if agreement is reached and there are no further subnegotiations, the data receiver alone is assumed to be handling output linefeed considerations πŸ‘‘

IAC WON'T NAOLFD

the data receiver refuses to negotiate about output linefeed disposition, or demands a return to the unnegotiated default mode 😀 same energy as the DON'T, just from the other side 🫢

IAC SB NAOLFD DS <8-bit value> IAC SE

the data sender uses the 8-bit value to say which party should handle output linefeeds and what their disposition should be 🎯 the code for DS is 1 ✨

IAC SB NAOLFD DR <8-bit value> IAC SE

the data receiver uses the 8-bit value to say which party should handle output linefeeds and what their disposition should be πŸ“ the code for DR is 0 🧚


3. Default 🌸

so, the default is DON'T NAOLFD / WON'T NAOLFD (DON'T NAOLFD/WON'T NAOLFD) πŸ™ˆ if nobody's negotiating about who's handling output linefeed considerations, neither party is required nor prohibited from handling linefeeds πŸ¦‹ BUT it's appropriate for at least the data receiver to handle them, even if it's kinda primitive πŸ’–


4. Motivation for the Option 🧚

the whole reason this option exists is explained in section 4 of the NAOL and NAOLFD Telnet option descriptions πŸ“š go check those out, they're the lore πŸ’…


5. Description of the Option πŸ‘‘

the data sender and the data receiver both use the 8-bit value along with the DS and DR SB commands, and it goes like this:

      8-bit value         Meaning

      0            Command sender suggests that he alone will handle
                   linefeeds, for the connection.
      1 to 250     Command sender suggests that the other party alone
                   should handle linefeeds, but suggests that a delay
                   of the indicated value be used.  The value is the
                   number of character-times to wait or number of
                   NULs to insert in the data stream before sending
                   the next data character.  (See qualifications, below.)
      251          Not allowed, in order to be compatible with
                   related Telnet options.
      252          Command sender suggests that the other party alone
                   handle linefeeds, but suggests that they be discarded.
      253          Command sender suggests that the other party alone
                   should handle linefeeds, but suggests that
                   linefeeds be simulated.
      254          Command sender suggests that the other party alone
                   should handle output linefeeds but suggests
                   waiting for a character to be transmitted (on the
                   other simplex connection) before sending more
                   data.  (See qualifications, below.) Note that, due
                   to the assynchrony of the two simplex connections,
                   phase problems can occur with this option.
      255          Command sender suggests that the other party alone
                   should handle output linefeeds and suggests
                   nothing about how it should be done.

now the guiding rules, which are the real main-character moments πŸŽ€

  1. if neither the data receiver nor the data sender wants to handle output linefeeds, the data receiver must do it πŸ’…
  2. if both the data receiver and the data sender want to handle output linefeed disposition, the data sender gets to do it πŸ‘‘

the reasoning for rule 1 is that if neither wants the job, the default in the NAOLFD option wins 🧸 and for rule 2, the sender is presumed to have special knowledge about the data, so they get the spotlight, while still taking into account whatever suggestions the receiver makes 🫢

simulation means swapping the linefeed character for a new-line (see below) plus enough blanks to move the print head (or line pointer) back to the same sideways position it had right before the linefeed showed up ✨ to avoid infinite recursion πŸŒ€, simulation is only allowed for linefeed characters that are not immediately preceded by carriage-returns (aka part of a Telnet new-line combination) πŸ™ƒ it's assumed that simulation will be needed for printers that don't have a separate linefeed, like the IBM 2741 πŸ–¨οΈ in that case, end-of-line character padding can be specified through NAOCRD πŸ’œ any padding (0 < <8-bit-value> < 251) of linefeed characters is to be done for ALL linefeed characters πŸ”₯

NOTE: delays, which are controlled by the data sender, have to be NUL characters inserted right after the character 🚨 that's necessary because network transmissions are asynchronous 🧠 also, because of the Telnet end-of-line convention, you might need to add carriage-return padding or a delay after the linefeed (see the NAOCRD Telnet option) πŸ’… like with all option negotiations: neither party should suggest a state that's already in effect, except to refuse to negotiate πŸ™…β€β™€οΈ changes should be acknowledged 🫢 and once something's been refused, the option shouldn't be resuggested until "something changes" (e.g., another process starts) ✨ at any time, either party can disable further negotiation by sending the appropriate WON'T NAOLFD or DON'T NAOLFD command πŸ¦‹
πŸ“¦ where this page comes from