home *** CD-ROM | disk | FTP | other *** search
/ Tricks of the Windows Gam…ming Gurus (2nd Edition) / Disc2.iso / vc98 / include / ipxsap.h < prev    next >
C/C++ Source or Header  |  1998-04-25  |  6KB  |  219 lines

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