home *** CD-ROM | disk | FTP | other *** search
/ Solo Programadores 22 / SOLO_22.iso / packages / win32ada / data.z / win32-mgmtapi.ads < prev    next >
Encoding:
Text File  |  1996-03-15  |  5.4 KB  |  112 lines

  1. -- $Source: /home/harp/1/proto/monoBANK/winnt/win32-mgmtapi.ads,v $ 
  2. -- $Revision: 1.12 $ $Date: 96/03/15 12:53:39 $ $Author: stm $ 
  3. -- See end of file for Copyright (c) information.
  4.  
  5. with Win32.Snmp;
  6. with Win32.Winnt;
  7. with Win32.Winsock;
  8.  
  9. package Win32.Mgmtapi is
  10.  
  11.     SNMP_MGMTAPI_TIMEOUT         : constant := 40;          -- mgmtapi.h:26
  12.     SNMP_MGMTAPI_SELECT_FDERRORS : constant := 41;          -- mgmtapi.h:27
  13.     SNMP_MGMTAPI_TRAP_ERRORS     : constant := 42;          -- mgmtapi.h:28
  14.     SNMP_MGMTAPI_TRAP_DUPINIT    : constant := 43;          -- mgmtapi.h:29
  15.     SNMP_MGMTAPI_NOTRAPS         : constant := 44;          -- mgmtapi.h:30
  16.     SNMP_MGMTAPI_AGAIN           : constant := 45;          -- mgmtapi.h:31
  17.     SNMP_MAX_OID_LEN             : constant := 16#7f00#;    -- mgmtapi.h:33
  18.     RECVBUFSIZE                  : constant := 4096;        -- mgmtapi.h:40
  19.  
  20.     subtype SockDesc is Win32.Winsock.SOCKET;               -- mgmtapi.h:38
  21.  
  22.     type SNMP_MGR_SESSION;                                  -- mgmtapi.h:42
  23.  
  24.     type LPSNMP_MGR_SESSION is access all SNMP_MGR_SESSION; -- mgmtapi.h:50
  25.  
  26.     type SNMP_MGR_SESSION is                                -- mgmtapi.h:42
  27.         record
  28.             fd       : SockDesc;                            -- mgmtapi.h:43
  29.             destAddr : Win32.Winsock.SOCKADDR;              -- mgmtapi.h:44
  30.             community: Win32.LPSTR;                         -- mgmtapi.h:45
  31.             timeout  : Win32.INT;                           -- mgmtapi.h:46
  32.             retries  : Win32.INT;                           -- mgmtapi.h:47
  33.             requestId: Win32.Snmp.AsnInteger;               -- mgmtapi.h:48
  34.             recvBuf  : Win32.CHAR_Array(0..RECVBUFSIZE-1);  -- mgmtapi.h:49
  35.         end record;
  36.  
  37.     function SnmpMgrOpen(
  38.                 lpAgentAddress  : Win32.LPSTR;
  39.                 lpAgentCommunity: Win32.LPSTR;
  40.                 nTimeOut        : Win32.INT;
  41.                 nRetries        : Win32.INT)
  42.                return LPSNMP_MGR_SESSION;                   -- mgmtapi.h:60
  43.  
  44.     function SnmpMgrClose(
  45.                 session: LPSNMP_MGR_SESSION)
  46.                return Win32.BOOL;                           -- mgmtapi.h:67
  47.  
  48.     function SnmpMgrRequest(
  49.                 session         : LPSNMP_MGR_SESSION;
  50.                 requestType     : Win32.BYTE;
  51.                 variableBindings: access Win32.Snmp.RFC1157VarBindList;
  52.                 errorStatus     : access Win32.Snmp.AsnInteger;
  53.                 errorIndex      : access Win32.Snmp.AsnInteger)
  54.                return Win32.INT;                            -- mgmtapi.h:71
  55.  
  56.     function SnmpMgrStrToOid(
  57.                 string: Win32.LPSTR;
  58.                 oid   : access Win32.Snmp.AsnObjectIdentifier)
  59.                return Win32.BOOL;                           -- mgmtapi.h:80
  60.  
  61.     function SnmpMgrOidToStr(
  62.                 oid   : access Win32.Snmp.AsnObjectIdentifier;
  63.                 string: access Win32.LPSTR)
  64.                return Win32.BOOL;                           -- mgmtapi.h:85
  65.  
  66.     function SnmpMgrTrapListen(
  67.                 phTrapAvailable: access Win32.Winnt.HANDLE)
  68.                return Win32.BOOL;                           -- mgmtapi.h:91
  69.  
  70.     function SnmpMgrGetTrap(
  71.                 enterprise      : access Win32.Snmp.AsnObjectIdentifier;
  72.                 IPAddress       : access Win32.Snmp.AsnIPAddress;
  73.                 genericTrap     : access Win32.Snmp.AsnInteger;
  74.                 specificTrap    : access Win32.Snmp.AsnInteger;
  75.                 timeStamp       : access Win32.Snmp.AsnTimeticks;
  76.                 variableBindings: access Win32.Snmp.RFC1157VarBindList)
  77.                return Win32.BOOL;                           -- mgmtapi.h:95
  78.  
  79. private
  80.  
  81.     pragma Convention(C, SNMP_MGR_SESSION);                 -- mgmtapi.h:42
  82.  
  83.     pragma Import(Stdcall, SnmpMgrOpen, "SnmpMgrOpen");           -- mgmtapi.h:60
  84.     pragma Import(Stdcall, SnmpMgrClose, "SnmpMgrClose");         -- mgmtapi.h:67
  85.     pragma Import(Stdcall, SnmpMgrRequest, "SnmpMgrRequest");     -- mgmtapi.h:71
  86.     pragma Import(Stdcall, SnmpMgrStrToOid, "SnmpMgrStrToOid");   -- mgmtapi.h:80
  87.     pragma Import(Stdcall, SnmpMgrOidToStr, "SnmpMgrOidToStr");   -- mgmtapi.h:85
  88.     pragma Import(Stdcall, SnmpMgrTrapListen, "SnmpMgrTrapListen");
  89.                                                             -- mgmtapi.h:91
  90.     pragma Import(Stdcall, SnmpMgrGetTrap, "SnmpMgrGetTrap");     -- mgmtapi.h:95
  91.  
  92. -------------------------------------------------------------------------------
  93. --
  94. -- THIS FILE AND ANY ASSOCIATED DOCUMENTATION IS PROVIDED WITHOUT CHARGE
  95. -- "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING
  96. -- BUT NOT LIMITED TO THE IMPLIED WARRANTIES OF MERCHANTABILITY AND/OR
  97. -- FITNESS FOR A PARTICULAR PURPOSE.  The user assumes the entire risk as to
  98. -- the accuracy and the use of this file.  This file may be used, copied,
  99. -- modified and distributed only by licensees of Microsoft Corporation's
  100. -- WIN32 Software Development Kit in accordance with the terms of the 
  101. -- licensee's End-User License Agreement for Microsoft Software for the
  102. -- WIN32 Development Kit.
  103. --
  104. -- Copyright (c) Intermetrics, Inc. 1995
  105. -- Portions (c) 1985-1994 Microsoft Corporation with permission.
  106. -- Microsoft is a registered trademark and Windows and Windows NT are
  107. -- trademarks of Microsoft Corporation.
  108. --
  109. -------------------------------------------------------------------------------
  110.  
  111. end Win32.Mgmtapi;
  112.