aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGuy Harris <guy@alum.mit.edu>2002-05-02 11:07:47 +0000
committerGuy Harris <guy@alum.mit.edu>2002-05-02 11:07:47 +0000
commit50e7338c515739611f77a1a93ccb9dbc984c51dd (patch)
tree2ebff4ab7fc8ee993ebc1453062c90a81972e86a
parent8245e425ff56b9478c867d2cb660b510c5f1fe42 (diff)
From Joerg Mayer:
Prefer IEEE entries over CaveBear entries, as the former list seems to be the better maintained one. svn path=/trunk/; revision=5362
-rwxr-xr-xmake-manuf34
1 files changed, 18 insertions, 16 deletions
diff --git a/make-manuf b/make-manuf
index 7d5413d03f..c84aca81f9 100755
--- a/make-manuf
+++ b/make-manuf
@@ -1,6 +1,6 @@
#!/usr/bin/perl -w
#
-# $Id: make-manuf,v 1.4 2002/03/14 21:22:11 guy Exp $
+# $Id: make-manuf,v 1.5 2002/05/02 11:07:47 guy Exp $
#
# Make-manuf - Creates a file containing ethernet OUIs and their
# company IDs. It merges the databases at
@@ -77,33 +77,35 @@ while ($line = <TMPL>) {
}
}
-foreach $line (split(/\n/, $cb_list)) {
- if (($oui, $manuf) = ($line =~ /^($cb_re)\s+(\S.*)$/)) {
- ($h1, $h2, $h3) = ($oui =~ /($hp)($hp)($hp)/); # The CaveBear bytes have no separators
- $oui = "$h1:$h2:$h3";
+# Add IEEE entries for OUIs not yet known.
+foreach $line (split(/\n/, $ieee_list)) {
+ if (($oui, $manuf) = ($line =~ /^($ieee_re)\s+\(hex\)\s+(\S.*)$/)) {
+ $oui =~ tr /-/:/; # The IEEE bytes are separated by dashes.
# Ensure OUI is all upper-case
$oui =~ tr/a-f/A-F/;
if (exists $oui_list{$oui}) {
- printf "$oui - Skipping CaveBear \"$manuf\" in favor of \"$oui_list{$oui}\"\n";
- $cb_skipped++;
+ printf "$oui - Skipping IEEE \"$manuf\" in favor of \"$oui_list{$oui}\"\n";
+ $ieee_skipped++;
} else {
$oui_list{$oui} = $manuf;
- $cb_added++;
+ $ieee_added++;
}
}
}
-foreach $line (split(/\n/, $ieee_list)) {
- if (($oui, $manuf) = ($line =~ /^($ieee_re)\s+\(hex\)\s+(\S.*)$/)) {
- $oui =~ tr /-/:/; # The IEEE bytes are separated by dashes.
+# Add CaveBear entries for OUIs not yet known.
+foreach $line (split(/\n/, $cb_list)) {
+ if (($oui, $manuf) = ($line =~ /^($cb_re)\s+(\S.*)$/)) {
+ ($h1, $h2, $h3) = ($oui =~ /($hp)($hp)($hp)/); # The CaveBear bytes have no separators
+ $oui = "$h1:$h2:$h3";
# Ensure OUI is all upper-case
$oui =~ tr/a-f/A-F/;
if (exists $oui_list{$oui}) {
- printf "$oui - Skipping IEEE \"$manuf\" in favor of \"$oui_list{$oui}\"\n";
- $ieee_skipped++;
+ printf "$oui - Skipping CaveBear \"$manuf\" in favor of \"$oui_list{$oui}\"\n";
+ $cb_skipped++;
} else {
$oui_list{$oui} = $manuf;
- $ieee_added++;
+ $cb_added++;
}
}
}
@@ -115,10 +117,10 @@ foreach $oui (sort(keys %oui_list)) {
$total_added = $tmpl_added + $cb_added + $ieee_added;
print <<"Fin"
Original entries : $tmpl_added
-CaveBear added : $cb_added
IEEE added : $ieee_added
+CaveBear added : $cb_added
Total : $total_added
-CaveBear skipped : $cb_skipped
IEEE skipped : $ieee_skipped
+CaveBear skipped : $cb_skipped
Fin