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.

140 lines
2.7 KiB

  1. #ifndef _NMSCHL_
  2. #define _NMSCHL_
  3. #ifdef __cplusplus
  4. extern "C" {
  5. #endif
  6. /*++
  7. Copyright (c) 1989 Microsoft Corporation
  8. Module Name:
  9. Nmschl.h
  10. Abstract:
  11. This is the header file for interfacing with the Name Challenge
  12. component of WINS
  13. Functions:
  14. Portability:
  15. This header is portable.
  16. Author:
  17. Pradeep Bahl (PradeepB) Feb-1993
  18. Revision History:
  19. Modification Date Person Description of Modification
  20. ------------------ ------- ---------------------------
  21. --*/
  22. /*
  23. includes
  24. */
  25. #include "wins.h"
  26. #include "comm.h"
  27. #include "nmsdb.h"
  28. /*
  29. defines
  30. */
  31. #define NMSCHL_INIT_BUFF_HEAP_SIZE 1000 //1000 bytes
  32. /*
  33. macros
  34. */
  35. //
  36. // The maximum number of challenges that can be initiated at any one time
  37. // 500 is a very genrous number. We might want to make it smaller.
  38. //
  39. // used by QueRemoveChlReqWrkItm function in queue.c
  40. //
  41. #define NMSCHL_MAX_CHL_REQ_AT_ONE_TIME 500
  42. /*
  43. externs
  44. */
  45. extern HANDLE NmsChlHeapHdl; //Heap for name challenge work items
  46. extern HANDLE NmsChlReqQueEvtHdl;
  47. extern HANDLE NmsChlRspQueEvtHdl;
  48. extern CRITICAL_SECTION NmsChlReqCrtSec;
  49. extern CRITICAL_SECTION NmsChlRspCrtSec;
  50. #ifdef WINSDBG
  51. extern DWORD NmsChlNoOfReqNbt;
  52. extern DWORD NmsChlNoOfReqRpl;
  53. extern DWORD NmsChlNoNoRsp;
  54. extern DWORD NmsChlNoInvRsp;
  55. extern DWORD NmsChlNoRspDropped;
  56. extern DWORD NmsChlNoReqDequeued;
  57. extern DWORD NmsChlNoRspDequeued;
  58. extern DWORD NmsChlNoReqAtHdOfList;
  59. #endif
  60. /*
  61. typedef definitions
  62. */
  63. //
  64. // NMSCHL_CMD_TYP_E -- Enumerator for indicating to the challenge manager
  65. // what action it needs to take.
  66. //
  67. typedef enum _NMSCHL_CMD_TYP_E {
  68. NMSCHL_E_CHL = 0, //challenge the node. If the
  69. //challenge fails, send a negative
  70. //name reg. response to the registrant,
  71. //else send a positive response
  72. NMSCHL_E_CHL_N_REL,
  73. NMSCHL_E_CHL_N_REL_N_INF,
  74. NMSCHL_E_REL, //ask the node to release the
  75. //name and then update db. Used by
  76. //the RPL PULL thread
  77. NMSCHL_E_REL_N_INF, //ask the node to release the name. Tell //remote WINS to update the version number
  78. NMSCHL_E_REL_ONLY //ask node to release name, no update db
  79. } NMSCHL_CMD_TYP_E, *PNMSCHL_CMD_TYP_E;
  80. /*
  81. * function declarations
  82. */
  83. STATUS
  84. NmsChlInit(
  85. VOID
  86. );
  87. extern
  88. STATUS
  89. NmsChlHdlNamReg(
  90. NMSCHL_CMD_TYP_E CmdTyp_e,
  91. WINS_CLIENT_E Client_e,
  92. PCOMM_HDL_T pDlgHdl,
  93. MSG_T pMsg,
  94. MSG_LEN_T MsgLen,
  95. DWORD QuesNamSecLen,
  96. PNMSDB_ROW_INFO_T pNodeToReg,
  97. PNMSDB_STAT_INFO_T pNodeInCnf,
  98. // PCOMM_ADD_T pAddOfNodeInCnf,
  99. PCOMM_ADD_T pAddOfRemWins
  100. );
  101. #ifdef __cplusplus
  102. }
  103. #endif
  104. #endif