2017-05-19 10:19:25 +02:00
|
|
|
/* -*- Mode: C; tab-width: 4; indent-tabs-mode: t; c-basic-offset: 4 -*- */
|
|
|
|
|
/*
|
|
|
|
|
*
|
|
|
|
|
* This program is free software; you can redistribute it and/or modify
|
|
|
|
|
* it under the terms of the GNU General Public License as published by
|
|
|
|
|
* the Free Software Foundation; either version 2, or (at your option)
|
|
|
|
|
* any later version.
|
|
|
|
|
*
|
|
|
|
|
* This program is distributed in the hope that it will be useful,
|
|
|
|
|
* but WITHOUT SC WARRANTY; without even the implied warranty of
|
|
|
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
|
* GNU General Public License for more details.
|
|
|
|
|
*
|
|
|
|
|
* You should have received a copy of the GNU General Public License along
|
|
|
|
|
* with this program; if not, write to the Free Software Foundation, Inc.,
|
|
|
|
|
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
|
|
|
|
*
|
|
|
|
|
* Copyright 2017 Red Hat, Inc.
|
|
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
#include "nm-default.h"
|
|
|
|
|
|
2017-05-19 10:32:13 +02:00
|
|
|
#include "nm-libnm-utils.h"
|
|
|
|
|
|
2017-05-19 10:19:25 +02:00
|
|
|
#include "nm-utils/nm-test-utils.h"
|
|
|
|
|
|
|
|
|
|
/*****************************************************************************/
|
|
|
|
|
|
2018-02-23 14:52:00 +01:00
|
|
|
#define T(func, desc, expected) \
|
|
|
|
|
result = func (desc); \
|
|
|
|
|
g_assert_cmpstr (result, ==, expected); \
|
|
|
|
|
g_free (result);
|
|
|
|
|
|
2017-05-19 10:32:13 +02:00
|
|
|
static void
|
2018-02-23 14:52:00 +01:00
|
|
|
test_fixup_desc_string (void)
|
2017-05-19 10:32:13 +02:00
|
|
|
{
|
2018-02-23 14:52:00 +01:00
|
|
|
char *result = NULL;
|
2017-05-19 10:32:13 +02:00
|
|
|
|
2018-02-23 14:52:00 +01:00
|
|
|
T (nm_utils_fixup_desc_string, NULL, NULL);
|
|
|
|
|
T (nm_utils_fixup_desc_string, "", NULL);
|
|
|
|
|
T (nm_utils_fixup_desc_string, "a", "a");
|
|
|
|
|
T (nm_utils_fixup_desc_string, "a b", "a b");
|
|
|
|
|
T (nm_utils_fixup_desc_string, "a b ", "a b");
|
|
|
|
|
T (nm_utils_fixup_desc_string, " a bbc ", "a bbc");
|
|
|
|
|
T (nm_utils_fixup_desc_string, " a \xcc bbc ", "a bbc");
|
|
|
|
|
T (nm_utils_fixup_desc_string, " a\xcc bbc ", "a bbc");
|
|
|
|
|
T (nm_utils_fixup_desc_string, " a\xcc""bbc Wireless PC", "a bbc");
|
|
|
|
|
T (nm_utils_fixup_desc_string, " a\xcc""bbc Wireless PC ", "a bbc");
|
|
|
|
|
T (nm_utils_fixup_desc_string, " a\xcc""bbcWireless PC ", "a bbcWireless PC");
|
|
|
|
|
T (nm_utils_fixup_desc_string, " a\xcc""bbc Wireless PCx", "a bbc Wireless PCx");
|
2017-05-19 10:32:13 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
static void
|
2018-02-23 14:52:00 +01:00
|
|
|
test_fixup_vendor_string (void)
|
2017-05-19 10:32:13 +02:00
|
|
|
{
|
2018-02-23 14:52:00 +01:00
|
|
|
char *result = NULL;
|
|
|
|
|
|
|
|
|
|
T (nm_utils_fixup_vendor_string, "3Com", "3Com");
|
|
|
|
|
T (nm_utils_fixup_vendor_string, "3Com Corp.", "3Com");
|
|
|
|
|
T (nm_utils_fixup_vendor_string, "3Com Corporation", "3Com");
|
2018-02-23 14:52:05 +01:00
|
|
|
T (nm_utils_fixup_vendor_string, "Abocom Systems Inc", "Abocom");
|
|
|
|
|
T (nm_utils_fixup_vendor_string, "AboCom Systems Inc", "AboCom");
|
|
|
|
|
T (nm_utils_fixup_vendor_string, "Accton Technology Corp.", "Accton");
|
|
|
|
|
T (nm_utils_fixup_vendor_string, "Accton Technology Corporation", "Accton");
|
|
|
|
|
T (nm_utils_fixup_vendor_string, "Acer Communications & Multimedia", "Acer");
|
|
|
|
|
T (nm_utils_fixup_vendor_string, "Actiontec Electronics, Inc. [hex]", "Actiontec");
|
2018-02-23 14:52:00 +01:00
|
|
|
T (nm_utils_fixup_vendor_string, "Adaptec", "Adaptec");
|
2018-02-23 14:52:05 +01:00
|
|
|
T (nm_utils_fixup_vendor_string, "Addtron Technology Co, Inc.", "Addtron");
|
2018-02-23 14:52:00 +01:00
|
|
|
T (nm_utils_fixup_vendor_string, "ADMtek", "ADMtek");
|
|
|
|
|
T (nm_utils_fixup_vendor_string, "ADMtek, Inc.", "ADMtek");
|
2018-02-23 14:52:05 +01:00
|
|
|
T (nm_utils_fixup_vendor_string, "ADS Technologies, Inc.", "ADS");
|
2018-02-23 14:52:05 +01:00
|
|
|
T (nm_utils_fixup_vendor_string, "Advanced Micro Devices, Inc. [AMD]", "AMD");
|
2018-02-23 14:52:05 +01:00
|
|
|
T (nm_utils_fixup_vendor_string, "Advance Multimedia Internet Technology Inc. (AMIT)", "Advance");
|
2018-02-23 14:52:00 +01:00
|
|
|
T (nm_utils_fixup_vendor_string, "AEI", "AEI");
|
|
|
|
|
T (nm_utils_fixup_vendor_string, "Airprime, Incorporated", "Airprime");
|
2018-02-23 14:52:05 +01:00
|
|
|
T (nm_utils_fixup_vendor_string, "AirTies Wireless Networks", "AirTies");
|
2018-02-23 14:52:00 +01:00
|
|
|
T (nm_utils_fixup_vendor_string, "AirVast", "AirVast");
|
|
|
|
|
T (nm_utils_fixup_vendor_string, "Alcatel Telecom", "Alcatel Telecom");
|
|
|
|
|
T (nm_utils_fixup_vendor_string, "ALi Corp.", "ALi");
|
|
|
|
|
T (nm_utils_fixup_vendor_string, "Allied Telesis", "Allied Telesis");
|
2018-02-23 14:52:05 +01:00
|
|
|
T (nm_utils_fixup_vendor_string, "Allied Telesyn International", "Allied Telesyn");
|
|
|
|
|
T (nm_utils_fixup_vendor_string, "Alteon Networks Inc.", "Alteon");
|
2018-02-23 14:52:05 +01:00
|
|
|
T (nm_utils_fixup_vendor_string, "Altima (nee Broadcom)", "Altima");
|
2018-02-23 14:52:05 +01:00
|
|
|
T (nm_utils_fixup_vendor_string, "A-Max Technology Macao Commercial Offshore Co. Ltd.", "A-Max");
|
|
|
|
|
T (nm_utils_fixup_vendor_string, "Amigo Technology Inc.", "Amigo");
|
|
|
|
|
T (nm_utils_fixup_vendor_string, "AMIT Technology, Inc.", "AMIT");
|
|
|
|
|
T (nm_utils_fixup_vendor_string, "Anchor Chips, Inc.", "Anchor");
|
2018-02-23 14:52:00 +01:00
|
|
|
T (nm_utils_fixup_vendor_string, "AnyDATA Corporation", "AnyDATA");
|
|
|
|
|
T (nm_utils_fixup_vendor_string, "Apple Inc.", "Apple");
|
|
|
|
|
T (nm_utils_fixup_vendor_string, "Apple, Inc.", "Apple");
|
2018-02-23 14:52:05 +01:00
|
|
|
T (nm_utils_fixup_vendor_string, "ARC International", "ARC");
|
|
|
|
|
T (nm_utils_fixup_vendor_string, "ASIX Electronics Corp.", "ASIX");
|
|
|
|
|
T (nm_utils_fixup_vendor_string, "Asix Electronics Corporation", "Asix");
|
|
|
|
|
T (nm_utils_fixup_vendor_string, "Askey Computer Corp. [hex]", "Askey");
|
2018-02-23 14:52:00 +01:00
|
|
|
T (nm_utils_fixup_vendor_string, "ASUSTek Computer, Inc.", "ASUSTek Computer");
|
2018-02-23 14:52:05 +01:00
|
|
|
T (nm_utils_fixup_vendor_string, "ASUSTek Computer, Inc. (wrong ID)", "ASUSTek Computer");
|
2018-02-23 14:52:05 +01:00
|
|
|
T (nm_utils_fixup_vendor_string, "ATEN International Co., Ltd", "ATEN");
|
2018-02-23 14:52:00 +01:00
|
|
|
T (nm_utils_fixup_vendor_string, "Atheros Communications", "Atheros");
|
|
|
|
|
T (nm_utils_fixup_vendor_string, "Atheros Communications, Inc.", "Atheros");
|
2018-02-23 14:52:05 +01:00
|
|
|
T (nm_utils_fixup_vendor_string, "AVM GmbH", "AVM");
|
2018-02-23 14:52:00 +01:00
|
|
|
T (nm_utils_fixup_vendor_string, "AzureWave", "AzureWave");
|
|
|
|
|
T (nm_utils_fixup_vendor_string, "Belkin", "Belkin");
|
|
|
|
|
T (nm_utils_fixup_vendor_string, "Belkin Components", "Belkin");
|
2018-02-23 14:52:05 +01:00
|
|
|
T (nm_utils_fixup_vendor_string, "Billionton Systems, Inc.", "Billionton");
|
2018-02-23 14:52:00 +01:00
|
|
|
T (nm_utils_fixup_vendor_string, "Broadcom Corp.", "Broadcom");
|
2018-02-23 14:52:05 +01:00
|
|
|
T (nm_utils_fixup_vendor_string, "Broadcom Limited", "Broadcom");
|
|
|
|
|
T (nm_utils_fixup_vendor_string, "Brocade Communications Systems, Inc.", "Brocade");
|
2018-02-23 14:52:05 +01:00
|
|
|
T (nm_utils_fixup_vendor_string, "BUFFALO INC. (formerly MelCo., Inc.)", "BUFFALO");
|
2018-02-23 14:52:05 +01:00
|
|
|
T (nm_utils_fixup_vendor_string, "CACE Technologies Inc.", "CACE");
|
|
|
|
|
T (nm_utils_fixup_vendor_string, "Cadence Design Systems, Inc.", "Cadence");
|
2018-02-23 14:52:00 +01:00
|
|
|
T (nm_utils_fixup_vendor_string, "Chelsio Communications Inc", "Chelsio");
|
2018-02-23 14:52:05 +01:00
|
|
|
T (nm_utils_fixup_vendor_string, "Chicony Electronics Co., Ltd", "Chicony");
|
|
|
|
|
T (nm_utils_fixup_vendor_string, "Chu Yuen Enterprise Co., Ltd", "Chu Yuen");
|
|
|
|
|
T (nm_utils_fixup_vendor_string, "Cisco Systems Inc", "Cisco");
|
|
|
|
|
T (nm_utils_fixup_vendor_string, "Cisco Systems, Inc.", "Cisco");
|
2018-02-23 14:52:00 +01:00
|
|
|
T (nm_utils_fixup_vendor_string, "CMOTECH Co., Ltd.", "CMOTECH");
|
2018-02-23 14:52:05 +01:00
|
|
|
T (nm_utils_fixup_vendor_string, "CNet Technology Inc.", "CNet");
|
|
|
|
|
T (nm_utils_fixup_vendor_string, "CNet Technology Inc", "CNet");
|
2018-02-23 14:52:00 +01:00
|
|
|
T (nm_utils_fixup_vendor_string, "Comneon", "Comneon");
|
2018-02-23 14:52:05 +01:00
|
|
|
T (nm_utils_fixup_vendor_string, "Compaq Computer Corp.", "Compaq");
|
|
|
|
|
T (nm_utils_fixup_vendor_string, "Compaq Computer Corporation", "Compaq");
|
2018-02-23 14:52:00 +01:00
|
|
|
T (nm_utils_fixup_vendor_string, "Compex", "Compex");
|
2018-02-23 14:52:05 +01:00
|
|
|
T (nm_utils_fixup_vendor_string, "Computer Access Technology Corp.", "Computer Access");
|
|
|
|
|
T (nm_utils_fixup_vendor_string, "Conexant Systems, Inc.", "Conexant");
|
2018-02-23 14:52:05 +01:00
|
|
|
T (nm_utils_fixup_vendor_string, "Conexant Systems (Rockwell), Inc.", "Conexant");
|
2018-02-23 14:52:00 +01:00
|
|
|
T (nm_utils_fixup_vendor_string, "Corega K.K.", "Corega K.K.");
|
|
|
|
|
T (nm_utils_fixup_vendor_string, "Curitel Communications, Inc.", "Curitel");
|
2018-02-23 14:52:05 +01:00
|
|
|
T (nm_utils_fixup_vendor_string, "CyberTAN Technology", "CyberTAN");
|
2018-02-23 14:52:00 +01:00
|
|
|
T (nm_utils_fixup_vendor_string, "Cypress Semiconductor Corp.", "Cypress");
|
|
|
|
|
T (nm_utils_fixup_vendor_string, "Davicom Semiconductor, Inc.", "Davicom");
|
2018-02-23 14:52:05 +01:00
|
|
|
T (nm_utils_fixup_vendor_string, "Dell Computer Corp.", "Dell");
|
|
|
|
|
T (nm_utils_fixup_vendor_string, "DELTA Electronics, Inc", "DELTA");
|
2018-02-23 14:52:00 +01:00
|
|
|
T (nm_utils_fixup_vendor_string, "Digital Equipment Corporation", "Digital Equipment");
|
|
|
|
|
T (nm_utils_fixup_vendor_string, "D-Link Corp.", "D-Link");
|
|
|
|
|
T (nm_utils_fixup_vendor_string, "D-Link System", "D-Link System");
|
|
|
|
|
T (nm_utils_fixup_vendor_string, "D-Link System Inc", "D-Link System");
|
|
|
|
|
T (nm_utils_fixup_vendor_string, "DrayTek Corp.", "DrayTek");
|
|
|
|
|
T (nm_utils_fixup_vendor_string, "d'TV", "d'TV");
|
|
|
|
|
T (nm_utils_fixup_vendor_string, "DVICO", "DVICO");
|
2018-02-23 14:52:05 +01:00
|
|
|
T (nm_utils_fixup_vendor_string, "Edimax Computer Co.", "Edimax");
|
|
|
|
|
T (nm_utils_fixup_vendor_string, "Edimax Technology Co., Ltd", "Edimax");
|
|
|
|
|
T (nm_utils_fixup_vendor_string, "Efar Microsystems", "Efar");
|
|
|
|
|
T (nm_utils_fixup_vendor_string, "Efficient Networks, Inc.", "Efficient");
|
|
|
|
|
T (nm_utils_fixup_vendor_string, "ELCON Systemtechnik", "ELCON");
|
|
|
|
|
T (nm_utils_fixup_vendor_string, "Elecom Co., Ltd", "Elecom");
|
|
|
|
|
T (nm_utils_fixup_vendor_string, "ELSA AG", "ELSA");
|
2018-02-23 14:52:00 +01:00
|
|
|
T (nm_utils_fixup_vendor_string, "Emulex Corporation", "Emulex");
|
2018-02-23 14:52:05 +01:00
|
|
|
T (nm_utils_fixup_vendor_string, "Encore Electronics Inc.", "Encore");
|
2018-02-23 14:52:00 +01:00
|
|
|
T (nm_utils_fixup_vendor_string, "EndPoints, Inc.", "EndPoints");
|
|
|
|
|
T (nm_utils_fixup_vendor_string, "Entrega [hex]", "Entrega");
|
|
|
|
|
T (nm_utils_fixup_vendor_string, "Ericsson Business Mobile Networks BV", "Ericsson");
|
2018-02-23 14:52:05 +01:00
|
|
|
T (nm_utils_fixup_vendor_string, "eTEK Labs", "eTEK");
|
2018-02-23 14:52:00 +01:00
|
|
|
T (nm_utils_fixup_vendor_string, "Exar Corp.", "Exar");
|
|
|
|
|
T (nm_utils_fixup_vendor_string, "Fiberline", "Fiberline");
|
|
|
|
|
T (nm_utils_fixup_vendor_string, "Fujitsu Limited.", "Fujitsu");
|
2018-02-23 14:52:05 +01:00
|
|
|
T (nm_utils_fixup_vendor_string, "Fujitsu Siemens Computers", "Fujitsu Siemens");
|
2018-02-23 14:52:00 +01:00
|
|
|
T (nm_utils_fixup_vendor_string, "Gateway, Inc.", "Gateway");
|
|
|
|
|
T (nm_utils_fixup_vendor_string, "Gemtek", "Gemtek");
|
|
|
|
|
T (nm_utils_fixup_vendor_string, "Genesys Logic, Inc.", "Genesys Logic");
|
2018-02-23 14:52:05 +01:00
|
|
|
T (nm_utils_fixup_vendor_string, "Global Sun Technology", "Global Sun");
|
|
|
|
|
T (nm_utils_fixup_vendor_string, "Global Sun Technology, Inc.", "Global Sun");
|
2018-02-23 14:52:00 +01:00
|
|
|
T (nm_utils_fixup_vendor_string, "GlobeSpan, Inc.", "GlobeSpan");
|
|
|
|
|
T (nm_utils_fixup_vendor_string, "Gmate, Inc.", "Gmate");
|
2018-02-23 14:52:05 +01:00
|
|
|
T (nm_utils_fixup_vendor_string, "Good Way Technology", "Good Way");
|
2018-02-23 14:52:00 +01:00
|
|
|
T (nm_utils_fixup_vendor_string, "Guillemot Corp.", "Guillemot");
|
2018-02-23 14:52:05 +01:00
|
|
|
T (nm_utils_fixup_vendor_string, "Hangzhou Silan Microelectronics Co., Ltd.", "Hangzhou Silan");
|
|
|
|
|
T (nm_utils_fixup_vendor_string, "Hawking Technologies", "Hawking");
|
2018-02-23 14:52:00 +01:00
|
|
|
T (nm_utils_fixup_vendor_string, "Hewlett-Packard", "Hewlett-Packard");
|
|
|
|
|
T (nm_utils_fixup_vendor_string, "Hirose Electric", "Hirose Electric");
|
2018-02-23 14:52:05 +01:00
|
|
|
T (nm_utils_fixup_vendor_string, "Holtek Microelectronics Inc", "Holtek");
|
2018-02-23 14:52:00 +01:00
|
|
|
T (nm_utils_fixup_vendor_string, "Huawei-3Com", "Huawei-3Com");
|
2018-02-23 14:52:05 +01:00
|
|
|
T (nm_utils_fixup_vendor_string, "Huawei Technologies Co., Ltd.", "Huawei");
|
2018-02-23 14:52:00 +01:00
|
|
|
T (nm_utils_fixup_vendor_string, "ICS Advent", "ICS Advent");
|
2018-02-23 14:52:05 +01:00
|
|
|
T (nm_utils_fixup_vendor_string, "IMC Networks", "IMC");
|
2018-02-23 14:52:00 +01:00
|
|
|
T (nm_utils_fixup_vendor_string, "Intel Corp.", "Intel");
|
|
|
|
|
T (nm_utils_fixup_vendor_string, "Intel Corporation", "Intel");
|
|
|
|
|
T (nm_utils_fixup_vendor_string, "Intellon Corp.", "Intellon");
|
|
|
|
|
T (nm_utils_fixup_vendor_string, "InterBiometrics", "InterBiometrics");
|
|
|
|
|
T (nm_utils_fixup_vendor_string, "Intersil Corp.", "Intersil");
|
|
|
|
|
T (nm_utils_fixup_vendor_string, "Intersil Corporation", "Intersil");
|
|
|
|
|
T (nm_utils_fixup_vendor_string, "I-O Data Device, Inc.", "I-O Data Device");
|
|
|
|
|
T (nm_utils_fixup_vendor_string, "Jaton Corp.", "Jaton");
|
2018-02-23 14:52:05 +01:00
|
|
|
T (nm_utils_fixup_vendor_string, "JMicron Technology Corp.", "JMicron");
|
2018-02-23 14:52:00 +01:00
|
|
|
T (nm_utils_fixup_vendor_string, "Kawasaki LSI", "Kawasaki LSI");
|
2018-02-23 14:52:05 +01:00
|
|
|
T (nm_utils_fixup_vendor_string, "KC Technology, Inc.", "KC");
|
|
|
|
|
T (nm_utils_fixup_vendor_string, "Kingston Technology", "Kingston");
|
2018-02-23 14:52:00 +01:00
|
|
|
T (nm_utils_fixup_vendor_string, "KTI", "KTI");
|
2018-02-23 14:52:05 +01:00
|
|
|
T (nm_utils_fixup_vendor_string, "Kvaser AB", "Kvaser");
|
2018-02-23 14:52:00 +01:00
|
|
|
T (nm_utils_fixup_vendor_string, "LapLink, Inc.", "LapLink");
|
|
|
|
|
T (nm_utils_fixup_vendor_string, "Lenovo", "Lenovo");
|
|
|
|
|
T (nm_utils_fixup_vendor_string, "LevelOne", "LevelOne");
|
2018-02-23 14:52:05 +01:00
|
|
|
T (nm_utils_fixup_vendor_string, "LG Electronics, Inc.", "LG");
|
|
|
|
|
T (nm_utils_fixup_vendor_string, "LG Electronics USA, Inc.", "LG");
|
2018-02-23 14:52:00 +01:00
|
|
|
T (nm_utils_fixup_vendor_string, "Linksys, Inc.", "Linksys");
|
2018-02-23 14:52:05 +01:00
|
|
|
T (nm_utils_fixup_vendor_string, "Linksys (?)", "Linksys");
|
2018-02-23 14:52:00 +01:00
|
|
|
T (nm_utils_fixup_vendor_string, "Linksys", "Linksys");
|
|
|
|
|
T (nm_utils_fixup_vendor_string, "Lite-On Communications Inc", "Lite-On");
|
2018-02-23 14:52:05 +01:00
|
|
|
T (nm_utils_fixup_vendor_string, "Lite-On Technology Corp.", "Lite-On");
|
2018-02-23 14:52:00 +01:00
|
|
|
T (nm_utils_fixup_vendor_string, "Logitec Corp.", "Logitec");
|
|
|
|
|
T (nm_utils_fixup_vendor_string, "Logitech, Inc.", "Logitech");
|
|
|
|
|
T (nm_utils_fixup_vendor_string, "LSI Corporation", "LSI");
|
2018-02-23 14:52:05 +01:00
|
|
|
T (nm_utils_fixup_vendor_string, "LSI Logic / Symbios Logic", "LSI Logic");
|
2018-02-23 14:52:05 +01:00
|
|
|
T (nm_utils_fixup_vendor_string, "Macronix, Inc. [MXIC]", "MXIC");
|
2018-02-23 14:52:00 +01:00
|
|
|
T (nm_utils_fixup_vendor_string, "Marvell Semiconductor, Inc.", "Marvell");
|
|
|
|
|
T (nm_utils_fixup_vendor_string, "Marvell Technology Group Ltd.", "Marvell");
|
|
|
|
|
T (nm_utils_fixup_vendor_string, "MediaTek Inc.", "MediaTek");
|
2018-02-23 14:52:05 +01:00
|
|
|
T (nm_utils_fixup_vendor_string, "Mellanox Technologies", "Mellanox");
|
2018-02-23 14:52:00 +01:00
|
|
|
T (nm_utils_fixup_vendor_string, "Memorex", "Memorex");
|
|
|
|
|
T (nm_utils_fixup_vendor_string, "Micrel-Kendin", "Micrel-Kendin");
|
2018-02-23 14:52:05 +01:00
|
|
|
T (nm_utils_fixup_vendor_string, "Microchip Technology, Inc.", "Microchip");
|
|
|
|
|
T (nm_utils_fixup_vendor_string, "Microcomputer Systems (M) Son", "Microcomputer");
|
2018-02-23 14:52:00 +01:00
|
|
|
T (nm_utils_fixup_vendor_string, "Microsoft Corp.", "Microsoft");
|
|
|
|
|
T (nm_utils_fixup_vendor_string, "Microsoft Corporation", "Microsoft");
|
2018-02-23 14:52:05 +01:00
|
|
|
T (nm_utils_fixup_vendor_string, "Micro-Star International Co., Ltd. [MSI]", "MSI");
|
2018-02-23 14:52:05 +01:00
|
|
|
T (nm_utils_fixup_vendor_string, "Micro Star International", "Micro Star");
|
2018-02-23 14:52:00 +01:00
|
|
|
T (nm_utils_fixup_vendor_string, "Mobility", "Mobility");
|
|
|
|
|
T (nm_utils_fixup_vendor_string, "MosChip Semiconductor", "MosChip");
|
2018-02-23 14:52:05 +01:00
|
|
|
T (nm_utils_fixup_vendor_string, "Motorola PCS", "Motorola");
|
2018-02-23 14:52:00 +01:00
|
|
|
T (nm_utils_fixup_vendor_string, "MYRICOM Inc.", "MYRICOM");
|
2018-02-23 14:52:05 +01:00
|
|
|
T (nm_utils_fixup_vendor_string, "MYSON Technology Inc", "MYSON");
|
|
|
|
|
T (nm_utils_fixup_vendor_string, "National Instruments Corp.", "National");
|
2018-02-23 14:52:00 +01:00
|
|
|
T (nm_utils_fixup_vendor_string, "National Semiconductor Corporation", "National");
|
|
|
|
|
T (nm_utils_fixup_vendor_string, "NEC Corp.", "NEC");
|
2018-02-23 14:52:05 +01:00
|
|
|
T (nm_utils_fixup_vendor_string, "Netchip Technology, Inc.", "Netchip");
|
2018-02-23 14:52:00 +01:00
|
|
|
T (nm_utils_fixup_vendor_string, "Netgear, Inc", "Netgear");
|
|
|
|
|
T (nm_utils_fixup_vendor_string, "NetGear, Inc.", "NetGear");
|
|
|
|
|
T (nm_utils_fixup_vendor_string, "Netgear", "Netgear");
|
|
|
|
|
T (nm_utils_fixup_vendor_string, "Netopia, Inc.", "Netopia");
|
2018-02-23 14:52:05 +01:00
|
|
|
T (nm_utils_fixup_vendor_string, "Netronome Systems, Inc.", "Netronome");
|
2018-02-23 14:52:00 +01:00
|
|
|
T (nm_utils_fixup_vendor_string, "NetVin", "NetVin");
|
|
|
|
|
T (nm_utils_fixup_vendor_string, "NetXen Incorporated", "NetXen");
|
2018-02-23 14:52:05 +01:00
|
|
|
T (nm_utils_fixup_vendor_string, "Nordic Semiconductor ASA", "Nordic");
|
2018-02-23 14:52:00 +01:00
|
|
|
T (nm_utils_fixup_vendor_string, "Northern Telecom", "Northern Telecom");
|
|
|
|
|
T (nm_utils_fixup_vendor_string, "NovaTech", "NovaTech");
|
|
|
|
|
T (nm_utils_fixup_vendor_string, "Novatel Wireless", "Novatel Wireless");
|
|
|
|
|
T (nm_utils_fixup_vendor_string, "NVIDIA Corp.", "NVIDIA");
|
|
|
|
|
T (nm_utils_fixup_vendor_string, "NVIDIA Corporation", "NVIDIA");
|
|
|
|
|
T (nm_utils_fixup_vendor_string, "Olicom", "Olicom");
|
2018-02-23 14:52:05 +01:00
|
|
|
T (nm_utils_fixup_vendor_string, "Olivetti Techcenter", "Olivetti");
|
|
|
|
|
T (nm_utils_fixup_vendor_string, "Olympus Optical Co., Ltd", "Olympus");
|
|
|
|
|
T (nm_utils_fixup_vendor_string, "OMEGA TECHNOLOGY", "OMEGA");
|
|
|
|
|
T (nm_utils_fixup_vendor_string, "Omnidirectional Control Technology, Inc.", "Omnidirectional Control");
|
2018-02-23 14:52:00 +01:00
|
|
|
T (nm_utils_fixup_vendor_string, "OpenMoko, Inc.", "OpenMoko");
|
|
|
|
|
T (nm_utils_fixup_vendor_string, "Option", "Option");
|
|
|
|
|
T (nm_utils_fixup_vendor_string, "OQO", "OQO");
|
2018-02-23 14:52:05 +01:00
|
|
|
T (nm_utils_fixup_vendor_string, "Oracle/SUN", "Oracle");
|
2018-02-23 14:52:00 +01:00
|
|
|
T (nm_utils_fixup_vendor_string, "Ovislink Corp.", "Ovislink");
|
|
|
|
|
T (nm_utils_fixup_vendor_string, "Packet Engines Inc.", "Packet Engines");
|
2018-02-23 14:52:05 +01:00
|
|
|
T (nm_utils_fixup_vendor_string, "Panasonic (Matsushita)", "Panasonic");
|
2018-02-23 14:52:00 +01:00
|
|
|
T (nm_utils_fixup_vendor_string, "PEAK System", "PEAK System");
|
2018-02-23 14:52:05 +01:00
|
|
|
T (nm_utils_fixup_vendor_string, "PEAK-System Technik GmbH", "PEAK-System");
|
2018-02-23 14:52:00 +01:00
|
|
|
T (nm_utils_fixup_vendor_string, "PEGATRON CORPORATION", "PEGATRON CORPORATION");
|
2018-02-23 14:52:05 +01:00
|
|
|
T (nm_utils_fixup_vendor_string, "Peppercon AG", "Peppercon");
|
|
|
|
|
T (nm_utils_fixup_vendor_string, "Peracom Networks, Inc.", "Peracom");
|
2018-02-23 14:52:05 +01:00
|
|
|
T (nm_utils_fixup_vendor_string, "Philips (or NXP)", "Philips");
|
2018-02-23 14:52:00 +01:00
|
|
|
T (nm_utils_fixup_vendor_string, "Planex Communications, Inc", "Planex");
|
|
|
|
|
T (nm_utils_fixup_vendor_string, "Planex Communications", "Planex");
|
|
|
|
|
T (nm_utils_fixup_vendor_string, "Planex", "Planex");
|
|
|
|
|
T (nm_utils_fixup_vendor_string, "PLANEX", "PLANEX");
|
|
|
|
|
T (nm_utils_fixup_vendor_string, "Portsmith", "Portsmith");
|
2018-02-23 14:52:05 +01:00
|
|
|
T (nm_utils_fixup_vendor_string, "Prolific Technology, Inc.", "Prolific");
|
2018-02-23 14:52:00 +01:00
|
|
|
T (nm_utils_fixup_vendor_string, "Qcom", "Qcom");
|
2018-02-23 14:52:05 +01:00
|
|
|
T (nm_utils_fixup_vendor_string, "Qi Hardware", "Qi");
|
|
|
|
|
T (nm_utils_fixup_vendor_string, "QinHeng Electronics", "QinHeng");
|
2018-02-23 14:52:00 +01:00
|
|
|
T (nm_utils_fixup_vendor_string, "QLogic Corp.", "QLogic");
|
|
|
|
|
T (nm_utils_fixup_vendor_string, "Qualcomm Atheros Communications", "Qualcomm Atheros");
|
|
|
|
|
T (nm_utils_fixup_vendor_string, "Qualcomm Atheros", "Qualcomm Atheros");
|
|
|
|
|
T (nm_utils_fixup_vendor_string, "Qualcomm, Inc.", "Qualcomm");
|
2018-02-23 14:52:05 +01:00
|
|
|
T (nm_utils_fixup_vendor_string, "Qualcomm / Option", "Qualcomm");
|
2018-02-23 14:52:00 +01:00
|
|
|
T (nm_utils_fixup_vendor_string, "Quanta Computer, Inc.", "Quanta Computer");
|
2018-02-23 14:52:05 +01:00
|
|
|
T (nm_utils_fixup_vendor_string, "Quanta Microsystems, Inc.", "Quanta");
|
2018-02-23 14:52:00 +01:00
|
|
|
T (nm_utils_fixup_vendor_string, "Quantenna Communications, Inc.", "Quantenna");
|
2018-02-23 14:52:05 +01:00
|
|
|
T (nm_utils_fixup_vendor_string, "RadioShack Corp. (Tandy)", "RadioShack");
|
2018-02-23 14:52:05 +01:00
|
|
|
T (nm_utils_fixup_vendor_string, "Ralink corp.", "Ralink");
|
|
|
|
|
T (nm_utils_fixup_vendor_string, "Ralink Technology, Corp.", "Ralink");
|
2018-02-23 14:52:00 +01:00
|
|
|
T (nm_utils_fixup_vendor_string, "RDC Semiconductor, Inc.", "RDC");
|
|
|
|
|
T (nm_utils_fixup_vendor_string, "Realtek Semiconductor Co., Ltd.", "Realtek");
|
|
|
|
|
T (nm_utils_fixup_vendor_string, "Realtek Semiconductor Corp.", "Realtek");
|
|
|
|
|
T (nm_utils_fixup_vendor_string, "Red Hat, Inc.", "Red Hat");
|
2018-02-23 14:52:05 +01:00
|
|
|
T (nm_utils_fixup_vendor_string, "SafeNet (wrong ID)", "SafeNet");
|
2018-02-23 14:52:00 +01:00
|
|
|
T (nm_utils_fixup_vendor_string, "Sagem", "Sagem");
|
2018-02-23 14:52:05 +01:00
|
|
|
T (nm_utils_fixup_vendor_string, "Samsung Electronics Co., Ltd", "Samsung");
|
|
|
|
|
T (nm_utils_fixup_vendor_string, "Sega Enterprises Ltd", "Sega");
|
2018-02-23 14:52:00 +01:00
|
|
|
T (nm_utils_fixup_vendor_string, "Senao", "Senao");
|
2018-02-23 14:52:05 +01:00
|
|
|
T (nm_utils_fixup_vendor_string, "Shark Multimedia", "Shark");
|
2018-02-23 14:52:00 +01:00
|
|
|
T (nm_utils_fixup_vendor_string, "Sharp Corp.", "Sharp");
|
2018-02-23 14:52:05 +01:00
|
|
|
T (nm_utils_fixup_vendor_string, "Siemens Information and Communication Products", "Siemens");
|
2018-02-23 14:52:00 +01:00
|
|
|
T (nm_utils_fixup_vendor_string, "Sierra Wireless, Inc.", "Sierra Wireless");
|
|
|
|
|
T (nm_utils_fixup_vendor_string, "Silicom", "Silicom");
|
2018-02-23 14:52:05 +01:00
|
|
|
T (nm_utils_fixup_vendor_string, "Silicon Graphics Intl. Corp.", "Silicon Graphics");
|
2018-02-23 14:52:05 +01:00
|
|
|
T (nm_utils_fixup_vendor_string, "Silicon Integrated Systems [SiS]", "SiS");
|
2018-02-23 14:52:05 +01:00
|
|
|
T (nm_utils_fixup_vendor_string, "Sitecom Europe B.V.", "Sitecom");
|
2018-02-23 14:52:00 +01:00
|
|
|
T (nm_utils_fixup_vendor_string, "Sitecom", "Sitecom");
|
|
|
|
|
T (nm_utils_fixup_vendor_string, "smartBridges, Inc.", "smartBridges");
|
|
|
|
|
T (nm_utils_fixup_vendor_string, "SohoWare", "SohoWare");
|
|
|
|
|
T (nm_utils_fixup_vendor_string, "Solarflare Communications", "Solarflare");
|
|
|
|
|
T (nm_utils_fixup_vendor_string, "Sony Corp.", "Sony");
|
|
|
|
|
T (nm_utils_fixup_vendor_string, "SpeedStream", "SpeedStream");
|
2018-02-23 14:52:05 +01:00
|
|
|
T (nm_utils_fixup_vendor_string, "Sphairon Access Systems GmbH", "Sphairon");
|
2018-02-23 14:52:05 +01:00
|
|
|
T (nm_utils_fixup_vendor_string, "Standard Microsystems Corp [SMC]", "SMC");
|
2018-02-23 14:52:05 +01:00
|
|
|
T (nm_utils_fixup_vendor_string, "Standard Microsystems Corp.", "Standard");
|
2018-02-23 14:52:00 +01:00
|
|
|
T (nm_utils_fixup_vendor_string, "STMicroelectronics", "STMicroelectronics");
|
2018-02-23 14:52:05 +01:00
|
|
|
T (nm_utils_fixup_vendor_string, "Sundance Technology Inc / IC Plus Corp", "Sundance");
|
2018-02-23 14:52:05 +01:00
|
|
|
T (nm_utils_fixup_vendor_string, "Surecom Technology Corp.", "Surecom");
|
|
|
|
|
T (nm_utils_fixup_vendor_string, "Surecom Technology", "Surecom");
|
2018-02-23 14:52:00 +01:00
|
|
|
T (nm_utils_fixup_vendor_string, "Sweex", "Sweex");
|
|
|
|
|
T (nm_utils_fixup_vendor_string, "SysKonnect", "SysKonnect");
|
2018-02-23 14:52:05 +01:00
|
|
|
T (nm_utils_fixup_vendor_string, "T & A Mobile Phones", "T & A");
|
2018-02-23 14:52:00 +01:00
|
|
|
T (nm_utils_fixup_vendor_string, "TDK Semiconductor Corp.", "TDK");
|
2018-02-23 14:52:05 +01:00
|
|
|
T (nm_utils_fixup_vendor_string, "Tehuti Networks Ltd.", "Tehuti");
|
|
|
|
|
T (nm_utils_fixup_vendor_string, "Tekram Technology Co., Ltd", "Tekram");
|
|
|
|
|
T (nm_utils_fixup_vendor_string, "Telit Wireless Solutions", "Telit");
|
|
|
|
|
T (nm_utils_fixup_vendor_string, "Texas Instruments, Inc.", "Texas");
|
|
|
|
|
T (nm_utils_fixup_vendor_string, "Thales Norway A/S", "Thales");
|
|
|
|
|
T (nm_utils_fixup_vendor_string, "TMT Technology, Inc.", "TMT");
|
2018-02-23 14:52:00 +01:00
|
|
|
T (nm_utils_fixup_vendor_string, "Toshiba Corp.", "Toshiba");
|
|
|
|
|
T (nm_utils_fixup_vendor_string, "TRENDnet", "TRENDnet");
|
2018-02-23 14:52:05 +01:00
|
|
|
T (nm_utils_fixup_vendor_string, "Trident Microsystems", "Trident");
|
|
|
|
|
T (nm_utils_fixup_vendor_string, "Trust International B.V.", "Trust");
|
2018-02-23 14:52:05 +01:00
|
|
|
T (nm_utils_fixup_vendor_string, "TTTech Computertechnik AG (Wrong ID)", "TTTech");
|
2018-02-23 14:52:00 +01:00
|
|
|
T (nm_utils_fixup_vendor_string, "TwinMOS", "TwinMOS");
|
2018-02-23 14:52:05 +01:00
|
|
|
T (nm_utils_fixup_vendor_string, "U-Blox AG", "U-Blox");
|
|
|
|
|
T (nm_utils_fixup_vendor_string, "ULi Electronics Inc.", "ULi");
|
2018-02-23 14:52:00 +01:00
|
|
|
T (nm_utils_fixup_vendor_string, "U.S. Robotics", "U.S. Robotics");
|
|
|
|
|
T (nm_utils_fixup_vendor_string, "Vaillant", "Vaillant");
|
2018-02-23 14:52:05 +01:00
|
|
|
T (nm_utils_fixup_vendor_string, "VIA Technologies, Inc.", "VIA");
|
|
|
|
|
T (nm_utils_fixup_vendor_string, "Victor Company of Japan, Ltd", "Victor");
|
2018-02-23 14:52:00 +01:00
|
|
|
T (nm_utils_fixup_vendor_string, "VMware", "VMware");
|
2018-02-23 14:52:05 +01:00
|
|
|
T (nm_utils_fixup_vendor_string, "VTech Holdings, Ltd", "VTech");
|
2018-02-23 14:52:00 +01:00
|
|
|
T (nm_utils_fixup_vendor_string, "Wavecom", "Wavecom");
|
|
|
|
|
T (nm_utils_fixup_vendor_string, "Westell", "Westell");
|
2018-02-23 14:52:05 +01:00
|
|
|
T (nm_utils_fixup_vendor_string, "Western Digital Technologies, Inc.", "Western Digital");
|
2018-02-23 14:52:00 +01:00
|
|
|
T (nm_utils_fixup_vendor_string, "Wilocity Ltd.", "Wilocity");
|
2018-02-23 14:52:05 +01:00
|
|
|
T (nm_utils_fixup_vendor_string, "Winbond Electronics Corp", "Winbond");
|
2018-02-23 14:52:00 +01:00
|
|
|
T (nm_utils_fixup_vendor_string, "Winbond", "Winbond");
|
|
|
|
|
T (nm_utils_fixup_vendor_string, "Wistron NeWeb", "Wistron NeWeb");
|
|
|
|
|
T (nm_utils_fixup_vendor_string, "Xircom", "Xircom");
|
|
|
|
|
T (nm_utils_fixup_vendor_string, "Z-Com", "Z-Com");
|
|
|
|
|
T (nm_utils_fixup_vendor_string, "Zinwell", "Zinwell");
|
2018-02-23 14:52:05 +01:00
|
|
|
T (nm_utils_fixup_vendor_string, "Zoom Telephonics, Inc.", "Zoom");
|
|
|
|
|
T (nm_utils_fixup_vendor_string, "ZTE WCDMA Technologies MSM", "ZTE");
|
2018-02-23 14:52:00 +01:00
|
|
|
T (nm_utils_fixup_vendor_string, "ZyDAS", "ZyDAS");
|
|
|
|
|
T (nm_utils_fixup_vendor_string, "ZyXEL Communications Corp.", "ZyXEL");
|
2017-05-19 10:32:13 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/*****************************************************************************/
|
|
|
|
|
|
2017-05-19 10:19:25 +02:00
|
|
|
NMTST_DEFINE ();
|
|
|
|
|
|
|
|
|
|
int main (int argc, char **argv)
|
|
|
|
|
{
|
|
|
|
|
nmtst_init (&argc, &argv, TRUE);
|
|
|
|
|
|
2017-05-19 10:32:13 +02:00
|
|
|
g_test_add_func ("/libnm/general/fixup_desc_string", test_fixup_desc_string);
|
2018-02-23 14:52:00 +01:00
|
|
|
g_test_add_func ("/libnm/general/fixup_vendor_string", test_fixup_vendor_string);
|
2017-05-19 10:32:13 +02:00
|
|
|
|
2017-05-19 10:19:25 +02:00
|
|
|
return g_test_run ();
|
|
|
|
|
}
|