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.

80 lines
2.0 KiB

  1. /*++
  2. Copyright (c) 1989 Microsoft Corporation.
  3. Module Name:
  4. header.h
  5. Abstract:
  6. This module contains the main infrastructure for mup data structures.
  7. Revision History:
  8. Uday Hegde (udayh) 11\10\1999
  9. NOTES:
  10. */
  11. #ifndef __DFS_HEADER_H
  12. #define __DFS_HEADER_H
  13. #define DFS_OBJECT_MAJOR 0x81
  14. typedef enum _DFS_OBJECT_TYPES {
  15. DFS_OT_UNDEFINED = 0x8100,
  16. DFS_OT_PREFIX_TABLE,
  17. DFS_OT_NAME_TABLE,
  18. DFS_OT_SERVER_INFO,
  19. DFS_OT_ROOT_OBJECT,
  20. DFS_OT_LINK_OBJECT,
  21. DFS_OT_REPLICA_OBJECT,
  22. DFS_OT_METADATA_STORAGE,
  23. DFS_OT_REGISTRY_MACHINE,
  24. DFS_OT_REFERRAL_STRUCT,
  25. DFS_OT_REGISTRY_STORE,
  26. DFS_OT_AD_STORE,
  27. DFS_OT_POLICY_OBJECT,
  28. DFS_OT_REFERRAL_LOAD_CONTEXT,
  29. DFS_OT_AD_DOMAIN,
  30. DFS_OT_ENTERPRISE_STORE
  31. } DFS_OBJECT_TYPES;
  32. typedef struct _DFS_OBJECT_HEADER {
  33. union {
  34. struct {
  35. UCHAR ObjectType;
  36. UCHAR ObjectMajor; // Only used for debugging.
  37. }Ob;
  38. USHORT NodeType; // Mainly for debugging.
  39. }Node;
  40. SHORT NodeSize;
  41. LONG ReferenceCount; // count of people referencing this.
  42. } DFS_OBJECT_HEADER, *PDFS_OBJECT_HEADER;
  43. #define DfsInitializeHeader(_hdr, _type, _size) \
  44. (_hdr)->Node.NodeType = (USHORT)(_type), \
  45. (_hdr)->NodeSize = (USHORT)(_size), \
  46. (_hdr)->ReferenceCount = 1
  47. #define DfsIncrementReference(_hdr) \
  48. InterlockedIncrement(&((PDFS_OBJECT_HEADER)(_hdr))->ReferenceCount)
  49. #define DfsDecrementReference(_hdr) \
  50. InterlockedDecrement(&((PDFS_OBJECT_HEADER)(_hdr))->ReferenceCount)
  51. #define DfsGetHeaderType(_x) (((PDFS_OBJECT_HEADER)(_x))->Node.NodeType)
  52. #define DfsGetHeaderSize(_x) (((PDFS_OBJECT_HEADER)(_x))->NodeSize)
  53. #define DfsGetHeaderCount(_x) (((PDFS_OBJECT_HEADER)(_x))->ReferenceCount)
  54. #define DFS_FILTER_NAME L"\\DfsServer"
  55. typedef DWORD DFSSTATUS;
  56. #endif /* __DFS_HEADER_H */