codes.rb 4.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110
  1. # This module contains the contants used for Telnet
  2. # Based on code by Jon A. Lambert, under the Zlib license.
  3. module Telnet
  4. module Codes
  5. IAC = 255 # Command - RFC 854, 855, 1123, 1143
  6. # 2 byte commands
  7. WILL = 251 # Will do option
  8. WONT = 252 # Wont do option
  9. DO = 253 # Do option
  10. DONT = 254 # Dont do option
  11. SB = 250 # Subnegotiation begin # IAC SB <option> <parameters> IAC SE
  12. SE = 240 # Subnegotiation end
  13. # 1 byte commands
  14. GA = 249 # Go Ahead
  15. NOP = 241 # No-op
  16. BRK = 243 # Break
  17. # In RFC 854
  18. AYT = 246 # Are you there?
  19. AO = 245 # abort output
  20. IP = 244 # interrupt
  21. EL = 248 # erase current line
  22. EC = 247 # erase current character
  23. DM = 242 # data mark - sent to demarcate end of urgent commands
  24. EOR = 239 # end of record (transparent mode)
  25. ABORT = 238 # Abort process
  26. SUSP = 237 # Suspend process
  27. EOF = 236 # End of file
  28. # Options
  29. BINARY = 0 # Transmit Binary - RFC 856
  30. ECHO = 1 # Echo - RFC 857
  31. RCP = 2 # Reconnection
  32. SGA = 3 # Suppress Go Ahead - RFC 858
  33. NAMS = 4 # Approx Message Size Negotiation
  34. STATUS = 5 # Status - RFC 859
  35. TM = 6 # Timing Mark - RFC 860
  36. RCTE = 7 # Remote Controlled Trans and Echo - RFC 563, 726
  37. NAOL = 8 # Output Line Width
  38. NAOP = 9 # Output Page Size
  39. NAOCRD = 10 # Output Carriage-Return Disposition - RFC 652
  40. NAOHTS = 11 # Output Horizontal Tab Stops - RFC 653
  41. NAOHTD = 12 # Output Horizontal Tab Disposition - RFC 654
  42. NAOFFD = 13 # Output Formfeed Disposition - RFC 655
  43. NAOVTS = 14 # Output Vertical Tabstops - RFC 656
  44. NAOVTD = 15 # Output Vertical Tab Disposition - RFC 657
  45. NAOLFD = 16 # Output Linefeed Disposition - RFC 658
  46. XASCII = 17 # Extended ASCII - RFC 698
  47. LOGOUT = 18 # Logout - RFC 727
  48. BM = 19 # Byte Macro - RFC 735
  49. DET = 20 # Data Entry Terminal - RFC 732, 1043
  50. SUPDUP = 21 # SUPDUP - RFC 734, 736
  51. SUPDUPOUTPUT = 22 # SUPDUP Output - RFC 749
  52. SNDLOC = 23 # Send Location - RFC 779
  53. TTYPE = 24 # Terminal Type - RFC 1091
  54. EOREC = 25 # End of Record - RFC 885
  55. TUID = 26 # TACACS User Identification - RFC 927
  56. OUTMRK = 27 # Output Marking - RFC 933
  57. TTYLOC = 28 # Terminal Location Number - RFC 946
  58. REGIME3270 = 29 # Telnet 3270 Regime - RFC 1041
  59. X3PAD = 30 # X.3 PAD - RFC 1053
  60. NAWS = 31 # Negotiate About Window Size - RFC 1073
  61. TSPEED = 32 # Terminal Speed - RFC 1079
  62. LFLOW = 33 # Remote Flow Control - RFC 1372
  63. LINEMODE = 34 # Linemode - RFC 1184
  64. XDISPLOC = 35 # X Display Location - RFC 1096
  65. ENVIRON = 36 # Environment Option - RFC 1408
  66. AUTHENTICATION = 37 # Authentication Option - RFC 1416, 2941, 2942, 2943, 2951
  67. ENCRYPT = 38 # Encryption Option - RFC 2946
  68. NEW_ENVIRON = 39 # New Environment Option - RFC 1572
  69. TN3270 = 40 # TN3270 Terminal Entry - RFC 2355
  70. XAUTH = 41 # XAUTH
  71. CHARSET = 42 # Charset option - RFC 2066
  72. RSP = 43 # Remote Serial Port
  73. CPCO = 44 # COM port Control Option - RFC 2217
  74. SUPLECHO = 45 # Suppress Local Echo
  75. TLS = 46 # Telnet Start TLS
  76. KERMIT = 47 # Kermit tranfer Option - RFC 2840
  77. SENDURL = 48 # Send URL
  78. FORWARDX = 49 # Forward X
  79. PLOGON = 138 # Telnet Pragma Logon
  80. SSPI = 139 # Telnet SSPI Logon
  81. PHEARTBEAT = 140 # Telnat Pragma Heartbeat
  82. EXOPL = 255 # Extended-Options-List - RFC 861
  83. MSDP = 69 # Mud Server Data Protocol
  84. MSSP = 70 # MUD Server Status Protocol
  85. COMPRESS = 85 # MCCP 1 support (broken deprecated)
  86. COMPRESS2 = 86 # MCCP 2 support
  87. MSP = 90 # MSP support
  88. MXP = 91 # MUD eXtension Protocol (MXP)
  89. MSP2 = 92 # MSP2 support
  90. MUSIC = 0
  91. SOUND = 1
  92. ZMP = 93 # ZMP support
  93. AARD = 102 # Aardwolf client protocol (deprecated?)
  94. MULTIPLEX = 112 # Crystal client telnet multiplex
  95. ATCP = 200 # Achaea telnet client protocol
  96. GMCP = 201 # GMCP/ATCP2 client protocol
  97. end