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.

89 lines
1.6 KiB

  1. /*++
  2. Copyright (c) 1992-1996 Microsoft Corporation
  3. Module Name:
  4. file.h
  5. Abstract:
  6. This file contains the data declarations for the disk format of arp cache.
  7. Author:
  8. Jameel Hyder (jameelh@microsoft.com) July 1996
  9. Environment:
  10. Kernel mode
  11. Revision History:
  12. --*/
  13. #ifndef _FILE_
  14. #define _FILE_
  15. #define DISK_HDR_SIGNATURE 'SprA'
  16. #define DISK_HDR_VERSION 0x00010000 // 1.0
  17. #define DISK_BUFFER_SIZE 4096 // Amount read or written at a time
  18. //
  19. // The file consists of a header, followed by individual entries.
  20. //
  21. typedef struct
  22. {
  23. ULONG Signature;
  24. ULONG Version;
  25. ULONG TimeStamp; // Time written
  26. ULONG NumberOfArpEntries;
  27. } DISK_HEADER, *PDISK_HEADER;
  28. typedef struct
  29. {
  30. UCHAR AddrType;
  31. UCHAR AddrLen;
  32. UCHAR SubAddrType;
  33. UCHAR SubAddrLen;
  34. UCHAR Address[ATM_ADDRESS_LENGTH];
  35. //
  36. // This is followed by SubAddress if one is present
  37. //
  38. // UCHAR SubAddress[ATM_ADDRESS_LENGTH];
  39. } DISK_ATMADDR;
  40. typedef struct
  41. {
  42. IPADDR IpAddr;
  43. DISK_ATMADDR AtmAddr;
  44. } DISK_ENTRY, *PDISK_ENTRY;
  45. #define SIZE_4N(_x_) (((_x_) + 3) & ~3)
  46. #define LinkDoubleAtHead(_pHead, _p) \
  47. { \
  48. (_p)->Next = (_pHead); \
  49. (_p)->Prev = &(_pHead); \
  50. if ((_pHead) != NULL) \
  51. (_pHead)->Prev = &(_p)->Next; \
  52. (_pHead) = (_p); \
  53. }
  54. #define LinkDoubleAtEnd(_pThis, _pLast) \
  55. { \
  56. (_pLast)->Next = (_pThis); \
  57. (_pThis)->Prev = &(_pLast)->Next; \
  58. (_pThis)->Next = NULL; \
  59. }
  60. #define UnlinkDouble(_p) \
  61. { \
  62. *((_p)->Prev) = (_p)->Next; \
  63. if ((_p)->Next != NULL) \
  64. (_p)->Next->Prev = (_p)->Prev; \
  65. }
  66. #endif // _FILE_
  67.