line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
# |
2
|
|
|
|
|
|
|
# (c) Jan Gehring |
3
|
|
|
|
|
|
|
# |
4
|
|
|
|
|
|
|
|
5
|
|
|
|
|
|
|
package Rex::Inventory::Hal::Object::Net; |
6
|
|
|
|
|
|
|
|
7
|
1
|
|
|
1
|
|
16
|
use v5.12.5; |
|
1
|
|
|
|
|
3
|
|
8
|
1
|
|
|
1
|
|
5
|
use warnings; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
55
|
|
9
|
|
|
|
|
|
|
|
10
|
|
|
|
|
|
|
our $VERSION = '1.14.2.3'; # TRIAL VERSION |
11
|
|
|
|
|
|
|
|
12
|
1
|
|
|
1
|
|
7
|
use Rex::Inventory::Hal::Object; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
8
|
|
13
|
1
|
|
|
1
|
|
24
|
use base qw(Rex::Inventory::Hal::Object); |
|
1
|
|
|
|
|
1
|
|
|
1
|
|
|
|
|
183
|
|
14
|
|
|
|
|
|
|
|
15
|
|
|
|
|
|
|
__PACKAGE__->has( |
16
|
|
|
|
|
|
|
[ |
17
|
|
|
|
|
|
|
|
18
|
|
|
|
|
|
|
{ key => "net.interface", accessor => "dev", }, |
19
|
|
|
|
|
|
|
{ key => "net.address", accessor => "mac", }, |
20
|
|
|
|
|
|
|
{ key => "info.product", accessor => "product", parent => 1, }, |
21
|
|
|
|
|
|
|
{ key => "info.vendor", accessor => "vendor", parent => 1, }, |
22
|
|
|
|
|
|
|
|
23
|
|
|
|
|
|
|
] |
24
|
|
|
|
|
|
|
); |
25
|
|
|
|
|
|
|
|
26
|
|
|
|
|
|
|
sub new { |
27
|
0
|
|
|
0
|
0
|
|
my $that = shift; |
28
|
0
|
|
0
|
|
|
|
my $proto = ref($that) || $that; |
29
|
0
|
|
|
|
|
|
my $self = {@_}; |
30
|
|
|
|
|
|
|
|
31
|
0
|
|
|
|
|
|
bless( $self, $proto ); |
32
|
|
|
|
|
|
|
|
33
|
0
|
|
|
|
|
|
return $self; |
34
|
|
|
|
|
|
|
} |
35
|
|
|
|
|
|
|
|
36
|
|
|
|
|
|
|
1; |