@@ -19,6 +19,10 @@ use constant printerinfomation => net_peripheral . '.4.2.1.5.5' ;
19
19
use constant brInfoSerialNumber => printerinfomation . ' .1.0' ;
20
20
use constant brScanCountCounter => printerinfomation . ' .54.2.2.1.3.3' ;
21
21
22
+ use constant brMultiIFConfigureEntry => brother . ' .2.4.4.1240.1.5.1' ;
23
+ use constant brMultiIFType => brMultiIFConfigureEntry . ' .2' ;
24
+ use constant brMultiIFNodeType => brMultiIFConfigureEntry . ' .8' ;
25
+
22
26
# Brother NetConfig
23
27
use constant brnetconfig => brother . ' .2.4.3.1240' ;
24
28
use constant brconfig => brnetconfig . ' .1' ;
@@ -77,6 +81,37 @@ sub getModel {
77
81
return $model ;
78
82
}
79
83
84
+ sub updatePortIfType {
85
+ my ($self ) = @_ ;
86
+
87
+ my $device = $self -> device
88
+ or return ;
89
+
90
+ # Get list of device ports
91
+ my $ports = $device -> {PORTS }-> {PORT };
92
+
93
+ # Get list of device ports types (lan(1)/wirelesslan(2))
94
+ my $brMultiIFType = $self -> walk(brMultiIFType)
95
+ or return ;
96
+
97
+ # Get list of device ports names
98
+ my $brMultiIFNodeType = $self -> walk(brMultiIFNodeType)
99
+ or return ;
100
+
101
+ foreach my $index (keys %{$brMultiIFType }) {
102
+ foreach my $port (keys %{$ports }) {
103
+ next unless defined ($ports -> {$port }-> {IFNAME }) && defined ($brMultiIFNodeType -> {$index });
104
+ if ($ports -> {$port }-> {IFNAME } eq getCanonicalString($brMultiIFNodeType -> {$index })) {
105
+ # wirelesslan(2)
106
+ if (defined ($brMultiIFType -> {$index }) && isInteger($brMultiIFType -> {$index }) && int ($brMultiIFType -> {$index }) == 2) {
107
+ # ieee80211(71)
108
+ $ports -> {$port }-> {IFTYPE } = 71
109
+ }
110
+ }
111
+ }
112
+ }
113
+ }
114
+
80
115
sub run {
81
116
my ($self ) = @_ ;
82
117
@@ -92,6 +127,8 @@ sub run {
92
127
or next ;
93
128
$device -> {PAGECOUNTERS }-> {$counter } = $count ;
94
129
}
130
+
131
+ $self -> updatePortIfType();
95
132
}
96
133
97
134
1;
0 commit comments