AGENT++
4.0.3
Main Page
Related Pages
Classes
Files
File List
File Members
include
agent_pp
mib_policy.h
Go to the documentation of this file.
1
/*_############################################################################
2
_##
3
_## AGENT++ 4.0 - mib_policy.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
22
23
#ifndef _mib_policy_h_
24
#define _mib_policy_h_
25
26
#include <
agent_pp/agent++.h
>
27
#include <
agent_pp/mib.h
>
28
#include <
agent_pp/snmp_target_mib.h
>
29
#include <
agent_pp/snmp_notification_mib.h
>
30
#include <
agent_pp/v3_mib.h
>
31
#include <
agent_pp/mib_complex_entry.h
>
32
33
#ifdef AGENTPP_NAMESPACE
34
namespace
Agentpp {
35
#endif
36
37
struct
table_size_def
{
38
Oidx
tableID
;
39
unsigned
int
sizeLimit
;
40
table_size_def
(
const
Oidx
& o,
unsigned
int
i): tableID(o), sizeLimit(i)
41
{ }
42
};
43
44
/*----------------------- class MibTablePolicy -------------------------*/
45
54
class
AGENTPP_DECL
MibTableSizePolicy
:
public
MibTableVoter
{
55
56
public
:
61
MibTableSizePolicy
(): defaultLimit(0) { }
62
79
MibTableSizePolicy
(
const
table_size_def
*,
unsigned
int
,
80
unsigned
int
);
81
82
virtual
~MibTableSizePolicy
() { }
83
84
virtual
int
is_transition_ok(
MibTable
*,
MibTableRow
*,
const
Oidx
&,
85
int
,
int
);
86
98
virtual
void
set_policy(
const
Oidx
&,
unsigned
int
);
99
106
virtual
void
remove_policy(
const
Oidx
&);
107
118
static
void
register_policy(
MibContext
*,
MibTableSizePolicy
*);
119
120
protected
:
121
OidList<MibStaticEntry>
policies
;
122
unsigned
int
defaultLimit
;
123
};
124
125
#ifdef AGENTPP_NAMESPACE
126
}
127
#endif
128
129
#endif
Generated by
1.8.2