2000-11-23 18:22:00 +00:00
|
|
|
#!/usr/bin/perl -w
|
|
|
|
#
|
|
|
|
# Make-manuf - Creates a file containing ethernet OUIs and their
|
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>
2016-08-21 18:23:20 +00:00
|
|
|
# company IDs. It merges the databases at IEEE with entries in our
|
|
|
|
# template file. Our file in turn contains entries from
|
2011-08-06 15:05:08 +00:00
|
|
|
# http://www.cavebear.com/archive/cavebear/Ethernet/Ethernet.txt
|
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>
2016-08-21 18:23:20 +00:00
|
|
|
# along with our own.
|
2000-11-23 18:22:00 +00:00
|
|
|
#
|
|
|
|
# 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"
|
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>
2016-08-21 18:23:20 +00:00
|
|
|
# with the listing in "oui.txt", "iab.txt", etc, with the entries in
|
2013-03-26 21:53:09 +00:00
|
|
|
# "manuf.tmpl" taking precedence.
|
2000-11-23 18:22:00 +00:00
|
|
|
|
2010-11-30 22:28:34 +00:00
|
|
|
# LWP is part of the standard Perl module libwww
|
2002-11-18 02:49:36 +00:00
|
|
|
|
2012-04-30 21:32:51 +00:00
|
|
|
# As of April 2012 the IEEE content is mostly UTF-8 encoded although some
|
|
|
|
# of the entries feature sequences listed at
|
|
|
|
# http://www.i18nqa.com/debug/utf8-debug.html
|
|
|
|
|
2016-10-02 19:03:34 +00:00
|
|
|
# As of October 2016 the download links at
|
|
|
|
# http://standards.ieee.org/develop/regauth/
|
|
|
|
# point to CSV files. We might want to download and parse those in favor
|
|
|
|
# of our current text munging.
|
|
|
|
|
2008-07-30 11:57:16 +00:00
|
|
|
use Encode;
|
2010-11-30 22:28:34 +00:00
|
|
|
use open ':encoding(utf8)';
|
2017-08-20 17:33:53 +00:00
|
|
|
use Text::Autoformat;
|
2008-07-30 11:57:16 +00:00
|
|
|
|
2000-11-23 18:22:00 +00:00
|
|
|
eval "require LWP::UserAgent;";
|
|
|
|
if( $@ ) {
|
2001-10-07 22:19:14 +00:00
|
|
|
die "LWP isn't installed. It is part of the standard Perl\n" .
|
|
|
|
" module libwww. Bailing.\n";
|
2000-11-23 18:22:00 +00:00
|
|
|
}
|
2012-05-09 19:17:48 +00:00
|
|
|
|
2002-11-18 02:49:36 +00:00
|
|
|
$agent = LWP::UserAgent->new;
|
2011-09-02 16:07:36 +00:00
|
|
|
$agent->env_proxy;
|
2014-02-14 00:17:27 +00:00
|
|
|
$agent->agent("Wireshark make-manuf");
|
2000-11-23 18:22:00 +00:00
|
|
|
|
|
|
|
$template = "manuf.tmpl";
|
|
|
|
$outfile = "manuf";
|
|
|
|
$inheader = 1;
|
2012-04-30 15:40:39 +00:00
|
|
|
$oui_url = "http://standards.ieee.org/develop/regauth/oui/oui.txt";
|
2017-05-22 23:53:25 +00:00
|
|
|
$cid_url = "http://standards.ieee.org/develop/regauth/cid/cid.txt";
|
2012-04-30 15:40:39 +00:00
|
|
|
$iab_url = "http://standards.ieee.org/develop/regauth/iab/iab.txt";
|
2015-10-15 19:04:34 +00:00
|
|
|
$oui28_url = "http://standards.ieee.org/develop/regauth/oui28/oui28.txt";
|
2013-12-29 17:28:12 +00:00
|
|
|
$oui36_url = "http://standards.ieee.org/develop/regauth/oui36/oui36.txt";
|
2000-11-23 18:22:00 +00:00
|
|
|
%oui_list = ();
|
|
|
|
$hp = "[0-9a-fA-F]{2}";
|
|
|
|
$oui_re = "$hp:$hp:$hp";
|
|
|
|
$ieee_re = "$hp-$hp-$hp";
|
|
|
|
|
2016-10-02 19:03:34 +00:00
|
|
|
$min_entries = 1000;
|
2017-05-22 23:53:25 +00:00
|
|
|
$min_cid_entries = 30;
|
2016-10-02 19:03:34 +00:00
|
|
|
$min_total = 27000; # 27196 as of 2016-10-02
|
2013-12-29 17:28:12 +00:00
|
|
|
|
|
|
|
$tmpl_added = 0;
|
|
|
|
$oui_added = 0;
|
|
|
|
$oui_skipped = 0;
|
|
|
|
$oui_total = 0;
|
|
|
|
$iab_added = 0;
|
|
|
|
$iab_skipped = 0;
|
|
|
|
$iab_total = 0;
|
2015-10-15 19:04:34 +00:00
|
|
|
$oui28_added = 0;
|
|
|
|
$oui28_skipped = 0;
|
|
|
|
$oui28_total = 0;
|
2013-03-26 21:53:09 +00:00
|
|
|
$oui36_added = 0;
|
|
|
|
$oui36_skipped = 0;
|
2013-12-29 17:28:12 +00:00
|
|
|
$oui36_total = 0;
|
2017-05-22 23:53:25 +00:00
|
|
|
$cid_skipped = 0;
|
|
|
|
$cid_total = 0;
|
2000-11-23 18:22:00 +00:00
|
|
|
|
2002-11-18 02:49:36 +00:00
|
|
|
sub shorten
|
|
|
|
{
|
2010-11-30 22:28:34 +00:00
|
|
|
my $origmanuf = shift;
|
2016-10-02 19:03:34 +00:00
|
|
|
# Trim leading (probably not needed) & trailing (absolutely needed) space.
|
|
|
|
$origmanuf =~ s/^\s+|\s+$//g;
|
2002-11-18 02:49:36 +00:00
|
|
|
my $manuf = " " . $origmanuf . " ";
|
|
|
|
# Remove any punctuation
|
2005-08-27 15:11:00 +00:00
|
|
|
$manuf =~ tr/',.()/ /;
|
2002-11-18 02:49:36 +00:00
|
|
|
# & isn't needed when Standalone
|
|
|
|
$manuf =~ s/ \& / /g;
|
|
|
|
# Remove any "the", "inc", "plc" ...
|
2009-07-07 05:10:20 +00:00
|
|
|
$manuf =~ s/\s(the|inc|incorporated|plc||systems|corp|corporation|s\/a|a\/s|ab|ag|kg|gmbh|co|company|limited|ltd|holding|spa)(?= )//gi;
|
2002-11-18 02:49:36 +00:00
|
|
|
# Convert to consistent case
|
|
|
|
$manuf =~ s/(\w+)/\u\L$1/g;
|
2003-01-21 20:20:09 +00:00
|
|
|
# Remove all spaces
|
|
|
|
$manuf =~ s/\s+//g;
|
2010-11-30 22:28:34 +00:00
|
|
|
# Truncate all names to a reasonable length, say, 8 characters.
|
|
|
|
# If the string contains UTF-8, this may be substantially more than 8 bytes.
|
|
|
|
$manuf = substr($manuf, 0, 8);
|
2002-11-18 02:49:36 +00:00
|
|
|
|
|
|
|
if ($manuf =~ /\Q$origmanuf\E/i) {
|
|
|
|
return $manuf;
|
|
|
|
} else {
|
2017-08-20 17:33:53 +00:00
|
|
|
my $mixedcase = $origmanuf;
|
|
|
|
|
|
|
|
#If company is all caps, convert to mixed case (so it doesn't look like we're screaming the company name)
|
|
|
|
if ($origmanuf =~ /^[A-Z\s\.\,]+$/) {
|
|
|
|
$mixedcase = autoformat $origmanuf, { case => 'title' };
|
|
|
|
#autoformat produces some unnecessary linebreaks
|
|
|
|
chomp($mixedcase);
|
|
|
|
chomp($mixedcase);
|
|
|
|
}
|
|
|
|
return sprintf("%s\t%s", $manuf, $mixedcase);
|
2002-11-18 02:49:36 +00:00
|
|
|
}
|
2000-11-23 18:22:00 +00:00
|
|
|
}
|
|
|
|
|
2008-07-30 11:57:16 +00:00
|
|
|
sub fetch
|
|
|
|
{
|
|
|
|
my $url = shift;
|
|
|
|
print "Fetching $url.\n";
|
|
|
|
$request = HTTP::Request->new(GET => $url);
|
|
|
|
$result = $agent->request($request);
|
|
|
|
|
|
|
|
if (!$result->is_success) {
|
|
|
|
die ("Error fetching $url: " . $result->status_line . "\n");
|
|
|
|
}
|
2012-04-30 21:32:51 +00:00
|
|
|
return decode("utf-8", $result->content);
|
2008-07-30 11:57:16 +00:00
|
|
|
}
|
|
|
|
|
2002-11-18 02:49:36 +00:00
|
|
|
# Write out the header and populate the OUI list with our entries.
|
2000-11-23 18:22:00 +00:00
|
|
|
|
2010-11-30 22:28:34 +00:00
|
|
|
open (TMPL, "< $template") ||
|
2000-11-23 18:22:00 +00:00
|
|
|
die "Couldn't open template file for reading ($template)\n";
|
|
|
|
|
|
|
|
while ($line = <TMPL>) {
|
|
|
|
chomp($line);
|
|
|
|
if ($line !~ /^$oui_re\s+\S/ && $inheader) {
|
2002-11-18 02:49:36 +00:00
|
|
|
$header .= "$line\n";
|
2000-11-23 18:22:00 +00:00
|
|
|
} elsif (($oui, $manuf) = ($line =~ /^($oui_re)\s+(\S.*)$/)) {
|
|
|
|
$inheader = 0;
|
2000-11-29 04:11:48 +00:00
|
|
|
# Ensure OUI is all upper-case
|
|
|
|
$oui =~ tr/a-f/A-F/;
|
2002-11-18 02:49:36 +00:00
|
|
|
# $oui_list{$oui} = &shorten($manuf);
|
2000-11-23 18:22:00 +00:00
|
|
|
$oui_list{$oui} = $manuf;
|
|
|
|
$tmpl_added++;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2008-07-30 11:57:16 +00:00
|
|
|
# Add IEEE entries for IABs
|
2002-11-18 02:49:36 +00:00
|
|
|
|
2008-07-30 11:57:16 +00:00
|
|
|
$ieee_list = fetch($iab_url);
|
2002-11-18 02:49:36 +00:00
|
|
|
|
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>
2016-08-21 18:23:20 +00:00
|
|
|
foreach $line (split(/[\r\n]+/, $ieee_list)) {
|
2008-07-30 11:57:16 +00:00
|
|
|
# determine the OUI used for IAB (currently only 00-50-C2)
|
2013-04-15 19:10:15 +00:00
|
|
|
if (($iab_tmp, $manuf) = ($line =~ /^\s*($ieee_re)\s+\(hex\)\s+(\S.*)$/)) {
|
2008-07-30 11:57:16 +00:00
|
|
|
$iab_base = $iab_tmp;
|
|
|
|
}
|
|
|
|
# determine next two bytes
|
2013-04-15 23:04:16 +00:00
|
|
|
if (($iab4, $iab5, $manuf) = ($line =~ /^\s*($hp)($hp)$hp-$hp$hp$hp\s+\(base\s16\)\s+(\S.*)$/)) {
|
2008-07-30 11:57:16 +00:00
|
|
|
$iab = "$iab_base:$iab4:$iab5:00/36";
|
|
|
|
$iab =~ tr /-/:/; # The IEEE bytes are separated by dashes.
|
|
|
|
# Ensure IAB is all upper-case
|
|
|
|
$iab =~ tr/a-f/A-F/;
|
|
|
|
if (exists $oui_list{$iab}) {
|
|
|
|
printf "$iab - Skipping IEEE \"$manuf\" in favor of \"$oui_list{$iab}\"\n";
|
|
|
|
$iab_skipped++;
|
|
|
|
} else {
|
|
|
|
$oui_list{$iab} = &shorten($manuf);
|
|
|
|
$iab_added++;
|
|
|
|
}
|
|
|
|
}
|
2013-12-29 17:28:12 +00:00
|
|
|
$iab_total++;
|
2002-11-18 02:49:36 +00:00
|
|
|
}
|
2008-07-30 11:57:16 +00:00
|
|
|
|
2013-12-29 17:28:12 +00:00
|
|
|
if ($iab_total < $min_entries) { die "Too few IAB entries ($iab_total)\n"; }
|
|
|
|
|
2015-10-15 19:04:34 +00:00
|
|
|
# Add IEEE entries for OUI-28
|
|
|
|
|
|
|
|
$ieee_list = fetch($oui28_url);
|
|
|
|
|
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>
2016-08-21 18:23:20 +00:00
|
|
|
foreach $line (split(/[\r\n]+/, $ieee_list)) {
|
|
|
|
chomp($line);
|
2015-10-15 19:04:34 +00:00
|
|
|
# determine the OUI used for OUI-28
|
|
|
|
if (($oui28_tmp, $manuf) = ($line =~ /^\s*($ieee_re)\s+\(hex\)\s+(\S.*)$/)) {
|
|
|
|
$oui28_base = $oui28_tmp;
|
|
|
|
}
|
|
|
|
# determine next two bytes
|
|
|
|
if (($oui28_4, $oui28_5, $manuf) = ($line =~ /^\s*($hp)($hp)$hp-$hp$hp$hp\s+\(base\s16\)\s+(\S.*)$/)) {
|
|
|
|
$oui28 = "$oui28_base:$oui28_4:$oui28_5:00/28";
|
|
|
|
$oui28 =~ tr /-/:/; # The IEEE bytes are separated by dashes.
|
|
|
|
# Ensure OUI-28 is all upper-case
|
|
|
|
$oui28 =~ tr/a-f/A-F/;
|
|
|
|
if (exists $oui_list{$oui28}) {
|
|
|
|
printf "$oui28 - Skipping IEEE \"$manuf\" in favor of \"$oui_list{$oui28}\"\n";
|
|
|
|
$oui28_skipped++;
|
|
|
|
} else {
|
|
|
|
$oui_list{$oui28} = &shorten($manuf);
|
|
|
|
$oui28_added++;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
$oui28_total++;
|
|
|
|
}
|
|
|
|
|
|
|
|
if ($oui28_total < $min_entries) { die "Too few OUI-28 entries ($oui28_total)\n"; }
|
|
|
|
|
2013-03-26 21:53:09 +00:00
|
|
|
# Add IEEE entries for OUI-36
|
|
|
|
|
|
|
|
$ieee_list = fetch($oui36_url);
|
|
|
|
|
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>
2016-08-21 18:23:20 +00:00
|
|
|
foreach $line (split(/[\r\n]+/, $ieee_list)) {
|
|
|
|
chomp($line);
|
2013-03-26 21:53:09 +00:00
|
|
|
# determine the OUI used for OUI-36 (currently only 00-1B-C5)
|
2013-04-15 19:10:15 +00:00
|
|
|
if (($oui36_tmp, $manuf) = ($line =~ /^\s*($ieee_re)\s+\(hex\)\s+(\S.*)$/)) {
|
2013-03-26 21:53:09 +00:00
|
|
|
$oui36_base = $oui36_tmp;
|
|
|
|
}
|
|
|
|
# determine next two bytes
|
2013-04-15 23:16:20 +00:00
|
|
|
if (($oui36_4, $oui36_5, $manuf) = ($line =~ /^\s*($hp)($hp)$hp-$hp$hp$hp\s+\(base\s16\)\s+(\S.*)$/)) {
|
2013-03-26 21:53:09 +00:00
|
|
|
$oui36 = "$oui36_base:$oui36_4:$oui36_5:00/36";
|
|
|
|
$oui36 =~ tr /-/:/; # The IEEE bytes are separated by dashes.
|
|
|
|
# Ensure OUI-36 is all upper-case
|
|
|
|
$oui36 =~ tr/a-f/A-F/;
|
|
|
|
if (exists $oui_list{$oui36}) {
|
|
|
|
printf "$oui36 - Skipping IEEE \"$manuf\" in favor of \"$oui_list{$oui36}\"\n";
|
|
|
|
$oui36_skipped++;
|
|
|
|
} else {
|
|
|
|
$oui_list{$oui36} = &shorten($manuf);
|
|
|
|
$oui36_added++;
|
|
|
|
}
|
|
|
|
}
|
2013-12-29 17:28:12 +00:00
|
|
|
$oui36_total++;
|
2013-03-26 21:53:09 +00:00
|
|
|
}
|
|
|
|
|
2013-12-29 17:28:12 +00:00
|
|
|
if ($oui36_total < $min_entries) { die "Too few OUI-36 entries ($oui36_total)\n"; }
|
|
|
|
|
2017-05-22 23:53:25 +00:00
|
|
|
# Add IEEE entries for CIDs.
|
|
|
|
|
|
|
|
$ieee_list = fetch($cid_url);
|
|
|
|
|
|
|
|
foreach $line (split(/[\r\n]+/, $ieee_list)) {
|
|
|
|
if (($cid, $manuf) = ($line =~ /^\s*($ieee_re)\s+\(hex\)\s+(\S.*)$/)) {
|
|
|
|
$cid =~ tr /-/:/; # The IEEE bytes are separated by dashes.
|
|
|
|
# Ensure OUI is all upper-case
|
|
|
|
$cid =~ tr/a-f/A-F/;
|
|
|
|
if (exists $oui_list{$cid}) {
|
|
|
|
printf "$cid - Skipping IEEE \"$manuf\" in favor of \"$oui_list{$cid}\"\n";
|
|
|
|
$cid_skipped++;
|
|
|
|
} else {
|
|
|
|
$oui_list{$cid} = &shorten($manuf);
|
|
|
|
$cid_added++;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
$cid_total++;
|
|
|
|
}
|
|
|
|
|
|
|
|
if ($cid_total < $min_cid_entries) { die "Too few CID entries ($cid_total)\n"; }
|
|
|
|
|
2008-07-30 11:57:16 +00:00
|
|
|
# Add IEEE entries for OUIs not yet known.
|
|
|
|
|
|
|
|
$ieee_list = fetch($oui_url);
|
2002-11-18 02:49:36 +00:00
|
|
|
|
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>
2016-08-21 18:23:20 +00:00
|
|
|
foreach $line (split(/[\r\n]+/, $ieee_list)) {
|
2013-04-15 19:10:15 +00:00
|
|
|
if (($oui, $manuf) = ($line =~ /^\s*($ieee_re)\s+\(hex\)\s+(\S.*)$/)) {
|
2002-05-02 11:07:47 +00:00
|
|
|
$oui =~ tr /-/:/; # The IEEE bytes are separated by dashes.
|
2000-11-29 04:11:48 +00:00
|
|
|
# Ensure OUI is all upper-case
|
|
|
|
$oui =~ tr/a-f/A-F/;
|
2000-11-23 18:22:00 +00:00
|
|
|
if (exists $oui_list{$oui}) {
|
2002-05-02 11:07:47 +00:00
|
|
|
printf "$oui - Skipping IEEE \"$manuf\" in favor of \"$oui_list{$oui}\"\n";
|
2008-07-30 11:57:16 +00:00
|
|
|
$oui_skipped++;
|
2000-11-23 18:22:00 +00:00
|
|
|
} else {
|
2002-11-18 02:49:36 +00:00
|
|
|
$oui_list{$oui} = &shorten($manuf);
|
2008-07-30 11:57:16 +00:00
|
|
|
$oui_added++;
|
2000-11-23 18:22:00 +00:00
|
|
|
}
|
|
|
|
}
|
2013-12-29 17:28:12 +00:00
|
|
|
$oui_total++;
|
2000-11-23 18:22:00 +00:00
|
|
|
}
|
|
|
|
|
2013-12-29 17:28:12 +00:00
|
|
|
if ($oui_total < $min_entries) { die "Too few OUI entries ($oui_total)\n"; }
|
|
|
|
|
2017-05-22 23:53:25 +00:00
|
|
|
$total_added = $tmpl_added + $oui_added + $iab_added + $oui36_added + $cid_added;
|
2016-10-02 19:03:34 +00:00
|
|
|
if ($total_added < $min_total) { die "Too few total entries ($total_added)\n"; }
|
|
|
|
|
2002-11-18 02:49:36 +00:00
|
|
|
# Write output file
|
|
|
|
|
|
|
|
open (OUT, "> $outfile") ||
|
|
|
|
die "Couldn't open output file for writing ($outfile)\n";
|
|
|
|
|
2005-03-06 01:52:34 +00:00
|
|
|
print(OUT "# This file was generated by running ./make-manuf.\n");
|
2017-07-20 01:32:40 +00:00
|
|
|
print(OUT "# Don't change it directly, change manuf.tmpl instead.\n#\n");
|
2002-11-18 02:49:36 +00:00
|
|
|
print(OUT "$header");
|
|
|
|
|
2000-11-23 18:22:00 +00:00
|
|
|
foreach $oui (sort(keys %oui_list)) {
|
|
|
|
print(OUT "$oui\t$oui_list{$oui}\n");
|
|
|
|
}
|
|
|
|
|
|
|
|
print <<"Fin"
|
2016-10-02 19:03:34 +00:00
|
|
|
Original entries : $tmpl_added
|
|
|
|
IEEE OUI added : $oui_added
|
|
|
|
IEEE IAB added : $iab_added
|
|
|
|
IEEE OUI28 added : $oui28_added
|
|
|
|
IEEE OUI36 added : $oui36_added
|
2017-05-22 23:53:25 +00:00
|
|
|
IEEE CID added : $cid_added
|
2016-10-02 19:03:34 +00:00
|
|
|
Total added : $total_added
|
|
|
|
|
|
|
|
IEEE OUI total : $oui_total
|
|
|
|
IEEE IAB total : $iab_total
|
|
|
|
IEEE OUI28 total : $oui28_total
|
2017-05-22 23:53:25 +00:00
|
|
|
IEEE OUI36 total : $oui36_total
|
|
|
|
IEEE CID total : $cid_total
|
2016-10-02 19:03:34 +00:00
|
|
|
|
|
|
|
IEEE OUI skipped : $oui_skipped
|
|
|
|
IEEE IAB skipped : $iab_skipped
|
2017-05-22 23:53:25 +00:00
|
|
|
IEEE OUI28 skipped : $oui28_skipped
|
2016-10-02 19:03:34 +00:00
|
|
|
IEEE OUI36 skipped : $oui36_skipped
|
2017-05-22 23:53:25 +00:00
|
|
|
IEEE CID skipped : $cid_skipped
|
2000-11-23 18:22:00 +00:00
|
|
|
Fin
|