Source code of Windows XP (NT5)
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.

158 lines
3.4 KiB

  1. //***************************************************************************
  2. //
  3. // Microsoft NT Remote Access Service
  4. //
  5. // Copyright (C) 1992-93 Microsft Corporation. All rights reserved.
  6. //
  7. // Filename: mxsint.h
  8. //
  9. // Revision History:
  10. //
  11. // Jun 8, 1992 J. Perry Hannah Created
  12. //
  13. //
  14. // Description: This file contains defines and enums that are used
  15. // by RAS components that share things in common with
  16. // RASMXS DLL.
  17. //
  18. // Header File Used by
  19. // ----------- -------
  20. // rasmxs.h UIs and other external applicaions
  21. // device.h RASMAN.DLL (shared by all device DLLs)
  22. // mxsint.h other internal RAS components
  23. // raspriv.h RASMXS.DLL only
  24. //
  25. //****************************************************************************
  26. #ifndef _MXSINT_
  27. #define _MXSINT_
  28. // General Defines *********************************************************
  29. //
  30. #define MAX_CMD_BUF_LEN 256
  31. #define MAX_RCV_BUF_LEN 256
  32. #define MAX_CMDTYPE_SUFFIX_LEN 8
  33. #define RESPONSES_SECTION_NAME "Responses"
  34. // Data Structures shared with wrapmxs.c ***********************************
  35. //
  36. typedef struct MXT_ENTRY MXT_ENTRY;
  37. struct MXT_ENTRY
  38. {
  39. TCHAR E_MacroName[MAX_PARAM_KEY_SIZE + 1];
  40. RAS_PARAMS *E_Param;
  41. };
  42. typedef struct MACROXLATIONTABLE MACROXLATIONTABLE;
  43. struct MACROXLATIONTABLE
  44. {
  45. WORD MXT_NumOfEntries;
  46. MXT_ENTRY MXT_Entry[1];
  47. };
  48. //* Function Prototypes shared with wrapmxs.c ******************************
  49. //
  50. DWORD UpdateParamString(RAS_PARAMS *pParam, TCHAR *psStr, DWORD dwStrLen);
  51. //* Enumeration Types ******************************************************
  52. //
  53. enum RCVSTATE // ReceiveStateMachine() State
  54. {
  55. GETECHO = 0,
  56. GETNUMBYTESECHOD = 1,
  57. CHECKECHO = 2,
  58. GETFIRSTCHAR = 3,
  59. GETNUMBYTESFIRSTCHAR = 4,
  60. GETRECEIVESTR = 5,
  61. GETNUMBYTESRCVD = 6,
  62. CHECKRESPONSE = 7
  63. };
  64. typedef enum RCVSTATE RCVSTATE;
  65. enum NEXTACTION // DeviceStateMachine() State
  66. {
  67. SEND = 0,
  68. RECEIVE = 1,
  69. DONE = 2
  70. };
  71. typedef enum NEXTACTION NEXTACTION;
  72. enum CMDTYPE // Used by DeviceStateMachine()
  73. {
  74. CT_UNKNOWN = 0,
  75. CT_GENERIC = 1,
  76. CT_INIT = 2,
  77. CT_DIAL = 3,
  78. CT_LISTEN = 4
  79. };
  80. typedef enum CMDTYPE CMDTYPE;
  81. enum DEVICETYPE // Used by DeviceConnect()
  82. {
  83. DT_UNKNOWN = 0,
  84. DT_NULL = 1,
  85. DT_MODEM = 2,
  86. DT_PAD = 3,
  87. DT_SWITCH = 4
  88. };
  89. typedef enum DEVICETYPE DEVICETYPE;
  90. enum INFOTYPE // Used by BinarySuffix()
  91. {
  92. UNKNOWN_INFOTYPE = 0,
  93. VARIABLE = 1,
  94. UNARYMACRO = 2,
  95. BINARYMACRO = 3
  96. };
  97. typedef enum INFOTYPE INFOTYPE;
  98. //* Wrapper Errors *********************************************************
  99. //
  100. // These are error codes returned from mxswrap.c to rasmxs dll, and which
  101. // are used only by rasmxs dll and are not passed up to rasman dll.
  102. //
  103. #define WRAP_BASE 13200
  104. #define ERROR_END_OF_SECTION WRAP_BASE + 7
  105. // RasDevGetCommand() found the end of a section instead of a command.
  106. #define ERROR_PARTIAL_RESPONSE WRAP_BASE + 8
  107. // RasDevCheckResponse() matched just the first part of a response
  108. // containing an <append> macro.
  109. #endif // _MXSINT_