AGENT++
4.0.3
Main Page
Related Pages
Classes
Files
File List
File Members
include
agent_pp
system_group.h
Go to the documentation of this file.
1
/*_############################################################################
2
_##
3
_## AGENT++ 4.0 - system_group.h
4
_##
5
_## Copyright (C) 2000-2013 Frank Fock and Jochen Katz (agentpp.com)
6
_##
7
_## Licensed under the Apache License, Version 2.0 (the "License");
8
_## you may not use this file except in compliance with the License.
9
_## You may obtain a copy of the License at
10
_##
11
_## http://www.apache.org/licenses/LICENSE-2.0
12
_##
13
_## Unless required by applicable law or agreed to in writing, software
14
_## distributed under the License is distributed on an "AS IS" BASIS,
15
_## WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16
_## See the License for the specific language governing permissions and
17
_## limitations under the License.
18
_##
19
_##########################################################################*/
20
21
#ifndef system_group_h_
22
#define system_group_h_
23
24
#ifndef WIN32
25
#include <sys/time.h>
26
#endif
27
28
#include <string.h>
29
#include <
agent_pp/mib.h
>
30
#include <
agent_pp/snmp_textual_conventions.h
>
31
32
#define oidSysGroup "1.3.6.1.2.1.1"
33
#define oidSysDescr "1.3.6.1.2.1.1.1.0"
34
#define oidSysObjectID "1.3.6.1.2.1.1.2.0"
35
#define oidSysUpTime "1.3.6.1.2.1.1.3.0"
36
#define oidSysContact "1.3.6.1.2.1.1.4.0"
37
#define oidSysName "1.3.6.1.2.1.1.5.0"
38
#define oidSysLocation "1.3.6.1.2.1.1.6.0"
39
#define oidSysServices "1.3.6.1.2.1.1.7.0"
40
41
#define confSysName "sysName.leaf"
42
#define confSysContact "sysContact.leaf"
43
#define confSysLocation "sysLocation.leaf"
44
#define confSysORTable "sysORTable.table"
45
46
#define oidSysORLastChange "1.3.6.1.2.1.1.8.0"
47
#define oidSysORTable "1.3.6.1.2.1.1.9"
48
#define oidSysOREntry "1.3.6.1.2.1.1.9.1"
49
#define oidSysORIndex "1.3.6.1.2.1.1.9.1.1"
50
#define colSysORIndex "1"
51
#define oidSysORID "1.3.6.1.2.1.1.9.1.2"
52
#define colSysORID "2"
53
#define oidSysORDescr "1.3.6.1.2.1.1.9.1.3"
54
#define colSysORDescr "3"
55
#define oidSysORUpTime "1.3.6.1.2.1.1.9.1.4"
56
#define colSysORUpTime "4"
57
58
#ifdef AGENTPP_NAMESPACE
59
namespace
Agentpp {
60
#endif
61
62
63
/**********************************************************************
64
*
65
* class sysUpTime
66
*
67
**********************************************************************/
68
69
class
AGENTPP_DECL
sysUpTime
:
public
MibLeaf
{
70
71
public
:
72
sysUpTime
();
73
74
void
get_request(
Request
*,
int
);
75
76
static
u_int
get
();
77
static
time_t get_currentTime();
78
79
virtual
bool
is_volatile
() {
return
TRUE
; }
80
#ifdef HAVE_CLOCK_GETTIME
81
static
struct
timespec start;
82
#else
83
static
u_int
start
;
84
#endif
85
};
86
87
/**********************************************************************
88
*
89
* class sysDescr
90
*
91
**********************************************************************/
92
93
class
AGENTPP_DECL
sysDescr
:
public
SnmpDisplayString
{
94
95
public
:
96
sysDescr
(
const
char
*);
97
};
98
99
/**********************************************************************
100
*
101
* class sysObjectID
102
*
103
**********************************************************************/
104
105
class
AGENTPP_DECL
sysObjectID
:
public
MibLeaf
{
106
107
public
:
108
sysObjectID
(
const
Oidx
&);
109
};
110
111
/**********************************************************************
112
*
113
* class sysServices
114
*
115
**********************************************************************/
116
117
class
AGENTPP_DECL
sysServices
:
public
MibLeaf
{
118
119
public
:
120
sysServices
(
const
int
);
121
};
122
123
132
class
AGENTPP_DECL
sysORLastChange
:
public
MibLeaf
{
133
134
public
:
135
sysORLastChange
();
136
virtual
~sysORLastChange
() {};
137
138
static
sysORLastChange
* instance;
139
140
virtual
bool
is_volatile
() {
return
TRUE
; }
141
void
update();
142
};
143
151
class
AGENTPP_DECL
sysOREntry
:
public
TimeStampTable
{
152
153
public
:
154
sysOREntry
(
TimeStamp
*);
155
virtual
~
sysOREntry
();
156
157
static
sysOREntry
*
instance
;
158
159
virtual
void
set_row(
MibTableRow
* r,
160
const
Oidx
&,
const
NS_SNMP
OctetStr&,
int
);
170
virtual
MibTableRow
* find(
const
Oidx
&);
171
172
virtual
bool
is_volatile
() {
return
TRUE
; }
173
};
174
175
176
/**********************************************************************
177
*
178
* class sysGroup
179
*
180
**********************************************************************/
181
182
class
AGENTPP_DECL
sysGroup
:
public
MibGroup
{
183
184
public
:
185
192
sysGroup
(
const
char
*descr,
const
Oidx
&o,
const
int
services,
193
const
char
*contact = 0,
const
char
*name = 0,
194
const
char
*location = 0);
195
};
196
#ifdef AGENTPP_NAMESPACE
197
}
198
#endif
199
#endif
Generated by
1.8.2