codes.go 3.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125
  1. package telnet
  2. const (
  3. // Telnet commands
  4. TELNET_IAC = 255
  5. TELNET_DONT = 254
  6. TELNET_DO = 253
  7. TELNET_WONT = 252
  8. TELNET_WILL = 251
  9. TELNET_SB = 250
  10. TELNET_GA = 249
  11. TELNET_EL = 248
  12. TELNET_EC = 247
  13. TELNET_AYT = 246
  14. TELNET_AO = 245
  15. TELNET_IP = 244
  16. TELNET_BREAK = 243
  17. TELNET_DM = 242
  18. TELNET_NOP = 241
  19. TELNET_SE = 240
  20. TELNET_EOR = 239
  21. TELNET_ABORT = 238
  22. TELNET_SUSP = 237
  23. TELNET_EOF = 236
  24. // Telnet options.
  25. TELNET_TELOPT_BINARY = 0
  26. TELNET_TELOPT_ECHO = 1
  27. TELNET_TELOPT_RCP = 2
  28. TELNET_TELOPT_SGA = 3
  29. TELNET_TELOPT_NAMS = 4
  30. TELNET_TELOPT_STATUS = 5
  31. TELNET_TELOPT_TM = 6
  32. TELNET_TELOPT_RCTE = 7
  33. TELNET_TELOPT_NAOL = 8
  34. TELNET_TELOPT_NAOP = 9
  35. TELNET_TELOPT_NAOCRD = 10
  36. TELNET_TELOPT_NAOHTS = 11
  37. TELNET_TELOPT_NAOHTD = 12
  38. TELNET_TELOPT_NAOFFD = 13
  39. TELNET_TELOPT_NAOVTS = 14
  40. TELNET_TELOPT_NAOVTD = 15
  41. TELNET_TELOPT_NAOLFD = 16
  42. TELNET_TELOPT_XASCII = 17
  43. TELNET_TELOPT_LOGOUT = 18
  44. TELNET_TELOPT_BM = 19
  45. TELNET_TELOPT_DET = 20
  46. TELNET_TELOPT_SUPDUP = 21
  47. TELNET_TELOPT_SUPDUPOUTPUT = 22
  48. TELNET_TELOPT_SNDLOC = 23
  49. TELNET_TELOPT_TTYPE = 24
  50. TELNET_TELOPT_EOR = 25
  51. TELNET_TELOPT_TUID = 26
  52. TELNET_TELOPT_OUTMRK = 27
  53. TELNET_TELOPT_TTYLOC = 28
  54. TELNET_TELOPT_3270REGIME = 29
  55. TELNET_TELOPT_X3PAD = 30
  56. TELNET_TELOPT_NAWS = 31
  57. TELNET_TELOPT_TSPEED = 32
  58. TELNET_TELOPT_LFLOW = 33
  59. TELNET_TELOPT_LINEMODE = 34
  60. TELNET_TELOPT_XDISPLOC = 35
  61. TELNET_TELOPT_ENVIRON = 36
  62. TELNET_TELOPT_AUTHENTICATION = 37
  63. TELNET_TELOPT_ENCRYPT = 38
  64. TELNET_TELOPT_NEW_ENVIRON = 39
  65. TELNET_TELOPT_MSDP = 69
  66. TELNET_TELOPT_MSSP = 70
  67. TELNET_TELOPT_COMPRESS = 85
  68. TELNET_TELOPT_COMPRESS2 = 86
  69. TELNET_TELOPT_MSP = 90
  70. TELNET_TELOPT_MXP = 91
  71. TELNET_TELOPT_MSP2 = 92
  72. TELNET_TELOPT_MSP2_MUSIC = 0
  73. TELNET_TELOPT_MSP2_SOUND = 1
  74. TELNET_TELOPT_ZMP = 93
  75. TELNET_TELOPT_EXOPL = 255
  76. TELNET_TELOPT_MCCP2 = 86
  77. // TERMINAL-TYPE codes.
  78. TELNET_TTYPE_IS = 0
  79. TELNET_TTYPE_SEND = 1
  80. // MTTS standard codes
  81. TELNET_MTTS_ANSI = 1
  82. TELNET_MTTS_VT100 = 2
  83. TELNET_MTTS_UTF8 = 4
  84. TELNET_MTTS_256_COLORS = 8
  85. TELNET_MTTS_MOUSE_TRACKING = 16
  86. TELNET_MTTS_OSC_COLOR_PALETTE = 32
  87. TELNET_MTTS_SCREEN_READER = 64
  88. TELNET_MTTS_PROXY = 128
  89. // NEW-ENVIRON/ENVIRON codes.
  90. TELNET_ENVIRON_IS = 0
  91. TELNET_ENVIRON_SEND = 1
  92. TELNET_ENVIRON_INFO = 2
  93. TELNET_ENVIRON_VAR = 0
  94. TELNET_ENVIRON_VALUE = 1
  95. TELNET_ENVIRON_ESC = 2
  96. TELNET_ENVIRON_USERVAR = 3
  97. // MSSP codes.
  98. TELNET_MSSP_VAR = 1
  99. TELNET_MSSP_VAL = 2
  100. // MSDP values.
  101. TELNET_MSDP_VAR = 1
  102. TELNET_MSDP_VAL = 2
  103. TELNET_MSDP_TABLE_OPEN = 3
  104. TELNET_MSDP_TABLE_CLOSE = 4
  105. TELNET_MSDP_ARRAY_OPEN = 5
  106. TELNET_MSDP_ARRAY_CLOSE = 6
  107. // newline, cr and nul
  108. TELNET_CR = 13
  109. TELNET_NL = 10
  110. TELNET_NUL = 0
  111. )