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.

112 lines
3.8 KiB

  1. /*++
  2. Copyright (c) 1989-2001 Microsoft Corporation
  3. Module Name:
  4. smbioctl.h
  5. Abstract:
  6. SMB IOCTLs
  7. Author:
  8. Jiandong Ruan
  9. Revision History:
  10. --*/
  11. #ifndef __SMBIOCTL_H__
  12. #define __SMBIOCTL_H__
  13. //
  14. // This 2 IOCTLs are used at development stage.
  15. //
  16. #define IOCTL_SMB_START CTL_CODE(FILE_DEVICE_TRANSPORT, 101, METHOD_BUFFERED, FILE_READ_ACCESS|FILE_WRITE_ACCESS)
  17. #define IOCTL_SMB_STOP CTL_CODE(FILE_DEVICE_TRANSPORT, 102, METHOD_BUFFERED, FILE_READ_ACCESS|FILE_WRITE_ACCESS)
  18. //
  19. // IOCTLs exposed to user
  20. //
  21. #define IOCTL_SMB_DNS CTL_CODE(FILE_DEVICE_TRANSPORT, 110, \
  22. METHOD_OUT_DIRECT, FILE_READ_ACCESS|FILE_WRITE_ACCESS)
  23. #define IOCTL_SMB_ENABLE_NAGLING CTL_CODE(FILE_DEVICE_TRANSPORT, 111, \
  24. METHOD_BUFFERED, FILE_READ_ACCESS|FILE_WRITE_ACCESS)
  25. #define IOCTL_SMB_DISABLE_NAGLING CTL_CODE(FILE_DEVICE_TRANSPORT, 112, \
  26. METHOD_BUFFERED, FILE_READ_ACCESS|FILE_WRITE_ACCESS)
  27. #define IOCTL_SMB_SET_IPV6_PROTECTION_LEVEL CTL_CODE(FILE_DEVICE_TRANSPORT, 113, \
  28. METHOD_BUFFERED, FILE_READ_ACCESS|FILE_WRITE_ACCESS)
  29. typedef struct NBSMB_IPV6_PROTECTION_PARAM {
  30. ULONG uIPv6ProtectionLevel;
  31. BOOL bIPv6EnableOutboundGlobal;
  32. } NBSMB_IPV6_PROTECTION_PARAM, * PNBSMB_IPV6_PROTECTION_PARAM;
  33. //
  34. // The following definitions are from Dns.c
  35. //
  36. #define DNS_NAME_BUFFER_LENGTH (256)
  37. #define DNS_MAX_NAME_LENGTH (255)
  38. #define SMB_MAX_IPADDRS_PER_HOST (16)
  39. //
  40. // Type of requests (bit mask)
  41. //
  42. #define SMB_DNS_A 1 // A record (IPv4) needed
  43. #define SMB_DNS_AAAA 2 // AAAA record (IPv6) needed
  44. #define SMB_DNS_AAAA_GLOBAL 4 // AAAA Global IPv6 record (IPv6) needed
  45. #define SMB_DNS_RESERVED (~(SMB_DNS_AAAA|SMB_DNS_A|SMB_DNS_AAAA_GLOBAL))
  46. typedef struct {
  47. ULONG Id;
  48. ULONG RequestType;
  49. BOOL Resolved;
  50. WCHAR Name[DNS_NAME_BUFFER_LENGTH];
  51. LONG NameLen;
  52. SMB_IP_ADDRESS IpAddrsList[SMB_MAX_IPADDRS_PER_HOST];
  53. LONG IpAddrsNum;
  54. } SMB_DNS_BUFFER, *PSMB_DNS_BUFFER;
  55. #if 0
  56. ////////////////////////////////////////////////////////////////////////////////
  57. // The following is copied form nbtioctl.h
  58. // It is required for compatibility
  59. ////////////////////////////////////////////////////////////////////////////////
  60. //
  61. // This structure is returned by Nbt when a TdiQueryInformation()
  62. // call asks for TDI_QUERY_ADDRESS_INFO on a connection. This is
  63. // the same as a TRANSPORT_ADDRESS struct from "tdi.h" containing
  64. // two address, a NetBIOS address followed by an IP address.
  65. //
  66. typedef struct _NBT_ADDRESS_PAIR {
  67. LONG TAAddressCount; // this will always == 2
  68. struct {
  69. USHORT AddressLength; // length in bytes of this address == 18
  70. USHORT AddressType; // this will == TDI_ADDRESS_TYPE_NETBIOS
  71. TDI_ADDRESS_NETBIOS Address;
  72. } AddressNetBIOS;
  73. struct {
  74. USHORT AddressLength; // length in bytes of this address == 14
  75. USHORT AddressType; // this will == TDI_ADDRESS_TYPE_IP
  76. TDI_ADDRESS_IP Address;
  77. } AddressIP;
  78. } NBT_ADDRESS_PAIR, *PNBT_ADDRESS_PAIR;
  79. typedef struct _NBT_ADDRESS_PAIR_INFO {
  80. ULONG ActivityCount; // outstanding open file objects/this address.
  81. NBT_ADDRESS_PAIR AddressPair; // the actual address & its components.
  82. } NBT_ADDRESS_PAIR_INFO, *PNBT_ADDRESS_PAIR_INFO;
  83. #endif
  84. #define DD_SMB6_EXPORT_NAME L"\\Device\\NetbiosSmb"
  85. #include "nbtioctl.h"
  86. #endif