DCW3 13-NOV-73 11:42 /20197 TELNET Output Page Size Option David C. Walden (BBN-NET) TELNET Output Page Size option i Command name and code. 1a NAOP 9 (Negotiate About Output Page-size) 1a1 (By page size we mean number of lines per page.) 1a1a Command meanings. 1b In the following, we are discussing a simplex connection, one half of a full duplex TELNET connection. On the simplex connection under discussion, by definition data passes from the data sender to the data receiver. If we consider the example of a computer transmitting data over a connection to a terminal where the data is printed, then the computer is the data sender and the terminal is the data receiver. Continuing to use this example, the NAOP option could be used to negotiate the page size to be used when printing pages from the computer on the terminal. To negotiate page size on the other half of the TELNET connection the parties involved reverse their data sender and data receiver roles; this can be done unambiguously as the sender of a DO or DON'T NAOP command can only be the data sender, thus defining the half of the TELNET connection under discussion, and the sender of a WILL or WON'T NAOP command can only be the data receiver. 1b1 IAC DO NAOP The data sender requests or agrees to negotiate about output page size with the data receiver. In the case where agreement has been reached and in the absence of further subnegotiations, the data receiver alone is assumed to be handling output page size considerations. 1b2 IAC DON'T NAOP The data sender refuses to negotiate about output page size with the data receiver, or demands a return to the unnegotiated default mode. lb3 DCW3 13-NOV-73 11:42 20197 TELNET Output Page Size Option IAC WILL NAOP The data receiver requests or agrees to negotiate about output page size with the data sender. In the case where agreement has been reached and in the absence of further subnegotiations, the data receiver alone is assumed to be handling output page size considerations. 1b4 IAC WON'T NAOP The data receiver refuses to negotiate about output page size, or demands a return to the unnegotiated default mode. 1b5 IAC SB NAOP DS <8 bit value> IAC SE The data sender specifies, with the 8 bit value, which party should handle output page size considerations and how. The code for DS is l. 1b6 IAC SB NAOP DR <8 bit value> IAC SE The data receiver specifies, with the 8 bit value, which party should handle output page size considerations and how. The code for DR is 0. 1b7 Default 1c DON'T NAOP In the default absence of 1c1 WON'T NAOP negotiation concerning which party, data sender or data receiver, is handling output page size considerations, neither party is required to handle page size consideration and neither party is prohibited from handling page size consideration, but it is appropriate if at least the data receiver handles page size considerations albeit primitively. 1c2 Motivation for the option 1d There appear to be four cases in which it is useful for the party at one end of a TELNET connection to communicate with the other party about the output page size: 1d1 (a) the sender may wish the receiver to use its local knowledge of the printer page size to properly handle the page size; 1d1a 1 DCW3 13-NOV-73 ll:42 20197 TELNET Output Page Size Option (b) the receiver may wish the sender to use its local knowledge to the data being sent to properly handle the page size; 1d1b (c) the sender may wish to use its local knowledge of the data being sent to instruct the receiver in the proper handling of the page size; and 1d1c (d) the receiver may wish to use its local knowledge of the printer size to instruct the sender in the proper handling of the page size. 1d1d An example of proper handling of the page size is for the receiver to hold off further output until instructed to continue when the lines being printed are about to overflow the scope face. 1d2 Description of the Option. 1e The data sender and data receiver use the 8 bit value along with the DS and DR SB commands as follows. 1e1 8 bit value Meaning 1e2 0 command sender suggests he alone will handle output page-size considerations for the connection. 1e3 1 to 253 command sender suggests other party alone should handle output page-size considerations but suggests page size should be value given, in lines. 1e4 254 command sender suggests other party alone should handle output page size considerations but suggests page size should be considered infinity. 1e5 255 command sender suggests other party alone should handle output page size considerations and suggests nothing about how it should be done. 1e6 The guiding rules are that 1f (1) if neither data receiver or data sender wants to handle output page size considerations, the data receiver must do it, and 1f1 2 DCW3 13-NOV-73 11:42 20197 TELNET Output Page Size Option (2) if both data receiver or data sender want to handle output page size, the data sender gets to do it. 1f2 The reasoning for the former rule is that if neither want to do it, then the default in the NAOP option dominates. If both want to do it, the sender, who is presumed to have special knowledge about the data, should be allowed to do it, taking into account any suggestions the receiver makes. 1g Some sample negotiations are: 1h no subnegotiations data receiver handles output page size considerations. 1h1 IAC SB NAOP DS 66 IAC SE data sender suggests data 1h2 IAC SB NAOP DR 0 IAC SE receiver handle output page size consideration data with suggested page size of 66 lines; receiver agrees. 1h3 IAC SB NAOP DR 255 IAC SE data receiver suggests data 1h4 IAC SB NAOP DS 0 IAC SE sender handle page size consideration; sender refuses. 1h5 IAC SB NAOP DS 0 IAC SE data sender wants to handle page 1h6 IAC SB NAOP DR 30 IAC SE size considerations; receiver agrees but notifies the sender the scope only has 30 lines. 1h7 As with all option negotiation, neither party should suggest a state already in effect except to refuse to negotiate; changes should be acknowledged; and once refused, an option should not be resuggested until "something changes" (e.g., another process starts). 1i At any time either party can disable further negotiation by giving the appropriate WON'T NAOP or DON'T NAOP command. 1j 3