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.

222 lines
5.3 KiB

  1. /*++
  2. Copyright (c) 1995-1999 Microsoft Corporation
  3. Module Name:
  4. ipxsap.h
  5. Abstract:
  6. This module contains the definitions of the:
  7. interface management APIs structures
  8. sap global management APIs structures
  9. sap MIB management APIs structures
  10. Author:
  11. Stefan Solomon 06/30/1995
  12. Revision History:
  13. --*/
  14. #ifndef _IPXSAP_
  15. #define _IPXSAP_
  16. #if _MSC_VER > 1000
  17. #pragma once
  18. #endif
  19. #include <ipxconst.h>
  20. typedef struct _SAP_GLOBAL_INFO {
  21. DWORD EventLogMask;
  22. } SAP_GLOBAL_INFO, *PSAP_GLOBAL_INFO;
  23. //********************************************************************
  24. // *
  25. // SAP Configuration Information *
  26. // *
  27. //********************************************************************
  28. //*** SAP Interface Configuration Information ***
  29. typedef struct _SAP_IF_INFO {
  30. ULONG AdminState; // The desired state of the interface
  31. ULONG UpdateMode; // SAP update mechanism used on this interface
  32. ULONG PacketType; // The SAP packet type used on this interface
  33. ULONG Supply; // Send SAP updates on this interface
  34. ULONG Listen; // Listen to SAP updates on this interface
  35. ULONG GetNearestServerReply; // Reply to GetNearestServer
  36. ULONG PeriodicUpdateInterval; // in seconds - default 60
  37. ULONG AgeIntervalMultiplier; // default 3
  38. } SAP_IF_INFO, *PSAP_IF_INFO;
  39. // UpdateMode Values:
  40. //
  41. // This parameter controls the SAP database update on this interface.
  42. //
  43. // If this is a LAN interface, use IPX_PERIODIC_UPDATE as default.
  44. // If this is a WAN router interface with static routes, use IPX_NO_UPDATE as default.
  45. // If you want to trigger an update on this interface and to keep the data
  46. // as static data, use IPX_AUTO_STATIC value.
  47. // IPX_AUTO_STATIC update can be set only on a WAN interface
  48. //
  49. // PacketType Default Values:
  50. //
  51. // If UpdateMode is set to IPX_NO_UPDATE, this field is meaningless.
  52. // If this is a LAN interface, use IPX_STANDARD_PACKET_TYPE as default.
  53. // If you want reliable delivery of the update data in a triggered update,
  54. // use IPX_RELIABLE_DELIVERY_PACKET_TYPE (this can be set only in combination with
  55. // IPX_AUTO_STATIC_UPDATE in the UpdateMode).
  56. // IPX Service Filter Info
  57. //
  58. typedef struct _SAP_SERVICE_FILTER_INFO {
  59. union {
  60. USHORT ServiceType;
  61. ULONG ServiceType_align; // Ensures aligment
  62. };
  63. UCHAR ServiceName[48];
  64. } SAP_SERVICE_FILTER_INFO, *PSAP_SERVICE_FILTER_INFO;
  65. // ServiceType - a wildcard (0xFFFF) means any type.
  66. // ServiceName - (1-47)chars service name. A null byte as the first byte
  67. // signifies ANY server of this type
  68. //*** SAP Filters Only Information ***
  69. typedef struct _SAP_IF_FILTERS {
  70. ULONG SupplyFilterAction;
  71. ULONG SupplyFilterCount;
  72. ULONG ListenFilterAction;
  73. ULONG ListenFilterCount;
  74. SAP_SERVICE_FILTER_INFO ServiceFilter[1];
  75. } SAP_IF_FILTERS, *PSAP_IF_FILTERS;
  76. // FilterAction -
  77. #define IPX_SERVICE_FILTER_PERMIT 1
  78. #define IPX_SERVICE_FILTER_DENY 2
  79. //
  80. //*** SAP Interface Configuration Information ***
  81. //
  82. // This structure is passed in AddInterface and SetInterface Entry Points
  83. //
  84. typedef struct _SAP_IF_CONFIG {
  85. SAP_IF_INFO SapIfInfo;
  86. SAP_IF_FILTERS SapIfFilters;
  87. } SAP_IF_CONFIG, *PSAP_IF_CONFIG;
  88. // ***********************************************************
  89. // *** ***
  90. // *** SAP MIB Table Identifiers ***
  91. // *** ***
  92. // ***********************************************************
  93. #define SAP_BASE_ENTRY 0
  94. #define SAP_INTERFACE_TABLE 1
  95. //************************************************************
  96. // *
  97. // SAP MIB Basic Structures *
  98. // *
  99. //************************************************************
  100. //
  101. // SAP MIB Base Entry
  102. //
  103. typedef struct _SAP_MIB_BASE {
  104. ULONG SapOperState;
  105. } SAP_MIB_BASE, *PSAP_MIB_BASE;
  106. //
  107. // SAP MIB Interface Table Entry
  108. //
  109. typedef struct _SAP_IF_STATS {
  110. ULONG SapIfOperState; // up, down or sleeping
  111. ULONG SapIfInputPackets;
  112. ULONG SapIfOutputPackets;
  113. } SAP_IF_STATS, *PSAP_IF_STATS;
  114. typedef struct _SAP_INTERFACE {
  115. ULONG InterfaceIndex;
  116. SAP_IF_INFO SapIfInfo;
  117. SAP_IF_STATS SapIfStats;
  118. } SAP_INTERFACE, *PSAP_INTERFACE;
  119. //***************************************************************
  120. // *
  121. // INPUT DATA For: Get, GetFirst, GetNext *
  122. // *
  123. //***************************************************************
  124. typedef struct _SAP_MIB_GET_INPUT_DATA {
  125. ULONG TableId;
  126. ULONG InterfaceIndex;
  127. } SAP_MIB_GET_INPUT_DATA, *PSAP_MIB_GET_INPUT_DATA;
  128. //***************************************************************
  129. // *
  130. // INPUT DATA For: Create, Delete, Set *
  131. // *
  132. //***************************************************************
  133. typedef struct _SAP_MIB_SET_INPUT_DATA {
  134. ULONG TableId;
  135. SAP_INTERFACE SapInterface;
  136. } SAP_MIB_SET_INPUT_DATA, *PSAP_MIB_SET_INPUT_DATA;
  137. //
  138. // *** SAP Base Entry ***
  139. //
  140. // MIB Functions: Get
  141. // INPUT DATA: SAP_MIB_GET_INPUT_DATA and Index is not used
  142. // OUTPUT DATA: SAP_INTERFACE
  143. //
  144. // *** SAP Interface Table ***
  145. //
  146. // MIB Functions: Get, GetFirst, GetNext, Set
  147. // INPUT DATA: SAP_MIB_GET_INPUT_DATA for Get, GetFirst and GetNext
  148. // SAP_MIB_SET_INPUT_DATA for Set
  149. //
  150. // OUTPUT DATA: SAP_INTERFACE
  151. //
  152. #endif