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.

116 lines
2.4 KiB

  1. /*++
  2. Copyright (c) 1991 Microsoft Corporation
  3. Module Name:
  4. msgrutil.h
  5. Abstract:
  6. Header file for the following helper routines found in the msgrutil.c
  7. module of netlib.
  8. NetpNetBiosAddName
  9. NetpNetBiosDelName
  10. NetpNetBiosGetAdapterNumbers
  11. NetpNetBiosCall
  12. NetpNetBiosHangup
  13. NetpNetBiosReceive
  14. NetpNetBiosSend
  15. NetpStringToNetBiosName
  16. NetpNetBiosStatusToApiStatus
  17. Authors:
  18. Rita Wong (ritaw) 26-July-1991
  19. Revision History:
  20. --*/
  21. #define MESSAGE_ALIAS_TYPE 0x03
  22. #define WKSTA_TO_MESSAGE_ALIAS_TYPE 0x01
  23. typedef struct _NB30_ADAPTER_STATUS {
  24. ADAPTER_STATUS AdapterInfo;
  25. NAME_BUFFER Names[16];
  26. } NB30_ADAPTER_STATUS, *PNB30_ADAPTER_STATUS;
  27. NET_API_STATUS
  28. NetpNetBiosReset(
  29. IN UCHAR LanAdapterNumber
  30. );
  31. NET_API_STATUS
  32. NetpNetBiosAddName(
  33. IN PCHAR NetBiosName,
  34. IN UCHAR LanAdapterNumber,
  35. OUT PUCHAR NetBiosNameNumber OPTIONAL
  36. );
  37. NET_API_STATUS
  38. NetpNetBiosDelName(
  39. IN PCHAR NetBiosName,
  40. IN UCHAR LanAdapterNumber
  41. );
  42. NET_API_STATUS
  43. NetpNetBiosGetAdapterNumbers(
  44. OUT PLANA_ENUM LanAdapterBuffer,
  45. IN WORD LanAdapterBufferSize
  46. );
  47. NET_API_STATUS
  48. NetpNetBiosCall(
  49. IN UCHAR LanAdapterNumber,
  50. IN LPTSTR NameToCall,
  51. IN LPTSTR Sender,
  52. OUT UCHAR *SessionNumber
  53. );
  54. NET_API_STATUS
  55. NetpNetBiosHangup(
  56. IN UCHAR LanAdapterNumber,
  57. IN UCHAR SessionNumber
  58. );
  59. NET_API_STATUS
  60. NetpNetBiosSend(
  61. IN UCHAR LanAdapterNumber,
  62. IN UCHAR SessionNumber,
  63. IN PCHAR SendBuffer,
  64. IN WORD SendBufferSize
  65. );
  66. NET_API_STATUS
  67. NetpNetBiosReceive(
  68. IN UCHAR LanAdapterNumber,
  69. IN UCHAR SessionNumber,
  70. OUT PUCHAR ReceiveBuffer,
  71. IN WORD ReceiveBufferSize,
  72. IN HANDLE EventHandle,
  73. OUT WORD *NumberOfBytesReceived
  74. );
  75. NET_API_STATUS
  76. NetpStringToNetBiosName(
  77. OUT PCHAR NetBiosName,
  78. IN LPTSTR String,
  79. IN DWORD CanonicalizeType,
  80. IN WORD Type
  81. );
  82. NET_API_STATUS
  83. NetpNetBiosStatusToApiStatus(
  84. UCHAR NetBiosStatus
  85. );
  86. int
  87. NetpSmbCheck(
  88. IN LPBYTE buffer, // Buffer containing SMB
  89. IN USHORT size, // size of SMB buffer (in bytes)
  90. IN UCHAR func, // Function code
  91. IN int parms, // Parameter count
  92. IN LPSTR fields // Buffer fields dope vector
  93. );