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.

172 lines
3.5 KiB

  1. //+-------------------------------------------------------------------------
  2. //
  3. // Microsoft Windows
  4. //
  5. // Copyright (C) Microsoft Corporation, 1994 - 1999
  6. //
  7. // File: dgnb.h
  8. //
  9. //--------------------------------------------------------------------------
  10. /************************************************************************/
  11. // This file contains NetBIOS specific definitions
  12. /************************************************************************/
  13. // 1234567890123456
  14. #define PERF_NETBIOS "perftest123456 "
  15. #define CLINAME "perfCli"
  16. #define ALL_CLIENTS "* "
  17. #define SPACES " "
  18. #define ClearNCB( PNCB ) { \
  19. RtlZeroMemory( PNCB , sizeof (NCB) ); \
  20. RtlMoveMemory( (PNCB)->ncb_name, SPACES, sizeof(SPACES)-1 );\
  21. RtlMoveMemory( (PNCB)->ncb_callname, SPACES, sizeof(SPACES)-1 );\
  22. }
  23. /**********************************************************************/
  24. // Local Function prototypes
  25. /**********************************************************************/
  26. UCHAR
  27. DGNetBIOS_AddName(
  28. IN PCHAR LocalName,
  29. IN UCHAR LanaNumber,
  30. OUT PUCHAR NameNumber
  31. );
  32. UCHAR
  33. DGNetBIOS_Reset(
  34. IN UCHAR LanaNumber
  35. );
  36. UCHAR
  37. DGNetBIOS_Receive(
  38. IN USHORT TIndex,
  39. IN PUCHAR RecvBuffer,
  40. IN USHORT RecvLen
  41. );
  42. UCHAR
  43. DGNetBIOS_Send(
  44. IN USHORT TIndex,
  45. IN PUCHAR SendBuffer,
  46. IN USHORT SendLen
  47. );
  48. UCHAR
  49. DGNetBIOS_RecvSend(
  50. IN USHORT TIndex,
  51. IN PUCHAR SendBuffer,
  52. IN USHORT SendLen,
  53. IN PUCHAR RecvBuffer,
  54. IN USHORT RecvLen
  55. );
  56. NTSTATUS
  57. DGNB_Initialize(
  58. IN USHORT NClients,
  59. IN PCHAR ServerName,
  60. IN USHORT SrvCli
  61. );
  62. NTSTATUS
  63. DGNB_PerClientInit(
  64. IN USHORT CIndex, // client index
  65. IN USHORT SrvCli
  66. );
  67. NTSTATUS
  68. DGNB_Wait_For_Client(
  69. IN USHORT CIndex
  70. );
  71. NTSTATUS
  72. DGNB_Disconnect_Client(
  73. IN USHORT CIndex
  74. );
  75. NTSTATUS
  76. DGNB_Connect_To_Server(
  77. IN USHORT CIndex
  78. );
  79. NTSTATUS
  80. DGNB_Allocate_Memory(
  81. IN USHORT CIndex
  82. );
  83. NTSTATUS
  84. DGNB_Deallocate_Memory(
  85. IN USHORT CIndex
  86. );
  87. NTSTATUS
  88. DGNB_Disconnect_From_Server(
  89. IN USHORT CIndex
  90. );
  91. NTSTATUS
  92. DGNB_DoHandshake(
  93. IN USHORT CIndex, // client index and namedpipe instance number
  94. IN USHORT SrvCli // if it's a server or client
  95. );
  96. NTSTATUS
  97. DGNB_ReadFromIPC(
  98. IN USHORT CIndex, // client index and namedpipe instance number
  99. IN OUT PULONG pReadDone,
  100. IN USHORT SrvCli // if it's a server or client
  101. );
  102. NTSTATUS
  103. DGNB_WriteToIPC(
  104. IN USHORT CIndex, // client index and namedpipe instance number
  105. IN OUT PULONG pWriteDone,
  106. IN USHORT SrvCli // if it's a server or client
  107. );
  108. NTSTATUS
  109. DGNB_XactIO(
  110. IN USHORT CIndex, // client index and namedpipe instance number
  111. IN OUT PULONG pReadDone,
  112. IN OUT PULONG pWriteDone,
  113. IN USHORT SrvCli, // if it's a server or client
  114. IN BOOLEAN FirstIter
  115. );
  116. NTSTATUS
  117. DGNB_Cleanup(
  118. VOID
  119. );
  120. NTSTATUS
  121. DGNB_ThreadCleanUp(
  122. IN USHORT CIndex
  123. );
  124. /**********************************************************************/
  125. // External variables
  126. /**********************************************************************/
  127. // For NetBIOS only
  128. extern USHORT LanaCount;
  129. extern USHORT LanaBase;
  130. extern UCHAR NameNumber;
  131. extern CHAR LocalName[NCBNAMSZ];
  132. extern CHAR RemoteName[NCBNAMSZ];
  133. extern struct client Clients[MAXCLIENTS]; // all the client data
  134. extern USHORT NClients;
  135. extern USHORT MachineNumber;