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.

141 lines
2.9 KiB

  1. /*++
  2. Copyright (c) 1996 Microsoft Corporation
  3. Module Name:
  4. system.h
  5. Abstract:
  6. ATMARP Client versions of system objects/definitions.
  7. Revision History:
  8. Who When What
  9. -------- -------- ----------------------------------------------
  10. arvindm 08-28-96 Created
  11. Notes:
  12. --*/
  13. #ifndef __ATMARPC_SYSTEM__H
  14. #define __ATMARPC_SYSTEM__H
  15. #define ATMARP_NDIS_MAJOR_VERSION 5
  16. #define ATMARP_NDIS_MINOR_VERSION 0
  17. #define ATMARP_UL_NAME L"ATMARPC"
  18. #define ATMARP_LL_NAME L"TCPIP_ATMARPC"
  19. //
  20. // 4/3/1998 JosephJ The UL version above is presented to TCPIP and the
  21. // LL version is presented to NDIS, so that NDIS will
  22. // find us when a "TCPIP" reconfiguration is sent to it
  23. // (NDIS will first look for an exact match and then for
  24. // a proper prefix match.)
  25. //
  26. #define ATMARP_NAME_STRING NDIS_STRING_CONST("ATMARPC")
  27. #define ATMARP_DEVICE_NAME L"\\Device\\ATMARPC"
  28. #define ATMARP_REGISTRY_PATH L"\\REGISTRY\\Machine\\System\\CurrentControlSet\\SERVICES\\AtmArpC"
  29. #define MAX_IP_CONFIG_STRING_LEN 200
  30. #define LOCKIN
  31. #define LOCKOUT
  32. #define NOLOCKOUT
  33. #ifndef APIENTRY
  34. #define APIENTRY
  35. #endif
  36. typedef struct _ATMARP_BLOCK
  37. {
  38. NDIS_EVENT Event;
  39. NDIS_STATUS Status;
  40. } ATMARP_BLOCK, *PATMARP_BLOCK;
  41. //
  42. // List manipulation stuff
  43. //
  44. typedef SINGLE_LIST_ENTRY AA_SINGLE_LIST_ENTRY, *PAA_SINGLE_LIST_ENTRY;
  45. #define NULL_PAA_SINGLE_LIST_ENTRY ((PAA_SINGLE_LIST_ENTRY)NULL)
  46. #define AA_POP_FROM_SLIST ExInterlockedPopEntrySList
  47. #define AA_PUSH_TO_SLIST ExInterlockedPushEntrySList
  48. #define AA_INIT_SLIST ExInitializeSListHead
  49. #if !BINARY_COMPATIBLE
  50. /*++
  51. VOID
  52. AA_COMPLETE_IRP(
  53. IN PIRP pIrp,
  54. IN NTSTATUS Status,
  55. IN ULONG Length
  56. )
  57. Complete a pending IRP.
  58. --*/
  59. #define AA_COMPLETE_IRP(_pIrp, _Status, _Length) \
  60. { \
  61. (_pIrp)->IoStatus.Status = (_Status); \
  62. (_pIrp)->IoStatus.Information = (_Length); \
  63. IoCompleteRequest((_pIrp), IO_NO_INCREMENT); \
  64. }
  65. #define AA_IRQL KIRQL
  66. #if DBG
  67. #define AA_GET_ENTRY_IRQL(Irql) \
  68. Irql = KeGetCurrentIrql()
  69. #define AA_CHECK_EXIT_IRQL(EntryIrql, ExitIrql) \
  70. { \
  71. ExitIrql = KeGetCurrentIrql(); \
  72. if (ExitIrql != EntryIrql) \
  73. { \
  74. DbgPrint("File %s, Line %d, Exit IRQ %d != Entry IRQ %d\n", \
  75. __FILE__, __LINE__, ExitIrql, EntryIrql); \
  76. DbgBreakPoint(); \
  77. } \
  78. }
  79. #else
  80. #define AA_GET_ENTRY_IRQL(Irql)
  81. #define AA_CHECK_EXIT_IRQL(EntryIrql, ExitIrql)
  82. #endif // DBG
  83. #endif // !BINARY_COMPATIBLE
  84. #if BINARY_COMPATIBLE
  85. #define AA_GET_ENTRY_IRQL(Irql)
  86. #define AA_CHECK_EXIT_IRQL(EntryIrql, ExitIrql)
  87. #define AA_IRQL ULONG
  88. #endif // BINARY_COMPATIBLE
  89. #ifdef BACK_FILL
  90. /*++
  91. BOOLEAN
  92. AA_BACK_FILL_POSSIBLE(
  93. IN PNDIS_BUFFER pNdisBuffer
  94. )
  95. Check if we can back-fill the specified NDIS buffer with Low-layer headers.
  96. --*/
  97. #define AA_BACK_FILL_POSSIBLE(_pBuf) \
  98. (((_pBuf)->MdlFlags & MDL_NETWORK_HEADER) != 0)
  99. #endif // BACK_FILL
  100. #endif // __ATMARPC_SYSTEM__H