home *** CD-ROM | disk | FTP | other *** search
/ PC Format (South-Africa) 2001 June / PCFJune.iso / Xenon / C++ / FreeCommandLineTools.exe / Include / ipxsap.h < prev    next >
Encoding:
C/C++ Source or Header  |  2000-01-31  |  5.6 KB  |  225 lines

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