1
|
1 /***********************************************************************\
|
|
2 * mgmtapi.d *
|
|
3 * *
|
|
4 * Windows API header module *
|
|
5 * *
|
|
6 * Translated from MinGW Windows headers *
|
|
7 * by Stewart Gordon *
|
|
8 * *
|
|
9 * Placed into public domain *
|
|
10 \***********************************************************************/
|
|
11 module win32.mgmtapi;
|
|
12
|
|
13 import win32.snmp;
|
|
14 private import win32.windef;
|
|
15
|
|
16 enum {
|
|
17 SNMP_MGMTAPI_TIMEOUT = 40,
|
|
18 SNMP_MGMTAPI_SELECT_FDERRORS,
|
|
19 SNMP_MGMTAPI_TRAP_ERRORS,
|
|
20 SNMP_MGMTAPI_TRAP_DUPINIT,
|
|
21 SNMP_MGMTAPI_NOTRAPS,
|
|
22 SNMP_MGMTAPI_AGAIN,
|
|
23 SNMP_MGMTAPI_INVALID_CTL,
|
|
24 SNMP_MGMTAPI_INVALID_SESSION,
|
|
25 SNMP_MGMTAPI_INVALID_BUFFER // = 48
|
|
26 }
|
|
27
|
|
28 const MGMCTL_SETAGENTPORT = 1;
|
|
29
|
|
30 alias PVOID LPSNMP_MGR_SESSION;
|
|
31
|
|
32 extern (Windows) {
|
|
33 BOOL SnmpMgrClose(LPSNMP_MGR_SESSION);
|
|
34 BOOL SnmpMgrCtl(LPSNMP_MGR_SESSION, DWORD, LPVOID, DWORD, LPVOID, DWORD,
|
|
35 LPDWORD);
|
|
36 BOOL SnmpMgrGetTrap(AsnObjectIdentifier*, AsnNetworkAddress*,
|
|
37 AsnInteger*, AsnInteger*, AsnTimeticks*, SnmpVarBindList*);
|
|
38 BOOL SnmpMgrGetTrapEx(AsnObjectIdentifier*, AsnNetworkAddress*,
|
|
39 AsnNetworkAddress*, AsnInteger*, AsnInteger*, AsnOctetString*,
|
|
40 AsnTimeticks*, SnmpVarBindList*);
|
|
41 BOOL SnmpMgrOidToStr(AsnObjectIdentifier*, LPSTR*);
|
|
42 LPSNMP_MGR_SESSION SnmpMgrOpen(LPSTR, LPSTR, INT, INT);
|
|
43 INT SnmpMgrRequest(LPSNMP_MGR_SESSION, BYTE, SnmpVarBindList*,
|
|
44 AsnInteger*, AsnInteger*);
|
|
45 BOOL SnmpMgrStrToOid(LPSTR, AsnObjectIdentifier*);
|
|
46 BOOL SnmpMgrTrapListen(HANDLE*);
|
|
47 }
|