line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Net::SNMP::Mixin::IpRouteTable; |
2
|
|
|
|
|
|
|
|
3
|
4
|
|
|
4
|
|
219711
|
use strict; |
|
4
|
|
|
|
|
5
|
|
|
4
|
|
|
|
|
104
|
|
4
|
4
|
|
|
4
|
|
15
|
use warnings; |
|
4
|
|
|
|
|
5
|
|
|
4
|
|
|
|
|
134
|
|
5
|
|
|
|
|
|
|
|
6
|
|
|
|
|
|
|
# |
7
|
|
|
|
|
|
|
# store this package name in a handy variable, |
8
|
|
|
|
|
|
|
# used for unambiguous prefix of mixin attributes |
9
|
|
|
|
|
|
|
# storage in object hash |
10
|
|
|
|
|
|
|
# |
11
|
|
|
|
|
|
|
my $prefix = __PACKAGE__; |
12
|
|
|
|
|
|
|
|
13
|
|
|
|
|
|
|
# |
14
|
|
|
|
|
|
|
# this module import config |
15
|
|
|
|
|
|
|
# |
16
|
4
|
|
|
4
|
|
17
|
use Carp (); |
|
4
|
|
|
|
|
7
|
|
|
4
|
|
|
|
|
69
|
|
17
|
4
|
|
|
4
|
|
449
|
use Net::SNMP::Mixin::Util qw/idx2val push_error/; |
|
4
|
|
|
|
|
59961
|
|
|
4
|
|
|
|
|
30
|
|
18
|
|
|
|
|
|
|
|
19
|
|
|
|
|
|
|
# |
20
|
|
|
|
|
|
|
# this module export config |
21
|
|
|
|
|
|
|
# |
22
|
|
|
|
|
|
|
my @mixin_methods; |
23
|
|
|
|
|
|
|
|
24
|
|
|
|
|
|
|
BEGIN { |
25
|
4
|
|
|
4
|
|
1006
|
@mixin_methods = ( qw/ get_ip_route_entries /); |
26
|
|
|
|
|
|
|
} |
27
|
|
|
|
|
|
|
|
28
|
4
|
|
|
|
|
31
|
use Sub::Exporter -setup => { |
29
|
|
|
|
|
|
|
exports => [@mixin_methods], |
30
|
|
|
|
|
|
|
groups => { default => [@mixin_methods], }, |
31
|
4
|
|
|
4
|
|
22
|
}; |
|
4
|
|
|
|
|
6
|
|
32
|
|
|
|
|
|
|
|
33
|
|
|
|
|
|
|
# |
34
|
|
|
|
|
|
|
# SNMP oid constants used in this module |
35
|
|
|
|
|
|
|
# |
36
|
|
|
|
|
|
|
# from mib-II |
37
|
|
|
|
|
|
|
use constant { |
38
|
4
|
|
|
|
|
3120
|
IP_ROUTE_TABLE => '1.3.6.1.2.1.4.21', |
39
|
|
|
|
|
|
|
|
40
|
|
|
|
|
|
|
IP_ROUTE_DEST => '1.3.6.1.2.1.4.21.1.1', |
41
|
|
|
|
|
|
|
IP_ROUTE_IFINDEX => '1.3.6.1.2.1.4.21.1.2', |
42
|
|
|
|
|
|
|
IP_ROUTE_METRIC1 => '1.3.6.1.2.1.4.21.1.3', |
43
|
|
|
|
|
|
|
IP_ROUTE_METRIC2 => '1.3.6.1.2.1.4.21.1.4', |
44
|
|
|
|
|
|
|
IP_ROUTE_METRIC3 => '1.3.6.1.2.1.4.21.1.5', |
45
|
|
|
|
|
|
|
IP_ROUTE_METRIC4 => '1.3.6.1.2.1.4.21.1.6', |
46
|
|
|
|
|
|
|
IP_ROUTE_NEXTHOP => '1.3.6.1.2.1.4.21.1.7', |
47
|
|
|
|
|
|
|
IP_ROUTE_TYPE => '1.3.6.1.2.1.4.21.1.8', |
48
|
|
|
|
|
|
|
IP_ROUTE_PROTO => '1.3.6.1.2.1.4.21.1.9', |
49
|
|
|
|
|
|
|
IP_ROUTE_AGE => '1.3.6.1.2.1.4.21.1.10', |
50
|
|
|
|
|
|
|
IP_ROUTE_MASK => '1.3.6.1.2.1.4.21.1.11', |
51
|
|
|
|
|
|
|
IP_ROUTE_METRIC5 => '1.3.6.1.2.1.4.21.1.12', |
52
|
|
|
|
|
|
|
IP_ROUTE_INFO => '1.3.6.1.2.1.4.21.1.13', |
53
|
4
|
|
|
4
|
|
1354
|
}; |
|
4
|
|
|
|
|
49
|
|
54
|
|
|
|
|
|
|
|
55
|
|
|
|
|
|
|
=head1 NAME |
56
|
|
|
|
|
|
|
|
57
|
|
|
|
|
|
|
Net::SNMP::Mixin::IpRouteTable - mixin class for the mib-II ipRouteTable |
58
|
|
|
|
|
|
|
|
59
|
|
|
|
|
|
|
=head1 VERSION |
60
|
|
|
|
|
|
|
|
61
|
|
|
|
|
|
|
Version 0.01_01 |
62
|
|
|
|
|
|
|
|
63
|
|
|
|
|
|
|
=cut |
64
|
|
|
|
|
|
|
|
65
|
|
|
|
|
|
|
our $VERSION = '0.01_01'; |
66
|
|
|
|
|
|
|
|
67
|
|
|
|
|
|
|
=head1 SYNOPSIS |
68
|
|
|
|
|
|
|
|
69
|
|
|
|
|
|
|
use Net::SNMP; |
70
|
|
|
|
|
|
|
use Net::SNMP::Mixin; |
71
|
|
|
|
|
|
|
|
72
|
|
|
|
|
|
|
#... |
73
|
|
|
|
|
|
|
|
74
|
|
|
|
|
|
|
my $session = Net::SNMP->session( -hostname => 'foo.bar.com' ); |
75
|
|
|
|
|
|
|
|
76
|
|
|
|
|
|
|
$session->mixer('Net::SNMP::Mixin::IpRouteTable'); |
77
|
|
|
|
|
|
|
$session->init_mixins; |
78
|
|
|
|
|
|
|
snmp_dispatcher(); |
79
|
|
|
|
|
|
|
|
80
|
|
|
|
|
|
|
die $session->errors if $session->errors; |
81
|
|
|
|
|
|
|
|
82
|
|
|
|
|
|
|
foreach my $rt_entry ( $session->get_ip_route_entries ) { |
83
|
|
|
|
|
|
|
|
84
|
|
|
|
|
|
|
my $dest = $rt_entry->{ipRouteDest}; |
85
|
|
|
|
|
|
|
my $mask = $rt_entry->{ipRouteMask}; |
86
|
|
|
|
|
|
|
my $nhop = $rt_entry->{ipRouteNextHop}; |
87
|
|
|
|
|
|
|
my $proto_str = $rt_entry->{ipRouteProtoString}; |
88
|
|
|
|
|
|
|
my $type_str = $rt_entry->{ipRouteTypeString}; |
89
|
|
|
|
|
|
|
|
90
|
|
|
|
|
|
|
print "$dest/$mask => $nhop $proto_str $type_str\n"; |
91
|
|
|
|
|
|
|
} |
92
|
|
|
|
|
|
|
|
93
|
|
|
|
|
|
|
=head1 DESCRIPTION |
94
|
|
|
|
|
|
|
|
95
|
|
|
|
|
|
|
A Net::SNMP mixin class for mib-II ipRouteTable info. |
96
|
|
|
|
|
|
|
|
97
|
|
|
|
|
|
|
=head1 MIXIN METHODS |
98
|
|
|
|
|
|
|
|
99
|
|
|
|
|
|
|
=head2 B<< OBJ->get_ip_route_entries() >> |
100
|
|
|
|
|
|
|
|
101
|
|
|
|
|
|
|
Returns a list of mib-II ipRouteTable entries. Every list element is a reference to a hash with the following fields and values: |
102
|
|
|
|
|
|
|
|
103
|
|
|
|
|
|
|
{ |
104
|
|
|
|
|
|
|
ipRouteDest => IpAddress, |
105
|
|
|
|
|
|
|
ipRouteMask => IpAddress, |
106
|
|
|
|
|
|
|
ipRouteNextHop => IpAddress, |
107
|
|
|
|
|
|
|
ipRouteIfIndex => INTEGER, |
108
|
|
|
|
|
|
|
ipRouteMetric1 => INTEGER, |
109
|
|
|
|
|
|
|
ipRouteMetric2 => INTEGER, |
110
|
|
|
|
|
|
|
ipRouteMetric3 => INTEGER, |
111
|
|
|
|
|
|
|
ipRouteMetric4 => INTEGER, |
112
|
|
|
|
|
|
|
ipRouteMetric5 => INTEGER, |
113
|
|
|
|
|
|
|
ipRouteType => INTEGER, |
114
|
|
|
|
|
|
|
ipRouteTypeString => String, # resolved enum |
115
|
|
|
|
|
|
|
ipRouteProto => INTEGER, |
116
|
|
|
|
|
|
|
ipRouteTypeProto => String, # resolved enum |
117
|
|
|
|
|
|
|
ipRouteAge => INTEGER, |
118
|
|
|
|
|
|
|
ipRouteInfo => OBJECT IDENTIFIER |
119
|
|
|
|
|
|
|
} |
120
|
|
|
|
|
|
|
|
121
|
|
|
|
|
|
|
=cut |
122
|
|
|
|
|
|
|
|
123
|
|
|
|
|
|
|
sub get_ip_route_entries { |
124
|
1
|
|
|
1
|
1
|
20087
|
my $session = shift; |
125
|
|
|
|
|
|
|
Carp::croak "'$prefix' not initialized," |
126
|
1
|
50
|
|
|
|
71
|
unless $session->{$prefix}{__initialized}; |
127
|
|
|
|
|
|
|
|
128
|
|
|
|
|
|
|
# |
129
|
|
|
|
|
|
|
# the ipRouteType enum |
130
|
|
|
|
|
|
|
# |
131
|
0
|
|
|
|
|
0
|
my %ip_route_type_enum = ( |
132
|
|
|
|
|
|
|
1 => 'other', |
133
|
|
|
|
|
|
|
2 => 'invalid', |
134
|
|
|
|
|
|
|
3 => 'direct', |
135
|
|
|
|
|
|
|
4 => 'indirect', |
136
|
|
|
|
|
|
|
); |
137
|
|
|
|
|
|
|
|
138
|
|
|
|
|
|
|
# |
139
|
|
|
|
|
|
|
# the ipRouteProto enum |
140
|
|
|
|
|
|
|
# |
141
|
0
|
|
|
|
|
0
|
my %ip_route_proto_enum = ( |
142
|
|
|
|
|
|
|
1 => 'other', |
143
|
|
|
|
|
|
|
2 => 'local', |
144
|
|
|
|
|
|
|
3 => 'netmgmt', |
145
|
|
|
|
|
|
|
4 => 'icmp', |
146
|
|
|
|
|
|
|
5 => 'egp', |
147
|
|
|
|
|
|
|
6 => 'ggp', |
148
|
|
|
|
|
|
|
7 => 'hello', |
149
|
|
|
|
|
|
|
8 => 'rip', |
150
|
|
|
|
|
|
|
9 => 'is-is', |
151
|
|
|
|
|
|
|
10 => 'es-is', |
152
|
|
|
|
|
|
|
11 => 'ciscoIgrp', |
153
|
|
|
|
|
|
|
12 => 'bbnSpfIgp', |
154
|
|
|
|
|
|
|
13 => 'ospf', |
155
|
|
|
|
|
|
|
14 => 'bgp', |
156
|
|
|
|
|
|
|
); |
157
|
|
|
|
|
|
|
|
158
|
|
|
|
|
|
|
# stash for return values |
159
|
0
|
|
|
|
|
0
|
my @route_entries = (); |
160
|
|
|
|
|
|
|
|
161
|
|
|
|
|
|
|
my ( |
162
|
0
|
|
|
|
|
0
|
$ipRouteDest, $ipRouteMask, $ipRouteNextHop, |
163
|
|
|
|
|
|
|
$ipRouteIfIndex, $ipRouteMetric1, $ipRouteMetric2, |
164
|
|
|
|
|
|
|
$ipRouteMetric3, $ipRouteMetric4, $ipRouteMetric5, |
165
|
|
|
|
|
|
|
$ipRouteType, $ipRouteTypeString, $ipRouteProto, |
166
|
|
|
|
|
|
|
$ipRouteProtoString, $ipRouteAge, $ipRouteInfo, |
167
|
|
|
|
|
|
|
); |
168
|
|
|
|
|
|
|
|
169
|
|
|
|
|
|
|
# index is ipRouteDest |
170
|
0
|
|
|
|
|
0
|
foreach my $idx ( keys %{ $session->{$prefix}{ipRouteIfIndex} } ) { |
|
0
|
|
|
|
|
0
|
|
171
|
0
|
|
|
|
|
0
|
$ipRouteDest = $idx; |
172
|
0
|
|
|
|
|
0
|
$ipRouteMask = $session->{$prefix}{ipRouteMask}{$idx}; |
173
|
0
|
|
|
|
|
0
|
$ipRouteNextHop = $session->{$prefix}{ipRouteNextHop}{$idx}; |
174
|
0
|
|
|
|
|
0
|
$ipRouteIfIndex = $session->{$prefix}{ipRouteIfIndex}{$idx}; |
175
|
0
|
|
|
|
|
0
|
$ipRouteMetric1 = $session->{$prefix}{ipRouteMetric1}{$idx}; |
176
|
0
|
|
|
|
|
0
|
$ipRouteMetric2 = $session->{$prefix}{ipRouteMetric2}{$idx}; |
177
|
0
|
|
|
|
|
0
|
$ipRouteMetric3 = $session->{$prefix}{ipRouteMetric3}{$idx}; |
178
|
0
|
|
|
|
|
0
|
$ipRouteMetric4 = $session->{$prefix}{ipRouteMetric4}{$idx}; |
179
|
0
|
|
|
|
|
0
|
$ipRouteMetric5 = $session->{$prefix}{ipRouteMetric5}{$idx}; |
180
|
0
|
|
0
|
|
|
0
|
$ipRouteType = $session->{$prefix}{ipRouteType}{$idx} || -1; |
181
|
0
|
|
0
|
|
|
0
|
$ipRouteTypeString = $ip_route_type_enum{$ipRouteType} || 'unknown'; |
182
|
0
|
|
0
|
|
|
0
|
$ipRouteProto = $session->{$prefix}{ipRouteProto}{$idx} || -1; |
183
|
0
|
|
0
|
|
|
0
|
$ipRouteProtoString = $ip_route_proto_enum{$ipRouteProto} || 'unknown'; |
184
|
0
|
|
|
|
|
0
|
$ipRouteAge = $session->{$prefix}{ipRouteAge}{$idx}; |
185
|
0
|
|
|
|
|
0
|
$ipRouteInfo = $session->{$prefix}{ipRouteInfo}{$idx}; |
186
|
|
|
|
|
|
|
|
187
|
0
|
|
|
|
|
0
|
push @route_entries, |
188
|
|
|
|
|
|
|
{ |
189
|
|
|
|
|
|
|
ipRouteDest => $ipRouteDest, |
190
|
|
|
|
|
|
|
ipRouteMask => $ipRouteMask, |
191
|
|
|
|
|
|
|
ipRouteNextHop => $ipRouteNextHop, |
192
|
|
|
|
|
|
|
ipRouteIfIndex => $ipRouteIfIndex, |
193
|
|
|
|
|
|
|
ipRouteMetric1 => $ipRouteMetric1, |
194
|
|
|
|
|
|
|
ipRouteMetric2 => $ipRouteMetric2, |
195
|
|
|
|
|
|
|
ipRouteMetric3 => $ipRouteMetric3, |
196
|
|
|
|
|
|
|
ipRouteMetric4 => $ipRouteMetric4, |
197
|
|
|
|
|
|
|
ipRouteMetric5 => $ipRouteMetric5, |
198
|
|
|
|
|
|
|
ipRouteType => $ipRouteType, |
199
|
|
|
|
|
|
|
ipRouteTypeString => $ipRouteTypeString, |
200
|
|
|
|
|
|
|
ipRouteProto => $ipRouteProto, |
201
|
|
|
|
|
|
|
ipRouteProtoString => $ipRouteProtoString, |
202
|
|
|
|
|
|
|
ipRouteAge => $ipRouteAge, |
203
|
|
|
|
|
|
|
ipRouteInfo => $ipRouteInfo, |
204
|
|
|
|
|
|
|
}; |
205
|
|
|
|
|
|
|
} |
206
|
|
|
|
|
|
|
|
207
|
0
|
|
|
|
|
0
|
return @route_entries; |
208
|
|
|
|
|
|
|
} |
209
|
|
|
|
|
|
|
|
210
|
|
|
|
|
|
|
=head1 INITIALIZATION |
211
|
|
|
|
|
|
|
|
212
|
|
|
|
|
|
|
=head2 B<< OBJ->_init($reload) >> |
213
|
|
|
|
|
|
|
|
214
|
|
|
|
|
|
|
Fetch the mib-II ipRouteTable from the host. Don't call this method direct! |
215
|
|
|
|
|
|
|
|
216
|
|
|
|
|
|
|
=cut |
217
|
|
|
|
|
|
|
|
218
|
|
|
|
|
|
|
sub _init { |
219
|
4
|
|
|
4
|
|
6341
|
my ($session, $reload) = @_; |
220
|
|
|
|
|
|
|
|
221
|
|
|
|
|
|
|
die "$prefix already initalized and reload not forced.\n" |
222
|
4
|
50
|
33
|
|
|
32
|
if $session->{$prefix}{__initialized} && not $reload; |
223
|
|
|
|
|
|
|
|
224
|
|
|
|
|
|
|
# populate the object with needed mib values |
225
|
|
|
|
|
|
|
# |
226
|
|
|
|
|
|
|
# initialize the object for ipRouteTable infos |
227
|
4
|
|
|
|
|
10
|
_fetch_ip_route_tbl($session); |
228
|
4
|
100
|
|
|
|
19
|
return if $session->error; |
229
|
|
|
|
|
|
|
|
230
|
2
|
|
|
|
|
13
|
return 1; |
231
|
|
|
|
|
|
|
} |
232
|
|
|
|
|
|
|
|
233
|
|
|
|
|
|
|
=head1 PRIVATE METHODS |
234
|
|
|
|
|
|
|
|
235
|
|
|
|
|
|
|
Only for developers or maintainers. |
236
|
|
|
|
|
|
|
|
237
|
|
|
|
|
|
|
=head2 B<< _fetch_ip_route_tbl($session) >> |
238
|
|
|
|
|
|
|
|
239
|
|
|
|
|
|
|
Fetch the ipRouteTable once during object initialization. |
240
|
|
|
|
|
|
|
|
241
|
|
|
|
|
|
|
=cut |
242
|
|
|
|
|
|
|
|
243
|
|
|
|
|
|
|
sub _fetch_ip_route_tbl { |
244
|
4
|
|
|
4
|
|
7
|
my $session = shift; |
245
|
4
|
|
|
|
|
4
|
my $result; |
246
|
|
|
|
|
|
|
|
247
|
|
|
|
|
|
|
# fetch the ipRouteTable |
248
|
4
|
100
|
|
|
|
22
|
$result = $session->get_table( |
249
|
|
|
|
|
|
|
-baseoid => IP_ROUTE_TABLE, |
250
|
|
|
|
|
|
|
|
251
|
|
|
|
|
|
|
# define callback if in nonblocking mode |
252
|
|
|
|
|
|
|
$session->nonblocking |
253
|
|
|
|
|
|
|
? ( -callback => \&_ip_route_tbl_cb ) : (), |
254
|
|
|
|
|
|
|
); |
255
|
|
|
|
|
|
|
|
256
|
4
|
100
|
|
|
|
2006992
|
unless (defined $result) { |
257
|
|
|
|
|
|
|
# Net::SNMP looses sometimes error messages in nonblocking |
258
|
|
|
|
|
|
|
# mode, so we save them in an extra buffer |
259
|
2
|
|
|
|
|
12
|
my $err_msg = $session->error; |
260
|
2
|
50
|
|
|
|
26
|
push_error($session, "$prefix: $err_msg") if $err_msg; |
261
|
2
|
|
|
|
|
75
|
return; |
262
|
|
|
|
|
|
|
} |
263
|
|
|
|
|
|
|
|
264
|
|
|
|
|
|
|
# in nonblocking mode the callback will be called asynchronously |
265
|
2
|
50
|
|
|
|
7
|
return 1 if $session->nonblocking; |
266
|
|
|
|
|
|
|
|
267
|
|
|
|
|
|
|
# ok we are in synchronous mode, call the result mangling function |
268
|
|
|
|
|
|
|
# by hand |
269
|
0
|
|
|
|
|
0
|
_ip_route_tbl_cb($session); |
270
|
|
|
|
|
|
|
|
271
|
|
|
|
|
|
|
} |
272
|
|
|
|
|
|
|
|
273
|
|
|
|
|
|
|
=head2 B<< _ip_route_tbl_cb($session) >> |
274
|
|
|
|
|
|
|
|
275
|
|
|
|
|
|
|
The callback for _fetch_ip_route_tbl(). |
276
|
|
|
|
|
|
|
|
277
|
|
|
|
|
|
|
=cut |
278
|
|
|
|
|
|
|
|
279
|
|
|
|
|
|
|
sub _ip_route_tbl_cb { |
280
|
2
|
|
|
2
|
|
2004070
|
my $session = shift; |
281
|
2
|
|
|
|
|
8
|
my $vbl = $session->var_bind_list; |
282
|
|
|
|
|
|
|
|
283
|
2
|
50
|
|
|
|
16
|
unless (defined $vbl) { |
284
|
|
|
|
|
|
|
# Net::SNMP looses sometimes error messages in nonblocking |
285
|
|
|
|
|
|
|
# mode, so we save them in an extra buffer |
286
|
2
|
|
|
|
|
8
|
my $err_msg = $session->error; |
287
|
2
|
50
|
|
|
|
28
|
push_error($session, "$prefix: $err_msg") if $err_msg; |
288
|
2
|
|
|
|
|
55
|
return; |
289
|
|
|
|
|
|
|
} |
290
|
|
|
|
|
|
|
|
291
|
|
|
|
|
|
|
# mangle result table to get plain idx->value |
292
|
|
|
|
|
|
|
# |
293
|
|
|
|
|
|
|
# result hashes: ipRouteDest => values |
294
|
|
|
|
|
|
|
# |
295
|
|
|
|
|
|
|
|
296
|
|
|
|
|
|
|
$session->{$prefix}{ipRouteIfIndex} = |
297
|
0
|
|
|
|
|
|
idx2val( $vbl, IP_ROUTE_IFINDEX, undef, undef, ); |
298
|
|
|
|
|
|
|
|
299
|
|
|
|
|
|
|
$session->{$prefix}{ipRouteMetric1} = |
300
|
0
|
|
|
|
|
|
idx2val( $vbl, IP_ROUTE_METRIC1, undef, undef, ); |
301
|
|
|
|
|
|
|
|
302
|
|
|
|
|
|
|
$session->{$prefix}{ipRouteMetric2} = |
303
|
0
|
|
|
|
|
|
idx2val( $vbl, IP_ROUTE_METRIC2, undef, undef, ); |
304
|
|
|
|
|
|
|
|
305
|
|
|
|
|
|
|
$session->{$prefix}{ipRouteMetric3} = |
306
|
0
|
|
|
|
|
|
idx2val( $vbl, IP_ROUTE_METRIC3, undef, undef, ); |
307
|
|
|
|
|
|
|
|
308
|
|
|
|
|
|
|
$session->{$prefix}{ipRouteMetric4} = |
309
|
0
|
|
|
|
|
|
idx2val( $vbl, IP_ROUTE_METRIC4, undef, undef, ); |
310
|
|
|
|
|
|
|
|
311
|
|
|
|
|
|
|
$session->{$prefix}{ipRouteMetric5} = |
312
|
0
|
|
|
|
|
|
idx2val( $vbl, IP_ROUTE_METRIC5, undef, undef, ); |
313
|
|
|
|
|
|
|
|
314
|
|
|
|
|
|
|
$session->{$prefix}{ipRouteNextHop} = |
315
|
0
|
|
|
|
|
|
idx2val( $vbl, IP_ROUTE_NEXTHOP, undef, undef, ); |
316
|
|
|
|
|
|
|
|
317
|
|
|
|
|
|
|
$session->{$prefix}{ipRouteType} = |
318
|
0
|
|
|
|
|
|
idx2val( $vbl, IP_ROUTE_TYPE, undef, undef, ); |
319
|
|
|
|
|
|
|
|
320
|
|
|
|
|
|
|
$session->{$prefix}{ipRouteProto} = |
321
|
0
|
|
|
|
|
|
idx2val( $vbl, IP_ROUTE_PROTO, undef, undef, ); |
322
|
|
|
|
|
|
|
|
323
|
|
|
|
|
|
|
$session->{$prefix}{ipRouteAge} = |
324
|
0
|
|
|
|
|
|
idx2val( $vbl, IP_ROUTE_AGE, undef, undef, ); |
325
|
|
|
|
|
|
|
|
326
|
|
|
|
|
|
|
$session->{$prefix}{ipRouteMask} = |
327
|
0
|
|
|
|
|
|
idx2val( $vbl, IP_ROUTE_MASK, undef, undef, ); |
328
|
|
|
|
|
|
|
|
329
|
|
|
|
|
|
|
$session->{$prefix}{ipRouteInfo} = |
330
|
0
|
|
|
|
|
|
idx2val( $vbl, IP_ROUTE_INFO, undef, undef, ); |
331
|
|
|
|
|
|
|
|
332
|
0
|
|
|
|
|
|
$session->{$prefix}{__initialized}++; |
333
|
|
|
|
|
|
|
} |
334
|
|
|
|
|
|
|
|
335
|
|
|
|
|
|
|
unless ( caller() ) { |
336
|
|
|
|
|
|
|
print "$prefix compiles and initializes successful.\n"; |
337
|
|
|
|
|
|
|
} |
338
|
|
|
|
|
|
|
|
339
|
|
|
|
|
|
|
=head1 SEE ALSO |
340
|
|
|
|
|
|
|
|
341
|
|
|
|
|
|
|
L<< Net::SNMP::Mixin >> |
342
|
|
|
|
|
|
|
|
343
|
|
|
|
|
|
|
=head1 REQUIREMENTS |
344
|
|
|
|
|
|
|
|
345
|
|
|
|
|
|
|
L<< Net::SNMP >>, L<< Net::SNMP::Mixin >> |
346
|
|
|
|
|
|
|
|
347
|
|
|
|
|
|
|
=head1 BUGS, PATCHES & FIXES |
348
|
|
|
|
|
|
|
|
349
|
|
|
|
|
|
|
There are no known bugs at the time of this release. However, if you spot a bug or are experiencing difficulties that are not explained within the POD documentation, please submit a bug to the RT system (see link below). However, it would help greatly if you are able to pinpoint problems or even supply a patch. |
350
|
|
|
|
|
|
|
|
351
|
|
|
|
|
|
|
Fixes are dependant upon their severity and my availablity. Should a fix not be forthcoming, please feel free to (politely) remind me by sending an email to gaissmai@cpan.org . |
352
|
|
|
|
|
|
|
|
353
|
|
|
|
|
|
|
RT: http://rt.cpan.org/Public/Dist/Display.html?Name=Net-SNMP-Mixin-IpRouteTable |
354
|
|
|
|
|
|
|
|
355
|
|
|
|
|
|
|
|
356
|
|
|
|
|
|
|
=head1 AUTHOR |
357
|
|
|
|
|
|
|
|
358
|
|
|
|
|
|
|
Karl Gaissmaier |
359
|
|
|
|
|
|
|
|
360
|
|
|
|
|
|
|
=head1 COPYRIGHT & LICENSE |
361
|
|
|
|
|
|
|
|
362
|
|
|
|
|
|
|
Copyright 2008 Karl Gaissmaier, all rights reserved. |
363
|
|
|
|
|
|
|
|
364
|
|
|
|
|
|
|
This program is free software; you can redistribute it and/or modify it |
365
|
|
|
|
|
|
|
under the same terms as Perl itself. |
366
|
|
|
|
|
|
|
|
367
|
|
|
|
|
|
|
=cut |
368
|
|
|
|
|
|
|
|
369
|
|
|
|
|
|
|
1; |
370
|
|
|
|
|
|
|
|
371
|
|
|
|
|
|
|
# vim: sw=2 |