Adam Smith
unread,Jan 10, 2011, 2:24:49 PM1/10/11Sign in to reply to author
Sign in to forward
You do not have permission to delete messages in this group
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to Xerela Developers Group
I would like to submit a patch to the IOS adapter Parsers.pm. I
noticed on my 4507s that the mac address table has a extra column
which caused the regex in parse_mac_table to never match.
@@ -179,7 +179,13 @@
my ( $in, $out ) = @_;
my $openedMacTable = 0;
my $regex;
- if ( $in->{mac} =~ /Vlan\s*Mac Address\s*Type\s*Ports/i )
+
+ # Some IOS/hardware include a extra Protocols column
+ if ( $in->{mac} =~ /Vlan\s*Mac Address\s*Type\s*Protocols
\s*Port/i )
+ {
+ $regex = '(\S+)\s*([\da-f.]{14})\s*\S+\s*\S+\s*(\S+)';
+ }
+ elsif ( $in->{mac} =~ /Vlan\s*Mac Address\s*Type\s*Ports/i )
{
$regex = '(\S+)\s*([\da-f.]{14})\s*\S+\s*(\S+)';
}