+
+# Switch ports
+my $OID_1dBasePortTable = '1.3.6.1.2.1.17.1.4';
+my $port_table = my_get_table({
+ 'ifindex' => "$OID_1dBasePortTable.1.2",
+});
+print "# Switch ports:\n", Dumper($port_table) if $debug;
+
+for my $port (keys %$port_table) {
+ my $if = $if_table->{$port_table->{$port}->{ifindex}} or die "Port table refers to unknown iface";
+ $if->{switch_port} = $port;
+}
+
+print "# Extended interface table:\n", Dumper($if_table) if $debug;