Leaked source code of windows server 2003
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

110 lines
4.2 KiB

  1. // telnet.h : This file contains the
  2. // Created: Feb '98
  3. // Author : a-rakeba
  4. // History:
  5. // Copyright (C) 1998 Microsoft Corporation
  6. // All rights reserved.
  7. // Microsoft Confidential
  8. #if !defined( _TELNET_H_ )
  9. #define _TELNET_H_
  10. //TELNET Command codes
  11. //just to make it obvious the TC_ prefix means Telnet Command
  12. #define TC_IAC (UCHAR)255 // Interpret As Command
  13. #define TC_DONT (UCHAR)254 // Request NOT To Do Option
  14. #define TC_DO (UCHAR)253 // Request To Do Option
  15. #define TC_WONT (UCHAR)252 // Refusal To Do Option
  16. #define TC_WILL (UCHAR)251 // Desire / Confirm Will Do Option
  17. #define TC_SB (UCHAR)250 // Start Subnegotiation
  18. #define TC_GA (UCHAR)249 // "Go Ahead" Function(you may reverse the line)
  19. // The line turn-around signal for half-duplex
  20. // data transfer
  21. #define TC_EL (UCHAR)248 // Requests that the previous line ( from the
  22. // current character back to the last newline )
  23. // be erased from the data stream
  24. #define TC_EC (UCHAR)247 // Requests that the previous character be erased
  25. // from the data stream
  26. #define TC_AYT (UCHAR)246 // "Are You There?" Function
  27. // Requests a visible or audible signal that
  28. // the remote side is still operating
  29. #define TC_AO (UCHAR)245 // Requests that the current user process be
  30. // be allowed to run to completion, but that
  31. // no more output be sent to the NVT "printer"
  32. #define TC_IP (UCHAR)244 // Requests that the current user process be
  33. // interrupted permanently
  34. #define TC_BREAK (UCHAR)243 // NVT character BRK. This code is to provide
  35. // a signal outside the ASCII character set to
  36. // indicate the Break or Attention signal
  37. // available on many systems
  38. #define TC_DM (UCHAR)242 // Data Mark ( for Sync ). A Stream
  39. // synchronizing character for use with the
  40. // Sync signal
  41. #define TC_NOP (UCHAR)241 // No Operation
  42. #define TC_SE (UCHAR)240 // End Of Subnegotiation
  43. // Telnet Option Codes
  44. // just to make it obvious the TO_ prefix means Telnet Option
  45. #define TO_TXBINARY (UCHAR)0 // TRANSMIT-BINARY option , to use 8-bit binary
  46. // (unencoded) character transmission instead of
  47. // NVT encoding. ( 8-bit data path )
  48. #define TO_ECHO (UCHAR)1 // Echo Option
  49. #define TO_SGA (UCHAR)3 // Suppress Go-Ahead Option
  50. #define TO_TERMTYPE (UCHAR)24 // Terminal-Type Option
  51. #define TO_NAWS (UCHAR)31 // Negotiate About Window Size
  52. #define TO_LFLOW (UCHAR)33 // remote flow-control
  53. #define TO_NEW_ENVIRON (UCHAR)39 //NEW_ENVIRON option. RFC 1572
  54. #define TO_ENVIRON (UCHAR)36 //ENVIRON_OPTION. RFC 1408
  55. #define VAR 0 //predeined variable
  56. #define VALUE 1 //value of variable
  57. #define ENV_ESC 2 //esacape char
  58. #define USERVAR 3 //any non-rfc-predefined variable
  59. #define IS 0
  60. #define SEND 1
  61. #define INFO 2
  62. #define TO_AUTH (UCHAR)37
  63. #define AU_IS 0
  64. #define AU_SEND 1
  65. #define AU_REPLY 2
  66. //Authentication Types
  67. #define AUTH_TYPE_NULL 0
  68. #define AUTH_TYPE_NTLM 15
  69. //Modifiers
  70. #define AUTH_WHO_MASK 1
  71. #define AUTH_CLIENT_TO_SERVER 0
  72. #define AUTH_HOW_MASK 2
  73. #define AUTH_HOW_MUTUAL 2
  74. // sub-suboption commands for NTLM authentication scheme
  75. #define NTLM_AUTH 0
  76. #define NTLM_CHALLENGE 1
  77. #define NTLM_RESPONSE 2
  78. #define NTLM_ACCEPT 3
  79. #define NTLM_REJECT 4
  80. // Option Subnegotiation Constants
  81. #define TT_IS 0 // TERMINAL-TYPE option "IS" command
  82. #define TT_SEND 1 // TERMINAL-TYPE option "SEND" command
  83. #endif