From 62a193bdb17d5185c06c23df79428505bff95cbc Mon Sep 17 00:00:00 2001 From: Dobrica Pavlinusic Date: Tue, 17 Jul 2018 10:30:19 +0200 Subject: [PATCH] dump switch mac address in snmp format (without leading 0) --- snmp-topology.pl | 2 ++ 1 file changed, 2 insertions(+) diff --git a/snmp-topology.pl b/snmp-topology.pl index 7aa4117..dd1e6d8 100755 --- a/snmp-topology.pl +++ b/snmp-topology.pl @@ -52,8 +52,10 @@ foreach my $file ( @dumps ) { #warn "# stat = ",dump($stat); open(my $fh, '>', '/dev/shm/mac2sw'); +open(my $fh2, '>', '/dev/shm/mac2sw.snmp'); foreach my $mac ( keys %{ $stat->{_mac2sw} } ) { print $fh macfmt($mac), " ", $stat->{_mac2sw}->{$mac}, "\n"; + print $fh $mac, " ", $stat->{_mac2sw}->{$mac}, "\n"; }; # XXX inject additional mac in filter to include wap devices -- 2.20.1