Update Doku aus Driversourcen
Change-Id: I455f0813b970151089b3dc1b8d9407eea323cdd1
diff --git a/doc/concepts/negotiation b/doc/concepts/negotiation
index ed2318f..f00aba9 100644
--- a/doc/concepts/negotiation
+++ b/doc/concepts/negotiation
@@ -6,14 +6,14 @@
between a client (the 'telnet' program or a mud client) and a
server (the game driver). Most of the options offered by the
protocol are optional and need to be negotiated between the
- client and the server. Consequently, and due to their
+ client and the server. Consequently, and due to their
specialized nature, mud clients don't have to support the full
telnet option feature set.
For the server to find out if a client supports the telnet
- protocol at all, one good approach is to a simple, commonly
- used telnet command to the client. If the client reacts
- conform to the protocol (or sends telnet commands itself), the
+ protocol at all, one good approach is to issue a simple,
+ commonly used telnet command to the client. If the client reaction
+ conforms to the protocol (or sends telnet commands itself), the
mud can continue to negotiate further options. If the client
does not react, the mud can safely refrain from further
negotiations.
@@ -22,58 +22,58 @@
the telnet related RFCs (available for example on
http://www.faqs.org/rfcs):
- RFC Titel rel. Code
+ RFC Title rel. Code
- 495 TELNET Protocol Specification
- 513 Comments on the new TELNET specifications
- 559 Comments on the new TELNET Protocol and its Implem
- 595 Some Thoughts in Defense of the TELNET Go-Ahead
- 596 Second Thoughts on Telnet Go-Ahead
- 652 Telnet Output Carriage-Return Disposition Option NAOCRD 10
- 653 Telnet Output Horizontal Tabstops Option NAOHTS 11
- 654 Telnet Output Horizontal Tab Disposition Option NAOHTD 12
- 655 Telnet Output Formfeed Disposition Option NAOFFD 13
- 656 Telnet Output Vertical Tabstops Option NAOVTS 14
- 657 Telnet Output Vertical Tab Disposition Option NAOVTD 15
- 658 Telnet Output Linefeed Disposition NAOLFD 16
- 698 Telnet Extended Ascii Option X-ASCII 17
- 727 Telnet Logout Option LOGOUT 18
- 728 A Minor Pitfall in the Telnet Protocol
- 735 Revised TELNET Byte Macro Option BM 19
- 749 Telnet SUPDUP-OUTPUT Option SUPDUP 22
- 764 Telnet Protocol Specification
- 779 Telnet SEND-LOCATION Option SENDLOC 23
- 818 The Remote User Telnet Service
- 854 Telnet Protocol Specification
- 855 Telnet Option Specifications
- 856 Telnet Binary Transmission BINARY 0
- 857 Telnet Echo Option ECHO 1
- 858 Telnet Suppress Go Ahead Option SGA 3
- 859 Telnet Status Option STATUS 5
- 860 Telnet Timing Mark Option TM 6
- 861 Telnet Extended Options - List Option EXOPL 255
- 884 Telnet Terminal Type Option TTYPE 24
- 885 Telnet End of Record Option EOR 25
- 930 Telnet Terminal Type Option TTYPE 24
- 933 Output Marking Telnet Option OUTMRK 27
- 946 Telnet Terminal Location Number Option TTYLOC 28
- 1043 Telnet Data Entry Terminal Option DODIIS Implement DET 20
- 1053 Telnet X.3 PAD Option X.3-PAD 30
- 1073 Telnet Window Size Option NAWS 31
- 1079 Telnet Terminal Speed Option TSPEED 32
- 1080 Telnet Remote Flow Control Option FLOWCTRL 33
- 1091 Telnet Terminal-Type Option TTYPE 24
- 1096 Telnet X Display Location Option XDISPLOC 35
- 1116 Telnet Linemode Option LINEMODE 34
- 1143 The Q Method of Implementing TELNET Option Negotia
- 1184 Telnet Linemode Option LINEMODE 34
- 1372 Telnet Remote Flow Control Option FLOWCTRL 33
- 1408 Telnet Environment Option ENVIRON 36
- 1571 Telnet Environment Option Interoperability Issues
- 1572 Telnet Environment Option NEWENV 39
- 2066 Telnet Charset Option CHARSET 42
- 2217 Telnet Com Port Control Option COMPORT 44
- 2877 5250 Telnet Enhancements
+ 495 TELNET Protocol Specification
+ 513 Comments on the new TELNET specifications
+ 559 Comments on the new TELNET Protocol and its Implem
+ 595 Some Thoughts in Defense of the TELNET Go-Ahead
+ 596 Second Thoughts on Telnet Go-Ahead
+ 652 Telnet Output Carriage-Return Disposition Option NAOCRD 10
+ 653 Telnet Output Horizontal Tabstops Option NAOHTS 11
+ 654 Telnet Output Horizontal Tab Disposition Option NAOHTD 12
+ 655 Telnet Output Formfeed Disposition Option NAOFFD 13
+ 656 Telnet Output Vertical Tabstops Option NAOVTS 14
+ 657 Telnet Output Vertical Tab Disposition Option NAOVTD 15
+ 658 Telnet Output Linefeed Disposition NAOLFD 16
+ 698 Telnet Extended Ascii Option X-ASCII 17
+ 727 Telnet Logout Option LOGOUT 18
+ 728 A Minor Pitfall in the Telnet Protocol
+ 735 Revised TELNET Byte Macro Option BM 19
+ 749 Telnet SUPDUP-OUTPUT Option SUPDUP 22
+ 764 Telnet Protocol Specification
+ 779 Telnet SEND-LOCATION Option SENDLOC 23
+ 818 The Remote User Telnet Service
+ 854 Telnet Protocol Specification
+ 855 Telnet Option Specifications
+ 856 Telnet Binary Transmission BINARY 0
+ 857 Telnet Echo Option ECHO 1
+ 858 Telnet Suppress Go Ahead Option SGA 3
+ 859 Telnet Status Option STATUS 5
+ 860 Telnet Timing Mark Option TM 6
+ 861 Telnet Extended Options - List Option EXOPL 255
+ 884 Telnet Terminal Type Option TTYPE 24
+ 885 Telnet End of Record Option EOR 25
+ 930 Telnet Terminal Type Option TTYPE 24
+ 933 Output Marking Telnet Option OUTMRK 27
+ 946 Telnet Terminal Location Number Option TTYLOC 28
+ 1043 Telnet Data Entry Terminal Option DODIIS Implement DET 20
+ 1053 Telnet X.3 PAD Option X.3-PAD 30
+ 1073 Telnet Window Size Option NAWS 31
+ 1079 Telnet Terminal Speed Option TSPEED 32
+ 1080 Telnet Remote Flow Control Option FLOWCTRL 33
+ 1091 Telnet Terminal-Type Option TTYPE 24
+ 1096 Telnet X Display Location Option XDISPLOC 35
+ 1116 Telnet Linemode Option LINEMODE 34
+ 1143 The Q Method of Implementing TELNET Option Negotia
+ 1184 Telnet Linemode Option LINEMODE 34
+ 1372 Telnet Remote Flow Control Option FLOWCTRL 33
+ 1408 Telnet Environment Option ENVIRON 36
+ 1571 Telnet Environment Option Interoperability Issues
+ 1572 Telnet Environment Option NEWENV 39
+ 2066 Telnet Charset Option CHARSET 42
+ 2217 Telnet Com Port Control Option COMPORT 44
+ 2877 5250 Telnet Enhancements
All negotiations start with the special character IAC which is
defined in /usr/include/arpa/telnet.h (or in
@@ -81,8 +81,7 @@
255. Negotiations are based on different telnetoptions (their
values are defined in telnet.h too). Before a negotiation can
start the client and the server have to agree that they
- support the option.
- This works in the following way:
+ support the option. This works in the following way:
If a client wants to send something to the server it has to
send 'IAC WILL option' (For terminaltype negotation this would
@@ -100,17 +99,17 @@
sent a WILL or WONT it has to reply with either 'IAC WILL
option' if it supports the option or 'IAC WONT option' if not.
- A small example: Lets assume we want to negotiating
+ A small example: Lets assume we want to negotiate
terminaltype. (TELOPT_TTYPE with value 24). client is the
telnet executable on the playerside, the server is the
gamedriver.
client server
IAC WILL TTYPE
- IAC DO TTYPE
+ IAC DO TTYPE
Or:
- IAC DO TTYPE
+ IAC DO TTYPE
IAC WILL TTYPE
After this we are ready to transfer the terminaltype from the
@@ -137,18 +136,18 @@
Example: (we have exchanged WILL/DO already)
client server
- IAC SB TTYPE SEND IAC SE
+ IAC SB TTYPE SEND IAC SE
IAC SB TTYPE IS VT200 IAC SE
- IAC SB TTYPE SEND IAC SE
+ IAC SB TTYPE SEND IAC SE
IAC SB TTYPE IS VT100 IAC SE
- IAC SB TTYPE SEND IAC SE
+ IAC SB TTYPE SEND IAC SE
IAC SB TTYPE IS VT52 IAC SE
- IAC SB TTYPE SEND IAC SE
+ IAC SB TTYPE SEND IAC SE
IAC SB TTYPE IS VT52 IAC SE
/* this marks that we have all terminaltypes. We decide to use the
* vt200 mode so we have to skip to VT200
*/
- IAC SB TTYPE SEND IAC SE
+ IAC SB TTYPE SEND IAC SE
IAC SB TTYPE IS VT200 IAC SE
@@ -166,7 +165,7 @@
Example: (WILL/DO exchanged)
client server
IAC SB NAWS 0 80 0 24 IAC SE /* the standard vt100 windowsize */
- /* no reply */
+ /* no reply */
And, a bit less important but most complex, the LINEMODE (34)
option. It was implemented it due to the fact, that
@@ -178,7 +177,7 @@
commandline-editing for the client. If a client supports
LINEMODE it HAS to support this modechange. The client will
reply with IAC SB LINEMODE LM_MODE MODE_EDIT|MODE_ACK IAC SE
- (x|y is bitwise or). Thats it for linemode. (You will perhaps
+ (x|y is bitwise or). That's it for linemode. (You will perhaps
receive other IAC SB LINEMODEs with other LM_xxx ... you may
ignore them. (At least IRIX 5.x sends IAC SB LINEMODE LM_SLC
.... IAC SE which declares the local characterset.)).
@@ -191,9 +190,9 @@
IAC SB LINEMODE LM_MODE
MODE_EDIT|MODE_ACK IAC SE
- Note: The option is much more funnier as it looks here, it for
- example supports a mixed mode between linemode and
- charactermode... flushing the input at certain characters (at
+ Note: The option is more interesting than it looks here. For
+ example it supports a mixed mode between linemode and
+ charactermode, flushing the input at certain characters (at
ESC or TAB for shell-like commandline completition). We suggest
reading RFC 1184.
@@ -232,7 +231,7 @@
using binary_message() (appropiate meaning sending the
right DO/DONT/WILL/WONT if not sent before and using the SB
return values).
- 3.1. Sent IAC DO TTYPE IAC DO NAWS IAC DO LINEMODE at the
+ 3.1. Send IAC DO TTYPE IAC DO NAWS IAC DO LINEMODE at the
first time you can do it (before cat()ing /WELCOME perhaps).
3.2. Note all sent and received WILL/WONT/DO/DONT options for
conforming to the standard, avoiding endless loops and for
@@ -243,7 +242,7 @@
linkdead or quits. You won't need to save this data.
3.4. Lower_case() terminaltypes... ;)
3.5. Use reasonable defaultvalues if the client does not
- support one of the options. (columns 80,lines 24 if not
+ support one of the options. (columns 80, lines 24 if not
NAWS, unknown or vt100 for no terminaltype)
The WILL/WONT/DO/DONT data is best saved in a mapping looking
@@ -287,6 +286,7 @@
Tinyfugue and some other mudclients usually do not support
negotiations.
+
Except for TF, which supports the Telnet End-Of-Record option
as marker for the end of the prompt. So if you send IAC EOR
after every prompt, it will print the prompt always in the
@@ -306,7 +306,6 @@
For getting RFCs you can for example use
ftp://ftp.uni-erlangen.de/pub/doc/rfc/
-
BUGS
Not all aspects of the options are mentioned to keep this doc
at a reasonable size. Refer to the RFCs to get more confused.