1 martin 1.13 //%LICENSE////////////////////////////////////////////////////////////////
|
2 martin 1.14 //
|
3 martin 1.13 // Licensed to The Open Group (TOG) under one or more contributor license
4 // agreements. Refer to the OpenPegasusNOTICE.txt file distributed with
5 // this work for additional information regarding copyright ownership.
6 // Each contributor licenses this file to you under the OpenPegasus Open
7 // Source License; you may not use this file except in compliance with the
8 // License.
|
9 martin 1.14 //
|
10 martin 1.13 // Permission is hereby granted, free of charge, to any person obtaining a
11 // copy of this software and associated documentation files (the "Software"),
12 // to deal in the Software without restriction, including without limitation
13 // the rights to use, copy, modify, merge, publish, distribute, sublicense,
14 // and/or sell copies of the Software, and to permit persons to whom the
15 // Software is furnished to do so, subject to the following conditions:
|
16 martin 1.14 //
|
17 martin 1.13 // The above copyright notice and this permission notice shall be included
18 // in all copies or substantial portions of the Software.
|
19 martin 1.14 //
|
20 martin 1.13 // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
|
21 martin 1.14 // OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
22 martin 1.13 // MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
23 // IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
24 // CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
25 // TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
26 // SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
27 martin 1.14 //
|
28 martin 1.13 //////////////////////////////////////////////////////////////////////////
|
29 mike 1.2 //
30 //%/////////////////////////////////////////////////////////////////////////////
31
|
32 kumpf 1.12 #ifndef Pegasus_snmpDeliverTrap_h
33 #define Pegasus_snmpDeliverTrap_h
34
|
35 mike 1.2 #include <iostream>
36 #include <Pegasus/Common/Config.h>
|
37 kumpf 1.5 #include <Pegasus/Common/Array.h>
|
38 mike 1.2 #include <Pegasus/Common/String.h>
39
40 PEGASUS_NAMESPACE_BEGIN
41
42 typedef struct _trapHeader
43 {
44 char destination[255];
45 char snmpType[10];
46 char enterprise[255];
47 char trapOid[255];
48 int variable_packets;
49 } trapHeader;
50
51 typedef struct _trapData
52 {
53 char vbOid[255];
54 char vbType[255];
55 char vbValue[512];
56 } trapData;
57
58 class snmpDeliverTrap
59 mike 1.2 {
60 public:
61
62 snmpDeliverTrap() { }
63
64 virtual ~snmpDeliverTrap() { }
65
|
66 kumpf 1.12 virtual void initialize() = 0;
67
68 virtual void terminate() = 0;
69
|
70 mike 1.2 virtual void deliverTrap(
71 const String& trapOid,
|
72 kumpf 1.15 const String& securityName,
73 const String& targetHost,
74 const Uint16& targetHostFormat,
75 const String& otherTargetHostFormat,
|
76 kumpf 1.6 const Uint32& portNumber,
|
77 kumpf 1.15 const Uint16& snmpVersion,
|
78 kumpf 1.6 const String& engineID,
|
79 sahana.prabhakar 1.16 const Uint8& snmpSecLevel,
80 const Uint8& snmpSecAuthProto,
81 const Array<Uint8>& snmpSecAuthKey,
82 const Uint8& snmpSecPrivProto,
83 const Array<Uint8>& snmpSecPrivKey,
|
84 kumpf 1.8 const Array<String>& vbOids,
85 const Array<String>& vbTypes,
86 const Array<String>& vbValues) = 0;
|
87 mike 1.2 };
88
89 PEGASUS_NAMESPACE_END
|
90 kumpf 1.12
91 #endif // Pegasus_snmpDeliverTrap_h
|