aboutsummaryrefslogtreecommitdiffstats
path: root/tools
diff options
context:
space:
mode:
authorGerald Combs <gerald@zing.org>2016-08-21 11:23:20 -0700
committerAnders Broman <a.broman58@gmail.com>2016-08-22 04:46:52 +0000
commitf06234154079afe61671471dfe97d59b282f8e21 (patch)
tree669a4864d2559860bec3add9f0fa8daed1684495 /tools
parent6a7d5df1ae5bf0d0d5e1bf33e6da2d6973046acd (diff)
Merge the CaveBear list into manuf.tmpl.
If the following lines at the top of "Ethernet.txt" are anything to go by ---- $Revision: 2.83 $ $Date: 1999/03/09 11:36:19 $ $Author: map $ $Id: Ethernet.txt,v 2.83 1999/03/09 11:36:19 map Exp $ ---- we've been fetching the same list over and over for quite some time. Go ahead and merge the CaveBear list with manuf.tmpl and stop fetching it remotely. Fixup the way we split the lines we get from the IEEE while we're here, otherwise we log carriage returns in the middle of lines. The following CaveBear lines were skipped during the merge: Change-Id: I2110a7480a01a1bc5cbb6adf858acd9b5f75204c 00:00:10 - Skipping CaveBear "Hughes LAN Systems (formerly Sytek)" in favor of "Hughes" 00:00:11 - Skipping CaveBear "Tektronix" in favor of "Tektrnix" 00:00:1A - Skipping CaveBear "AMD (?)" in favor of "AMD" 00:00:20 - Skipping CaveBear "DIAB (Data Intdustrier AB)" in favor of "DIAB" 00:00:21 - Skipping CaveBear "SC&C (PAM Soft&Hardware also reported)" in favor of "SC&C" 00:00:24 - Skipping CaveBear "Olicom" in favor of "Olicom" 00:00:3D - Skipping CaveBear "AT&T" in favor of "AT&T" 00:00:46 - Skipping CaveBear "ISC-Bunker Ramo, An Olivetti Company" in favor of "ISC-BR" 00:00:4B - Skipping CaveBear "APT -ICL also reported" in favor of "APT" 00:00:55 - Skipping CaveBear "AT&T" in favor of "AT&T" 00:00:5A - Skipping CaveBear "Xerox 806 (unregistered)" in favor of "SkSchnei # SK (Schneider & Koch in Europe and Syskonnect outside of Europe)" 00:00:62 - Skipping CaveBear "Honeywell" in favor of "Hneywell # Honeywell" 00:00:63 - Skipping CaveBear "Hewlett-Packard LanProbe" in favor of "HP" 00:00:69 - Skipping CaveBear "Concord Communications, Inc (although someone said Silicon Graphics)" in favor of "SGI" 00:00:6B - Skipping CaveBear "MIPS" in favor of "MIPS" 00:00:7A - Skipping CaveBear "Ardent" in favor of "Ardent" 00:00:7D - Skipping CaveBear "Cray Research Superservers,Inc [Also Harris (3M) (old)]" in favor of "Cray" 00:00:A3 - Skipping CaveBear "Network Application Technology (NAT)" in favor of "NAT" 00:00:A5 - Skipping CaveBear "Compatible Systems Corporation" in favor of "CSC" 00:00:A7 - Skipping CaveBear "Network Computing Devices (NCD) X-terminals" in favor of "NCD" 00:00:A9 - Skipping CaveBear "Network Systems" in favor of "NetSys # Network Systems" 00:00:DD - Skipping CaveBear "Gould" in favor of "Gould" 00:00:DE - Skipping CaveBear "Unigraph" in favor of "Unigraph" 00:00:E1 - Skipping CaveBear "Hitachi (laptop built-in)" in favor of "Hitachi" 00:00:F6 - Skipping CaveBear "A.M.C. (Applied Microsystems Corp.)" in favor of "Madge" 00:01:FA - Skipping CaveBear "Compaq (PageMarq printers)" in favor of "Compaq" 00:02:04 - Skipping CaveBear "Novell NE3200" in favor of "Novell" 00:07:01 - Skipping CaveBear "Racal-Datacom" in favor of "Cisco # RACAL-DATACOM" 00:20:85 - Skipping CaveBear "3COM SuperStack II UPS management module" in favor of "3Com" 00:40:0B - Skipping CaveBear "Crescendo (now owned by Cisco)" in favor of "Cresc" 00:40:96 - Skipping CaveBear "Telesystems SLW Inc" in favor of "Aironet # Cisco Systems, Inc." 00:60:B0 - Skipping CaveBear "Hewlett-Packard" in favor of "HP" 00:80:0F - Skipping CaveBear "SMC (Standard Microsystem Corp.)" in favor of "SMC" 00:80:1C - Skipping CaveBear "Cisco" in favor of "Cisco # NEWPORT SYSTEMS SOLUTIONS" 00:80:96 - Skipping CaveBear "HDS (Human Designed Systems) X terminals" in favor of "HDS" 00:80:AD - Skipping CaveBear "CNet Technology Used by Telebit (among others)" in favor of "Telebit" 00:90:B1 - Skipping CaveBear "Cisco" in favor of "Cisco" 00:E0:98 - Skipping CaveBear "Linksys PCMCIA card" in favor of "Trend" 02:07:01 - Skipping CaveBear "Racal-Datacom" in favor of "Interlan # Interlan [now Racal-InterLAN] DEC (UNIBUS or QBUS), Apollo, Cisco" 02:CF:1F - Skipping CaveBear "CMC Masscomp; Silicon Graphics; Prime EXL" in favor of "CMC" 08:00:02 - Skipping CaveBear "3Com (formerly Bridge)" in favor of "3Com" 08:00:03 - Skipping CaveBear "ACC (Advanced Computer Communications)" in favor of "ACC" 08:00:08 - Skipping CaveBear "BBN (Bolt Beranek and Newman, Inc.)" in favor of "BBN" 08:00:09 - Skipping CaveBear "Hewlett-Packard" in favor of "HP" 08:00:1A - Skipping CaveBear "Tiara? (used to have Data General)" in favor of "DataGenl # Data General" 08:00:38 - Skipping CaveBear "Bull" in favor of "Bull" 08:00:3E - Skipping CaveBear "Motorola VME bus processor modules" in favor of "Motorola" 08:00:69 - Skipping CaveBear "Silicon Graphics" in favor of "SGI" 08:00:79 - Skipping CaveBear "Silicon Graphics" in favor of "SGI" 08:00:90 - Skipping CaveBear "Retix, Inc. Bridges" in favor of "Retix" 09:00:6A - Skipping CaveBear "AT&T" in favor of "AT&T" 10:00:90 - Skipping CaveBear "Hewlett-Packard Advisor products" in favor of "HP" 10:00:D4 - Skipping CaveBear "DEC" in favor of "DEC" 3C:00:00 - Skipping CaveBear "3Com dual function (V.34 modem + Ethernet) card" in favor of "3Com" 44:45:53 - Skipping CaveBear "Microsoft (Windows95 internal "adapters")" in favor of "Microsoft" Reviewed-on: https://code.wireshark.org/review/17212 Reviewed-by: Anders Broman <a.broman58@gmail.com>
Diffstat (limited to 'tools')
-rwxr-xr-xtools/make-manuf50
1 files changed, 11 insertions, 39 deletions
diff --git a/tools/make-manuf b/tools/make-manuf
index 7c51b13167..3710ab89f0 100755
--- a/tools/make-manuf
+++ b/tools/make-manuf
@@ -1,13 +1,14 @@
#!/usr/bin/perl -w
#
# Make-manuf - Creates a file containing ethernet OUIs and their
-# company IDs. It merges the databases at IEEE and
+# company IDs. It merges the databases at IEEE with entries in our
+# template file. Our file in turn contains entries from
# http://www.cavebear.com/archive/cavebear/Ethernet/Ethernet.txt
-# with entries in our template file.
+# along with our own.
#
# The script reads the comments at the top of "manuf.tmpl" and writes
# them to "manuf". It then joins the manufacturer listing in "manuf.tmpl"
-# with the listing in "oui.txt", "iab.txt", etc, with the entries in
+# with the listing in "oui.txt", "iab.txt", etc, with the entries in
# "manuf.tmpl" taking precedence.
# LWP is part of the standard Perl module libwww
@@ -37,19 +38,14 @@ $oui_url = "http://standards.ieee.org/develop/regauth/oui/oui.txt";
$iab_url = "http://standards.ieee.org/develop/regauth/iab/iab.txt";
$oui28_url = "http://standards.ieee.org/develop/regauth/oui28/oui28.txt";
$oui36_url = "http://standards.ieee.org/develop/regauth/oui36/oui36.txt";
-$cb_url = "http://www.cavebear.com/archive/cavebear/Ethernet/Ethernet.txt";
%oui_list = ();
$hp = "[0-9a-fA-F]{2}";
$oui_re = "$hp:$hp:$hp";
-$cb_re = "$hp$hp$hp";
$ieee_re = "$hp-$hp-$hp";
$min_entries = 100;
$tmpl_added = 0;
-$cb_added = 0;
-$cb_skipped = 0;
-$cb_total = 0;
$oui_added = 0;
$oui_skipped = 0;
$oui_total = 0;
@@ -124,7 +120,7 @@ while ($line = <TMPL>) {
$ieee_list = fetch($iab_url);
-foreach $line (split(/\n/, $ieee_list)) {
+foreach $line (split(/[\r\n]+/, $ieee_list)) {
# determine the OUI used for IAB (currently only 00-50-C2)
if (($iab_tmp, $manuf) = ($line =~ /^\s*($ieee_re)\s+\(hex\)\s+(\S.*)$/)) {
$iab_base = $iab_tmp;
@@ -152,7 +148,8 @@ if ($iab_total < $min_entries) { die "Too few IAB entries ($iab_total)\n"; }
$ieee_list = fetch($oui28_url);
-foreach $line (split(/\n/, $ieee_list)) {
+foreach $line (split(/[\r\n]+/, $ieee_list)) {
+ chomp($line);
# determine the OUI used for OUI-28
if (($oui28_tmp, $manuf) = ($line =~ /^\s*($ieee_re)\s+\(hex\)\s+(\S.*)$/)) {
$oui28_base = $oui28_tmp;
@@ -180,7 +177,8 @@ if ($oui28_total < $min_entries) { die "Too few OUI-28 entries ($oui28_total)\n"
$ieee_list = fetch($oui36_url);
-foreach $line (split(/\n/, $ieee_list)) {
+foreach $line (split(/[\r\n]+/, $ieee_list)) {
+ chomp($line);
# determine the OUI used for OUI-36 (currently only 00-1B-C5)
if (($oui36_tmp, $manuf) = ($line =~ /^\s*($ieee_re)\s+\(hex\)\s+(\S.*)$/)) {
$oui36_base = $oui36_tmp;
@@ -208,7 +206,7 @@ if ($oui36_total < $min_entries) { die "Too few OUI-36 entries ($oui36_total)\n"
$ieee_list = fetch($oui_url);
-foreach $line (split(/\n/, $ieee_list)) {
+foreach $line (split(/[\r\n]+/, $ieee_list)) {
if (($oui, $manuf) = ($line =~ /^\s*($ieee_re)\s+\(hex\)\s+(\S.*)$/)) {
$oui =~ tr /-/:/; # The IEEE bytes are separated by dashes.
# Ensure OUI is all upper-case
@@ -226,30 +224,6 @@ foreach $line (split(/\n/, $ieee_list)) {
if ($oui_total < $min_entries) { die "Too few OUI entries ($oui_total)\n"; }
-# Add CaveBear entries for OUIs not yet known.
-
-$cb_list = fetch($cb_url);
-
-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 CaveBear \"$manuf\" in favor of \"$oui_list{$oui}\"\n";
- $cb_skipped++;
- } else {
- printf "$oui - adding \"$manuf\" from CaveBear\n";
- $oui_list{$oui} = &shorten($manuf);
- $cb_added++;
- }
- }
- $cb_total++;
-}
-
-if ($cb_total < $min_entries) { die "Too few CaveBear entries ($cb_total)\n"; }
-
# Write output file
open (OUT, "> $outfile") ||
@@ -279,19 +253,17 @@ while ($line = <WKATMPL>) {
print(OUT "$line\n");
}
-$total_added = $tmpl_added + $cb_added + $oui_added + $iab_added;
+$total_added = $tmpl_added + $oui_added + $iab_added;
print <<"Fin"
Original entries : $tmpl_added
IEEE OUI added : $oui_added
IEEE IAB added : $iab_added
IEEE OUI28 added : $oui28_added
IEEE OUI36 added : $oui36_added
-CaveBear added : $cb_added
Total : $total_added
IEEE OUI skipped : $oui_skipped
IEEE IAB skipped : $iab_skipped
IEEE OUI28 skipd : $oui28_skipped
IEEE OUI36 skipd : $oui36_skipped
-CaveBear skipped : $cb_skipped
Fin