OSDN Git Service

* NEWS: Add and adjust release notes for 4.0.
[mingw/mingw-org-wsl.git] / include / mgmtapi.h
1 /**
2  * @file mgmtapi.h
3  * Copyright 2012, 2013 MinGW.org project
4  *
5  * Permission is hereby granted, free of charge, to any person obtaining a
6  * copy of this software and associated documentation files (the "Software"),
7  * to deal in the Software without restriction, including without limitation
8  * the rights to use, copy, modify, merge, publish, distribute, sublicense,
9  * and/or sell copies of the Software, and to permit persons to whom the
10  * Software is furnished to do so, subject to the following conditions:
11  * 
12  * The above copyright notice and this permission notice (including the next
13  * paragraph) shall be included in all copies or substantial portions of the
14  * Software.
15  * 
16  * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17  * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18  * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
19  * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
20  * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
21  * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
22  * DEALINGS IN THE SOFTWARE.
23  */
24 #ifndef _MGMTAPI_H
25 #define _MGMTAPI_H
26 #pragma GCC system_header
27 #include <_mingw.h>
28
29 /*
30  * SNMP Management API
31  */
32 #include <snmp.h>
33
34 #ifdef __cplusplus
35 extern "C" {
36 #endif
37
38 #define SNMP_MGMTAPI_TIMEOUT    40
39 #define SNMP_MGMTAPI_SELECT_FDERRORS    41
40 #define SNMP_MGMTAPI_TRAP_ERRORS        42
41 #define SNMP_MGMTAPI_TRAP_DUPINIT       43
42 #define SNMP_MGMTAPI_NOTRAPS    44
43 #define SNMP_MGMTAPI_AGAIN      45
44 #define SNMP_MGMTAPI_INVALID_CTL        46
45 #define SNMP_MGMTAPI_INVALID_SESSION    47
46 #define SNMP_MGMTAPI_INVALID_BUFFER     48
47 #define MGMCTL_SETAGENTPORT     1
48
49 #ifndef RC_INVOKED
50
51 typedef PVOID LPSNMP_MGR_SESSION;
52
53 BOOL WINSNMPAPI SnmpMgrClose(LPSNMP_MGR_SESSION);
54 BOOL WINSNMPAPI SnmpMgrCtl(LPSNMP_MGR_SESSION,DWORD,LPVOID,DWORD,LPVOID,DWORD,LPDWORD);
55 BOOL WINSNMPAPI SnmpMgrGetTrap(AsnObjectIdentifier*,AsnNetworkAddress*,AsnInteger*,AsnInteger*,AsnTimeticks*,SnmpVarBindList*);
56 BOOL WINSNMPAPI SnmpMgrGetTrapEx(AsnObjectIdentifier*,AsnNetworkAddress*,AsnNetworkAddress*,AsnInteger*,AsnInteger*,AsnOctetString*,AsnTimeticks*,SnmpVarBindList*);
57 BOOL WINSNMPAPI SnmpMgrOidToStr(AsnObjectIdentifier*,LPSTR*);
58 LPSNMP_MGR_SESSION WINSNMPAPI SnmpMgrOpen(LPSTR,LPSTR,INT,INT);
59 INT WINSNMPAPI SnmpMgrRequest(LPSNMP_MGR_SESSION,BYTE,SnmpVarBindList*,AsnInteger*,AsnInteger*);
60 BOOL WINSNMPAPI SnmpMgrStrToOid(LPSTR,AsnObjectIdentifier*);
61 BOOL WINSNMPAPI SnmpMgrTrapListen(HANDLE*);
62
63 #endif /* RC_INVOKED */
64
65 #ifdef __cplusplus
66 }
67 #endif
68
69 #endif