diff options
| author | Michael Biebl <biebl@debian.org> | 2018-06-04 00:07:45 +0200 |
|---|---|---|
| committer | Michael Biebl <biebl@debian.org> | 2018-06-04 00:07:45 +0200 |
| commit | 04bc9e1cd3544445d883ad29ea108c1645c8e7b7 (patch) | |
| tree | d10c354b1b980ca8a7b9e48ec9019e8ed88bde2b /libnm | |
| parent | ee9c73a923909e23a649407be77e25235d769e25 (diff) | |
New upstream version 1.11.4 upstream/1.11.4
Diffstat (limited to 'libnm')
63 files changed, 4979 insertions, 652 deletions
diff --git a/libnm/NetworkManager.h b/libnm/NetworkManager.h index 2bdd2ed9..9226aa35 100644 --- a/libnm/NetworkManager.h +++ b/libnm/NetworkManager.h @@ -38,12 +38,14 @@ #include "nm-device-generic.h" #include "nm-device-infiniband.h" #include "nm-device-ip-tunnel.h" +#include "nm-device-macsec.h" #include "nm-device-macvlan.h" #include "nm-device-modem.h" #include "nm-device-olpc-mesh.h" #include "nm-device-ovs-interface.h" #include "nm-device-ovs-port.h" #include "nm-device-ovs-bridge.h" +#include "nm-device-ppp.h" #include "nm-device-team.h" #include "nm-device-tun.h" #include "nm-device-vlan.h" @@ -108,6 +110,8 @@ #include "nm-vpn-service-plugin.h" #include "nm-wimax-nsp.h" +#include "nm-autoptr.h" + #undef __NETWORKMANAGER_H_INSIDE__ #endif /* __NETWORKMANAGER_H__ */ diff --git a/libnm/fake-typelib/NMClient.gir b/libnm/fake-typelib/NMClient.gir new file mode 100644 index 00000000..3002f8d6 --- /dev/null +++ b/libnm/fake-typelib/NMClient.gir @@ -0,0 +1,9 @@ +<?xml version="1.0"?> +<!-- A lame duck typelib which prevents GIR from loading the + real one (which would crash due to conflict with libnm) --> +<repository version="1.2" + xmlns="http://www.gtk.org/introspection/core/1.0" + xmlns:c="http://www.gtk.org/introspection/c/1.0" + xmlns:glib="http://www.gtk.org/introspection/glib/1.0"> + <namespace name="NMClient" version="0.0" /> +</repository> diff --git a/libnm/fake-typelib/NetworkManager.gir b/libnm/fake-typelib/NetworkManager.gir new file mode 100644 index 00000000..d15d29af --- /dev/null +++ b/libnm/fake-typelib/NetworkManager.gir @@ -0,0 +1,10 @@ +<?xml version="1.0"?> +<!-- A lame duck typelib which prevents GIR from loading the + real one (which would crash due to conflict with libnm) --> +<repository version="1.2" + xmlns="http://www.gtk.org/introspection/core/1.0" + xmlns:c="http://www.gtk.org/introspection/c/1.0" + xmlns:glib="http://www.gtk.org/introspection/glib/1.0"> + <namespace name="NetworkManager" version="0.0"> + </namespace> +</repository> diff --git a/libnm/fake-typelib/meson.build b/libnm/fake-typelib/meson.build new file mode 100644 index 00000000..c0a779a2 --- /dev/null +++ b/libnm/fake-typelib/meson.build @@ -0,0 +1,30 @@ +g_ir_compiler = find_program('g-ir-compiler') + +girs = [ + 'NetworkManager', + 'NMClient' +] + +resource_data = [] + +foreach gir: girs + gir_typelib = gir + '.typelib' + + resource_data += custom_target( + gir_typelib, + input: gir + '.gir', + output: gir_typelib, + command: [g_ir_compiler, '@INPUT@', '-o', '@OUTPUT@'] + ) +endforeach + +resource = 'typelibs' + +sources += gnome.compile_resources( + resource, + resource + '.gresource.xml', + source_dir: '.', + dependencies: resource_data, + extra_args: '--manual-register', + export: true +) diff --git a/libnm/fake-typelib/typelibs.gresource.xml b/libnm/fake-typelib/typelibs.gresource.xml new file mode 100644 index 00000000..9a71d975 --- /dev/null +++ b/libnm/fake-typelib/typelibs.gresource.xml @@ -0,0 +1,7 @@ +<?xml version="1.0" encoding="UTF-8"?> +<gresources> + <gresource prefix="/org/freedesktop/libnm/fake-typelib"> + <file>NetworkManager.typelib</file> + <file>NMClient.typelib</file> + </gresource> +</gresources> diff --git a/libnm/generate-plugin-docs.pl b/libnm/generate-plugin-docs.pl index 24912a03..e4963b7c 100755 --- a/libnm/generate-plugin-docs.pl +++ b/libnm/generate-plugin-docs.pl @@ -46,25 +46,14 @@ use v5.10; # global variables my @keywords = ("property", "variable", "format", "values", "default", "example", "description"); -my @source_files; my @data; my $fo; -(scalar @ARGV == 3) or die "Usage: $0 <plugin> <srcdir> <output-xml-file>\n"; -my ($plugin, $srcdir, $output) = @ARGV; +(scalar @ARGV >= 3) or die "Usage: $0 <plugin> <output-xml-file> <srcfiles>\n"; +my ($plugin, $output, (@source_files)) = @ARGV; my $start_tag = "---$plugin---\\s*\$"; my $end_tag = '---end---'; -# get source files to scan for documentation comments (nm-setting-<something>.c) -my $file = "$srcdir/Makefile.am"; -open my $fh, '<', $file or die "Can't open $file: $!"; -while (my $line = <$fh>) { - if ($line =~ /^\t*(libnm-core\/nm-setting-[^.]*\.c)( \\)?$/g) { - push @source_files, $1; - } -} -close $fh; - # open output file open $fo, '>', $output or die "Can't open $output: $!"; @@ -73,11 +62,10 @@ write_header(); # write generated documenation for each setting foreach my $c_file (@source_files) { - my $path = "$srcdir/$c_file"; - my $setting_name = get_setting_name($path); + my $setting_name = get_setting_name($c_file); if ($setting_name) { write_item("<setting name=\"$setting_name\">"); - scan_doc_comments($path, $start_tag, $end_tag); + scan_doc_comments($c_file, $start_tag, $end_tag); write_item("</setting>"); } } diff --git a/libnm/generate-setting-docs.py b/libnm/generate-setting-docs.py index f888ff22..22552615 100755 --- a/libnm/generate-setting-docs.py +++ b/libnm/generate-setting-docs.py @@ -183,6 +183,7 @@ def usage(): exit() parser = argparse.ArgumentParser() +parser.add_argument('-l', '--lib-path', metavar='PATH', action='append', help='path to scan for shared libraries') parser.add_argument('-g', '--gir', metavar='FILE', help='NM-1.0.gir file') parser.add_argument('-x', '--overrides', metavar='FILE', help='documentation overrides file') parser.add_argument('-o', '--output', metavar='FILE', help='output file') @@ -191,6 +192,10 @@ args = parser.parse_args() if args.gir is None or args.output is None: usage() +if args.lib_path: + for lib in args.lib_path: + GIRepository.Repository.prepend_library_path(lib) + girxml = ET.parse(args.gir).getroot() outfile = open(args.output, mode='w') diff --git a/libnm/libnm.ver b/libnm/libnm.ver index 7646a931..ec1b91da 100644 --- a/libnm/libnm.ver +++ b/libnm/libnm.ver @@ -1331,3 +1331,34 @@ global: nm_utils_tc_tfilter_from_str; nm_utils_tc_tfilter_to_str; } libnm_1_10_0; + +libnm_1_12_0 { +global: + nm_checkpoint_create_flags_get_type; + nm_checkpoint_get_created; + nm_checkpoint_get_devices; + nm_checkpoint_get_rollback_timeout; + nm_checkpoint_get_type; + nm_client_checkpoint_adjust_rollback_timeout; + nm_client_checkpoint_adjust_rollback_timeout_finish; + nm_client_checkpoint_create; + nm_client_checkpoint_create_finish; + nm_client_checkpoint_destroy; + nm_client_checkpoint_destroy_finish; + nm_client_checkpoint_rollback; + nm_client_checkpoint_rollback_finish; + nm_client_get_checkpoints; + nm_connection_get_setting_tc_config; + nm_device_ip_tunnel_get_flags; + nm_ip_tunnel_flags_get_type; + nm_remote_connection_get_flags; + nm_setting_connection_get_mdns; + nm_setting_connection_mdns_get_type; + nm_setting_ip_tunnel_get_flags; + nm_setting_vpn_get_data_keys; + nm_setting_vpn_get_secret_keys; + nm_setting_wireless_security_get_fils; + nm_setting_wireless_security_fils_get_type; + nm_settings_connection_flags_get_type; + nm_vpn_service_plugin_shutdown; +} libnm_1_10_0; diff --git a/libnm/meson.build b/libnm/meson.build new file mode 100644 index 00000000..91fe972e --- /dev/null +++ b/libnm/meson.build @@ -0,0 +1,259 @@ +libnm_inc = include_directories('.') + +sources = files('nm-libnm-utils.c') + +deps = [ + libnmdbus_dep, + shared_dep +] + +cflags = [ + '-DG_LOG_DOMAIN="@0@"'.format(libnm_name), + '-DNETWORKMANAGER_COMPILATION=NM_NETWORKMANAGER_COMPILATION_LIBNM', +] + +if have_fake_typelibs + deps += gir_dep + subdir('fake-typelib') +endif + +libnm_utils = static_library( + 'nm-utils', + sources: sources, + include_directories: libnm_core_inc, + dependencies: deps, + c_args: cflags +) + +libnm_headers = files( + 'NetworkManager.h', + 'nm-access-point.h', + 'nm-active-connection.h', + 'nm-autoptr.h', + 'nm-checkpoint.h', + 'nm-client.h', + 'nm-device-adsl.h', + 'nm-device-bond.h', + 'nm-device-bridge.h', + 'nm-device-bt.h', + 'nm-device-dummy.h', + 'nm-device-ethernet.h', + 'nm-device-generic.h', + 'nm-device.h', + 'nm-device-infiniband.h', + 'nm-device-ip-tunnel.h', + 'nm-device-macsec.h', + 'nm-device-macvlan.h', + 'nm-device-modem.h', + 'nm-device-olpc-mesh.h', + 'nm-device-ovs-interface.h', + 'nm-device-ovs-port.h', + 'nm-device-ovs-bridge.h', + 'nm-device-ppp.h', + 'nm-device-team.h', + 'nm-device-tun.h', + 'nm-device-vlan.h', + 'nm-device-vxlan.h', + 'nm-device-wifi.h', + 'nm-device-wimax.h', + 'nm-dhcp-config.h', + 'nm-ip-config.h', + 'nm-object.h', + 'nm-remote-connection.h', + 'nm-secret-agent-old.h', + 'nm-types.h', + 'nm-vpn-connection.h', + 'nm-vpn-editor.h', + 'nm-vpn-plugin-old.h', + 'nm-vpn-service-plugin.h', + 'nm-wimax-nsp.h' +) + +install_headers( + libnm_core_headers + libnm_headers + [version_header], + subdir: libnm_name +) + +enum_headers = libnm_headers + [version_header] +enum_types = 'nm-enum-types' + +libnm_enum = gnome.mkenums( + enum_types, + sources: enum_headers, + identifier_prefix: nm_id_prefix, + c_template: enum_types + '.c.template', + h_template: enum_types + '.h.template', + install_header: true, + install_dir: libnm_pkgincludedir +) + +libnm_sources = files( + 'nm-access-point.c', + 'nm-active-connection.c', + 'nm-checkpoint.c', + 'nm-client.c', + 'nm-dbus-helpers.c', + 'nm-device-adsl.c', + 'nm-device-bond.c', + 'nm-device-bridge.c', + 'nm-device-bt.c', + 'nm-device.c', + 'nm-device-dummy.c', + 'nm-device-ethernet.c', + 'nm-device-generic.c', + 'nm-device-infiniband.c', + 'nm-device-ip-tunnel.c', + 'nm-device-macsec.c', + 'nm-device-macvlan.c', + 'nm-device-modem.c', + 'nm-device-olpc-mesh.c', + 'nm-device-ovs-interface.c', + 'nm-device-ovs-port.c', + 'nm-device-ovs-bridge.c', + 'nm-device-ppp.c', + 'nm-device-team.c', + 'nm-device-tun.c', + 'nm-device-vlan.c', + 'nm-device-vxlan.c', + 'nm-device-wifi.c', + 'nm-device-wimax.c', + 'nm-dhcp-config.c', + 'nm-dhcp4-config.c', + 'nm-dhcp6-config.c', + 'nm-dns-manager.c', + 'nm-ip-config.c', + 'nm-ip4-config.c', + 'nm-ip6-config.c', + 'nm-manager.c', + 'nm-object.c', + 'nm-remote-connection.c', + 'nm-remote-settings.c', + 'nm-secret-agent-old.c', + 'nm-vpn-connection.c', + 'nm-vpn-plugin-old.c', + 'nm-vpn-editor.c', + 'nm-vpn-service-plugin.c', + 'nm-wimax-nsp.c' +) + +deps = [ + dl_dep, + libudev_dep, + shared_dep, + uuid_dep +] + +linker_script = join_paths(meson.current_source_dir(), 'libnm.ver') + + +libnm = shared_library( + 'nm', + sources: libnm_sources + libnm_enum, + version: libnm_version, + include_directories: libnm_core_inc, + dependencies: deps, + c_args: cflags, + link_with: libnm_utils, + link_whole: libnm_core, + link_args: [ + '-Wl,--version-script,@0@'.format(linker_script), + ], + link_depends: linker_script, + install: true +) + +libnm_dep = declare_dependency( + sources: libnm_enum[1], + include_directories: libnm_inc, + link_with: libnm +) + +pkg.generate( + libraries: libnm, + version: nm_version, + name: libnm_name, + description: 'Convenience library for clients of NetworkManager', + filebase: libnm_name, + subdirs: libnm_name, + requires: 'gio-2.0', + variables: [ + 'exec_prefix=${prefix}', + 'vpnservicedir=' + join_paths(nm_pkglibdir, 'VPN') + ] +) + +run_target( + 'check-local-exports-' + libnm_name, + command: [check_exports, libnm.full_path(), linker_script], + depends: libnm +) + +if enable_introspection + gir_sources = libnm_core_enum + libnm_core_headers + libnm_core_sources + libnm_enum + libnm_headers + libnm_sources + [version_header] + + libnm_gir = gnome.generate_gir( + libnm, + sources: gir_sources, + nsversion: nm_gir_version, + namespace: 'NM', + identifier_prefix: nm_id_prefix, + symbol_prefix: nm_id_prefix.to_lower(), + export_packages: libnm_name, + includes: 'Gio-2.0', + extra_args: cflags, + header: 'NetworkManager.h', + install: true + ) + + generate_plugin_docs = join_paths(meson.current_source_dir(), 'generate-plugin-docs.pl') + + name = 'nm-settings-keyfile-docs.xml' + nm_settings_keyfile_docs = custom_target( + name, + input: libnm_core_settings_sources, + output: name, + command: [perl, generate_plugin_docs, 'keyfile', '@OUTPUT@', '@INPUT@'] + ) + + name = 'nm-settings-docs-overrides.xml' + nm_settings_docs_overrides = custom_target( + name, + input: libnm_core_settings_sources, + output: name, + command: [perl, generate_plugin_docs, 'dbus', '@OUTPUT@', '@INPUT@'] + ) + + if enable_ifcfg_rh + name = 'nm-settings-ifcfg-rh-docs.xml' + nm_settings_ifcfg_rh_docs = custom_target( + name, + input: libnm_core_settings_sources, + output: name, + command: [perl, generate_plugin_docs, 'ifcfg-rh', '@OUTPUT@', '@INPUT@'] + ) + endif + + generate_setting_docs = join_paths(meson.current_source_dir(), 'generate-setting-docs.py') + + name = 'nm-property-docs.xml' + nm_property_docs = custom_target( + name, + input: libnm_gir[0], + output: name, + command: [generate_setting_docs, '--lib-path', meson.current_build_dir(), '--gir', '@INPUT@', '--output', '@OUTPUT@'], + depends: libnm + ) + + name = 'nm-settings-docs.xml' + nm_settings_docs = custom_target( + name, + input: libnm_gir[0], + output: name, + command: [generate_setting_docs, '--lib-path', meson.current_build_dir(), '--gir', '@INPUT@', '--overrides', nm_settings_docs_overrides, '--output', '@OUTPUT@'], + depends: libnm + ) +endif + +if enable_tests + subdir('tests') +endif diff --git a/libnm/nm-access-point.c b/libnm/nm-access-point.c index ed0135ba..75ea5570 100644 --- a/libnm/nm-access-point.c +++ b/libnm/nm-access-point.c @@ -144,9 +144,9 @@ nm_access_point_get_ssid (NMAccessPoint *ap) * nm_access_point_get_frequency: * @ap: a #NMAccessPoint * - * Gets the frequency of the access point. + * Gets the frequency of the access point in MHz. * - * Returns: the frequency + * Returns: the frequency in MHz **/ guint32 nm_access_point_get_frequency (NMAccessPoint *ap) @@ -209,9 +209,9 @@ nm_access_point_get_max_bitrate (NMAccessPoint *ap) * nm_access_point_get_strength: * @ap: a #NMAccessPoint * - * Gets the current signal strength of the access point. + * Gets the current signal strength of the access point as a percentage. * - * Returns: the signal strength + * Returns: the signal strength (0 to 100) **/ guint8 nm_access_point_get_strength (NMAccessPoint *ap) @@ -483,7 +483,6 @@ init_dbus (NMObject *object) property_info); } - static void nm_access_point_class_init (NMAccessPointClass *ap_class) { @@ -588,7 +587,7 @@ nm_access_point_class_init (NMAccessPointClass *ap_class) NULL, G_PARAM_READABLE | G_PARAM_STATIC_STRINGS)); - + /** * NMAccessPoint:mode: * diff --git a/libnm/nm-active-connection.c b/libnm/nm-active-connection.c index a0ea8a25..0314667f 100644 --- a/libnm/nm-active-connection.c +++ b/libnm/nm-active-connection.c @@ -580,7 +580,6 @@ init_dbus (NMObject *object) property_info); } - static void nm_active_connection_class_init (NMActiveConnectionClass *ap_class) { @@ -661,11 +660,9 @@ nm_active_connection_class_init (NMActiveConnectionClass *ap_class) G_PARAM_STATIC_STRINGS)); /** - * NMActiveConnection:devices: + * NMActiveConnection:devices: (type GPtrArray(NMDevice)) * * The devices of the active connection. - * - * Element-type: NMDevice **/ g_object_class_install_property (object_class, PROP_DEVICES, diff --git a/libnm/nm-autoptr.h b/libnm/nm-autoptr.h new file mode 100644 index 00000000..6b2fd015 --- /dev/null +++ b/libnm/nm-autoptr.h @@ -0,0 +1,85 @@ +/* -*- Mode: C; tab-width: 4; indent-tabs-mode: t; c-basic-offset: 4 -*- */ +/* + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the + * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, + * Boston, MA 02110-1301 USA. + * + * Copyright 2018 Red Hat, Inc. + */ + +#ifndef __NM_AUTOPTR_H__ +#define __NM_AUTOPTR_H__ + +/* + * Note that you might use this header with older versions of libnm + * that do not yet ship this header. In that case, copy the header + * into your source tree. + */ + +#include <glib.h> +#include <NetworkManager.h> + +#ifdef G_DEFINE_AUTOPTR_CLEANUP_FUNC + +G_DEFINE_AUTOPTR_CLEANUP_FUNC (NMClient, g_object_unref) + +G_DEFINE_AUTOPTR_CLEANUP_FUNC (NMConnection, g_object_unref) +G_DEFINE_AUTOPTR_CLEANUP_FUNC (NMSetting, g_object_unref) + +G_DEFINE_AUTOPTR_CLEANUP_FUNC (NMSetting8021x, g_object_unref) +G_DEFINE_AUTOPTR_CLEANUP_FUNC (NMSettingAdsl, g_object_unref) +G_DEFINE_AUTOPTR_CLEANUP_FUNC (NMSettingBluetooth, g_object_unref) +G_DEFINE_AUTOPTR_CLEANUP_FUNC (NMSettingBond, g_object_unref) +G_DEFINE_AUTOPTR_CLEANUP_FUNC (NMSettingBridge, g_object_unref) +G_DEFINE_AUTOPTR_CLEANUP_FUNC (NMSettingBridgePort, g_object_unref) +G_DEFINE_AUTOPTR_CLEANUP_FUNC (NMSettingCdma, g_object_unref) +G_DEFINE_AUTOPTR_CLEANUP_FUNC (NMSettingConnection, g_object_unref) +G_DEFINE_AUTOPTR_CLEANUP_FUNC (NMSettingDcb, g_object_unref) +G_DEFINE_AUTOPTR_CLEANUP_FUNC (NMSettingDummy, g_object_unref) +G_DEFINE_AUTOPTR_CLEANUP_FUNC (NMSettingGeneric, g_object_unref) +G_DEFINE_AUTOPTR_CLEANUP_FUNC (NMSettingGsm, g_object_unref) +G_DEFINE_AUTOPTR_CLEANUP_FUNC (NMSettingInfiniband, g_object_unref) +G_DEFINE_AUTOPTR_CLEANUP_FUNC (NMSettingIP4Config, g_object_unref) +G_DEFINE_AUTOPTR_CLEANUP_FUNC (NMSettingIP6Config, g_object_unref) +G_DEFINE_AUTOPTR_CLEANUP_FUNC (NMSettingIPConfig, g_object_unref) +G_DEFINE_AUTOPTR_CLEANUP_FUNC (NMSettingIPTunnel, g_object_unref) +G_DEFINE_AUTOPTR_CLEANUP_FUNC (NMSettingMacsec, g_object_unref) +G_DEFINE_AUTOPTR_CLEANUP_FUNC (NMSettingMacvlan, g_object_unref) +G_DEFINE_AUTOPTR_CLEANUP_FUNC (NMSettingOlpcMesh, g_object_unref) +G_DEFINE_AUTOPTR_CLEANUP_FUNC (NMSettingOvsBridge, g_object_unref) +G_DEFINE_AUTOPTR_CLEANUP_FUNC (NMSettingOvsInterface, g_object_unref) +G_DEFINE_AUTOPTR_CLEANUP_FUNC (NMSettingOvsPatch, g_object_unref) +G_DEFINE_AUTOPTR_CLEANUP_FUNC (NMSettingOvsPort, g_object_unref) +G_DEFINE_AUTOPTR_CLEANUP_FUNC (NMSettingPpp, g_object_unref) +G_DEFINE_AUTOPTR_CLEANUP_FUNC (NMSettingPppoe, g_object_unref) +G_DEFINE_AUTOPTR_CLEANUP_FUNC (NMSettingProxy, g_object_unref) +G_DEFINE_AUTOPTR_CLEANUP_FUNC (NMSettingSerial, g_object_unref) +G_DEFINE_AUTOPTR_CLEANUP_FUNC (NMSettingTCConfig, g_object_unref) +G_DEFINE_AUTOPTR_CLEANUP_FUNC (NMSettingTeam, g_object_unref) +G_DEFINE_AUTOPTR_CLEANUP_FUNC (NMSettingTeamPort, g_object_unref) +G_DEFINE_AUTOPTR_CLEANUP_FUNC (NMSettingTun, g_object_unref) +G_DEFINE_AUTOPTR_CLEANUP_FUNC (NMSettingUser, g_object_unref) +G_DEFINE_AUTOPTR_CLEANUP_FUNC (NMSettingVlan, g_object_unref) +G_DEFINE_AUTOPTR_CLEANUP_FUNC (NMSettingVpn, g_object_unref) +G_DEFINE_AUTOPTR_CLEANUP_FUNC (NMSettingVxlan, g_object_unref) +G_DEFINE_AUTOPTR_CLEANUP_FUNC (NMSettingWimax, g_object_unref) +G_DEFINE_AUTOPTR_CLEANUP_FUNC (NMSettingWired, g_object_unref) +G_DEFINE_AUTOPTR_CLEANUP_FUNC (NMSettingWireless, g_object_unref) +G_DEFINE_AUTOPTR_CLEANUP_FUNC (NMSettingWirelessSecurity, g_object_unref) + +G_DEFINE_AUTOPTR_CLEANUP_FUNC (NMVpnPluginInfo, g_object_unref) + +#endif + +#endif /* __NM_AUTOPTR_H__ */ diff --git a/libnm/nm-checkpoint.c b/libnm/nm-checkpoint.c new file mode 100644 index 00000000..153a7104 --- /dev/null +++ b/libnm/nm-checkpoint.c @@ -0,0 +1,218 @@ +/* -*- Mode: C; tab-width: 4; indent-tabs-mode: t; c-basic-offset: 4 -*- */ +/* + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2 of the License, or (at your option) any later version. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this program. If not, see + * <http://www.gnu.org/licenses/>. + * + * Copyright 2017 Red Hat, Inc. + */ + +#include "nm-default.h" + +#include "nm-checkpoint.h" +#include "nm-core-internal.h" +#include "nm-dbus-interface.h" +#include "nm-device.h" +#include "nm-object-private.h" + +typedef struct { + GPtrArray *devices; + gint64 created; + guint32 rollback_timeout; +} NMCheckpointPrivate; + +struct _NMCheckpoint { + NMObject parent; + NMCheckpointPrivate _priv; +}; + +struct _NMCheckpointClass { + NMObjectClass parent; +}; + +G_DEFINE_TYPE (NMCheckpoint, nm_checkpoint, NM_TYPE_OBJECT) + +#define NM_CHECKPOINT_GET_PRIVATE(self) _NM_GET_PRIVATE (self, NMCheckpoint, NM_IS_CHECKPOINT) + +enum { + PROP_0, + PROP_DEVICES, + PROP_CREATED, + PROP_ROLLBACK_TIMEOUT, + + LAST_PROP +}; + +/** + * nm_checkpoint_get_devices: + * @checkpoint: a #NMCheckpoint + * + * The devices that are part of this checkpoint. + * + * Returns: (element-type NMDevice): the devices list. + * + * Since: 1.12 + **/ +const GPtrArray * +nm_checkpoint_get_devices (NMCheckpoint *checkpoint) +{ + g_return_val_if_fail (NM_IS_CHECKPOINT (checkpoint), NULL); + + return NM_CHECKPOINT_GET_PRIVATE (checkpoint)->devices; +} + +/** + * nm_checkpoint_get_created: + * @checkpoint: a #NMCheckpoint + * + * Gets the timestamp (in CLOCK_BOOTTIME milliseconds) + * of checkpoint creation. + * + * Returns: the timestamp of checkpoint creation. + * + * Since: 1.12 + **/ +gint64 +nm_checkpoint_get_created (NMCheckpoint *checkpoint) +{ + g_return_val_if_fail (NM_IS_CHECKPOINT (checkpoint), 0); + + return NM_CHECKPOINT_GET_PRIVATE (checkpoint)->created; +} + +/** + * nm_checkpoint_get_rollback_timeout: + * @checkpoint: a #NMCheckpoint + * + * Gets the the timeout in seconds for automatic rollback. + * + * Returns: the rollback timeout. + * + * Since: 1.12 + **/ +guint32 +nm_checkpoint_get_rollback_timeout (NMCheckpoint *checkpoint) +{ + g_return_val_if_fail (NM_IS_CHECKPOINT (checkpoint), 0); + + return NM_CHECKPOINT_GET_PRIVATE (checkpoint)->rollback_timeout; +} + +/*****************************************************************************/ + +static void +nm_checkpoint_init (NMCheckpoint *checkpoint) +{ +} + +static void +finalize (GObject *object) +{ + NMCheckpointPrivate *priv = NM_CHECKPOINT_GET_PRIVATE (NM_CHECKPOINT (object)); + + g_ptr_array_unref (priv->devices); + + G_OBJECT_CLASS (nm_checkpoint_parent_class)->finalize (object); +} + +static void +get_property (GObject *object, + guint prop_id, + GValue *value, + GParamSpec *pspec) +{ + NMCheckpoint *checkpoint = NM_CHECKPOINT (object); + NMCheckpointPrivate *priv = NM_CHECKPOINT_GET_PRIVATE (checkpoint); + + switch (prop_id) { + case PROP_DEVICES: + g_value_take_boxed (value, _nm_utils_copy_object_array (priv->devices)); + break; + case PROP_CREATED: + g_value_set_int64 (value, priv->created); + break; + case PROP_ROLLBACK_TIMEOUT: + g_value_set_uint (value, priv->rollback_timeout); + break; + default: + G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec); + break; + } +} + +static void +init_dbus (NMObject *object) +{ + NMCheckpointPrivate *priv = NM_CHECKPOINT_GET_PRIVATE (NM_CHECKPOINT (object)); + const NMPropertiesInfo property_info[] = { + { NM_CHECKPOINT_DEVICES, &priv->devices, NULL, NM_TYPE_DEVICE }, + { NM_CHECKPOINT_CREATED, &priv->created }, + { NM_CHECKPOINT_ROLLBACK_TIMEOUT, &priv->rollback_timeout }, + { NULL }, + }; + + NM_OBJECT_CLASS (nm_checkpoint_parent_class)->init_dbus (object); + + _nm_object_register_properties (object, + NM_DBUS_INTERFACE_CHECKPOINT, + property_info); +} + +static void +nm_checkpoint_class_init (NMCheckpointClass *checkpoint_class) +{ + GObjectClass *object_class = G_OBJECT_CLASS (checkpoint_class); + NMObjectClass *nm_object_class = NM_OBJECT_CLASS (checkpoint_class); + + object_class->get_property = get_property; + object_class->finalize = finalize; + + nm_object_class->init_dbus = init_dbus; + + /** + * NMCheckpoint:devices: (type GPtrArray(NMDevice)) + * + * The devices that are part of this checkpoint. + * + * Since: 1.12 + **/ + g_object_class_install_property + (object_class, PROP_DEVICES, + g_param_spec_boxed (NM_CHECKPOINT_DEVICES, "", "", + G_TYPE_PTR_ARRAY, + G_PARAM_READABLE | + G_PARAM_STATIC_STRINGS)); + + /** + * NMCheckpoint:created: + * + * The timestamp (in CLOCK_BOOTTIME milliseconds) of checkpoint creation. + * + * Since: 1.12 + **/ + g_object_class_install_property + (object_class, PROP_CREATED, + g_param_spec_int64 (NM_CHECKPOINT_CREATED, "", "", + G_MININT64, G_MAXINT64, 0, + G_PARAM_READABLE | + G_PARAM_STATIC_STRINGS)); + + /** + * NMCheckpoint:rollback-timeout: + * + * Timeout in seconds for automatic rollback, or zero. + * + * Since: 1.12 + **/ + g_object_class_install_property + (object_class, PROP_ROLLBACK_TIMEOUT, + g_param_spec_uint (NM_CHECKPOINT_ROLLBACK_TIMEOUT, "", "", + 0, G_MAXUINT32, 0, + G_PARAM_READABLE | + G_PARAM_STATIC_STRINGS)); +} diff --git a/libnm/nm-checkpoint.h b/libnm/nm-checkpoint.h new file mode 100644 index 00000000..a0c9d722 --- /dev/null +++ b/libnm/nm-checkpoint.h @@ -0,0 +1,53 @@ +/* -*- Mode: C; tab-width: 4; indent-tabs-mode: t; c-basic-offset: 4 -*- */ +/* + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2 of the License, or (at your option) any later version. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this program. If not, see + * <http://www.gnu.org/licenses/>. + * + * Copyright 2017 Red Hat, Inc. + */ + +#ifndef __NM_CHECKPOINT_H__ +#define __NM_CHECKPOINT_H__ + +#if !defined (__NETWORKMANAGER_H_INSIDE__) && !defined (NETWORKMANAGER_COMPILATION) +#error "Only <NetworkManager.h> can be included directly." +#endif + +#include "nm-object.h" + +G_BEGIN_DECLS + +#define NM_TYPE_CHECKPOINT (nm_checkpoint_get_type ()) +#define NM_CHECKPOINT(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), NM_TYPE_CHECKPOINT, NMCheckpoint)) +#define NM_CHECKPOINT_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), NM_TYPE_CHECKPOINT, NMCheckpointClass)) +#define NM_IS_CHECKPOINT(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), NM_TYPE_CHECKPOINT)) +#define NM_IS_CHECKPOINT_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), NM_TYPE_CHECKPOINT)) +#define NM_CHECKPOINT_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), NM_TYPE_CHECKPOINT, NMCheckpointClass)) + +#define NM_CHECKPOINT_DEVICES "devices" +#define NM_CHECKPOINT_CREATED "created" +#define NM_CHECKPOINT_ROLLBACK_TIMEOUT "rollback-timeout" + +/** + * NMCheckpoint: + */ +typedef struct _NMCheckpointClass NMCheckpointClass; + +GType nm_checkpoint_get_type (void); + +NM_AVAILABLE_IN_1_12 +const GPtrArray *nm_checkpoint_get_devices (NMCheckpoint *checkpoint); +NM_AVAILABLE_IN_1_12 +gint64 nm_checkpoint_get_created (NMCheckpoint *checkpoint); +NM_AVAILABLE_IN_1_12 +guint32 nm_checkpoint_get_rollback_timeout (NMCheckpoint *checkpoint); + +G_END_DECLS + +#endif /* __NM_CHECKPOINT_H__ */ diff --git a/libnm/nm-client.c b/libnm/nm-client.c index 4653b272..18d3e318 100644 --- a/libnm/nm-client.c +++ b/libnm/nm-client.c @@ -50,6 +50,7 @@ #include "nm-access-point.h" #include "nm-active-connection.h" +#include "nm-checkpoint.h" #include "nm-device-adsl.h" #include "nm-device-bond.h" #include "nm-device-bridge.h" @@ -109,6 +110,7 @@ typedef struct { GDBusObjectManager *object_manager; GCancellable *new_object_manager_cancellable; struct udev *udev; + bool udev_inited:1; } NMClientPrivate; enum { @@ -139,6 +141,7 @@ enum { PROP_DNS_MODE, PROP_DNS_RC_MANAGER, PROP_DNS_CONFIGURATION, + PROP_CHECKPOINTS, LAST_PROP }; @@ -752,7 +755,6 @@ nm_client_check_connectivity_finish (NMClient *client, return (NMConnectivityState) g_simple_async_result_get_op_res_gssize (simple); } - /** * nm_client_save_hostname: * @client: the %NMClient @@ -2076,6 +2078,385 @@ dns_notify (GObject *object, } } +static void +checkpoint_create_cb (GObject *object, + GAsyncResult *result, + gpointer user_data) +{ + GSimpleAsyncResult *simple = user_data; + NMCheckpoint *checkpoint; + GError *error = NULL; + + checkpoint = nm_manager_checkpoint_create_finish (NM_MANAGER (object), result, &error); + if (checkpoint) + g_simple_async_result_set_op_res_gpointer (simple, checkpoint, g_object_unref); + else + g_simple_async_result_take_error (simple, error); + + g_simple_async_result_complete (simple); + g_object_unref (simple); +} + +/** + * nm_client_get_checkpoints: + * @client: a #NMClient + * + * Gets all the active checkpoints. + * + * Returns: (transfer none) (element-type NMCheckpoint): a #GPtrArray + * containing all the #NMCheckpoint. The returned array is owned by the + * #NMClient object and should not be modified. + * + * Since: 1.12 + **/ +const GPtrArray * +nm_client_get_checkpoints (NMClient *client) +{ + g_return_val_if_fail (NM_IS_CLIENT (client), NULL); + + if (!nm_client_get_nm_running (client)) + return ∅ + + return nm_manager_get_checkpoints (NM_CLIENT_GET_PRIVATE (client)->manager); +} + +/** + * nm_client_checkpoint_create: + * @client: the %NMClient + * @devices: (element-type NMDevice): a list of devices for which a + * checkpoint should be created. + * @rollback_timeout: the rollback timeout in seconds + * @flags: creation flags + * @cancellable: a #GCancellable, or %NULL + * @callback: (scope async): callback to be called when the add operation completes + * @user_data: (closure): caller-specific data passed to @callback + * + * Creates a checkpoint of the current networking configuration + * for given interfaces. An empty @devices argument means all + * devices. If @rollback_timeout is not zero, a rollback is + * automatically performed after the given timeout. + * + * Since: 1.12 + **/ +void +nm_client_checkpoint_create (NMClient *client, + const GPtrArray *devices, + guint32 rollback_timeout, + NMCheckpointCreateFlags flags, + GCancellable *cancellable, + GAsyncReadyCallback callback, + gpointer user_data) +{ + GSimpleAsyncResult *simple; + GError *error = NULL; + + g_return_if_fail (NM_IS_CLIENT (client)); + + if (!_nm_client_check_nm_running (client, &error)) { + g_simple_async_report_take_gerror_in_idle (G_OBJECT (client), callback, user_data, error); + return; + } + + simple = g_simple_async_result_new (G_OBJECT (client), callback, user_data, + nm_client_checkpoint_create); + if (cancellable) + g_simple_async_result_set_check_cancellable (simple, cancellable); + nm_manager_checkpoint_create (NM_CLIENT_GET_PRIVATE (client)->manager, + devices, rollback_timeout, flags, + cancellable, checkpoint_create_cb, simple); +} + +/** + * nm_client_checkpoint_create_finish: + * @client: the #NMClient + * @result: the result passed to the #GAsyncReadyCallback + * @error: location for a #GError, or %NULL + * + * Gets the result of a call to nm_client_checkpoint_create(). + * + * Returns: (transfer full): the new #NMCheckpoint on success, %NULL on + * failure, in which case @error will be set. + * + * Since: 1.12 + **/ +NMCheckpoint * +nm_client_checkpoint_create_finish (NMClient *client, + GAsyncResult *result, + GError **error) +{ + GSimpleAsyncResult *simple; + + g_return_val_if_fail (NM_IS_CLIENT (client), NULL); + g_return_val_if_fail (G_IS_SIMPLE_ASYNC_RESULT (result), NULL); + + simple = G_SIMPLE_ASYNC_RESULT (result); + if (g_simple_async_result_propagate_error (simple, error)) + return NULL; + else + return g_object_ref (g_simple_async_result_get_op_res_gpointer (simple)); +} + +static void +checkpoint_destroy_cb (GObject *object, + GAsyncResult *result, + gpointer user_data) +{ + GSimpleAsyncResult *simple = user_data; + GError *error = NULL; + + if (nm_manager_checkpoint_destroy_finish (NM_MANAGER (object), result, &error)) + g_simple_async_result_set_op_res_gboolean (simple, TRUE); + else + g_simple_async_result_take_error (simple, error); + + g_simple_async_result_complete (simple); + g_object_unref (simple); +} + +/** + * nm_client_checkpoint_destroy: + * @client: the %NMClient + * @checkpoint_path: the D-Bus path for the checkpoint + * @cancellable: a #GCancellable, or %NULL + * @callback: (scope async): callback to be called when the add operation completes + * @user_data: (closure): caller-specific data passed to @callback + * + * Destroys an existing checkpoint without performing a rollback. + * + * Since: 1.12 + **/ +void +nm_client_checkpoint_destroy (NMClient *client, + const char *checkpoint_path, + GCancellable *cancellable, + GAsyncReadyCallback callback, + gpointer user_data) +{ + GSimpleAsyncResult *simple; + GError *error = NULL; + + g_return_if_fail (NM_IS_CLIENT (client)); + g_return_if_fail (checkpoint_path && checkpoint_path[0] == '/'); + + if (!_nm_client_check_nm_running (client, &error)) { + g_simple_async_report_take_gerror_in_idle (G_OBJECT (client), callback, user_data, error); + return; + } + + simple = g_simple_async_result_new (G_OBJECT (client), callback, user_data, + nm_client_checkpoint_destroy); + if (cancellable) + g_simple_async_result_set_check_cancellable (simple, cancellable); + nm_manager_checkpoint_destroy (NM_CLIENT_GET_PRIVATE (client)->manager, + checkpoint_path, + cancellable, checkpoint_destroy_cb, simple); +} + +/** + * nm_client_checkpoint_destroy_finish: + * @client: an #NMClient + * @result: the result passed to the #GAsyncReadyCallback + * @error: location for a #GError, or %NULL + * + * Gets the result of a call to nm_client_checkpoint_destroy(). + * + * Returns: %TRUE on success or %FALSE on failure, in which case + * @error will be set. + * + * Since: 1.12 + **/ +gboolean +nm_client_checkpoint_destroy_finish (NMClient *client, + GAsyncResult *result, + GError **error) +{ + GSimpleAsyncResult *simple; + + g_return_val_if_fail (NM_IS_CLIENT (client), FALSE); + g_return_val_if_fail (G_IS_SIMPLE_ASYNC_RESULT (result), FALSE); + + simple = G_SIMPLE_ASYNC_RESULT (result); + if (g_simple_async_result_propagate_error (simple, error)) + return FALSE; + else + return g_simple_async_result_get_op_res_gboolean (simple); +} + +static void +checkpoint_rollback_cb (GObject *object, + GAsyncResult *result, + gpointer user_data) +{ + GSimpleAsyncResult *simple = user_data; + GHashTable *hash; + GError *error = NULL; + + hash = nm_manager_checkpoint_rollback_finish (NM_MANAGER (object), result, &error); + if (hash) + g_simple_async_result_set_op_res_gpointer (simple, hash, (GDestroyNotify) g_hash_table_unref); + else + g_simple_async_result_take_error (simple, error); + + g_simple_async_result_complete (simple); + g_object_unref (simple); +} + +/** + * nm_client_checkpoint_rollback: + * @client: the %NMClient + * @checkpoint_path: the D-Bus path to the checkpoint + * @cancellable: a #GCancellable, or %NULL + * @callback: (scope async): callback to be called when the add operation completes + * @user_data: (closure): caller-specific data passed to @callback + * + * Performs the rollback of a checkpoint before the timeout is reached. + * + * Since: 1.12 + **/ +void +nm_client_checkpoint_rollback (NMClient *client, + const char *checkpoint_path, + GCancellable *cancellable, + GAsyncReadyCallback callback, + gpointer user_data) +{ + GSimpleAsyncResult *simple; + GError *error = NULL; + + g_return_if_fail (NM_IS_CLIENT (client)); + g_return_if_fail (checkpoint_path && checkpoint_path[0] == '/'); + + if (!_nm_client_check_nm_running (client, &error)) { + g_simple_async_report_take_gerror_in_idle (G_OBJECT (client), callback, user_data, error); + return; + } + + simple = g_simple_async_result_new (G_OBJECT (client), callback, user_data, + nm_client_checkpoint_rollback); + if (cancellable) + g_simple_async_result_set_check_cancellable (simple, cancellable); + nm_manager_checkpoint_rollback (NM_CLIENT_GET_PRIVATE (client)->manager, + checkpoint_path, + cancellable, checkpoint_rollback_cb, simple); +} + +/** + * nm_client_checkpoint_rollback_finish: + * @client: an #NMClient + * @result: the result passed to the #GAsyncReadyCallback + * @error: location for a #GError, or %NULL + * + * Gets the result of a call to nm_client_checkpoint_rollback(). + * + * Returns: (transfer full) (element-type utf8 guint32): an hash table of + * devices and results. Devices are represented by their original + * D-Bus path; each result is a #NMRollbackResult. + * + * Since: 1.12 + **/ +GHashTable * +nm_client_checkpoint_rollback_finish (NMClient *client, + GAsyncResult *result, + GError **error) +{ + GSimpleAsyncResult *simple; + GHashTable *hash; + + g_return_val_if_fail (NM_IS_CLIENT (client), NULL); + g_return_val_if_fail (G_IS_SIMPLE_ASYNC_RESULT (result), NULL); + + simple = G_SIMPLE_ASYNC_RESULT (result); + if (g_simple_async_result_propagate_error (simple, error)) + return NULL; + else { + hash = g_simple_async_result_get_op_res_gpointer (simple); + return g_hash_table_ref (hash); + } +} + +static void +checkpoint_adjust_rollback_timeout_cb (GObject *object, + GAsyncResult *result, + gpointer user_data) +{ + gs_unref_object GSimpleAsyncResult *simple = user_data; + GError *error = NULL; + + if (nm_manager_checkpoint_adjust_rollback_timeout_finish (NM_MANAGER (object), result, &error)) + g_simple_async_result_set_op_res_gboolean (simple, TRUE); + else + g_simple_async_result_take_error (simple, error); + + g_simple_async_result_complete (simple); +} + +/** + * nm_client_checkpoint_adjust_rollback_timeout: + * @client: the %NMClient + * @checkpoint_path: a D-Bus path to a checkpoint + * @add_timeout: the timeout in seconds counting from now. + * Set to zero, to disable the timeout. + * @cancellable: a #GCancellable, or %NULL + * @callback: (scope async): callback to be called when the add operation completes + * @user_data: (closure): caller-specific data passed to @callback + * + * Resets the timeout for the checkpoint with path @checkpoint_path + * to @timeout_add. + * + * Since: 1.12 + **/ +void +nm_client_checkpoint_adjust_rollback_timeout (NMClient *client, + const char *checkpoint_path, + guint32 add_timeout, + GCancellable *cancellable, + GAsyncReadyCallback callback, + gpointer user_data) +{ + GSimpleAsyncResult *simple; + GError *error = NULL; + + g_return_if_fail (NM_IS_CLIENT (client)); + g_return_if_fail (checkpoint_path && checkpoint_path[0] == '/'); + + if (!_nm_client_check_nm_running (client, &error)) { + g_simple_async_report_take_gerror_in_idle (G_OBJECT (client), callback, user_data, error); + return; + } + + simple = g_simple_async_result_new (G_OBJECT (client), callback, user_data, + nm_client_checkpoint_rollback); + if (cancellable) + g_simple_async_result_set_check_cancellable (simple, cancellable); + nm_manager_checkpoint_adjust_rollback_timeout (NM_CLIENT_GET_PRIVATE (client)->manager, + checkpoint_path, add_timeout, + cancellable, checkpoint_adjust_rollback_timeout_cb, simple); +} + +/** + * nm_client_checkpoint_adjust_rollback_timeout_finish: + * @client: an #NMClient + * @result: the result passed to the #GAsyncReadyCallback + * @error: location for a #GError, or %NULL + * + * Gets the result of a call to nm_client_checkpoint_adjust_rollback_timeout(). + * + * Returns: %TRUE on success or %FALSE on failure. + * + * Since: 1.12 + **/ +gboolean +nm_client_checkpoint_adjust_rollback_timeout_finish (NMClient *client, + GAsyncResult *result, + GError **error) +{ + g_return_val_if_fail (NM_IS_CLIENT (client), FALSE); + g_return_val_if_fail (G_IS_SIMPLE_ASYNC_RESULT (result), FALSE); + + return !g_simple_async_result_propagate_error (G_SIMPLE_ASYNC_RESULT (result), + error); +} + /****************************************************************/ /* Object Initialization */ /****************************************************************/ @@ -2206,6 +2587,8 @@ obj_nm_for_gdbus_object (NMClient *self, GDBusObject *object, GDBusObjectManager type = NM_TYPE_VPN_CONNECTION; else if (strcmp (ifname, NM_DBUS_INTERFACE_WIMAX_NSP) == 0) type = NM_TYPE_WIMAX_NSP; + else if (strcmp (ifname, NM_DBUS_INTERFACE_CHECKPOINT) == 0) + type = NM_TYPE_CHECKPOINT; if (type != G_TYPE_INVALID) break; @@ -2221,9 +2604,14 @@ obj_nm_for_gdbus_object (NMClient *self, GDBusObject *object, GDBusObjectManager NULL); if (NM_IS_DEVICE (obj_nm)) { priv = NM_CLIENT_GET_PRIVATE (self); - if (!priv->udev) - priv->udev = udev_new (); - _nm_device_set_udev (NM_DEVICE (obj_nm), priv->udev); + if (G_UNLIKELY (!priv->udev_inited)) { + priv->udev_inited = TRUE; + /* for testing, we don't want to use udev in libnm. */ + if (!nm_streq0 (g_getenv ("LIBNM_USE_NO_UDEV"), "1")) + priv->udev = udev_new (); + } + if (priv->udev) + _nm_device_set_udev (NM_DEVICE (obj_nm), priv->udev); } g_object_set_qdata_full (G_OBJECT (object), _nm_object_obj_nm_quark (), obj_nm, g_object_unref); @@ -2240,7 +2628,6 @@ obj_nm_inited (GObject *object, GAsyncResult *result, gpointer user_data) } } - static void object_added (GDBusObjectManager *object_manager, GDBusObject *object, gpointer user_data) { @@ -2357,7 +2744,6 @@ objects_created (NMClient *client, GDBusObjectManager *object_manager, GError ** G_CALLBACK (dns_notify), client); } - /* The handlers don't really use the client instance. However * it makes it convenient to unhook them by data. */ g_signal_connect (object_manager, "object-added", @@ -2783,6 +3169,12 @@ get_property (GObject *object, guint prop_id, case PROP_ALL_DEVICES: g_value_take_boxed (value, _nm_utils_copy_object_array (nm_client_get_all_devices (self))); break; + case PROP_CHECKPOINTS: + if (priv->manager) + g_object_get_property (G_OBJECT (priv->manager), pspec->name, value); + else + g_value_take_boxed (value, g_ptr_array_new ()); + break; /* Settings properties. */ case PROP_CONNECTIONS: @@ -2976,11 +3368,9 @@ nm_client_class_init (NMClientClass *client_class) G_PARAM_STATIC_STRINGS)); /** - * NMClient:active-connections: + * NMClient:active-connections: (type GPtrArray(NMActiveConnection)) * * The active connections. - * - * Element-type: NMActiveConnection **/ g_object_class_install_property (object_class, PROP_ACTIVE_CONNECTIONS, @@ -3057,11 +3447,9 @@ nm_client_class_init (NMClientClass *client_class) G_PARAM_STATIC_STRINGS)); /** - * NMClient:devices: + * NMClient:devices: (type GPtrArray(NMDevice)) * * List of real network devices. Does not include placeholder devices. - * - * Element-type: NMDevice **/ g_object_class_install_property (object_class, PROP_DEVICES, @@ -3071,11 +3459,9 @@ nm_client_class_init (NMClientClass *client_class) G_PARAM_STATIC_STRINGS)); /** - * NMClient:all-devices: + * NMClient:all-devices: (type GPtrArray(NMDevice)) * * List of both real devices and device placeholders. - * - * Element-type: NMDevice * Since: 1.2 **/ g_object_class_install_property @@ -3086,14 +3472,12 @@ nm_client_class_init (NMClientClass *client_class) G_PARAM_STATIC_STRINGS)); /** - * NMClient:connections: + * NMClient:connections: (type GPtrArray(NMRemoteConnection)) * * The list of configured connections that are available to the user. (Note * that this differs from the underlying D-Bus property, which may also * contain the object paths of connections that the user does not have * permission to read the details of.) - * - * Element-type: NMRemoteConnection */ g_object_class_install_property (object_class, PROP_CONNECTIONS, @@ -3170,7 +3554,7 @@ nm_client_class_init (NMClientClass *client_class) G_PARAM_STATIC_STRINGS)); /** - * NMClient:dns-configuration: + * NMClient:dns-configuration: (type GPtrArray(GVariant)) * * The current DNS configuration represented as an array of * dictionaries. Each dictionary has the "nameservers", @@ -3189,6 +3573,20 @@ nm_client_class_init (NMClientClass *client_class) G_PARAM_READABLE | G_PARAM_STATIC_STRINGS)); + /** + * NMClient:checkpoints: (type GPtrArray(NMCheckpoint)) + * + * The list of active checkpoints. + * + * Since: 1.12 + */ + g_object_class_install_property + (object_class, PROP_CHECKPOINTS, + g_param_spec_boxed (NM_MANAGER_CHECKPOINTS, "", "", + G_TYPE_PTR_ARRAY, + G_PARAM_READABLE | + G_PARAM_STATIC_STRINGS)); + /* signals */ /** diff --git a/libnm/nm-client.h b/libnm/nm-client.h index 3b37b55a..6259b122 100644 --- a/libnm/nm-client.h +++ b/libnm/nm-client.h @@ -403,6 +403,57 @@ const char *nm_client_get_dns_rc_manager (NMClient *client); NM_AVAILABLE_IN_1_6 const GPtrArray *nm_client_get_dns_configuration (NMClient *client); +NM_AVAILABLE_IN_1_12 +const GPtrArray *nm_client_get_checkpoints (NMClient *client); + +NM_AVAILABLE_IN_1_12 +void nm_client_checkpoint_create (NMClient *client, + const GPtrArray *devices, + guint32 rollback_timeout, + NMCheckpointCreateFlags flags, + GCancellable *cancellable, + GAsyncReadyCallback callback, + gpointer user_data); +NM_AVAILABLE_IN_1_12 +NMCheckpoint *nm_client_checkpoint_create_finish (NMClient *client, + GAsyncResult *result, + GError **error); + +NM_AVAILABLE_IN_1_12 +void nm_client_checkpoint_destroy (NMClient *client, + const char *checkpoint_path, + GCancellable *cancellable, + GAsyncReadyCallback callback, + gpointer user_data); +NM_AVAILABLE_IN_1_12 +gboolean nm_client_checkpoint_destroy_finish (NMClient *client, + GAsyncResult *result, + GError **error); + +NM_AVAILABLE_IN_1_12 +void nm_client_checkpoint_rollback (NMClient *client, + const char *checkpoint_path, + GCancellable *cancellable, + GAsyncReadyCallback callback, + gpointer user_data); +NM_AVAILABLE_IN_1_12 +GHashTable *nm_client_checkpoint_rollback_finish (NMClient *client, + GAsyncResult *result, + GError **error); + +NM_AVAILABLE_IN_1_12 +void nm_client_checkpoint_adjust_rollback_timeout (NMClient *client, + const char *checkpoint_path, + guint32 add_timeout, + GCancellable *cancellable, + GAsyncReadyCallback callback, + gpointer user_data); + +NM_AVAILABLE_IN_1_12 +gboolean nm_client_checkpoint_adjust_rollback_timeout_finish (NMClient *client, + GAsyncResult *result, + GError **error); + G_END_DECLS #endif /* __NM_CLIENT_H__ */ diff --git a/libnm/nm-dbus-helpers.h b/libnm/nm-dbus-helpers.h index 1847da1d..0f2cabe8 100644 --- a/libnm/nm-dbus-helpers.h +++ b/libnm/nm-dbus-helpers.h @@ -21,6 +21,10 @@ #ifndef __NM_DBUS_HELPERS_PRIVATE_H__ #define __NM_DBUS_HELPERS_PRIVATE_H__ +#if !((NETWORKMANAGER_COMPILATION) & NM_NETWORKMANAGER_COMPILATION_WITH_LIBNM_PRIVATE) +#error Cannot use this header. +#endif + #include "nm-dbus-compat.h" GBusType _nm_dbus_bus_type (void); diff --git a/libnm/nm-device-adsl.c b/libnm/nm-device-adsl.c index 3285745d..a82aa8d0 100644 --- a/libnm/nm-device-adsl.c +++ b/libnm/nm-device-adsl.c @@ -30,7 +30,6 @@ #include "nm-setting-adsl.h" #include "nm-setting-connection.h" - G_DEFINE_TYPE (NMDeviceAdsl, nm_device_adsl, NM_TYPE_DEVICE) #define NM_DEVICE_ADSL_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), NM_TYPE_DEVICE_ADSL, NMDeviceAdslPrivate)) diff --git a/libnm/nm-device-bond.c b/libnm/nm-device-bond.c index 96334840..9c43598f 100644 --- a/libnm/nm-device-bond.c +++ b/libnm/nm-device-bond.c @@ -248,11 +248,9 @@ nm_device_bond_class_init (NMDeviceBondClass *bond_class) G_PARAM_STATIC_STRINGS)); /** - * NMDeviceBond:slaves: + * NMDeviceBond:slaves: (type GPtrArray(NMDevice)) * * The devices slaved to the bond device. - * - * Element-type: NMDevice **/ g_object_class_install_property (object_class, PROP_SLAVES, diff --git a/libnm/nm-device-bridge.c b/libnm/nm-device-bridge.c index 27f362b2..76934daa 100644 --- a/libnm/nm-device-bridge.c +++ b/libnm/nm-device-bridge.c @@ -253,11 +253,9 @@ nm_device_bridge_class_init (NMDeviceBridgeClass *bridge_class) G_PARAM_STATIC_STRINGS)); /** - * NMDeviceBridge:slaves: + * NMDeviceBridge:slaves: (type GPtrArray(NMDevice)) * * The devices slaved to the bridge device. - * - * Element-type: NMDevice **/ g_object_class_install_property (object_class, PROP_SLAVES, diff --git a/libnm/nm-device-ethernet.c b/libnm/nm-device-ethernet.c index 727ea8a6..ebb019dc 100644 --- a/libnm/nm-device-ethernet.c +++ b/libnm/nm-device-ethernet.c @@ -92,9 +92,9 @@ nm_device_ethernet_get_permanent_hw_address (NMDeviceEthernet *device) * nm_device_ethernet_get_speed: * @device: a #NMDeviceEthernet * - * Gets the speed of the #NMDeviceEthernet. + * Gets the speed of the #NMDeviceEthernet in Mbit/s. * - * Returns: the speed of the device + * Returns: the speed of the device in Mbit/s **/ guint32 nm_device_ethernet_get_speed (NMDeviceEthernet *device) diff --git a/libnm/nm-device-ip-tunnel.c b/libnm/nm-device-ip-tunnel.c index e0dfc0f4..2f7efe9d 100644 --- a/libnm/nm-device-ip-tunnel.c +++ b/libnm/nm-device-ip-tunnel.c @@ -46,6 +46,7 @@ typedef struct { char *output_key; guint8 encap_limit; guint32 flow_label; + guint32 flags; } NMDeviceIPTunnelPrivate; enum { @@ -61,6 +62,7 @@ enum { PROP_OUTPUT_KEY, PROP_ENCAPSULATION_LIMIT, PROP_FLOW_LABEL, + PROP_FLAGS, LAST_PROP }; @@ -242,6 +244,22 @@ nm_device_ip_tunnel_get_flow_label (NMDeviceIPTunnel *device) return NM_DEVICE_IP_TUNNEL_GET_PRIVATE (device)->flow_label; } +/** + * nm_device_ip_tunnel_get_flags: + * @device: a #NMDeviceIPTunnel + * + * Returns: the tunnel flags + * + * Since: 1.12 + **/ +NMIPTunnelFlags +nm_device_ip_tunnel_get_flags (NMDeviceIPTunnel *device) +{ + g_return_val_if_fail (NM_IS_DEVICE_IP_TUNNEL (device), NM_IP_TUNNEL_FLAG_NONE); + + return NM_DEVICE_IP_TUNNEL_GET_PRIVATE (device)->flags; +} + static gboolean connection_compatible (NMDevice *device, NMConnection *connection, GError **error) { @@ -286,6 +304,7 @@ init_dbus (NMObject *object) { NM_DEVICE_IP_TUNNEL_OUTPUT_KEY, &priv->output_key }, { NM_DEVICE_IP_TUNNEL_ENCAPSULATION_LIMIT, &priv->encap_limit }, { NM_DEVICE_IP_TUNNEL_FLOW_LABEL, &priv->flow_label }, + { NM_DEVICE_IP_TUNNEL_FLAGS, &priv->flags }, { NULL }, }; @@ -352,6 +371,9 @@ get_property (GObject *object, case PROP_FLOW_LABEL: g_value_set_uint (value, nm_device_ip_tunnel_get_flow_label (device)); break; + case PROP_FLAGS: + g_value_set_uint (value, nm_device_ip_tunnel_get_flags (device)); + break; default: G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec); break; @@ -536,4 +558,18 @@ nm_device_ip_tunnel_class_init (NMDeviceIPTunnelClass *bond_class) 0, (1 << 20) - 1, 0, G_PARAM_READABLE | G_PARAM_STATIC_STRINGS)); + + /** + * NMDeviceIPTunnel:flags: + * + * Tunnel flags. + * + * Since: 1.12 + **/ + g_object_class_install_property + (object_class, PROP_FLAGS, + g_param_spec_uint (NM_DEVICE_IP_TUNNEL_FLAGS, "", "", + 0, G_MAXUINT32, 0, + G_PARAM_READABLE | + G_PARAM_STATIC_STRINGS)); } diff --git a/libnm/nm-device-ip-tunnel.h b/libnm/nm-device-ip-tunnel.h index 6d748d96..92a83edc 100644 --- a/libnm/nm-device-ip-tunnel.h +++ b/libnm/nm-device-ip-tunnel.h @@ -26,6 +26,7 @@ #endif #include "nm-device.h" +#include "nm-setting-ip-tunnel.h" G_BEGIN_DECLS @@ -47,6 +48,7 @@ G_BEGIN_DECLS #define NM_DEVICE_IP_TUNNEL_OUTPUT_KEY "output-key" #define NM_DEVICE_IP_TUNNEL_ENCAPSULATION_LIMIT "encapsulation-limit" #define NM_DEVICE_IP_TUNNEL_FLOW_LABEL "flow-label" +#define NM_DEVICE_IP_TUNNEL_FLAGS "flags" /** * NMDeviceIPTunnel: @@ -87,6 +89,8 @@ NM_AVAILABLE_IN_1_2 guint8 nm_device_ip_tunnel_get_encapsulation_limit (NMDeviceIPTunnel *device); NM_AVAILABLE_IN_1_2 guint nm_device_ip_tunnel_get_flow_label (NMDeviceIPTunnel *device); +NM_AVAILABLE_IN_1_12 +NMIPTunnelFlags nm_device_ip_tunnel_get_flags (NMDeviceIPTunnel *device); G_END_DECLS diff --git a/libnm/nm-device-macvlan.c b/libnm/nm-device-macvlan.c index e6477219..23c649cc 100644 --- a/libnm/nm-device-macvlan.c +++ b/libnm/nm-device-macvlan.c @@ -143,7 +143,6 @@ nm_device_macvlan_get_hw_address (NMDeviceMacvlan *device) return nm_str_not_empty (NM_DEVICE_MACVLAN_GET_PRIVATE (device)->hw_address); } - static gboolean connection_compatible (NMDevice *device, NMConnection *connection, GError **error) { diff --git a/libnm/nm-device-team.c b/libnm/nm-device-team.c index 0b62b864..101e3160 100644 --- a/libnm/nm-device-team.c +++ b/libnm/nm-device-team.c @@ -274,11 +274,9 @@ nm_device_team_class_init (NMDeviceTeamClass *team_class) G_PARAM_STATIC_STRINGS)); /** - * NMDeviceTeam:slaves: + * NMDeviceTeam:slaves: (type GPtrArray(NMDevice)) * * The devices enslaved to the team device. - * - * Element-type: NMDevice **/ g_object_class_install_property (object_class, PROP_SLAVES, diff --git a/libnm/nm-device-wifi.c b/libnm/nm-device-wifi.c index e4ea94e9..1f2118fa 100644 --- a/libnm/nm-device-wifi.c +++ b/libnm/nm-device-wifi.c @@ -887,11 +887,9 @@ nm_device_wifi_class_init (NMDeviceWifiClass *wifi_class) G_PARAM_STATIC_STRINGS)); /** - * NMDeviceWifi:access-points: + * NMDeviceWifi:access-points: (type GPtrArray(NMAccessPoint)) * * List of all Wi-Fi access points the device can see. - * - * Element-type: NMAccessPoint **/ g_object_class_install_property (object_class, PROP_ACCESS_POINTS, diff --git a/libnm/nm-device-wimax.c b/libnm/nm-device-wimax.c index fd0a2dc5..7134024f 100644 --- a/libnm/nm-device-wimax.c +++ b/libnm/nm-device-wimax.c @@ -650,11 +650,9 @@ nm_device_wimax_class_init (NMDeviceWimaxClass *wimax_class) G_PARAM_STATIC_STRINGS)); /** - * NMDeviceWimax:nsps: + * NMDeviceWimax:nsps: (type GPtrArray(NMWimaxNsp)) * * List of all WiMAX Network Service Providers the device can see. - * - * Element-type: NMWimaxNsp **/ g_object_class_install_property (object_class, PROP_NSPS, diff --git a/libnm/nm-device.c b/libnm/nm-device.c index ffdfca9c..57f0bedd 100644 --- a/libnm/nm-device.c +++ b/libnm/nm-device.c @@ -735,11 +735,9 @@ nm_device_class_init (NMDeviceClass *device_class) G_PARAM_STATIC_STRINGS)); /** - * NMDevice:available-connections: + * NMDevice:available-connections: (type GPtrArray(NMRemoteConnection)) * * The available connections of the device - * - * Element-type: NMRemoteConnection **/ g_object_class_install_property (object_class, PROP_AVAILABLE_CONNECTIONS, @@ -1297,6 +1295,136 @@ nm_device_get_available_connections (NMDevice *device) return NM_DEVICE_GET_PRIVATE (device)->available_connections; } +static const char * +get_type_name (NMDevice *device) +{ + switch (nm_device_get_device_type (device)) { + case NM_DEVICE_TYPE_ETHERNET: + return _("Ethernet"); + case NM_DEVICE_TYPE_WIFI: + return _("Wi-Fi"); + case NM_DEVICE_TYPE_BT: + return _("Bluetooth"); + case NM_DEVICE_TYPE_OLPC_MESH: + return _("OLPC Mesh"); + case NM_DEVICE_TYPE_OVS_INTERFACE: + return _("OpenVSwitch Interface"); + case NM_DEVICE_TYPE_OVS_PORT: + return _("OpenVSwitch Port"); + case NM_DEVICE_TYPE_OVS_BRIDGE: + return _("OpenVSwitch Bridge"); + case NM_DEVICE_TYPE_WIMAX: + return _("WiMAX"); + case NM_DEVICE_TYPE_MODEM: + return _("Mobile Broadband"); + case NM_DEVICE_TYPE_INFINIBAND: + return _("InfiniBand"); + case NM_DEVICE_TYPE_BOND: + return _("Bond"); + case NM_DEVICE_TYPE_TEAM: + return _("Team"); + case NM_DEVICE_TYPE_BRIDGE: + return _("Bridge"); + case NM_DEVICE_TYPE_VLAN: + return _("VLAN"); + case NM_DEVICE_TYPE_ADSL: + return _("ADSL"); + case NM_DEVICE_TYPE_MACVLAN: + return _("MACVLAN"); + case NM_DEVICE_TYPE_VXLAN: + return _("VXLAN"); + case NM_DEVICE_TYPE_IP_TUNNEL: + return _("IPTunnel"); + case NM_DEVICE_TYPE_TUN: + return _("Tun"); + case NM_DEVICE_TYPE_VETH: + return _("Veth"); + case NM_DEVICE_TYPE_MACSEC: + return _("MACsec"); + case NM_DEVICE_TYPE_DUMMY: + return _("Dummy"); + case NM_DEVICE_TYPE_PPP: + return _("PPP"); + case NM_DEVICE_TYPE_GENERIC: + case NM_DEVICE_TYPE_UNUSED1: + case NM_DEVICE_TYPE_UNUSED2: + case NM_DEVICE_TYPE_UNKNOWN: + break; + } + return _("Unknown"); +} + +static char * +get_device_type_name_with_iface (NMDevice *device) +{ + const char *type_name = get_type_name (device); + + switch (nm_device_get_device_type (device)) { + case NM_DEVICE_TYPE_BOND: + case NM_DEVICE_TYPE_TEAM: + case NM_DEVICE_TYPE_BRIDGE: + case NM_DEVICE_TYPE_VLAN: + return g_strdup_printf ("%s (%s)", type_name, nm_device_get_iface (device)); + default: + return g_strdup (type_name); + } +} + +static char * +get_device_generic_type_name_with_iface (NMDevice *device) +{ + switch (nm_device_get_device_type (device)) { + case NM_DEVICE_TYPE_ETHERNET: + case NM_DEVICE_TYPE_INFINIBAND: + return g_strdup (_("Wired")); + default: + return get_device_type_name_with_iface (device); + } +} + +static const char * +get_bus_name (NMDevice *device) +{ + NMDevicePrivate *priv = NM_DEVICE_GET_PRIVATE (device); + struct udev_device *udevice; + const char *ifname, *bus; + + if (priv->bus_name) + goto out; + + if (!priv->udev) + return NULL; + + ifname = nm_device_get_iface (device); + if (!ifname) + return NULL; + + udevice = udev_device_new_from_subsystem_sysname (priv->udev, "net", ifname); + if (!udevice) { + udevice = udev_device_new_from_subsystem_sysname (priv->udev, "tty", ifname); + if (!udevice) + return NULL; + } + bus = udev_device_get_property_value (udevice, "ID_BUS"); + if (!g_strcmp0 (bus, "pci")) + priv->bus_name = g_strdup (_("PCI")); + else if (!g_strcmp0 (bus, "usb")) + priv->bus_name = g_strdup (_("USB")); + else { + /* Use "" instead of NULL so we can tell later that we've + * already tried. + */ + priv->bus_name = g_strdup (""); + } + udev_device_unref (udevice); + +out: + if (*priv->bus_name) + return priv->bus_name; + else + return NULL; +} + void _nm_device_set_udev (NMDevice *device, struct udev *udev) { @@ -1350,15 +1478,14 @@ _get_udev_property (NMDevice *device, } udev_device_unref (udev_device); - /* Prefer the encoded value which comes directly from the device - * over the hwdata database value. - */ - if (enc_value) { - g_free (db_value); - return enc_value; + /* Prefer the hwdata database value over what comes directly + * from the device. */ + if (db_value) { + g_free (enc_value); + return db_value; } - return db_value; + return enc_value; } static char * @@ -1443,7 +1570,7 @@ ensure_description (NMDevice *device) GParamSpec *name_prop; gs_free char *short_product = NULL; - priv->short_vendor = nm_str_realloc (nm_utils_fixup_desc_string (nm_device_get_vendor (device))); + priv->short_vendor = nm_str_realloc (nm_utils_fixup_vendor_string (nm_device_get_vendor (device))); /* Grab device's preferred name, if any */ name_prop = g_object_class_find_property (G_OBJECT_GET_CLASS (G_OBJECT (device)), "name"); @@ -1454,12 +1581,15 @@ ensure_description (NMDevice *device) g_clear_pointer (&priv->description, g_free); } - if ( !priv->short_vendor - || !(short_product = nm_utils_fixup_desc_string (nm_device_get_product (device)))) { + if (!priv->short_vendor) { priv->description = g_strdup (nm_device_get_iface (device) ?: ""); return; } + short_product = nm_utils_fixup_product_string (nm_device_get_product (device)); + if (short_product == NULL) + short_product = g_strdup (get_type_name (device)); + /* Another quick hack; if all of the fixed up vendor string * is found in product, ignore the vendor. */ @@ -1513,136 +1643,6 @@ nm_device_get_description (NMDevice *device) return priv->description; } -static const char * -get_type_name (NMDevice *device) -{ - switch (nm_device_get_device_type (device)) { - case NM_DEVICE_TYPE_ETHERNET: - return _("Ethernet"); - case NM_DEVICE_TYPE_WIFI: - return _("Wi-Fi"); - case NM_DEVICE_TYPE_BT: - return _("Bluetooth"); - case NM_DEVICE_TYPE_OLPC_MESH: - return _("OLPC Mesh"); - case NM_DEVICE_TYPE_OVS_INTERFACE: - return _("OpenVSwitch Interface"); - case NM_DEVICE_TYPE_OVS_PORT: - return _("OpenVSwitch Port"); - case NM_DEVICE_TYPE_OVS_BRIDGE: - return _("OpenVSwitch Bridge"); - case NM_DEVICE_TYPE_WIMAX: - return _("WiMAX"); - case NM_DEVICE_TYPE_MODEM: - return _("Mobile Broadband"); - case NM_DEVICE_TYPE_INFINIBAND: - return _("InfiniBand"); - case NM_DEVICE_TYPE_BOND: - return _("Bond"); - case NM_DEVICE_TYPE_TEAM: - return _("Team"); - case NM_DEVICE_TYPE_BRIDGE: - return _("Bridge"); - case NM_DEVICE_TYPE_VLAN: - return _("VLAN"); - case NM_DEVICE_TYPE_ADSL: - return _("ADSL"); - case NM_DEVICE_TYPE_MACVLAN: - return _("MACVLAN"); - case NM_DEVICE_TYPE_VXLAN: - return _("VXLAN"); - case NM_DEVICE_TYPE_IP_TUNNEL: - return _("IPTunnel"); - case NM_DEVICE_TYPE_TUN: - return _("Tun"); - case NM_DEVICE_TYPE_VETH: - return _("Veth"); - case NM_DEVICE_TYPE_MACSEC: - return _("MACsec"); - case NM_DEVICE_TYPE_DUMMY: - return _("Dummy"); - case NM_DEVICE_TYPE_PPP: - return _("PPP"); - case NM_DEVICE_TYPE_GENERIC: - case NM_DEVICE_TYPE_UNUSED1: - case NM_DEVICE_TYPE_UNUSED2: - case NM_DEVICE_TYPE_UNKNOWN: - break; - } - return _("Unknown"); -} - -static char * -get_device_type_name_with_iface (NMDevice *device) -{ - const char *type_name = get_type_name (device); - - switch (nm_device_get_device_type (device)) { - case NM_DEVICE_TYPE_BOND: - case NM_DEVICE_TYPE_TEAM: - case NM_DEVICE_TYPE_BRIDGE: - case NM_DEVICE_TYPE_VLAN: - return g_strdup_printf ("%s (%s)", type_name, nm_device_get_iface (device)); - default: - return g_strdup (type_name); - } -} - -static char * -get_device_generic_type_name_with_iface (NMDevice *device) -{ - switch (nm_device_get_device_type (device)) { - case NM_DEVICE_TYPE_ETHERNET: - case NM_DEVICE_TYPE_INFINIBAND: - return g_strdup (_("Wired")); - default: - return get_device_type_name_with_iface (device); - } -} - -static const char * -get_bus_name (NMDevice *device) -{ - NMDevicePrivate *priv = NM_DEVICE_GET_PRIVATE (device); - struct udev_device *udevice; - const char *ifname, *bus; - - if (priv->bus_name) - goto out; - - if (!priv->udev) - return NULL; - - ifname = nm_device_get_iface (device); - if (!ifname) - return NULL; - - udevice = udev_device_new_from_subsystem_sysname (priv->udev, "net", ifname); - if (!udevice) { - udevice = udev_device_new_from_subsystem_sysname (priv->udev, "tty", ifname); - if (!udevice) - return NULL; - } - bus = udev_device_get_property_value (udevice, "ID_BUS"); - if (!g_strcmp0 (bus, "pci")) - priv->bus_name = g_strdup (_("PCI")); - else if (!g_strcmp0 (bus, "usb")) - priv->bus_name = g_strdup (_("USB")); - else { - /* Use "" instead of NULL so we can tell later that we've - * already tried. - */ - priv->bus_name = g_strdup (""); - } - udev_device_unref (udevice); - -out: - if (*priv->bus_name) - return priv->bus_name; - else - return NULL; -} - static gboolean find_duplicates (char **names, gboolean *duplicates, @@ -1716,7 +1716,7 @@ nm_device_disambiguate_names (NMDevice **devices, g_free (names[i]); name = get_device_type_name_with_iface (devices[i]); - /* Translators: the first %s is a bus name (eg, "USB") or + /* TRANSLATORS: the first %s is a bus name (eg, "USB") or * product name, the second is a device type (eg, * "Ethernet"). You can change this to something like * "%2$s (%1$s)" if there's no grammatical way to combine @@ -1819,7 +1819,7 @@ nm_device_get_physical_port_id (NMDevice *device) * * Gets the MTU of the #NMDevice. * - * Returns: the MTU of the device. + * Returns: the MTU of the device in bytes. **/ guint32 nm_device_get_mtu (NMDevice *device) @@ -1940,7 +1940,6 @@ nm_device_reapply (NMDevice *device, if (!dict) dict = g_variant_new_array (G_VARIANT_TYPE ("{sa{sv}}"), NULL, 0); - ret = nmdbus_device_call_reapply_sync (NM_DEVICE_GET_PRIVATE (device)->proxy, dict, version_id, flags, cancellable, error); if (error && *error) @@ -2578,7 +2577,7 @@ nm_lldp_neighbor_new (void) neigh = g_new0 (NMLldpNeighbor, 1); neigh->refcount = 1; - neigh->attrs = g_hash_table_new_full (g_str_hash, g_str_equal, g_free, + neigh->attrs = g_hash_table_new_full (nm_str_hash, g_str_equal, g_free, (GDestroyNotify) g_variant_unref); return neigh; diff --git a/libnm/nm-dhcp-config.c b/libnm/nm-dhcp-config.c index 3161e296..3f835670 100644 --- a/libnm/nm-dhcp-config.c +++ b/libnm/nm-dhcp-config.c @@ -51,7 +51,7 @@ nm_dhcp_config_init (NMDhcpConfig *config) { NMDhcpConfigPrivate *priv = NM_DHCP_CONFIG_GET_PRIVATE (config); - priv->options = g_hash_table_new_full (g_str_hash, g_str_equal, g_free, g_free); + priv->options = g_hash_table_new_full (nm_str_hash, g_str_equal, g_free, g_free); } static gboolean @@ -154,11 +154,9 @@ nm_dhcp_config_class_init (NMDhcpConfigClass *config_class) G_PARAM_STATIC_STRINGS)); /** - * NMDhcpConfig:options: + * NMDhcpConfig:options: (type GHashTable(utf8,utf8)): * * The #GHashTable containing options of the configuration. - * - * Type: GLib.HashTable(utf8,utf8) **/ g_object_class_install_property (object_class, PROP_OPTIONS, diff --git a/libnm/nm-dhcp4-config.h b/libnm/nm-dhcp4-config.h index 2cbbdc9e..6669aa0e 100644 --- a/libnm/nm-dhcp4-config.h +++ b/libnm/nm-dhcp4-config.h @@ -21,9 +21,11 @@ #ifndef __NM_DHCP4_CONFIG_H__ #define __NM_DHCP4_CONFIG_H__ -#include "nm-dhcp-config.h" +#if !((NETWORKMANAGER_COMPILATION) & NM_NETWORKMANAGER_COMPILATION_WITH_LIBNM_PRIVATE) +#error Cannot use this header. +#endif -G_BEGIN_DECLS +#include "nm-dhcp-config.h" #define NM_TYPE_DHCP4_CONFIG (nm_dhcp4_config_get_type ()) #define NM_DHCP4_CONFIG(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), NM_TYPE_DHCP4_CONFIG, NMDhcp4Config)) @@ -40,13 +42,8 @@ typedef struct { typedef struct { NMDhcpConfigClass parent; - - /*< private >*/ - gpointer padding[4]; } NMDhcp4ConfigClass; GType nm_dhcp4_config_get_type (void); -G_END_DECLS - #endif /* __NM_DHCP4_CONFIG_H__ */ diff --git a/libnm/nm-dhcp6-config.h b/libnm/nm-dhcp6-config.h index 2d6568e1..3c18f5ec 100644 --- a/libnm/nm-dhcp6-config.h +++ b/libnm/nm-dhcp6-config.h @@ -21,9 +21,11 @@ #ifndef __NM_DHCP6_CONFIG_H__ #define __NM_DHCP6_CONFIG_H__ -#include "nm-dhcp-config.h" +#if !((NETWORKMANAGER_COMPILATION) & NM_NETWORKMANAGER_COMPILATION_WITH_LIBNM_PRIVATE) +#error Cannot use this header. +#endif -G_BEGIN_DECLS +#include "nm-dhcp-config.h" #define NM_TYPE_DHCP6_CONFIG (nm_dhcp6_config_get_type ()) #define NM_DHCP6_CONFIG(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), NM_TYPE_DHCP6_CONFIG, NMDhcp6Config)) @@ -40,13 +42,8 @@ typedef struct { typedef struct { NMDhcpConfigClass parent; - - /*< private >*/ - gpointer padding[4]; } NMDhcp6ConfigClass; GType nm_dhcp6_config_get_type (void); -G_END_DECLS - #endif /* __NM_DHCP6_CONFIG_H__ */ diff --git a/libnm/nm-dns-manager.h b/libnm/nm-dns-manager.h index 63989451..b72aea7d 100644 --- a/libnm/nm-dns-manager.h +++ b/libnm/nm-dns-manager.h @@ -21,11 +21,13 @@ #ifndef __NM_DNS_MANAGER_H__ #define __NM_DNS_MANAGER_H__ +#if !((NETWORKMANAGER_COMPILATION) & NM_NETWORKMANAGER_COMPILATION_WITH_LIBNM_PRIVATE) +#error Cannot use this header. +#endif + #include "nm-object.h" #include "nm-client.h" -G_BEGIN_DECLS - #define NM_TYPE_DNS_MANAGER (nm_dns_manager_get_type ()) #define NM_DNS_MANAGER(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), NM_TYPE_DNS_MANAGER, NMDnsManager)) #define NM_DNS_MANAGER_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), NM_TYPE_DNS_MANAGER, NMDnsManagerClass)) @@ -49,13 +51,8 @@ struct _NMDnsManager { struct _NMDnsManagerClass { NMObjectClass parent; - - /*< private >*/ - gpointer padding[8]; }; -G_END_DECLS - GType nm_dns_manager_get_type (void); const char *nm_dns_manager_get_mode (NMDnsManager *manager); diff --git a/libnm/nm-enum-types.c.template b/libnm/nm-enum-types.c.template new file mode 100644 index 00000000..5abd5c79 --- /dev/null +++ b/libnm/nm-enum-types.c.template @@ -0,0 +1,76 @@ +/*** BEGIN file-header ***/ +#include "config.h" + +#include "nm-enum-types.h" +#include "nm-default.h" + +#include "nm-version-macros.h" +#include "NetworkManager.h" +#include "nm-access-point.h" +#include "nm-active-connection.h" +#include "nm-checkpoint.h" +#include "nm-client.h" +#include "nm-device-adsl.h" +#include "nm-device-bond.h" +#include "nm-device-bridge.h" +#include "nm-device-bt.h" +#include "nm-device-dummy.h" +#include "nm-device-ethernet.h" +#include "nm-device-generic.h" +#include "nm-device-infiniband.h" +#include "nm-device-ip-tunnel.h" +#include "nm-device-macsec.h" +#include "nm-device-macvlan.h" +#include "nm-device-modem.h" +#include "nm-device-olpc-mesh.h" +#include "nm-device-ovs-interface.h" +#include "nm-device-ovs-port.h" +#include "nm-device-ovs-bridge.h" +#include "nm-device-ppp.h" +#include "nm-device-team.h" +#include "nm-device-tun.h" +#include "nm-device-vlan.h" +#include "nm-device-vxlan.h" +#include "nm-device-wifi.h" +#include "nm-device-wimax.h" +#include "nm-device.h" +#include "nm-dhcp-config.h" +#include "nm-ip-config.h" +#include "nm-object.h" +#include "nm-remote-connection.h" +#include "nm-types.h" +#include "nm-vpn-connection.h" +#include "nm-vpn-editor.h" +#include "nm-wimax-nsp.h" +#include "nm-secret-agent-old.h" +#include "nm-vpn-plugin-old.h" +#include "nm-vpn-service-plugin.h" +/*** END file-header ***/ + +/*** BEGIN value-header ***/ +GType +@enum_name@_get_type (void) +{ + static volatile gsize g_define_type_id__volatile = 0; + + if (g_once_init_enter (&g_define_type_id__volatile)) + { + static const G@Type@Value values[] = { +/*** END value-header ***/ + +/*** BEGIN value-production ***/ + { @VALUENAME@, "@VALUENAME@", "@valuenick@" }, +/*** END value-production ***/ + +/*** BEGIN value-tail ***/ + { 0, NULL, NULL } + }; + GType g_define_type_id = + g_@type@_register_static (g_intern_static_string ("@EnumName@"), values); + g_once_init_leave (&g_define_type_id__volatile, g_define_type_id); + } + + return g_define_type_id__volatile; +} + +/*** END value-tail ***/ diff --git a/libnm/nm-enum-types.h.template b/libnm/nm-enum-types.h.template new file mode 100644 index 00000000..bd9ce40b --- /dev/null +++ b/libnm/nm-enum-types.h.template @@ -0,0 +1,22 @@ +/*** BEGIN file-header ***/ +#ifndef __NM_ENUM_TYPES_H__ +#define __NM_ENUM_TYPES_H__ + +#include <nm-core-enum-types.h> +#include <glib-object.h> + +G_BEGIN_DECLS + +/*** END file-header ***/ + +/*** BEGIN enumeration-production ***/ +GType @enum_name@_get_type (void) G_GNUC_CONST; +#define @ENUMPREFIX@_TYPE_@ENUMSHORT@ (@enum_name@_get_type ()) + +/*** END enumeration-production ***/ + +/*** BEGIN file-tail ***/ +G_END_DECLS + +#endif /* __NM_ENUM_TYPES_H__ */ +/*** END file-tail ***/ diff --git a/libnm/nm-ip-config.c b/libnm/nm-ip-config.c index 74db9994..d1a69f38 100644 --- a/libnm/nm-ip-config.c +++ b/libnm/nm-ip-config.c @@ -304,7 +304,7 @@ nm_ip_config_class_init (NMIPConfigClass *config_class) G_PARAM_STATIC_STRINGS)); /** - * NMIPConfig:routes: + * NMIPConfig:routes: (type GPtrArray(NMIPRoute)) * * A #GPtrArray containing the routes (#NMIPRoute) of the configuration. **/ @@ -491,7 +491,7 @@ nm_ip_config_get_wins_servers (NMIPConfig *config) * Gets the routes. * * Returns: (element-type NMIPRoute) (transfer none): the #GPtrArray containing - * #NMIPRoutes. This is the internal copy used by the configuration, and must + * #NMIPRoute<!-- -->s. This is the internal copy used by the configuration, and must * not be modified. The library never modifies the returned array and thus it is * safe for callers to reference and keep using it. * diff --git a/libnm/nm-ip4-config.h b/libnm/nm-ip4-config.h index d99b2113..266e0bc5 100644 --- a/libnm/nm-ip4-config.h +++ b/libnm/nm-ip4-config.h @@ -22,9 +22,11 @@ #ifndef __NM_IP4_CONFIG_H__ #define __NM_IP4_CONFIG_H__ -#include "nm-ip-config.h" +#if !((NETWORKMANAGER_COMPILATION) & NM_NETWORKMANAGER_COMPILATION_WITH_LIBNM_PRIVATE) +#error Cannot use this header. +#endif -G_BEGIN_DECLS +#include "nm-ip-config.h" #define NM_TYPE_IP4_CONFIG (nm_ip4_config_get_type ()) #define NM_IP4_CONFIG(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), NM_TYPE_IP4_CONFIG, NMIP4Config)) @@ -42,13 +44,8 @@ typedef struct { typedef struct { NMIPConfigClass parent; - - /*< private >*/ - gpointer padding[4]; } NMIP4ConfigClass; GType nm_ip4_config_get_type (void); -G_END_DECLS - #endif /* __NM_IP4_CONFIG_H__ */ diff --git a/libnm/nm-ip6-config.h b/libnm/nm-ip6-config.h index 12e723b2..1d21adb4 100644 --- a/libnm/nm-ip6-config.h +++ b/libnm/nm-ip6-config.h @@ -22,9 +22,11 @@ #ifndef __NM_IP6_CONFIG_H__ #define __NM_IP6_CONFIG_H__ -#include "nm-ip-config.h" +#if !((NETWORKMANAGER_COMPILATION) & NM_NETWORKMANAGER_COMPILATION_WITH_LIBNM_PRIVATE) +#error Cannot use this header. +#endif -G_BEGIN_DECLS +#include "nm-ip-config.h" #define NM_TYPE_IP6_CONFIG (nm_ip6_config_get_type ()) #define NM_IP6_CONFIG(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), NM_TYPE_IP6_CONFIG, NMIP6Config)) @@ -42,13 +44,8 @@ typedef struct { typedef struct { NMIPConfigClass parent; - - /*< private >*/ - gpointer padding[4]; } NMIP6ConfigClass; GType nm_ip6_config_get_type (void); -G_END_DECLS - #endif /* __NM_IP6_CONFIG_H__ */ diff --git a/libnm/nm-libnm-utils.c b/libnm/nm-libnm-utils.c index fbbfe2c5..36219065 100644 --- a/libnm/nm-libnm-utils.c +++ b/libnm/nm-libnm-utils.c @@ -16,7 +16,7 @@ * Boston, MA 02110-1301 USA. * * Copyright 2007 - 2008 Novell, Inc. - * Copyright 2007 - 2017 Red Hat, Inc. + * Copyright 2007 - 2018 Red Hat, Inc. */ #include "nm-default.h" @@ -25,52 +25,14 @@ /*****************************************************************************/ -char * -nm_utils_fixup_desc_string (const char *desc) +static char * +_fixup_string (const char *desc, + const char *const *ignored_phrases, + const char *const *ignored_words, + gboolean square_brackets_sensible) { - static const char *const IGNORED_PHRASES[] = { - "Multiprotocol MAC/baseband processor", - "Wireless LAN Controller", - "Wireless LAN Adapter", - "Wireless Adapter", - "Network Connection", - "Wireless Cardbus Adapter", - "Wireless CardBus Adapter", - "54 Mbps Wireless PC Card", - "Wireless PC Card", - "Wireless PC", - "PC Card with XJACK(r) Antenna", - "Wireless cardbus", - "Wireless LAN PC Card", - "Technology Group Ltd.", - "Communication S.p.A.", - "Business Mobile Networks BV", - "Mobile Broadband Minicard Composite Device", - "Mobile Communications AB", - "(PC-Suite Mode)", - }; - static const char *const IGNORED_WORDS[] = { - "Semiconductor", - "Components", - "Corporation", - "Communications", - "Company", - "Corp.", - "Corp", - "Co.", - "Inc.", - "Inc", - "Incorporated", - "Ltd.", - "Limited.", - "Intel?", - "chipset", - "adapter", - "[hex]", - "NDIS", - "Module", - }; char *desc_full; + gboolean in_paren = FALSE; char *p, *q; int i; @@ -88,18 +50,23 @@ nm_utils_fixup_desc_string (const char *desc) p = q + 1; } - /* replace '_', ',', and ASCII controll characters with space. */ + /* replace '_', ',', ASCII control characters and parentheses, with space. */ for (p = desc_full; p[0]; p++) { + if (*p == '(') + in_paren = TRUE; if ( NM_IN_SET (*p, '_', ',') - || *p < ' ') + || *p < ' ' + || in_paren) *p = ' '; + if (*p == ')') + in_paren = FALSE; } /* Attempt to shorten ID by ignoring certain phrases */ - for (i = 0; i < G_N_ELEMENTS (IGNORED_PHRASES); i++) { - p = strstr (desc_full, IGNORED_PHRASES[i]); + for (i = 0; ignored_phrases[i]; i++) { + p = strstr (desc_full, ignored_phrases[i]); if (p) { - const char *eow = &p[strlen (IGNORED_PHRASES[i])]; + const char *eow = &p[strlen (ignored_phrases[i])]; /* require that the phrase is delimited by space, or * at the beginning or end of the description. */ @@ -112,7 +79,7 @@ nm_utils_fixup_desc_string (const char *desc) /* Attempt to shorten ID by ignoring certain individual words. * - word-split the description at spaces * - coalesce multiple spaces - * - skip over IGNORED_WORDS */ + * - skip over ignored_words */ p = desc_full; q = desc_full; for (;;) { @@ -131,9 +98,7 @@ nm_utils_fixup_desc_string (const char *desc) if (eow) *eow = '\0'; - if (nm_utils_strv_find_first ((char **) IGNORED_WORDS, - G_N_ELEMENTS (IGNORED_WORDS), - p) >= 0) + if (nm_utils_strv_find_first ((char **) ignored_words, -1, p) >= 0) goto next; l = strlen (p); @@ -152,11 +117,529 @@ next: *q++ = '\0'; + p = strchr (desc_full, '['); + if (p == desc_full) { + /* All we're left with is in square brackets. + * Always prefer that to a blank string.*/ + square_brackets_sensible = TRUE; + } + if (square_brackets_sensible) { + /* If there's a [<string>] that survived the substitution, then the string + * is a short form that is generally preferrable. */ + q = strchr (desc_full, ']'); + if (p && q > p) { + p++; + memmove (desc_full, p, q - p); + desc_full[q - p] = '\0'; + } + } else { + /* [<string>] sometimes contains the preferred human-readable name, but + * mostly it's utterly useless. Sigh. Drop it. */ + if (p) { + if (p > desc_full && p[-1] == ' ') + p--; + *p = '\0'; + } + } + if (!desc_full[0]) { g_free (desc_full); return NULL; } + return desc_full; +} + +char * +nm_utils_fixup_vendor_string (const char *desc) +{ + static const char *const IGNORED_PHRASES[] = { + "Access Systems", + "Business Mobile Networks BV", + "Communications & Multimedia", + "Company of Japan", + "Computer Co.", + "Computer Corp.", + "Computer Corporation", + "Computer Inc.", + "Computer, Inc.", + "Information and Communication Products", + "Macao Commercial Offshore", + "Mobile Phones", + "(M) Son", + "Multimedia Internet Technology", + "Technology Group Ltd.", + "Wireless Networks", + "Wireless Solutions", + NULL, + }; + static const char *const IGNORED_WORDS[] = { + "AB", + "AG", + "A/S", + "ASA", + "B.V.", + "Chips", + "Co.", + "Co", + "Communications", + "Components", + "Computers", + "Computertechnik", + "corp.", + "Corp.", + "Corp", + "Corporation", + "Design", + "Electronics", + "Enterprise", + "Enterprises", + "Europe", + "GmbH", + "Hardware", + "[hex]", + "Holdings", + "Inc.", + "Inc", + "INC.", + "Incorporated", + "Instruments", + "International", + "Intl.", + "Labs", + "Limited.", + "Limited", + "Ltd.", + "Ltd", + "Microelectronics", + "Microsystems", + "MSM", + "Multimedia", + "Networks", + "Norway", + "Optical", + "PCS", + "Semiconductor", + "Systems", + "Systemtechnik", + "Techcenter", + "Technik", + "Technologies", + "Technology", + "TECHNOLOGY", + "Telephonics", + "USA", + "WCDMA", + NULL, + }; + char *desc_full; + char *p; + + desc_full = _fixup_string (desc, IGNORED_PHRASES, IGNORED_WORDS, TRUE); + if (!desc_full) + return NULL; + + /* Chop off everything after a slash. */ + for (p = desc_full; *p; p++) { + if ((p[0] == ' ' && p[1] == '/') || p[0] == '/') { + p[0] = '\0'; + break; + } + } + + nm_assert (g_utf8_validate (desc_full, -1, NULL)); + + return desc_full; +} + +char * +nm_utils_fixup_product_string (const char *desc) +{ + static const char *const IGNORED_PHRASES[] = { + "100/10 MBit", + "10/100 Mbps", + "1.0 GbE", + "10 GbE", + "10 Gigabit", + "10 Mbps", + "1/10 Gigabit", + "150 Mbps", + "2.5 GbE", + "54 Mbps", + "Attached Port", + "+ BT", + "\"CDC Subset\"", + "CE Media Processor", + "Controller Area Network", + "Converged Network", + "DEC-Tulip compatible", + "Dish Adapter", + "Double 108 Mbps", + "Dual Band", + "Dual Port", + "Embedded UTP", + "Ethernet Connection", + "Ethernet Pro 100", + "Express Module", + "Fabric Adapter", + "Fast Ethernet", + "for 10GBASE-T" , + "for 10GbE backplane" , + "for 10GbE QSFP+" , + "for 10GbE SFP+" , + "for 1GbE", + "for 20GbE backplane" , + "for 25GbE backplane" , + "for 25GbE SFP28" , + "for 40GbE backplane" , + "for 40GbE QSFP+" , + "G Adapter", + "Gigabit Desktop Network", + "Gigabit Ethernet", + "Gigabit or", + "Host Interface", + "Host Virtual Interface", + "IEEE 802.11a/b/g", + "IEEE 802.11g", + "IEEE 802.11G", + "IEEE 802.11n", + "MAC + PHY", + "Mini Card", + "Mini Wireless", + "multicore SoC", + "Multi Function", + "N Draft 11n Wireless", + "Network Connection", + "Network Everywhere", + "N Wireless", + "N+ Wireless", + "OCT To Fast Ethernet Converter", + "PC Card", + "PCI Express", + "Platform Controller Hub", + "Plus Bluetooth", + "Quad Gigabit", + "rev 1", + "rev 17", + "rev 2", + "rev A", + "rev B", + "rev F", + "TO Ethernet", + "Turbo Wireless Adapter", + "Unified Wire", + "USB 1.1", + "USB 2.0", + "Virtual media for", + "WiFi Link", + "+ WiMAX", + "WiMAX/WiFi Link", + "Wireless G", + "Wireless G+", + "Wireless Lan", + "Wireless Mini adapter", + "Wireless Mini Adapter", + "Wireless N", + "with 1000-BASE-T interface", + "with CX4 copper interface", + "with Range Amplifier", + "with SR-XFP optical interface", + "w/ Upgradable Antenna", + NULL, + }; + static const char *const IGNORED_WORDS[] = { + "1000BaseSX", + "1000BASE-T", + "1000Base-ZX", + "100/10M", + "100baseFx", + "100Base-MII", + "100Base-T", + "100BaseT4", + "100Base-TX", + "100BaseTX", + "100GbE", + "100Mbps", + "100MBps", + "10/100", + "10/100/1000", + "10/100/1000Base-T", + "10/100/1000BASE-T", + "10/100BaseT", + "10/100baseTX", + "10/100BaseTX", + "10/100/BNC", + "10/100M", + "10/20-Gigabit", + "10/25/40/50GbE", + "10/40G", + "10base-FL", + "10BaseT", + "10BASE-T", + "10G", + "10Gb", + "10Gb/25Gb", + "10Gb/25Gb/40Gb/50Gb", + "10Gbase-T", + "10GBase-T", + "10GBASE-T", + "10GbE", + "10Gbps", + "10-Giga", + "10-Gigabit", + "10mbps", + "10Mbps", + "1/10GbE", + "1/10-Gigabit", + "11b/g/n", + "11g", + "150Mbps", + "16Gbps/10Gbps", + "1GbE", + "1x2:2", + "20GbE", + "25Gb", + "25GbE", + "2-Port", + "2x3:3", + "3G", + "3G/4G", + "3x3:3", + "40GbE", + "4G", + "54g", + "54M", + "54Mbps", + "56k", + "5G", + "802.11", + "802.11a/b/g", + "802.11abg", + "802.11a/b/g/n", + "802.11abgn", + "802.11ac", + "802.11ad", + "802.11a/g", + "802.11b", + "802.11b/g", + "802.11bg", + "802.11b/g/n", + "802.11bgn", + "802.11b/g/n-draft", + "802.11g", + "802.11n", + "802.11N", + "802.11n/b/g", + "802.11ng", + "802AIN", + "802UIG-1", + "adapter", + "Adapter", + "adaptor", + "ADSL", + "Basic", + "CAN-Bus", + "card", + "Card", + "Cardbus", + "CardBus", + "CDMA", + "CNA", + "Composite", + "controller", + "Controller", + "Copper", + "DB", + "Desktop", + "device", + "Device", + "dongle", + "driver", + "Dual-band", + "Dual-Protocol", + "EISA", + "Enhanced", + "ethernet.", + "ethernet", + "Ethernet", + "Ethernet/RNDIS", + "ExpressModule", + "family", + "Family", + "Fast/Gigabit", + "Fiber", + "gigabit", + "Gigabit", + "G-NIC", + "Hi-Gain", + "Hi-Speed", + "HSDPA", + "HSUPA", + "integrated", + "Integrated", + "interface", + "LAN", + "LAN+Winmodem", + "Laptop", + "LTE", + "LTE/UMTS/GSM", + "MAC", + "Micro", + "Mini-Card", + "Mini-USB", + "misprogrammed", + "modem", + "Modem", + "Modem/Networkcard", + "Module", + "Multimode", + "Multithreaded", + "Name:", + "net", + "network", + "Network", + "n/g/b", + "NIC", + "Notebook", + "OEM", + "PCI", + "PCI64", + "PCIe", + "PCI-E", + "PCI-Express", + "PCI-X", + "PCMCIA", + "PDA", + "PnP", + "RDMA", + "RJ-45", + "Series", + "Server", + "SoC", + "Switch", + "Technologies", + "TOE", + "USB", + "USB2.0", + "USB/Ethernet", + "UTP", + "UTP/Coax", + "v1", + "v1.1", + "v2", + "V2.0", + "v3", + "v4", + "wifi", + "Wi-Fi", + "WiFi", + "wireless", + "Wireless", + "Wireless-150N", + "Wireless-300N", + "Wireless-G", + "Wireless-N", + "WLAN", + NULL, + }; + char *desc_full; + char *p; + + desc_full = _fixup_string (desc, IGNORED_PHRASES, IGNORED_WORDS, FALSE); + if (!desc_full) + return NULL; + + /* Chop off everything after a '-'. */ + for (p = desc_full; *p; p++) { + if (p[0] == ' ' && p[1] == '-' && p[2] == ' ') { + p[0] = '\0'; + break; + } + } + nm_assert (g_utf8_validate (desc_full, -1, NULL)); + return desc_full; } + +#if WITH_FAKE_TYPELIBS + +/* + * Here we register empty "NMClient" and "NetworkManager" GIR modules as soon + * as we are loaded (if gnome-introspection is being used). This prevents the + * real modules from being loaded because they would in turn load libnm-glib + * and abort() and crash. + * + * For the high level languages that utilize GIR the crash is highly inconvenient + * while the inability to resolve any methods and attributes is potentially + * recoverable. + */ + +#include <girepository.h> + +GResource *typelibs_get_resource (void); +void typelibs_register_resource (void); + +static void __attribute__((constructor)) +_nm_libnm_utils_init (void) +{ + GITypelib *typelib; + GBytes *data; + const char *namespace; + GModule *self; + GITypelib *(*_g_typelib_new_from_const_memory) (const guint8 *memory, + gsize len, + GError **error) = NULL; + const char *(*_g_irepository_load_typelib) (GIRepository *repository, + GITypelib *typelib, + GIRepositoryLoadFlags flags, + GError **error) = NULL; + const char *names[] = { "/org/freedesktop/libnm/fake-typelib/NetworkManager.typelib", + "/org/freedesktop/libnm/fake-typelib/NMClient.typelib" }; + int i; + + self = g_module_open (NULL, 0); + if (!self) + return; + g_module_symbol (self, "g_typelib_new_from_const_memory", + (gpointer *) &_g_typelib_new_from_const_memory); + if (_g_typelib_new_from_const_memory) { + g_module_symbol (self, "g_irepository_load_typelib", + (gpointer *) &_g_irepository_load_typelib); + } + g_module_close (self); + + if (!_g_typelib_new_from_const_memory || !_g_irepository_load_typelib) + return; + + typelibs_register_resource (); + + for (i = 0; i < 2; i++) { + gs_free_error GError *error = NULL; + + data = g_resource_lookup_data (typelibs_get_resource (), + names[i], + G_RESOURCE_LOOKUP_FLAGS_NONE, + &error); + if (!data) { + g_warning ("Fake typelib %s could not be loaded: %s", names[i], error->message); + return; + } + + typelib = _g_typelib_new_from_const_memory (g_bytes_get_data (data, NULL), + g_bytes_get_size (data), + &error); + if (!typelib) { + g_warning ("Could not create fake typelib instance %s: %s", names[i], error->message); + return; + } + + namespace = _g_irepository_load_typelib (NULL, typelib, 0, &error); + if (!namespace) { + g_warning ("Could not load fake typelib %s: %s", names[i], error->message); + return; + } + } +} + +#endif /* WITH_FAKE_TYPELIBS */ diff --git a/libnm/nm-libnm-utils.h b/libnm/nm-libnm-utils.h index 4a5a361c..9b48b0a7 100644 --- a/libnm/nm-libnm-utils.h +++ b/libnm/nm-libnm-utils.h @@ -15,12 +15,17 @@ * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, * Boston, MA 02110-1301 USA. * - * Copyright 2017 Red Hat, Inc. + * Copyright 2017, 2018 Red Hat, Inc. */ #ifndef __NM_LIBNM_UTILS_H__ #define __NM_LIBNM_UTILS_H__ -char *nm_utils_fixup_desc_string (const char *desc); +#if !((NETWORKMANAGER_COMPILATION) & NM_NETWORKMANAGER_COMPILATION_WITH_LIBNM_PRIVATE) +#error Cannot use this header. +#endif + +char *nm_utils_fixup_vendor_string (const char *desc); +char *nm_utils_fixup_product_string (const char *desc); #endif /* __NM_LIBNM_UTILS_H__ */ diff --git a/libnm/nm-manager.c b/libnm/nm-manager.c index 5eeed668..aac120c6 100644 --- a/libnm/nm-manager.c +++ b/libnm/nm-manager.c @@ -26,6 +26,7 @@ #include <string.h> #include "nm-utils.h" +#include "nm-checkpoint.h" #include "nm-common-macros.h" #include "nm-device-ethernet.h" #include "nm-device-wifi.h" @@ -34,7 +35,7 @@ #include "nm-active-connection.h" #include "nm-vpn-connection.h" #include "nm-dbus-helpers.h" -#include "nm-utils/c-list.h" +#include "c-list/src/c-list.h" #include "introspection/org.freedesktop.NetworkManager.h" @@ -61,6 +62,8 @@ typedef struct { GPtrArray *devices; GPtrArray *all_devices; GPtrArray *active_connections; + GPtrArray *checkpoints; + GSList *added_checkpoints; NMConnectivityState connectivity; NMActiveConnection *primary_connection; NMActiveConnection *activating_connection; @@ -107,6 +110,7 @@ enum { PROP_PRIMARY_CONNECTION, PROP_ACTIVATING_CONNECTION, PROP_DEVICES, + PROP_CHECKPOINTS, PROP_METERED, PROP_ALL_DEVICES, @@ -120,6 +124,8 @@ enum { ANY_DEVICE_REMOVED, ACTIVE_CONNECTION_ADDED, ACTIVE_CONNECTION_REMOVED, + CHECKPOINT_ADDED, + CHECKPOINT_REMOVED, PERMISSION_CHANGED, LAST_SIGNAL @@ -129,6 +135,53 @@ static guint signals[LAST_SIGNAL] = { 0 }; /*****************************************************************************/ +typedef struct { + NMManager *manager; + GSimpleAsyncResult *simple; + char *path; +} CheckpointInfo; + +static CheckpointInfo * +find_checkpoint_info (NMManager *manager, const char *path) +{ + NMManagerPrivate *priv = NM_MANAGER_GET_PRIVATE (manager); + CheckpointInfo *info; + GSList *iter; + + for (iter = priv->added_checkpoints; iter; iter = g_slist_next (iter)) { + info = iter->data; + if (nm_streq0 (path, info->path)) + return info; + } + + return NULL; +} + +static void +checkpoint_info_complete (NMManager *self, + CheckpointInfo *info, + NMCheckpoint *checkpoint, + GError *error) +{ + NMManagerPrivate *priv = NM_MANAGER_GET_PRIVATE (self); + + g_return_if_fail (info); + + if (checkpoint) { + g_simple_async_result_set_op_res_gpointer (info->simple, + g_object_ref (checkpoint), + g_object_unref); + } else + g_simple_async_result_set_from_error (info->simple, error); + g_simple_async_result_complete (info->simple); + + g_object_unref (info->simple); + priv->added_checkpoints = g_slist_remove (priv->added_checkpoints, info); + + g_free (info->path); + g_slice_free (CheckpointInfo, info); +} + static void nm_manager_init (NMManager *manager) { @@ -139,7 +192,7 @@ nm_manager_init (NMManager *manager) priv->state = NM_STATE_UNKNOWN; priv->connectivity = NM_CONNECTIVITY_UNKNOWN; - priv->permissions = g_hash_table_new (g_direct_hash, g_direct_equal); + priv->permissions = g_hash_table_new (nm_direct_hash, NULL); priv->devices = g_ptr_array_new (); priv->all_devices = g_ptr_array_new (); priv->active_connections = g_ptr_array_new (); @@ -189,6 +242,7 @@ init_dbus (NMObject *object) { NM_MANAGER_PRIMARY_CONNECTION, &priv->primary_connection, NULL, NM_TYPE_ACTIVE_CONNECTION }, { NM_MANAGER_ACTIVATING_CONNECTION, &priv->activating_connection, NULL, NM_TYPE_ACTIVE_CONNECTION }, { NM_MANAGER_DEVICES, &priv->devices, NULL, NM_TYPE_DEVICE, "device" }, + { NM_MANAGER_CHECKPOINTS, &priv->checkpoints, NULL, NM_TYPE_CHECKPOINT, "checkpoint" }, { NM_MANAGER_METERED, &priv->metered }, { NM_MANAGER_ALL_DEVICES, &priv->all_devices, NULL, NM_TYPE_DEVICE, "any-device" }, { NULL }, @@ -206,6 +260,23 @@ init_dbus (NMObject *object) G_CALLBACK (manager_recheck_permissions), object, 0); } +static void +object_creation_failed (NMObject *object, const char *failed_path) +{ + NMManager *self = NM_MANAGER (object); + CheckpointInfo *info; + GError *add_error; + + info = find_checkpoint_info (self, failed_path); + if (info) { + add_error = g_error_new_literal (NM_CLIENT_ERROR, + NM_CLIENT_ERROR_OBJECT_CREATION_FAILED, + _("Checkpoint was removed before it was initialized")); + checkpoint_info_complete (self, info, NULL, add_error); + g_error_free (add_error); + } +} + static NMClientPermission nm_permission_to_client (const char *nm) { @@ -719,8 +790,7 @@ NMDevice * nm_manager_get_device_by_path (NMManager *manager, const char *object_path) { const GPtrArray *devices; - int i; - NMDevice *device = NULL; + guint i; g_return_val_if_fail (NM_IS_MANAGER (manager), NULL); g_return_val_if_fail (object_path, NULL); @@ -729,12 +799,25 @@ nm_manager_get_device_by_path (NMManager *manager, const char *object_path) for (i = 0; i < devices->len; i++) { NMDevice *candidate = g_ptr_array_index (devices, i); if (!strcmp (nm_object_get_path (NM_OBJECT (candidate)), object_path)) { - device = candidate; - break; + return candidate; } } + return NULL; +} - return device; +static NMCheckpoint * +get_checkpoint_by_path (NMManager *manager, const char *object_path) +{ + NMManagerPrivate *priv = NM_MANAGER_GET_PRIVATE (manager); + NMCheckpoint *candidate; + guint i; + + for (i = 0; i < priv->checkpoints->len; i++) { + candidate = priv->checkpoints->pdata[i]; + if (nm_streq (nm_object_get_path (NM_OBJECT (candidate)), object_path)) + return candidate; + } + return NULL; } NMDevice * @@ -966,7 +1049,7 @@ nm_manager_activate_connection_async (NMManager *manager, nmdbus_manager_call_activate_connection (priv->proxy, connection ? nm_connection_get_path (connection) : "/", device ? nm_object_get_path (NM_OBJECT (device)) : "/", - specific_object ? specific_object : "/", + specific_object ?: "/", cancellable, activate_cb, info); } @@ -1050,7 +1133,7 @@ nm_manager_add_and_activate_connection_async (NMManager *manager, nmdbus_manager_call_add_and_activate_connection (priv->proxy, dict, nm_object_get_path (NM_OBJECT (device)), - specific_object ? specific_object : "/", + specific_object ?: "/", cancellable, add_activate_cb, info); } @@ -1115,6 +1198,16 @@ active_connection_removed (NMManager *self, NMActiveConnection *ac) recheck_pending_activations (self); } +static void +checkpoint_added (NMManager *manager, NMCheckpoint *checkpoint) +{ + CheckpointInfo *info; + + info = find_checkpoint_info (manager, nm_object_get_path (NM_OBJECT (checkpoint))); + if (info) + checkpoint_info_complete (manager, info, checkpoint, NULL); +} + gboolean nm_manager_deactivate_connection (NMManager *manager, NMActiveConnection *active, @@ -1216,6 +1309,300 @@ free_active_connections (NMManager *manager) /*****************************************************************************/ +static const char ** +get_device_paths (const GPtrArray *devices) +{ + const char **array; + guint i; + + array = g_new (const char *, devices->len + 1); + for (i = 0; i < devices->len; i++) + array[i] = nm_object_get_path (NM_OBJECT (devices->pdata[i])); + + array[i] = NULL; + + return array; +} + +const GPtrArray * +nm_manager_get_checkpoints (NMManager *manager) +{ + g_return_val_if_fail (NM_IS_MANAGER (manager), NULL); + + return NM_MANAGER_GET_PRIVATE (manager)->checkpoints; +} + +static void +checkpoint_created_cb (GObject *object, + GAsyncResult *result, + gpointer user_data) +{ + CheckpointInfo *info = user_data; + NMManager *self = info->manager; + gs_free_error GError *error = NULL; + NMCheckpoint *checkpoint; + + nmdbus_manager_call_checkpoint_create_finish (NMDBUS_MANAGER (object), + &info->path, result, &error); + if (error) { + g_dbus_error_strip_remote_error (error); + checkpoint_info_complete (self, info, NULL, error); + return; + } + + checkpoint = get_checkpoint_by_path (self, info->path); + if (!checkpoint) { + /* this is really problematic. The async request returned, but + * we don't yet have a visible (fully initialized) NMCheckpoint instance + * to return. Wait longer for it to appear. However, it's ugly. */ + return; + } + + checkpoint_info_complete (self, info, checkpoint, NULL); +} + +void +nm_manager_checkpoint_create (NMManager *manager, + const GPtrArray *devices, + guint32 rollback_timeout, + NMCheckpointCreateFlags flags, + GCancellable *cancellable, + GAsyncReadyCallback callback, + gpointer user_data) +{ + NMManagerPrivate *priv = NM_MANAGER_GET_PRIVATE (manager); + gs_free const char **paths = NULL; + CheckpointInfo *info; + + g_return_if_fail (NM_IS_MANAGER (manager)); + + info = g_slice_new0 (CheckpointInfo); + info->manager = manager; + info->simple = g_simple_async_result_new (G_OBJECT (manager), callback, user_data, + nm_manager_checkpoint_create); + if (cancellable) + g_simple_async_result_set_check_cancellable (info->simple, cancellable); + paths = get_device_paths (devices); + nmdbus_manager_call_checkpoint_create (NM_MANAGER_GET_PRIVATE (manager)->proxy, + paths, + rollback_timeout, + flags, + cancellable, + checkpoint_created_cb, + info); + priv->added_checkpoints = g_slist_append (priv->added_checkpoints, info); +} + +NMCheckpoint * +nm_manager_checkpoint_create_finish (NMManager *manager, + GAsyncResult *result, + GError **error) +{ + GSimpleAsyncResult *simple; + + g_return_val_if_fail (NM_IS_MANAGER (manager), NULL); + g_return_val_if_fail (G_IS_SIMPLE_ASYNC_RESULT (result), NULL); + + simple = G_SIMPLE_ASYNC_RESULT (result); + if (g_simple_async_result_propagate_error (simple, error)) + return NULL; + else + return g_object_ref (g_simple_async_result_get_op_res_gpointer (simple)); +} + +static void +checkpoint_destroy_cb (GObject *object, + GAsyncResult *result, + gpointer user_data) +{ + GSimpleAsyncResult *simple = user_data; + GError *error = NULL; + + if (nmdbus_manager_call_checkpoint_destroy_finish (NMDBUS_MANAGER (object), + result, &error)) + g_simple_async_result_set_op_res_gboolean (simple, TRUE); + else { + g_dbus_error_strip_remote_error (error); + g_simple_async_result_take_error (simple, error); + } + g_simple_async_result_complete (simple); + g_object_unref (simple); +} + +void +nm_manager_checkpoint_destroy (NMManager *manager, + const char *checkpoint_path, + GCancellable *cancellable, + GAsyncReadyCallback callback, + gpointer user_data) +{ + GSimpleAsyncResult *simple; + + g_return_if_fail (NM_IS_MANAGER (manager)); + g_return_if_fail (checkpoint_path && checkpoint_path[0] == '/'); + + simple = g_simple_async_result_new (G_OBJECT (manager), callback, user_data, + nm_manager_checkpoint_destroy); + if (cancellable) + g_simple_async_result_set_check_cancellable (simple, cancellable); + + nmdbus_manager_call_checkpoint_destroy (NM_MANAGER_GET_PRIVATE (manager)->proxy, + checkpoint_path, + cancellable, + checkpoint_destroy_cb, simple); +} + +gboolean +nm_manager_checkpoint_destroy_finish (NMManager *manager, + GAsyncResult *result, + GError **error) +{ + GSimpleAsyncResult *simple; + + g_return_val_if_fail (g_simple_async_result_is_valid (result, G_OBJECT (manager), + nm_manager_checkpoint_destroy), + FALSE); + + simple = G_SIMPLE_ASYNC_RESULT (result); + if (g_simple_async_result_propagate_error (simple, error)) + return FALSE; + else + return g_simple_async_result_get_op_res_gboolean (simple); +} + +static void +checkpoint_rollback_cb (GObject *object, + GAsyncResult *result, + gpointer user_data) +{ + GSimpleAsyncResult *simple = user_data; + GError *error = NULL; + GVariant *variant = NULL; + GVariantIter iter; + GHashTable *hash; + const char *path; + guint r; + + if (nmdbus_manager_call_checkpoint_rollback_finish (NMDBUS_MANAGER (object), + &variant, + result, + &error)) { + hash = g_hash_table_new_full (nm_str_hash, g_str_equal, g_free, NULL); + g_variant_iter_init (&iter, variant); + while (g_variant_iter_next (&iter, "{&su}", &path, &r)) + g_hash_table_insert (hash, g_strdup (path), GUINT_TO_POINTER (r)); + g_simple_async_result_set_op_res_gpointer (simple, hash, (GDestroyNotify) g_hash_table_unref); + } else { + g_dbus_error_strip_remote_error (error); + g_simple_async_result_take_error (simple, error); + } + g_simple_async_result_complete (simple); + g_object_unref (simple); +} + +void +nm_manager_checkpoint_rollback (NMManager *manager, + const char *checkpoint_path, + GCancellable *cancellable, + GAsyncReadyCallback callback, + gpointer user_data) +{ + GSimpleAsyncResult *simple; + + g_return_if_fail (NM_IS_MANAGER (manager)); + g_return_if_fail (checkpoint_path && checkpoint_path[0] == '/'); + + simple = g_simple_async_result_new (G_OBJECT (manager), callback, user_data, + nm_manager_checkpoint_rollback); + if (cancellable) + g_simple_async_result_set_check_cancellable (simple, cancellable); + + nmdbus_manager_call_checkpoint_rollback (NM_MANAGER_GET_PRIVATE (manager)->proxy, + checkpoint_path, + cancellable, + checkpoint_rollback_cb, simple); +} + +GHashTable * +nm_manager_checkpoint_rollback_finish (NMManager *manager, + GAsyncResult *result, + GError **error) +{ + GSimpleAsyncResult *simple; + + g_return_val_if_fail (g_simple_async_result_is_valid (result, G_OBJECT (manager), + nm_manager_checkpoint_rollback), + NULL); + + simple = G_SIMPLE_ASYNC_RESULT (result); + if (g_simple_async_result_propagate_error (simple, error)) + return NULL; + else + return g_simple_async_result_get_op_res_gpointer (simple); +} + +static void +checkpoint_adjust_rollback_timeout_cb (GObject *object, + GAsyncResult *result, + gpointer user_data) +{ + gs_unref_object GSimpleAsyncResult *simple = user_data; + GError *error = NULL; + + if (nmdbus_manager_call_checkpoint_adjust_rollback_timeout_finish (NMDBUS_MANAGER (object), + result, + &error)) + g_simple_async_result_set_op_res_gboolean (simple, TRUE); + else { + g_dbus_error_strip_remote_error (error); + g_simple_async_result_take_error (simple, error); + } + g_simple_async_result_complete (simple); +} + +void +nm_manager_checkpoint_adjust_rollback_timeout (NMManager *manager, + const char *checkpoint_path, + guint32 add_timeout, + GCancellable *cancellable, + GAsyncReadyCallback callback, + gpointer user_data) +{ + GSimpleAsyncResult *simple; + + g_return_if_fail (NM_IS_MANAGER (manager)); + g_return_if_fail (checkpoint_path && checkpoint_path[0] == '/'); + + simple = g_simple_async_result_new (G_OBJECT (manager), callback, user_data, + nm_manager_checkpoint_adjust_rollback_timeout); + if (cancellable) + g_simple_async_result_set_check_cancellable (simple, cancellable); + + nmdbus_manager_call_checkpoint_adjust_rollback_timeout (NM_MANAGER_GET_PRIVATE (manager)->proxy, + checkpoint_path, + add_timeout, + cancellable, + checkpoint_adjust_rollback_timeout_cb, + simple); +} + +gboolean +nm_manager_checkpoint_adjust_rollback_timeout_finish (NMManager *manager, + GAsyncResult *result, + GError **error) +{ + GSimpleAsyncResult *simple; + + g_return_val_if_fail (g_simple_async_result_is_valid (result, G_OBJECT (manager), + nm_manager_checkpoint_adjust_rollback_timeout), + FALSE); + + simple = G_SIMPLE_ASYNC_RESULT (result); + return !g_simple_async_result_propagate_error (simple, error); +} + +/*****************************************************************************/ + static void constructed (GObject *object) { @@ -1482,6 +1869,9 @@ get_property (GObject *object, case PROP_DEVICES: g_value_take_boxed (value, _nm_utils_copy_object_array (nm_manager_get_devices (self))); break; + case PROP_CHECKPOINTS: + g_value_take_boxed (value, _nm_utils_copy_object_array (nm_manager_get_checkpoints (self))); + break; case PROP_METERED: g_value_set_uint (value, priv->metered); break; @@ -1510,11 +1900,13 @@ nm_manager_class_init (NMManagerClass *manager_class) object_class->finalize = finalize; nm_object_class->init_dbus = init_dbus; + nm_object_class->object_creation_failed = object_creation_failed; manager_class->device_added = device_added; manager_class->device_removed = device_removed; manager_class->active_connection_added = active_connection_added; manager_class->active_connection_removed = active_connection_removed; + manager_class->checkpoint_added = checkpoint_added; /* properties */ @@ -1622,6 +2014,12 @@ nm_manager_class_init (NMManagerClass *manager_class) G_TYPE_PTR_ARRAY, G_PARAM_READABLE | G_PARAM_STATIC_STRINGS)); + g_object_class_install_property + (object_class, PROP_CHECKPOINTS, + g_param_spec_boxed (NM_MANAGER_CHECKPOINTS, "", "", + G_TYPE_PTR_ARRAY, + G_PARAM_READABLE | + G_PARAM_STATIC_STRINGS)); /** * NMManager:metered: * @@ -1693,6 +2091,23 @@ nm_manager_class_init (NMManagerClass *manager_class) NULL, NULL, NULL, G_TYPE_NONE, 1, G_TYPE_OBJECT); + signals[CHECKPOINT_ADDED] = + g_signal_new ("checkpoint-added", + G_OBJECT_CLASS_TYPE (object_class), + G_SIGNAL_RUN_FIRST, + G_STRUCT_OFFSET (NMManagerClass, checkpoint_added), + NULL, NULL, NULL, + G_TYPE_NONE, 1, + G_TYPE_OBJECT); + signals[CHECKPOINT_REMOVED] = + g_signal_new ("checkpoint-removed", + G_OBJECT_CLASS_TYPE (object_class), + G_SIGNAL_RUN_FIRST, + G_STRUCT_OFFSET (NMManagerClass, checkpoint_removed), + NULL, NULL, NULL, + G_TYPE_NONE, 1, + G_TYPE_OBJECT); + signals[PERMISSION_CHANGED] = g_signal_new ("permission-changed", G_OBJECT_CLASS_TYPE (object_class), diff --git a/libnm/nm-manager.h b/libnm/nm-manager.h index 209a99a0..0a278aee 100644 --- a/libnm/nm-manager.h +++ b/libnm/nm-manager.h @@ -22,11 +22,13 @@ #ifndef __NM_MANAGER_H__ #define __NM_MANAGER_H__ +#if !((NETWORKMANAGER_COMPILATION) & NM_NETWORKMANAGER_COMPILATION_WITH_LIBNM_PRIVATE) +#error Cannot use this header. +#endif + #include "nm-object.h" #include "nm-client.h" -G_BEGIN_DECLS - #define NM_TYPE_MANAGER (nm_manager_get_type ()) #define NM_MANAGER(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), NM_TYPE_MANAGER, NMManager)) #define NM_MANAGER_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), NM_TYPE_MANAGER, NMManagerClass)) @@ -51,6 +53,7 @@ G_BEGIN_DECLS #define NM_MANAGER_PRIMARY_CONNECTION "primary-connection" #define NM_MANAGER_ACTIVATING_CONNECTION "activating-connection" #define NM_MANAGER_DEVICES "devices" +#define NM_MANAGER_CHECKPOINTS "checkpoints" #define NM_MANAGER_METERED "metered" #define NM_MANAGER_ALL_DEVICES "all-devices" @@ -69,11 +72,11 @@ typedef struct { void (*device_removed) (NMManager *manager, NMDevice *device); void (*active_connection_added) (NMManager *manager, NMActiveConnection *ac); void (*active_connection_removed) (NMManager *manager, NMActiveConnection *ac); + void (*checkpoint_added) (NMManager *manager, NMCheckpoint *checkpoint); + void (*checkpoint_removed) (NMManager *manager, NMCheckpoint *checkpoint); void (*permission_changed) (NMManager *manager, NMClientPermission permission, NMClientPermissionResult result); - - /* nm-manager.h is internal API. We can add more slots without breaking ABI. */ } NMManagerClass; GType nm_manager_get_type (void); @@ -99,13 +102,10 @@ gboolean nm_manager_wimax_get_enabled (NMManager *manager); void nm_manager_wimax_set_enabled (NMManager *manager, gboolean enabled); gboolean nm_manager_wimax_hardware_get_enabled (NMManager *manager); -NM_AVAILABLE_IN_1_10 gboolean nm_manager_connectivity_check_get_available (NMManager *manager); -NM_AVAILABLE_IN_1_10 gboolean nm_manager_connectivity_check_get_enabled (NMManager *manager); -NM_AVAILABLE_IN_1_10 void nm_manager_connectivity_check_set_enabled (NMManager *manager, gboolean enabled); @@ -137,7 +137,6 @@ NMConnectivityState nm_manager_check_connectivity_finish (NMManager *manager, /* Devices */ const GPtrArray *nm_manager_get_devices (NMManager *manager); -NM_AVAILABLE_IN_1_2 const GPtrArray *nm_manager_get_all_devices(NMManager *manager); NMDevice *nm_manager_get_device_by_path (NMManager *manager, const char *object_path); NMDevice *nm_manager_get_device_by_iface (NMManager *manager, const char *iface); @@ -184,6 +183,41 @@ gboolean nm_manager_deactivate_connection_finish (NMManager *manager, GAsyncResult *result, GError **error); -G_END_DECLS +const GPtrArray *nm_manager_get_checkpoints (NMManager *manager); +void nm_manager_checkpoint_create (NMManager *manager, + const GPtrArray *devices, + guint32 rollback_timeout, + NMCheckpointCreateFlags flags, + GCancellable *cancellable, + GAsyncReadyCallback callback, + gpointer user_data); +NMCheckpoint *nm_manager_checkpoint_create_finish (NMManager *manager, + GAsyncResult *result, + GError **error); +void nm_manager_checkpoint_destroy (NMManager *manager, + const char *checkpoint_path, + GCancellable *cancellable, + GAsyncReadyCallback callback, + gpointer user_data); +gboolean nm_manager_checkpoint_destroy_finish (NMManager *manager, + GAsyncResult *result, + GError **error); +void nm_manager_checkpoint_rollback (NMManager *manager, + const char *checkpoint_path, + GCancellable *cancellable, + GAsyncReadyCallback callback, + gpointer user_data); +GHashTable *nm_manager_checkpoint_rollback_finish (NMManager *manager, + GAsyncResult *result, + GError **error); +void nm_manager_checkpoint_adjust_rollback_timeout (NMManager *manager, + const char *checkpoint_path, + guint32 add_timeout, + GCancellable *cancellable, + GAsyncReadyCallback callback, + gpointer user_data); +gboolean nm_manager_checkpoint_adjust_rollback_timeout_finish (NMManager *manager, + GAsyncResult *result, + GError **error); #endif /* __NM_MANAGER_H__ */ diff --git a/libnm/nm-object-private.h b/libnm/nm-object-private.h index 8c2f3a9c..1f6d54d3 100644 --- a/libnm/nm-object-private.h +++ b/libnm/nm-object-private.h @@ -21,6 +21,10 @@ #ifndef __NM_OBJECT_PRIVATE_H__ #define __NM_OBJECT_PRIVATE_H__ +#if !((NETWORKMANAGER_COMPILATION) & NM_NETWORKMANAGER_COMPILATION_WITH_LIBNM_PRIVATE) +#error Cannot use this header. +#endif + #include "nm-object.h" typedef gboolean (*PropertyMarshalFunc) (NMObject *, GParamSpec *, GVariant *, gpointer); diff --git a/libnm/nm-object.c b/libnm/nm-object.c index 82e519e6..f162b15d 100644 --- a/libnm/nm-object.c +++ b/libnm/nm-object.c @@ -33,7 +33,7 @@ #include "nm-dbus-helpers.h" #include "nm-client.h" #include "nm-core-internal.h" -#include "nm-utils/c-list.h" +#include "c-list/src/c-list.h" static gboolean debug = FALSE; #define dbgmsg(f,...) if (G_UNLIKELY (debug)) { g_message (f, ## __VA_ARGS__ ); } @@ -608,8 +608,9 @@ handle_object_property (NMObject *self, const char *property_name, GVariant *val object = g_dbus_object_manager_get_object (priv->object_manager, path); if (!object) { /* This is a server bug -- a dangling object path for an object - * that does not exist. */ - /* XXX: We've ignored this before and the server hits the condition + * that does not exist. + * + * NOTE: We've ignored this before and the server hits the condition * more often that it should. Given we're able to recover from * ther error, let's lower the severity of the log message to * avoid unnecessarily bothering the user. This can be removed @@ -955,7 +956,7 @@ _nm_object_register_properties (NMObject *object, G_CALLBACK (properties_changed), object); g_ptr_array_add (priv->proxies, proxy); - instance = g_hash_table_new_full (g_str_hash, g_str_equal, g_free, g_free); + instance = g_hash_table_new_full (nm_str_hash, g_str_equal, g_free, g_free); priv->property_tables = g_slist_prepend (priv->property_tables, instance); for (tmp = (NMPropertiesInfo *) info; tmp->name; tmp++) { @@ -967,7 +968,7 @@ _nm_object_register_properties (NMObject *object, } pi = g_malloc0 (sizeof (PropertyInfo)); - pi->func = tmp->func ? tmp->func : demarshal_generic; + pi->func = tmp->func ?: demarshal_generic; pi->object_type = tmp->object_type; pi->field = tmp->field; pi->signal_prefix = tmp->signal_prefix; diff --git a/libnm/nm-property-docs.xml b/libnm/nm-property-docs.xml index 6c6491a0..a8b809bd 100644 --- a/libnm/nm-property-docs.xml +++ b/libnm/nm-property-docs.xml @@ -5,22 +5,23 @@ <nm-setting-docs> <setting name="connection" description="General Connection Profile Settings" name_upper="CONNECTION" > <property name="auth-retries" name_upper="AUTH_RETRIES" type="int32" default="-1" description="The number of retries for the authentication. Zero means to try indefinitely; -1 means to use a global default. If the global default is not set, the authentication retries for 3 times before failing the connection. Currently this only applies to 802-1x authentication." /> - <property name="autoconnect" name_upper="AUTOCONNECT" type="boolean" default="TRUE" description="Whether or not the connection should be automatically connected by NetworkManager when the resources for the connection are available. TRUE to automatically activate the connection, FALSE to require manual intervention to activate the connection." /> + <property name="autoconnect" name_upper="AUTOCONNECT" type="boolean" default="TRUE" description="Whether or not the connection should be automatically connected by NetworkManager when the resources for the connection are available. TRUE to automatically activate the connection, FALSE to require manual intervention to activate the connection. Note that autoconnect is not implemented for VPN profiles. See "secondaries" as an alternative to automatically connect VPN profiles." /> <property name="autoconnect-priority" name_upper="AUTOCONNECT_PRIORITY" type="int32" default="0" description="The autoconnect priority. If the connection is set to autoconnect, connections with higher priority will be preferred. Defaults to 0. The higher number means higher priority." /> <property name="autoconnect-retries" name_upper="AUTOCONNECT_RETRIES" type="int32" default="-1" description="The number of times a connection should be tried when autoactivating before giving up. Zero means forever, -1 means the global default (4 times if not overridden). Setting this to 1 means to try activation only once before blocking autoconnect. Note that after a timeout, NetworkManager will try to autoconnect again." /> - <property name="autoconnect-slaves" name_upper="AUTOCONNECT_SLAVES" type="NMSettingConnectionAutoconnectSlaves (int32)" description="Whether or not slaves of this connection should be automatically brought up when NetworkManager activates this connection. This only has a real effect for master connections. The permitted values are: 0: leave slave connections untouched, 1: activate all the slave connections with this connection, -1: default. If -1 (default) is set, global connection.autoconnect-slaves is read to determine the real value. If it is default as well, this fallbacks to 0." /> + <property name="autoconnect-slaves" name_upper="AUTOCONNECT_SLAVES" type="NMSettingConnectionAutoconnectSlaves (int32)" description="Whether or not slaves of this connection should be automatically brought up when NetworkManager activates this connection. This only has a real effect for master connections. The properties "autoconnect", "autoconnect-priority" and "autoconnect-retries" are unrelated to this setting. The permitted values are: 0: leave slave connections untouched, 1: activate all the slave connections with this connection, -1: default. If -1 (default) is set, global connection.autoconnect-slaves is read to determine the real value. If it is default as well, this fallbacks to 0." /> <property name="gateway-ping-timeout" name_upper="GATEWAY_PING_TIMEOUT" type="uint32" default="0" description="If greater than zero, delay success of IP addressing until either the timeout is reached, or an IP gateway replies to a ping." /> <property name="id" name_upper="ID" type="string" description="A human readable unique identifier for the connection, like "Work Wi-Fi" or "T-Mobile 3G"." /> <property name="interface-name" name_upper="INTERFACE_NAME" type="string" description="The name of the network interface this connection is bound to. If not set, then the connection can be attached to any interface of the appropriate type (subject to restrictions imposed by other settings). For software devices this specifies the name of the created device. For connection types where interface names cannot easily be made persistent (e.g. mobile broadband or USB Ethernet), this property should not be used. Setting this property restricts the interfaces a connection can be used with, and if interface names change or are reordered the connection may be applied to the wrong interface." /> <property name="lldp" name_upper="LLDP" type="int32" default="-1" description="Whether LLDP is enabled for the connection." /> <property name="master" name_upper="MASTER" type="string" description="Interface name of the master device or UUID of the master connection." /> + <property name="mdns" name_upper="MDNS" type="int32" default="-1" description="Whether mDNS is enabled for the connection. The permitted values are: yes: register hostname and resolving for the connection, no: disable mDNS for the interface, resolve: do not register hostname but allow resolving of mDNS host names. When updating this property on a currently activated connection, the change takes effect immediately. This feature requires a plugin which supports mDNS. One such plugin is dns-systemd-resolved." /> <property name="metered" name_upper="METERED" type="NMMetered (int32)" description="Whether the connection is metered. When updating this property on a currently activated connection, the change takes effect immediately." /> <property name="name" name_upper="NAME" type="string" default="connection" description="The setting's name, which uniquely identifies the setting within the connection. Each setting type has a name unique to that type, for example "ppp" or "wireless" or "wired"." /> <property name="permissions" name_upper="PERMISSIONS" type="array of string" default="[]" description="An array of strings defining what access a given user has to this connection. If this is NULL or empty, all users are allowed to access this connection; otherwise users are allowed if and only if they are in this list. When this is not empty, the connection can be active only when one of the specified users is logged into an active session. Each entry is of the form "[type]:[id]:[reserved]"; for example, "user:dcbw:blah". At this time only the "user" [type] is allowed. Any other values are ignored and reserved for future use. [id] is the username that this permission refers to, which may not contain the ":" character. Any [reserved] information present must be ignored and is reserved for future use. All of [type], [id], and [reserved] must be valid UTF-8." /> <property name="read-only" name_upper="READ_ONLY" type="boolean" default="FALSE" description="FALSE if the connection can be modified using the provided settings service's D-Bus interface with the right privileges, or TRUE if the connection is read-only and cannot be modified." /> <property name="secondaries" name_upper="SECONDARIES" type="array of string" default="[]" description="List of connection UUIDs that should be activated when the base connection itself is activated. Currently only VPN connections are supported." /> <property name="slave-type" name_upper="SLAVE_TYPE" type="string" description="Setting name of the device type of this slave's master connection (eg, "bond"), or NULL if this connection is not a slave." /> - <property name="stable-id" name_upper="STABLE_ID" type="string" description="Token to generate stable IDs for the connection. The stable-id is used for generating IPv6 stable private addresses with ipv6.addr-gen-mode=stable-privacy. It is also used to seed the generated cloned MAC address for ethernet.cloned-mac-address=stable and wifi.cloned-mac-address=stable. Note that also the interface name of the activating connection and a per-host secret key is included into the address generation so that the same stable-id on different hosts/devices yields different addresses. If the value is unset, an ID unique for the connection is used. Specifying a stable-id allows multiple connections to generate the same addresses. Another use is to generate IDs at runtime via dynamic substitutions. The '$' character is treated special to perform dynamic substitutions at runtime. Currently supported are "${CONNECTION}", "${BOOT}", "${RANDOM}". These effectively create unique IDs per-connection, per-boot, or every time. Any unrecognized patterns following '$' are treated verbatim, however are reserved for future use. You are thus advised to avoid '$' or escape it as "$$". For example, set it to "${CONNECTION}/${BOOT}" to create a unique id for this connection that changes with every reboot. Note that two connections only use the same effective id if their stable-id is also identical before performing dynamic substitutions." /> + <property name="stable-id" name_upper="STABLE_ID" type="string" description="This represents the identity of the connection used for various purposes. It allows to configure multiple profiles to share the identity. Also, the stable-id can contain placeholders that are substituted dynamically and deterministically depending on the context. The stable-id is used for generating IPv6 stable private addresses with ipv6.addr-gen-mode=stable-privacy. It is also used to seed the generated cloned MAC address for ethernet.cloned-mac-address=stable and wifi.cloned-mac-address=stable. It is also used as DHCP client identifier with ipv4.dhcp-client-id=stable. Note that depending on the context where it is used, other parameters are also seeded into the generation algorithm. For example, a per-host key is commonly also included, so that different systems end up generating different IDs. Or with ipv6.addr-gen-mode=stable-privacy, also the device's name is included, so that different interfaces yield different addresses. The '$' character is treated special to perform dynamic substitutions at runtime. Currently supported are "${CONNECTION}", "${DEVICE}", "${BOOT}", "${RANDOM}". These effectively create unique IDs per-connection, per-device, per-boot, or every time. Note that "${DEVICE}" corresponds the the interface name of the device. Any unrecognized patterns following '$' are treated verbatim, however are reserved for future use. You are thus advised to avoid '$' or escape it as "$$". For example, set it to "${CONNECTION}-${BOOT}-${DEVICE}" to create a unique id for this connection that changes with every reboot and differs depending on the interface where the profile activates. If the value is unset, a global connection default is consulted. If the value is still unset, the default is similar to "${CONNECTION}" and uses a unique, fixed ID for the connection." /> <property name="timestamp" name_upper="TIMESTAMP" type="uint64" default="0" description="The time, in seconds since the Unix Epoch, that the connection was last _successfully_ fully activated. NetworkManager updates the connection timestamp periodically when the connection is active to ensure that an active connection has the latest timestamp. The property is only meant for reading (changes to this property will not be preserved)." /> <property name="type" name_upper="TYPE" type="string" description="Base type of the connection. For hardware-dependent connections, should contain the setting name of the hardware-type specific setting (ie, "802-3-ethernet" or "802-11-wireless" or "bluetooth", etc), and for non-hardware dependent connections like VPN or otherwise, should contain the setting name of that setting type (ie, "vpn" or "bridge", etc)." /> <property name="uuid" name_upper="UUID" type="string" description="A universally unique identifier for the connection, for example generated with libuuid. It should be assigned when the connection is created, and never changed as long as the connection still applies to the same network. For example, it should not be changed when the "id" property or NMSettingIP4Config changes, but might need to be re-created when the Wi-Fi SSID, mobile broadband network provider, or "type" property changes. The UUID must be in the format "2815492f-7e56-435e-b2e9-246bd7cdc664" (ie, contains only hexadecimal characters and "-")." /> @@ -97,7 +98,7 @@ <property name="forward-delay" name_upper="FORWARD_DELAY" type="uint32" default="15" description="The Spanning Tree Protocol (STP) forwarding delay, in seconds." /> <property name="group-forward-mask" name_upper="GROUP_FORWARD_MASK" type="uint32" default="0" description="A mask of group addresses to forward. Usually, group addresses in the range from 01:80:C2:00:00:00 to 01:80:C2:00:00:0F are not forwarded according to standards. This property is a mask of 16 bits, each corresponding to a group address in that range that must be forwarded. The mask can't have bits 0, 1 or 2 set because they are used for STP, MAC pause frames and LACP." /> <property name="hello-time" name_upper="HELLO_TIME" type="uint32" default="2" description="The Spanning Tree Protocol (STP) hello time, in seconds." /> - <property name="mac-address" name_upper="MAC_ADDRESS" type="byte array" description="If specified, the MAC address of bridge. When creating a new bridge, this MAC address will be set. If this field is left unspecified, the "ethernet.cloned-mac-address" is referred instead to generate the initial MAC address. Note that setting "ethernet.cloned-mac-address" anyway overwrites the MAC address of the bridge later while activating the bridge. Hence, this property is deprecated." /> + <property name="mac-address" name_upper="MAC_ADDRESS" type="byte array" description="If specified, the MAC address of bridge. When creating a new bridge, this MAC address will be set. If this field is left unspecified, the "ethernet.cloned-mac-address" is referred instead to generate the initial MAC address. Note that setting "ethernet.cloned-mac-address" anyway overwrites the MAC address of the bridge later while activating the bridge. Hence, this property is deprecated. Deprecated: 1" /> <property name="max-age" name_upper="MAX_AGE" type="uint32" default="20" description="The Spanning Tree Protocol (STP) maximum message age, in seconds." /> <property name="multicast-snooping" name_upper="MULTICAST_SNOOPING" type="boolean" default="TRUE" description="Controls whether IGMP snooping is enabled for this bridge. Note that if snooping was automatically disabled due to hash collisions, the system may refuse to enable the feature until the collisions are resolved." /> <property name="name" name_upper="NAME" type="string" default="bridge" description="The setting's name, which uniquely identifies the setting within the connection. Each setting type has a name unique to that type, for example "ppp" or "wireless" or "wired"." /> @@ -127,14 +128,14 @@ <property name="app-iscsi-flags" name_upper="APP_ISCSI_FLAGS" type="NMSettingDcbFlags (uint32)" description="Specifies the NMSettingDcbFlags for the DCB iSCSI application. Flags may be any combination of NM_SETTING_DCB_FLAG_ENABLE (0x1), NM_SETTING_DCB_FLAG_ADVERTISE (0x2), and NM_SETTING_DCB_FLAG_WILLING (0x4)." /> <property name="app-iscsi-priority" name_upper="APP_ISCSI_PRIORITY" type="int32" default="-1" description="The highest User Priority (0 - 7) which iSCSI frames should use, or -1 for default priority. Only used when the "app-iscsi-flags" property includes the NM_SETTING_DCB_FLAG_ENABLE (0x1) flag." /> <property name="name" name_upper="NAME" type="string" default="dcb" description="The setting's name, which uniquely identifies the setting within the connection. Each setting type has a name unique to that type, for example "ppp" or "wireless" or "wired"." /> - <property name="priority-bandwidth" name_upper="PRIORITY_BANDWIDTH" type="array of uint32" default="[0, 0, 0, 0, 0, 0, 0, 0]" description="An array of 8 uint values, where the array index corresponds to the User Priority (0 - 7) and the value indicates the percentage of bandwidth of the priority's assigned group that the priority may use. The sum of all percentages for priorities which belong to the same group must total 100 percents." /> - <property name="priority-flow-control" name_upper="PRIORITY_FLOW_CONTROL" type="array of uint32" default="[0, 0, 0, 0, 0, 0, 0, 0]" description="An array of 8 boolean values, where the array index corresponds to the User Priority (0 - 7) and the value indicates whether or not the corresponding priority should transmit priority pause." /> + <property name="priority-bandwidth" name_upper="PRIORITY_BANDWIDTH" type="array of uint32" default="[0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L]" description="An array of 8 uint values, where the array index corresponds to the User Priority (0 - 7) and the value indicates the percentage of bandwidth of the priority's assigned group that the priority may use. The sum of all percentages for priorities which belong to the same group must total 100 percents." /> + <property name="priority-flow-control" name_upper="PRIORITY_FLOW_CONTROL" type="array of uint32" default="[False, False, False, False, False, False, False, False]" description="An array of 8 boolean values, where the array index corresponds to the User Priority (0 - 7) and the value indicates whether or not the corresponding priority should transmit priority pause." /> <property name="priority-flow-control-flags" name_upper="PRIORITY_FLOW_CONTROL_FLAGS" type="NMSettingDcbFlags (uint32)" description="Specifies the NMSettingDcbFlags for DCB Priority Flow Control (PFC). Flags may be any combination of NM_SETTING_DCB_FLAG_ENABLE (0x1), NM_SETTING_DCB_FLAG_ADVERTISE (0x2), and NM_SETTING_DCB_FLAG_WILLING (0x4)." /> - <property name="priority-group-bandwidth" name_upper="PRIORITY_GROUP_BANDWIDTH" type="array of uint32" default="[0, 0, 0, 0, 0, 0, 0, 0]" description="An array of 8 uint values, where the array index corresponds to the Priority Group ID (0 - 7) and the value indicates the percentage of link bandwidth allocated to that group. Allowed values are 0 - 100, and the sum of all values must total 100 percents." /> + <property name="priority-group-bandwidth" name_upper="PRIORITY_GROUP_BANDWIDTH" type="array of uint32" default="[0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L]" description="An array of 8 uint values, where the array index corresponds to the Priority Group ID (0 - 7) and the value indicates the percentage of link bandwidth allocated to that group. Allowed values are 0 - 100, and the sum of all values must total 100 percents." /> <property name="priority-group-flags" name_upper="PRIORITY_GROUP_FLAGS" type="NMSettingDcbFlags (uint32)" description="Specifies the NMSettingDcbFlags for DCB Priority Groups. Flags may be any combination of NM_SETTING_DCB_FLAG_ENABLE (0x1), NM_SETTING_DCB_FLAG_ADVERTISE (0x2), and NM_SETTING_DCB_FLAG_WILLING (0x4)." /> - <property name="priority-group-id" name_upper="PRIORITY_GROUP_ID" type="array of uint32" default="[0, 0, 0, 0, 0, 0, 0, 0]" description="An array of 8 uint values, where the array index corresponds to the User Priority (0 - 7) and the value indicates the Priority Group ID. Allowed Priority Group ID values are 0 - 7 or 15 for the unrestricted group." /> - <property name="priority-strict-bandwidth" name_upper="PRIORITY_STRICT_BANDWIDTH" type="array of uint32" default="[0, 0, 0, 0, 0, 0, 0, 0]" description="An array of 8 boolean values, where the array index corresponds to the User Priority (0 - 7) and the value indicates whether or not the priority may use all of the bandwidth allocated to its assigned group." /> - <property name="priority-traffic-class" name_upper="PRIORITY_TRAFFIC_CLASS" type="array of uint32" default="[0, 0, 0, 0, 0, 0, 0, 0]" description="An array of 8 uint values, where the array index corresponds to the User Priority (0 - 7) and the value indicates the traffic class (0 - 7) to which the priority is mapped." /> + <property name="priority-group-id" name_upper="PRIORITY_GROUP_ID" type="array of uint32" default="[0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L]" description="An array of 8 uint values, where the array index corresponds to the User Priority (0 - 7) and the value indicates the Priority Group ID. Allowed Priority Group ID values are 0 - 7 or 15 for the unrestricted group." /> + <property name="priority-strict-bandwidth" name_upper="PRIORITY_STRICT_BANDWIDTH" type="array of uint32" default="[False, False, False, False, False, False, False, False]" description="An array of 8 boolean values, where the array index corresponds to the User Priority (0 - 7) and the value indicates whether or not the priority may use all of the bandwidth allocated to its assigned group." /> + <property name="priority-traffic-class" name_upper="PRIORITY_TRAFFIC_CLASS" type="array of uint32" default="[0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L]" description="An array of 8 uint values, where the array index corresponds to the User Priority (0 - 7) and the value indicates the traffic class (0 - 7) to which the priority is mapped." /> </setting> <setting name="dummy" description="Dummy Link Settings" name_upper="DUMMY" > <property name="name" name_upper="NAME" type="string" default="dummy" description="The setting's name, which uniquely identifies the setting within the connection. Each setting type has a name unique to that type, for example "ppp" or "wireless" or "wired"." /> @@ -168,16 +169,16 @@ </setting> <setting name="ipv4" description="IPv4 Settings" name_upper="IP4_CONFIG" > <property name="addresses" name_upper="ADDRESSES" type="array of array of uint32" default="[]" description="Array of IP addresses." /> - <property name="dad-timeout" name_upper="DAD_TIMEOUT" type="int32" default="-1" description="Timeout in milliseconds used to check for the presence of duplicate IP addresses on the network. If an address conflict is detected, the activation will fail. A zero value means that no duplicate address detection is performed, -1 means the default value (either configuration ipvx.dad-timeout override or 3 seconds). A value greater than zero is a timeout in milliseconds." /> - <property name="dhcp-client-id" name_upper="DHCP_CLIENT_ID" type="string" description="A string sent to the DHCP server to identify the local machine which the DHCP server may use to customize the DHCP lease and options. When the property is a hex string ('aa:bb:cc') it is interpreted as a binary client ID, in which case the first byte is assumed to be the 'type' field as per RFC 2132 section 9.14 and the remaining bytes may be an hardware address (e.g. '01:xx:xx:xx:xx:xx:xx' where 1 is the Ethernet ARP type and the rest is a MAC address). If the property is not a hex string it is considered as a non-hardware-address client ID and the 'type' field is set to 0." /> + <property name="dad-timeout" name_upper="DAD_TIMEOUT" type="int32" default="-1" description="Timeout in milliseconds used to check for the presence of duplicate IP addresses on the network. If an address conflict is detected, the activation will fail. A zero value means that no duplicate address detection is performed, -1 means the default value (either configuration ipvx.dad-timeout override or zero). A value greater than zero is a timeout in milliseconds. The property is currently implemented only for IPv4." /> + <property name="dhcp-client-id" name_upper="DHCP_CLIENT_ID" type="string" description="A string sent to the DHCP server to identify the local machine which the DHCP server may use to customize the DHCP lease and options. When the property is a hex string ('aa:bb:cc') it is interpreted as a binary client ID, in which case the first byte is assumed to be the 'type' field as per RFC 2132 section 9.14 and the remaining bytes may be an hardware address (e.g. '01:xx:xx:xx:xx:xx:xx' where 1 is the Ethernet ARP type and the rest is a MAC address). If the property is not a hex string it is considered as a non-hardware-address client ID and the 'type' field is set to 0. The special values "mac" and "perm-mac" are supported, which use the current or permanent MAC address of the device to generate a client identifier with type ethernet type (01). Currently, these options only work for ethernet type of links. The special value "stable" is supported to generate a type 0 client identifier based on the stable-id (see connection.stable-id) and a per-host key. If unset, a globally configured default is used. If still unset, the client-id from the last lease is reused." /> <property name="dhcp-fqdn" name_upper="DHCP_FQDN" type="string" description="If the "dhcp-send-hostname" property is TRUE, then the specified FQDN will be sent to the DHCP server when acquiring a lease. This property and "dhcp-hostname" are mutually exclusive and cannot be set at the same time." /> <property name="dhcp-hostname" name_upper="DHCP_HOSTNAME" type="string" description="If the "dhcp-send-hostname" property is TRUE, then the specified name will be sent to the DHCP server when acquiring a lease. This property and "dhcp-fqdn" are mutually exclusive and cannot be set at the same time." /> <property name="dhcp-send-hostname" name_upper="DHCP_SEND_HOSTNAME" type="boolean" default="TRUE" description="If TRUE, a hostname is sent to the DHCP server when acquiring a lease. Some DHCP servers use this hostname to update DNS databases, essentially providing a static hostname for the computer. If the "dhcp-hostname" property is NULL and this property is TRUE, the current persistent hostname of the computer is sent." /> <property name="dhcp-timeout" name_upper="DHCP_TIMEOUT" type="int32" default="0" description="A timeout for a DHCP transaction in seconds." /> <property name="dns" name_upper="DNS" type="array of uint32" default="[]" description="Array of IP addresses of DNS servers." /> <property name="dns-options" name_upper="DNS_OPTIONS" type="array of string" default="[]" description="Array of DNS options as described in man 5 resolv.conf. NULL means that the options are unset and left at the default. In this case NetworkManager will use default options. This is distinct from an empty list of properties." /> - <property name="dns-priority" name_upper="DNS_PRIORITY" type="int32" default="0" description="Intra-connection DNS priority. The relative priority to be used when determining the order of DNS servers in resolv.conf. A lower value means that servers will be on top of the file. Zero selects the default value, which is 50 for VPNs and 100 for other connections. Note that the priority is to order DNS settings for multiple active connections. It does not disambiguate multiple DNS servers within the same connection profile. For that, just specify the DNS servers in the desired order. When multiple devices have configurations with the same priority, the one with an active default route will be preferred. Note that when using dns=dnsmasq the order is meaningless since dnsmasq forwards queries to all known servers at the same time. Negative values have the special effect of excluding other configurations with a greater priority value; so in presence of at least a negative priority, only DNS servers from connections with the lowest priority value will be used." /> - <property name="dns-search" name_upper="DNS_SEARCH" type="array of string" default="[]" description="Array of DNS search domains." /> + <property name="dns-priority" name_upper="DNS_PRIORITY" type="int32" default="0" description="DNS servers priority. The relative priority for DNS servers specified by this setting. A lower value is better (higher priority). Zero selects the default value, which is 50 for VPNs and 100 for other connections. Note that the priority is to order DNS settings for multiple active connections. It does not disambiguate multiple DNS servers within the same connection profile. When using dns=default, servers with higher priority will be on top of resolv.conf. To prioritize a given server over another one within the same connection, just specify them in the desired order. When multiple devices have configurations with the same priority, the one with an active default route will be preferred. Negative values have the special effect of excluding other configurations with a greater priority value; so in presence of at least a negative priority, only DNS servers from connections with the lowest priority value will be used. When using a DNS resolver that supports split-DNS as dns=dnsmasq or dns=systemd-resolved, each connection is used to query domains in its search list. Queries for domains not present in any search list are routed through connections having the '~.' special wildcard domain, which is added automatically to connections with the default route (or can be added manually). When multiple connections specify the same domain, the one with the highest priority (lowest numerical value) wins. If a connection specifies a domain which is subdomain of another domain with a negative DNS priority value, the subdomain is ignored." /> + <property name="dns-search" name_upper="DNS_SEARCH" type="array of string" default="[]" description="Array of DNS search domains. Domains starting with a tilde ('~') are considered 'routing' domains and are used only to decide the interface over which a query must be forwarded; they are not used to complete unqualified host names." /> <property name="gateway" name_upper="GATEWAY" type="string" description="The gateway associated with this configuration. This is only meaningful if "addresses" is also set." /> <property name="ignore-auto-dns" name_upper="IGNORE_AUTO_DNS" type="boolean" default="FALSE" description="When "method" is set to "auto" and this property to TRUE, automatically configured nameservers and search domains are ignored and only nameservers and search domains specified in the "dns" and "dns-search" properties, if any, are used." /> <property name="ignore-auto-routes" name_upper="IGNORE_AUTO_ROUTES" type="boolean" default="FALSE" description="When "method" is set to "auto" and this property to TRUE, automatically configured routes are ignored and only routes specified in the "routes" property, if any, are used." /> @@ -192,14 +193,14 @@ <setting name="ipv6" description="IPv6 Settings" name_upper="IP6_CONFIG" > <property name="addr-gen-mode" name_upper="ADDR_GEN_MODE" type="int32" default="1" description="Configure method for creating the address for use with RFC4862 IPv6 Stateless Address Autoconfiguration. The permitted values are: NM_SETTING_IP6_CONFIG_ADDR_GEN_MODE_EUI64 (0) or NM_SETTING_IP6_CONFIG_ADDR_GEN_MODE_STABLE_PRIVACY (1). If the property is set to EUI64, the addresses will be generated using the interface tokens derived from hardware address. This makes the host part of the address to stay constant, making it possible to track host's presence when it changes networks. The address changes when the interface hardware is replaced. The value of stable-privacy enables use of cryptographically secure hash of a secret host-specific key along with the connection's stable-id and the network address as specified by RFC7217. This makes it impossible to use the address track host's presence, and makes the address stable when the network interface hardware is replaced. On D-Bus, the absence of an addr-gen-mode setting equals enabling stable-privacy. For keyfile plugin, the absence of the setting on disk means EUI64 so that the property doesn't change on upgrade from older versions. Note that this setting is distinct from the Privacy Extensions as configured by "ip6-privacy" property and it does not affect the temporary addresses configured with this option." /> <property name="addresses" name_upper="ADDRESSES" type="array of legacy IPv6 address struct" default="[]" description="Array of IP addresses." /> - <property name="dad-timeout" name_upper="DAD_TIMEOUT" type="int32" default="-1" description="Timeout in milliseconds used to check for the presence of duplicate IP addresses on the network. If an address conflict is detected, the activation will fail. A zero value means that no duplicate address detection is performed, -1 means the default value (either configuration ipvx.dad-timeout override or 3 seconds). A value greater than zero is a timeout in milliseconds." /> + <property name="dad-timeout" name_upper="DAD_TIMEOUT" type="int32" default="-1" description="Timeout in milliseconds used to check for the presence of duplicate IP addresses on the network. If an address conflict is detected, the activation will fail. A zero value means that no duplicate address detection is performed, -1 means the default value (either configuration ipvx.dad-timeout override or zero). A value greater than zero is a timeout in milliseconds. The property is currently implemented only for IPv4." /> <property name="dhcp-hostname" name_upper="DHCP_HOSTNAME" type="string" description="If the "dhcp-send-hostname" property is TRUE, then the specified name will be sent to the DHCP server when acquiring a lease. This property and "dhcp-fqdn" are mutually exclusive and cannot be set at the same time." /> <property name="dhcp-send-hostname" name_upper="DHCP_SEND_HOSTNAME" type="boolean" default="TRUE" description="If TRUE, a hostname is sent to the DHCP server when acquiring a lease. Some DHCP servers use this hostname to update DNS databases, essentially providing a static hostname for the computer. If the "dhcp-hostname" property is NULL and this property is TRUE, the current persistent hostname of the computer is sent." /> <property name="dhcp-timeout" name_upper="DHCP_TIMEOUT" type="int32" default="0" description="A timeout for a DHCP transaction in seconds." /> <property name="dns" name_upper="DNS" type="array of byte array" default="[]" description="Array of IP addresses of DNS servers." /> <property name="dns-options" name_upper="DNS_OPTIONS" type="array of string" default="[]" description="Array of DNS options as described in man 5 resolv.conf. NULL means that the options are unset and left at the default. In this case NetworkManager will use default options. This is distinct from an empty list of properties." /> - <property name="dns-priority" name_upper="DNS_PRIORITY" type="int32" default="0" description="Intra-connection DNS priority. The relative priority to be used when determining the order of DNS servers in resolv.conf. A lower value means that servers will be on top of the file. Zero selects the default value, which is 50 for VPNs and 100 for other connections. Note that the priority is to order DNS settings for multiple active connections. It does not disambiguate multiple DNS servers within the same connection profile. For that, just specify the DNS servers in the desired order. When multiple devices have configurations with the same priority, the one with an active default route will be preferred. Note that when using dns=dnsmasq the order is meaningless since dnsmasq forwards queries to all known servers at the same time. Negative values have the special effect of excluding other configurations with a greater priority value; so in presence of at least a negative priority, only DNS servers from connections with the lowest priority value will be used." /> - <property name="dns-search" name_upper="DNS_SEARCH" type="array of string" default="[]" description="Array of DNS search domains." /> + <property name="dns-priority" name_upper="DNS_PRIORITY" type="int32" default="0" description="DNS servers priority. The relative priority for DNS servers specified by this setting. A lower value is better (higher priority). Zero selects the default value, which is 50 for VPNs and 100 for other connections. Note that the priority is to order DNS settings for multiple active connections. It does not disambiguate multiple DNS servers within the same connection profile. When using dns=default, servers with higher priority will be on top of resolv.conf. To prioritize a given server over another one within the same connection, just specify them in the desired order. When multiple devices have configurations with the same priority, the one with an active default route will be preferred. Negative values have the special effect of excluding other configurations with a greater priority value; so in presence of at least a negative priority, only DNS servers from connections with the lowest priority value will be used. When using a DNS resolver that supports split-DNS as dns=dnsmasq or dns=systemd-resolved, each connection is used to query domains in its search list. Queries for domains not present in any search list are routed through connections having the '~.' special wildcard domain, which is added automatically to connections with the default route (or can be added manually). When multiple connections specify the same domain, the one with the highest priority (lowest numerical value) wins. If a connection specifies a domain which is subdomain of another domain with a negative DNS priority value, the subdomain is ignored." /> + <property name="dns-search" name_upper="DNS_SEARCH" type="array of string" default="[]" description="Array of DNS search domains. Domains starting with a tilde ('~') are considered 'routing' domains and are used only to decide the interface over which a query must be forwarded; they are not used to complete unqualified host names." /> <property name="gateway" name_upper="GATEWAY" type="string" description="The gateway associated with this configuration. This is only meaningful if "addresses" is also set." /> <property name="ignore-auto-dns" name_upper="IGNORE_AUTO_DNS" type="boolean" default="FALSE" description="When "method" is set to "auto" and this property to TRUE, automatically configured nameservers and search domains are ignored and only nameservers and search domains specified in the "dns" and "dns-search" properties, if any, are used." /> <property name="ignore-auto-routes" name_upper="IGNORE_AUTO_ROUTES" type="boolean" default="FALSE" description="When "method" is set to "auto" and this property to TRUE, automatically configured routes are ignored and only routes specified in the "routes" property, if any, are used." /> @@ -215,6 +216,7 @@ </setting> <setting name="ip-tunnel" description="IP Tunneling Settings" name_upper="IP_TUNNEL" > <property name="encapsulation-limit" name_upper="ENCAPSULATION_LIMIT" type="uint32" default="0" description="How many additional levels of encapsulation are permitted to be prepended to packets. This property applies only to IPv6 tunnels." /> + <property name="flags" name_upper="FLAGS" type="uint32" default="0" description="Tunnel flags. Currently the following values are supported: NM_IP_TUNNEL_FLAG_IP6_IGN_ENCAP_LIMIT (0x1), NM_IP_TUNNEL_FLAG_IP6_USE_ORIG_TCLASS (0x2), NM_IP_TUNNEL_FLAG_IP6_USE_ORIG_FLOWLABEL (0x4), NM_IP_TUNNEL_FLAG_IP6_MIP6_DEV (0x8), NM_IP_TUNNEL_FLAG_IP6_RCV_DSCP_COPY (0x10), NM_IP_TUNNEL_FLAG_IP6_USE_ORIG_FWMARK (0x20). They are valid only for IPv6 tunnels." /> <property name="flow-label" name_upper="FLOW_LABEL" type="uint32" default="0" description="The flow label to assign to tunnel packets. This property applies only to IPv6 tunnels." /> <property name="input-key" name_upper="INPUT_KEY" type="string" description="The key used for tunnel input packets; the property is valid only for certain tunnel modes (GRE, IP6GRE). If empty, no key is used." /> <property name="local" name_upper="LOCAL" type="string" description="The local endpoint of the tunnel; the value can be empty, otherwise it must contain an IPv4 or IPv6 address." /> @@ -431,7 +433,7 @@ <property name="channel" name_upper="CHANNEL" type="uint32" default="0" description="Wireless channel to use for the Wi-Fi connection. The device will only join (or create for Ad-Hoc networks) a Wi-Fi network on the specified channel. Because channel numbers overlap between bands, this property also requires the "band" property to be set." /> <property name="cloned-mac-address" name_upper="CLONED_MAC_ADDRESS" type="byte array" description="If specified, request that the device use this MAC address instead. This is known as MAC cloning or spoofing. Beside explicitly specifying a MAC address, the special values "preserve", "permanent", "random" and "stable" are supported. "preserve" means not to touch the MAC address on activation. "permanent" means to use the permanent hardware address of the device. "random" creates a random MAC address on each connect. "stable" creates a hashed MAC address based on connection.stable-id and a machine dependent key. If unspecified, the value can be overwritten via global defaults, see manual of NetworkManager.conf. If still unspecified, it defaults to "preserve" (older versions of NetworkManager may use a different default value). On D-Bus, this field is expressed as "assigned-mac-address" or the deprecated "cloned-mac-address"." /> <property name="generate-mac-address-mask" name_upper="GENERATE_MAC_ADDRESS_MASK" type="string" description="With "cloned-mac-address" setting "random" or "stable", by default all bits of the MAC address are scrambled and a locally-administered, unicast MAC address is created. This property allows to specify that certain bits are fixed. Note that the least significant bit of the first MAC address will always be unset to create a unicast MAC address. If the property is NULL, it is eligible to be overwritten by a default connection setting. If the value is still NULL or an empty string, the default is to create a locally-administered, unicast MAC address. If the value contains one MAC address, this address is used as mask. The set bits of the mask are to be filled with the current MAC address of the device, while the unset bits are subject to randomization. Setting "FE:FF:FF:00:00:00" means to preserve the OUI of the current MAC address and only randomize the lower 3 bytes using the "random" or "stable" algorithm. If the value contains one additional MAC address after the mask, this address is used instead of the current MAC address to fill the bits that shall not be randomized. For example, a value of "FE:FF:FF:00:00:00 68:F7:28:00:00:00" will set the OUI of the MAC address to 68:F7:28, while the lower bits are randomized. A value of "02:00:00:00:00:00 00:00:00:00:00:00" will create a fully scrambled globally-administered, burned-in MAC address. If the value contains more than one additional MAC addresses, one of them is chosen randomly. For example, "02:00:00:00:00:00 00:00:00:00:00:00 02:00:00:00:00:00" will create a fully scrambled MAC address, randomly locally or globally administered." /> - <property name="hidden" name_upper="HIDDEN" type="boolean" default="FALSE" description="If TRUE, indicates this network is a non-broadcasting network that hides its SSID. In this case various workarounds may take place, such as probe-scanning the SSID for more reliable network discovery. However, these workarounds expose inherent insecurities with hidden SSID networks, and thus hidden SSID networks should be used with caution." /> + <property name="hidden" name_upper="HIDDEN" type="boolean" default="FALSE" description="If TRUE, indicates this network is a non-broadcasting network that hides its SSID. In this case various workarounds may take place, such as probe-scanning the SSID for more reliable network discovery. However, these workarounds expose inherent insecurities with hidden SSID networks, and thus hidden SSID networks should be used with caution. Note that marking the network as hidden may be a privacy issue for you, as the explicit probe-scans may be distinctly recognizable on the air." /> <property name="mac-address" name_upper="MAC_ADDRESS" type="byte array" description="If specified, this connection will only apply to the Wi-Fi device whose permanent MAC address matches. This property does not change the MAC address of the device (i.e. MAC spoofing)." /> <property name="mac-address-blacklist" name_upper="MAC_ADDRESS_BLACKLIST" type="array of string" default="[]" description="A list of permanent MAC addresses of Wi-Fi devices to which this connection should never apply. Each MAC address should be given in the standard hex-digits-and-colons notation (eg "00:11:22:33:44:55")." /> <property name="mac-address-randomization" name_upper="MAC_ADDRESS_RANDOMIZATION" type="uint32" default="0" description="One of NM_SETTING_MAC_RANDOMIZATION_DEFAULT (0) (never randomize unless the user has set a global default to randomize and the supplicant supports randomization), NM_SETTING_MAC_RANDOMIZATION_NEVER (1) (never randomize the MAC address), or NM_SETTING_MAC_RANDOMIZATION_ALWAYS (2) (always randomize the MAC address). This property is deprecated for 'cloned-mac-address'. Deprecated: 1" /> @@ -446,6 +448,7 @@ </setting> <setting name="802-11-wireless-security" description="Wi-Fi Security Settings" name_upper="WIRELESS_SECURITY" > <property name="auth-alg" name_upper="AUTH_ALG" type="string" description="When WEP is used (ie, key-mgmt = "none" or "ieee8021x") indicate the 802.11 authentication algorithm required by the AP here. One of "open" for Open System, "shared" for Shared Key, or "leap" for Cisco LEAP. When using Cisco LEAP (ie, key-mgmt = "ieee8021x" and auth-alg = "leap") the "leap-username" and "leap-password" properties must be specified." /> + <property name="fils" name_upper="FILS" type="int32" default="0" description="Indicates whether Fast Initial Link Setup (802.11ai) must be enabled for the connection. One of NM_SETTING_WIRELESS_SECURITY_FILS_DEFAULT (0) (use global default value), NM_SETTING_WIRELESS_SECURITY_FILS_DISABLE (1) (disable FILS), NM_SETTING_WIRELESS_SECURITY_FILS_OPTIONAL (2) (enable FILS if the supplicant and the access point support it) or NM_SETTING_WIRELESS_SECURITY_FILS_REQUIRED (3) (enable FILS and fail if not supported). When set to NM_SETTING_WIRELESS_SECURITY_FILS_DEFAULT (0) and no global default is set, FILS will be optionally enabled." /> <property name="group" name_upper="GROUP" type="array of string" default="[]" description="A list of group/broadcast encryption algorithms which prevents connections to Wi-Fi networks that do not utilize one of the algorithms in the list. For maximum compatibility leave this property empty. Each list element may be one of "wep40", "wep104", "tkip", or "ccmp"." /> <property name="key-mgmt" name_upper="KEY_MGMT" type="string" description="Key management used for the connection. One of "none" (WEP), "ieee8021x" (Dynamic WEP), "wpa-none" (Ad-Hoc WPA-PSK), "wpa-psk" (infrastructure WPA-PSK), or "wpa-eap" (WPA-Enterprise). This property must be set for any Wi-Fi connection that uses security." /> <property name="leap-password" name_upper="LEAP_PASSWORD" type="string" description="The login password for legacy LEAP connections (ie, key-mgmt = "ieee8021x" and auth-alg = "leap")." /> diff --git a/libnm/nm-remote-connection-private.h b/libnm/nm-remote-connection-private.h index e3f35428..5ff282f4 100644 --- a/libnm/nm-remote-connection-private.h +++ b/libnm/nm-remote-connection-private.h @@ -21,6 +21,10 @@ #ifndef __NM_REMOTE_CONNECTION_PRIVATE_H__ #define __NM_REMOTE_CONNECTION_PRIVATE_H__ +#if !((NETWORKMANAGER_COMPILATION) & NM_NETWORKMANAGER_COMPILATION_WITH_LIBNM_PRIVATE) +#error Cannot use this header. +#endif + #define NM_REMOTE_CONNECTION_INIT_RESULT "init-result" typedef enum { diff --git a/libnm/nm-remote-connection.c b/libnm/nm-remote-connection.c index 80bf179d..bd60c413 100644 --- a/libnm/nm-remote-connection.c +++ b/libnm/nm-remote-connection.c @@ -50,6 +50,7 @@ G_DEFINE_TYPE_WITH_CODE (NMRemoteConnection, nm_remote_connection, NM_TYPE_OBJEC enum { PROP_0, PROP_UNSAVED, + PROP_FLAGS, PROP_VISIBLE, LAST_PROP @@ -59,6 +60,7 @@ typedef struct { NMDBusSettingsConnection *proxy; gboolean unsaved; + guint32 flags; gboolean visible; } NMRemoteConnectionPrivate; @@ -101,7 +103,7 @@ update2_cb (GObject *proxy, GAsyncResult *result, gpointer user_data) * * Asynchronously calls the Update2() D-Bus method. * - * Since: 1.10.2 + * Since: 1.12 **/ void nm_remote_connection_update2 (NMRemoteConnection *connection, @@ -652,6 +654,22 @@ nm_remote_connection_get_unsaved (NMRemoteConnection *connection) } /** + * nm_remote_connection_get_flags: + * @connection: the #NMRemoteConnection + * + * Returns: the flags of the connection of type #NMSettingsConnectionFlags. + * + * Since: 1.12 + **/ +NMSettingsConnectionFlags +nm_remote_connection_get_flags (NMRemoteConnection *connection) +{ + g_return_val_if_fail (NM_IS_REMOTE_CONNECTION (connection), FALSE); + + return (NMSettingsConnectionFlags) NM_REMOTE_CONNECTION_GET_PRIVATE (connection)->flags; +} + +/** * nm_remote_connection_get_visible: * @connection: the #NMRemoteConnection * @@ -741,6 +759,7 @@ init_dbus (NMObject *object) NMRemoteConnectionPrivate *priv = NM_REMOTE_CONNECTION_GET_PRIVATE (object); const NMPropertiesInfo property_info[] = { { NM_REMOTE_CONNECTION_UNSAVED, &priv->unsaved }, + { NM_REMOTE_CONNECTION_FLAGS, &priv->flags }, { NULL }, }; @@ -871,6 +890,9 @@ get_property (GObject *object, guint prop_id, case PROP_UNSAVED: g_value_set_boolean (value, NM_REMOTE_CONNECTION_GET_PRIVATE (object)->unsaved); break; + case PROP_FLAGS: + g_value_set_boolean (value, NM_REMOTE_CONNECTION_GET_PRIVATE (object)->flags); + break; case PROP_VISIBLE: g_value_set_boolean (value, NM_REMOTE_CONNECTION_GET_PRIVATE (object)->visible); break; @@ -929,6 +951,21 @@ nm_remote_connection_class_init (NMRemoteConnectionClass *remote_class) G_PARAM_STATIC_STRINGS)); /** + * NMRemoteConnection:flags: + * + * The flags of the connection as unsigned integer. The values + * correspond to the #NMSettingsConnectionFlags enum. + * + * Since: 1.12 + **/ + g_object_class_install_property + (object_class, PROP_FLAGS, + g_param_spec_uint (NM_REMOTE_CONNECTION_FLAGS, "", "", + 0, G_MAXUINT32, 0, + G_PARAM_READABLE | + G_PARAM_STATIC_STRINGS)); + + /** * NMRemoteConnection:visible: * * %TRUE if the remote connection is visible to the current user, %FALSE if diff --git a/libnm/nm-remote-connection.h b/libnm/nm-remote-connection.h index 9fdcae89..d5b6a8c4 100644 --- a/libnm/nm-remote-connection.h +++ b/libnm/nm-remote-connection.h @@ -37,11 +37,11 @@ G_BEGIN_DECLS #define NM_IS_REMOTE_CONNECTION_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), NM_TYPE_REMOTE_CONNECTION)) #define NM_REMOTE_CONNECTION_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), NM_TYPE_REMOTE_CONNECTION, NMRemoteConnectionClass)) - /* Properties */ #define NM_REMOTE_CONNECTION_DBUS_CONNECTION "dbus-connection" #define NM_REMOTE_CONNECTION_PATH "path" #define NM_REMOTE_CONNECTION_UNSAVED "unsaved" +#define NM_REMOTE_CONNECTION_FLAGS "flags" #define NM_REMOTE_CONNECTION_VISIBLE "visible" /** @@ -60,7 +60,7 @@ typedef struct { GType nm_remote_connection_get_type (void); -NM_AVAILABLE_IN_1_10_2 +NM_AVAILABLE_IN_1_12 void nm_remote_connection_update2 (NMRemoteConnection *connection, GVariant *settings, NMSettingsUpdate2Flags flags, @@ -68,7 +68,7 @@ void nm_remote_connection_update2 (NMRemoteConnection *connection, GCancellable *cancellable, GAsyncReadyCallback callback, gpointer user_data); -NM_AVAILABLE_IN_1_10_2 +NM_AVAILABLE_IN_1_12 GVariant *nm_remote_connection_update2_finish (NMRemoteConnection *connection, GAsyncResult *result, GError **error); @@ -123,6 +123,9 @@ GVariant *nm_remote_connection_get_secrets_finish (NMRemoteConnection *connectio gboolean nm_remote_connection_get_unsaved (NMRemoteConnection *connection); +NM_AVAILABLE_IN_1_12 +NMSettingsConnectionFlags nm_remote_connection_get_flags (NMRemoteConnection *connection); + gboolean nm_remote_connection_get_visible (NMRemoteConnection *connection); G_END_DECLS diff --git a/libnm/nm-remote-settings.c b/libnm/nm-remote-settings.c index 2339e872..f2b26215 100644 --- a/libnm/nm-remote-settings.c +++ b/libnm/nm-remote-settings.c @@ -533,13 +533,12 @@ nm_remote_settings_save_hostname (NMRemoteSettings *settings, NMRemoteSettingsPrivate *priv; gboolean ret; - g_return_val_if_fail (NM_IS_REMOTE_SETTINGS (settings), FALSE); priv = NM_REMOTE_SETTINGS_GET_PRIVATE (settings); ret = nmdbus_settings_call_save_hostname_sync (priv->proxy, - hostname ? hostname : "", + hostname ?: "", cancellable, error); if (error && *error) g_dbus_error_strip_remote_error (*error); @@ -584,7 +583,7 @@ nm_remote_settings_save_hostname_async (NMRemoteSettings *settings, g_simple_async_result_set_check_cancellable (simple, cancellable); nmdbus_settings_call_save_hostname (priv->proxy, - hostname ? hostname : "", + hostname ?: "", cancellable, save_hostname_cb, simple); } diff --git a/libnm/nm-remote-settings.h b/libnm/nm-remote-settings.h index 06d3ac0a..ee0e0f22 100644 --- a/libnm/nm-remote-settings.h +++ b/libnm/nm-remote-settings.h @@ -22,9 +22,11 @@ #ifndef __NM_REMOTE_SETTINGS_H__ #define __NM_REMOTE_SETTINGS_H__ -#include "nm-object.h" +#if !((NETWORKMANAGER_COMPILATION) & NM_NETWORKMANAGER_COMPILATION_WITH_LIBNM_PRIVATE) +#error Cannot use this header. +#endif -G_BEGIN_DECLS +#include "nm-object.h" #define NM_TYPE_REMOTE_SETTINGS (nm_remote_settings_get_type ()) #define NM_REMOTE_SETTINGS(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), NM_TYPE_REMOTE_SETTINGS, NMRemoteSettings)) @@ -53,14 +55,10 @@ struct _NMRemoteSettings { struct _NMRemoteSettingsClass { NMObjectClass parent; - /* Signals */ void (*connection_added) (NMRemoteSettings *settings, NMRemoteConnection *connection); void (*connection_removed) (NMRemoteSettings *settings, NMRemoteConnection *connection); - - /*< private >*/ - gpointer padding[8]; }; GType nm_remote_settings_get_type (void); @@ -125,6 +123,4 @@ gboolean nm_remote_settings_save_hostname_finish (NMRemoteSettings *settings, GAsyncResult *result, GError **error); -G_END_DECLS - #endif /* __NM_REMOTE_SETTINGS_H__ */ diff --git a/libnm/nm-secret-agent-old.c b/libnm/nm-secret-agent-old.c index d5f6f174..1b9e8915 100644 --- a/libnm/nm-secret-agent-old.c +++ b/libnm/nm-secret-agent-old.c @@ -224,7 +224,7 @@ verify_sender (NMSecretAgentOld *self, NM_SECRET_AGENT_ERROR, NM_SECRET_AGENT_ERROR_PERMISSION_DENIED, "Failed to request unix user: (%s) %s.", - remote_error ? remote_error : "", + remote_error ?: "", local->message); g_free (remote_error); g_error_free (local); @@ -603,12 +603,10 @@ reg_request_cb (GObject *proxy, { GSimpleAsyncResult *simple = user_data; NMSecretAgentOld *self; - NMSecretAgentOldPrivate *priv; GError *error = NULL; self = NM_SECRET_AGENT_OLD (g_async_result_get_source_object (G_ASYNC_RESULT (simple))); g_object_unref (self); /* drop extra ref added by get_source_object() */ - priv = NM_SECRET_AGENT_OLD_GET_PRIVATE (self); if (!nmdbus_agent_manager_call_register_finish (NMDBUS_AGENT_MANAGER (proxy), result, &error)) g_dbus_error_strip_remote_error (error); @@ -884,7 +882,7 @@ nm_secret_agent_old_get_registered (NMSecretAgentOld *self) /*****************************************************************************/ /** - * nm_secret_agent_old_get_secrets: + * nm_secret_agent_old_get_secrets: (virtual get_secrets): * @self: a #NMSecretAgentOld * @connection: the #NMConnection for which we're asked secrets * @setting_name: the name of the secret setting @@ -898,8 +896,6 @@ nm_secret_agent_old_get_registered (NMSecretAgentOld *self) * agent should use when performing the request, for example returning only * existing secrets without user interaction, or requesting entirely new * secrets from the user. - * - * Virtual: get_secrets */ void nm_secret_agent_old_get_secrets (NMSecretAgentOld *self, @@ -930,7 +926,7 @@ nm_secret_agent_old_get_secrets (NMSecretAgentOld *self, } /** - * nm_secret_agent_old_save_secrets: + * nm_secret_agent_old_save_secrets: (virtual save_secrets): * @self: a #NMSecretAgentOld * @connection: a #NMConnection * @callback: (scope async): a callback, to be invoked when the operation is done @@ -938,8 +934,6 @@ nm_secret_agent_old_get_secrets (NMSecretAgentOld *self, * * Asynchronously ensures that all secrets inside @connection are stored to * disk. - * - * Virtual: save_secrets */ void nm_secret_agent_old_save_secrets (NMSecretAgentOld *self, @@ -959,7 +953,7 @@ nm_secret_agent_old_save_secrets (NMSecretAgentOld *self, } /** - * nm_secret_agent_old_delete_secrets: + * nm_secret_agent_old_delete_secrets: (virtual delete_secrets): * @self: a #NMSecretAgentOld * @connection: a #NMConnection * @callback: (scope async): a callback, to be invoked when the operation is done @@ -967,8 +961,6 @@ nm_secret_agent_old_save_secrets (NMSecretAgentOld *self, * * Asynchronously asks the agent to delete all saved secrets belonging to * @connection. - * - * Virtual: delete_secrets */ void nm_secret_agent_old_delete_secrets (NMSecretAgentOld *self, diff --git a/libnm/nm-settings-docs.xml b/libnm/nm-settings-docs.xml index 57553f8b..5334b658 100644 --- a/libnm/nm-settings-docs.xml +++ b/libnm/nm-settings-docs.xml @@ -5,22 +5,23 @@ <nm-setting-docs> <setting name="connection" description="General Connection Profile Settings" name_upper="CONNECTION" > <property name="auth-retries" name_upper="AUTH_RETRIES" type="int32" default="-1" description="The number of retries for the authentication. Zero means to try indefinitely; -1 means to use a global default. If the global default is not set, the authentication retries for 3 times before failing the connection. Currently this only applies to 802-1x authentication." /> - <property name="autoconnect" name_upper="AUTOCONNECT" type="boolean" default="TRUE" description="Whether or not the connection should be automatically connected by NetworkManager when the resources for the connection are available. TRUE to automatically activate the connection, FALSE to require manual intervention to activate the connection." /> + <property name="autoconnect" name_upper="AUTOCONNECT" type="boolean" default="TRUE" description="Whether or not the connection should be automatically connected by NetworkManager when the resources for the connection are available. TRUE to automatically activate the connection, FALSE to require manual intervention to activate the connection. Note that autoconnect is not implemented for VPN profiles. See "secondaries" as an alternative to automatically connect VPN profiles." /> <property name="autoconnect-priority" name_upper="AUTOCONNECT_PRIORITY" type="int32" default="0" description="The autoconnect priority. If the connection is set to autoconnect, connections with higher priority will be preferred. Defaults to 0. The higher number means higher priority." /> <property name="autoconnect-retries" name_upper="AUTOCONNECT_RETRIES" type="int32" default="-1" description="The number of times a connection should be tried when autoactivating before giving up. Zero means forever, -1 means the global default (4 times if not overridden). Setting this to 1 means to try activation only once before blocking autoconnect. Note that after a timeout, NetworkManager will try to autoconnect again." /> - <property name="autoconnect-slaves" name_upper="AUTOCONNECT_SLAVES" type="NMSettingConnectionAutoconnectSlaves (int32)" description="Whether or not slaves of this connection should be automatically brought up when NetworkManager activates this connection. This only has a real effect for master connections. The permitted values are: 0: leave slave connections untouched, 1: activate all the slave connections with this connection, -1: default. If -1 (default) is set, global connection.autoconnect-slaves is read to determine the real value. If it is default as well, this fallbacks to 0." /> + <property name="autoconnect-slaves" name_upper="AUTOCONNECT_SLAVES" type="NMSettingConnectionAutoconnectSlaves (int32)" description="Whether or not slaves of this connection should be automatically brought up when NetworkManager activates this connection. This only has a real effect for master connections. The properties "autoconnect", "autoconnect-priority" and "autoconnect-retries" are unrelated to this setting. The permitted values are: 0: leave slave connections untouched, 1: activate all the slave connections with this connection, -1: default. If -1 (default) is set, global connection.autoconnect-slaves is read to determine the real value. If it is default as well, this fallbacks to 0." /> <property name="gateway-ping-timeout" name_upper="GATEWAY_PING_TIMEOUT" type="uint32" default="0" description="If greater than zero, delay success of IP addressing until either the timeout is reached, or an IP gateway replies to a ping." /> <property name="id" name_upper="ID" type="string" description="A human readable unique identifier for the connection, like "Work Wi-Fi" or "T-Mobile 3G"." /> <property name="interface-name" name_upper="INTERFACE_NAME" type="string" description="The name of the network interface this connection is bound to. If not set, then the connection can be attached to any interface of the appropriate type (subject to restrictions imposed by other settings). For software devices this specifies the name of the created device. For connection types where interface names cannot easily be made persistent (e.g. mobile broadband or USB Ethernet), this property should not be used. Setting this property restricts the interfaces a connection can be used with, and if interface names change or are reordered the connection may be applied to the wrong interface." /> <property name="lldp" name_upper="LLDP" type="int32" default="-1" description="Whether LLDP is enabled for the connection." /> <property name="master" name_upper="MASTER" type="string" description="Interface name of the master device or UUID of the master connection." /> + <property name="mdns" name_upper="MDNS" type="int32" default="-1" description="Whether mDNS is enabled for the connection. The permitted values are: yes: register hostname and resolving for the connection, no: disable mDNS for the interface, resolve: do not register hostname but allow resolving of mDNS host names. When updating this property on a currently activated connection, the change takes effect immediately. This feature requires a plugin which supports mDNS. One such plugin is dns-systemd-resolved." /> <property name="metered" name_upper="METERED" type="NMMetered (int32)" description="Whether the connection is metered. When updating this property on a currently activated connection, the change takes effect immediately." /> <property name="name" name_upper="NAME" type="string" default="connection" description="The setting's name, which uniquely identifies the setting within the connection. Each setting type has a name unique to that type, for example "ppp" or "wireless" or "wired"." /> <property name="permissions" name_upper="PERMISSIONS" type="array of string" default="[]" description="An array of strings defining what access a given user has to this connection. If this is NULL or empty, all users are allowed to access this connection; otherwise users are allowed if and only if they are in this list. When this is not empty, the connection can be active only when one of the specified users is logged into an active session. Each entry is of the form "[type]:[id]:[reserved]"; for example, "user:dcbw:blah". At this time only the "user" [type] is allowed. Any other values are ignored and reserved for future use. [id] is the username that this permission refers to, which may not contain the ":" character. Any [reserved] information present must be ignored and is reserved for future use. All of [type], [id], and [reserved] must be valid UTF-8." /> <property name="read-only" name_upper="READ_ONLY" type="boolean" default="FALSE" description="FALSE if the connection can be modified using the provided settings service's D-Bus interface with the right privileges, or TRUE if the connection is read-only and cannot be modified." /> <property name="secondaries" name_upper="SECONDARIES" type="array of string" default="[]" description="List of connection UUIDs that should be activated when the base connection itself is activated. Currently only VPN connections are supported." /> <property name="slave-type" name_upper="SLAVE_TYPE" type="string" description="Setting name of the device type of this slave's master connection (eg, "bond"), or NULL if this connection is not a slave." /> - <property name="stable-id" name_upper="STABLE_ID" type="string" description="Token to generate stable IDs for the connection. The stable-id is used for generating IPv6 stable private addresses with ipv6.addr-gen-mode=stable-privacy. It is also used to seed the generated cloned MAC address for ethernet.cloned-mac-address=stable and wifi.cloned-mac-address=stable. Note that also the interface name of the activating connection and a per-host secret key is included into the address generation so that the same stable-id on different hosts/devices yields different addresses. If the value is unset, an ID unique for the connection is used. Specifying a stable-id allows multiple connections to generate the same addresses. Another use is to generate IDs at runtime via dynamic substitutions. The '$' character is treated special to perform dynamic substitutions at runtime. Currently supported are "${CONNECTION}", "${BOOT}", "${RANDOM}". These effectively create unique IDs per-connection, per-boot, or every time. Any unrecognized patterns following '$' are treated verbatim, however are reserved for future use. You are thus advised to avoid '$' or escape it as "$$". For example, set it to "${CONNECTION}/${BOOT}" to create a unique id for this connection that changes with every reboot. Note that two connections only use the same effective id if their stable-id is also identical before performing dynamic substitutions." /> + <property name="stable-id" name_upper="STABLE_ID" type="string" description="This represents the identity of the connection used for various purposes. It allows to configure multiple profiles to share the identity. Also, the stable-id can contain placeholders that are substituted dynamically and deterministically depending on the context. The stable-id is used for generating IPv6 stable private addresses with ipv6.addr-gen-mode=stable-privacy. It is also used to seed the generated cloned MAC address for ethernet.cloned-mac-address=stable and wifi.cloned-mac-address=stable. It is also used as DHCP client identifier with ipv4.dhcp-client-id=stable. Note that depending on the context where it is used, other parameters are also seeded into the generation algorithm. For example, a per-host key is commonly also included, so that different systems end up generating different IDs. Or with ipv6.addr-gen-mode=stable-privacy, also the device's name is included, so that different interfaces yield different addresses. The '$' character is treated special to perform dynamic substitutions at runtime. Currently supported are "${CONNECTION}", "${DEVICE}", "${BOOT}", "${RANDOM}". These effectively create unique IDs per-connection, per-device, per-boot, or every time. Note that "${DEVICE}" corresponds the the interface name of the device. Any unrecognized patterns following '$' are treated verbatim, however are reserved for future use. You are thus advised to avoid '$' or escape it as "$$". For example, set it to "${CONNECTION}-${BOOT}-${DEVICE}" to create a unique id for this connection that changes with every reboot and differs depending on the interface where the profile activates. If the value is unset, a global connection default is consulted. If the value is still unset, the default is similar to "${CONNECTION}" and uses a unique, fixed ID for the connection." /> <property name="timestamp" name_upper="TIMESTAMP" type="uint64" default="0" description="The time, in seconds since the Unix Epoch, that the connection was last _successfully_ fully activated. NetworkManager updates the connection timestamp periodically when the connection is active to ensure that an active connection has the latest timestamp. The property is only meant for reading (changes to this property will not be preserved)." /> <property name="type" name_upper="TYPE" type="string" description="Base type of the connection. For hardware-dependent connections, should contain the setting name of the hardware-type specific setting (ie, "802-3-ethernet" or "802-11-wireless" or "bluetooth", etc), and for non-hardware dependent connections like VPN or otherwise, should contain the setting name of that setting type (ie, "vpn" or "bridge", etc)." /> <property name="uuid" name_upper="UUID" type="string" description="A universally unique identifier for the connection, for example generated with libuuid. It should be assigned when the connection is created, and never changed as long as the connection still applies to the same network. For example, it should not be changed when the "id" property or NMSettingIP4Config changes, but might need to be re-created when the Wi-Fi SSID, mobile broadband network provider, or "type" property changes. The UUID must be in the format "2815492f-7e56-435e-b2e9-246bd7cdc664" (ie, contains only hexadecimal characters and "-")." /> @@ -99,7 +100,7 @@ <property name="group-forward-mask" name_upper="GROUP_FORWARD_MASK" type="uint32" default="0" description="A mask of group addresses to forward. Usually, group addresses in the range from 01:80:C2:00:00:00 to 01:80:C2:00:00:0F are not forwarded according to standards. This property is a mask of 16 bits, each corresponding to a group address in that range that must be forwarded. The mask can't have bits 0, 1 or 2 set because they are used for STP, MAC pause frames and LACP." /> <property name="hello-time" name_upper="HELLO_TIME" type="uint32" default="2" description="The Spanning Tree Protocol (STP) hello time, in seconds." /> <property name="interface-name" name_upper="INTERFACE_NAME" type="string" description="Deprecated in favor of connection.interface-name, but can be used for backward-compatibility with older daemons, to set the bridge's interface name." /> - <property name="mac-address" name_upper="MAC_ADDRESS" type="byte array" description="If specified, the MAC address of bridge. When creating a new bridge, this MAC address will be set. If this field is left unspecified, the "ethernet.cloned-mac-address" is referred instead to generate the initial MAC address. Note that setting "ethernet.cloned-mac-address" anyway overwrites the MAC address of the bridge later while activating the bridge. Hence, this property is deprecated." /> + <property name="mac-address" name_upper="MAC_ADDRESS" type="byte array" description="If specified, the MAC address of bridge. When creating a new bridge, this MAC address will be set. If this field is left unspecified, the "ethernet.cloned-mac-address" is referred instead to generate the initial MAC address. Note that setting "ethernet.cloned-mac-address" anyway overwrites the MAC address of the bridge later while activating the bridge. Hence, this property is deprecated. Deprecated: 1" /> <property name="max-age" name_upper="MAX_AGE" type="uint32" default="20" description="The Spanning Tree Protocol (STP) maximum message age, in seconds." /> <property name="multicast-snooping" name_upper="MULTICAST_SNOOPING" type="boolean" default="TRUE" description="Controls whether IGMP snooping is enabled for this bridge. Note that if snooping was automatically disabled due to hash collisions, the system may refuse to enable the feature until the collisions are resolved." /> <property name="name" name_upper="NAME" type="string" default="bridge" description="The setting's name, which uniquely identifies the setting within the connection. Each setting type has a name unique to that type, for example "ppp" or "wireless" or "wired"." /> @@ -129,14 +130,14 @@ <property name="app-iscsi-flags" name_upper="APP_ISCSI_FLAGS" type="NMSettingDcbFlags (uint32)" description="Specifies the NMSettingDcbFlags for the DCB iSCSI application. Flags may be any combination of NM_SETTING_DCB_FLAG_ENABLE (0x1), NM_SETTING_DCB_FLAG_ADVERTISE (0x2), and NM_SETTING_DCB_FLAG_WILLING (0x4)." /> <property name="app-iscsi-priority" name_upper="APP_ISCSI_PRIORITY" type="int32" default="-1" description="The highest User Priority (0 - 7) which iSCSI frames should use, or -1 for default priority. Only used when the "app-iscsi-flags" property includes the NM_SETTING_DCB_FLAG_ENABLE (0x1) flag." /> <property name="name" name_upper="NAME" type="string" default="dcb" description="The setting's name, which uniquely identifies the setting within the connection. Each setting type has a name unique to that type, for example "ppp" or "wireless" or "wired"." /> - <property name="priority-bandwidth" name_upper="PRIORITY_BANDWIDTH" type="array of uint32" default="[0, 0, 0, 0, 0, 0, 0, 0]" description="An array of 8 uint values, where the array index corresponds to the User Priority (0 - 7) and the value indicates the percentage of bandwidth of the priority's assigned group that the priority may use. The sum of all percentages for priorities which belong to the same group must total 100 percents." /> - <property name="priority-flow-control" name_upper="PRIORITY_FLOW_CONTROL" type="array of uint32" default="[0, 0, 0, 0, 0, 0, 0, 0]" description="An array of 8 boolean values, where the array index corresponds to the User Priority (0 - 7) and the value indicates whether or not the corresponding priority should transmit priority pause." /> + <property name="priority-bandwidth" name_upper="PRIORITY_BANDWIDTH" type="array of uint32" default="[0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L]" description="An array of 8 uint values, where the array index corresponds to the User Priority (0 - 7) and the value indicates the percentage of bandwidth of the priority's assigned group that the priority may use. The sum of all percentages for priorities which belong to the same group must total 100 percents." /> + <property name="priority-flow-control" name_upper="PRIORITY_FLOW_CONTROL" type="array of uint32" default="[False, False, False, False, False, False, False, False]" description="An array of 8 boolean values, where the array index corresponds to the User Priority (0 - 7) and the value indicates whether or not the corresponding priority should transmit priority pause." /> <property name="priority-flow-control-flags" name_upper="PRIORITY_FLOW_CONTROL_FLAGS" type="NMSettingDcbFlags (uint32)" description="Specifies the NMSettingDcbFlags for DCB Priority Flow Control (PFC). Flags may be any combination of NM_SETTING_DCB_FLAG_ENABLE (0x1), NM_SETTING_DCB_FLAG_ADVERTISE (0x2), and NM_SETTING_DCB_FLAG_WILLING (0x4)." /> - <property name="priority-group-bandwidth" name_upper="PRIORITY_GROUP_BANDWIDTH" type="array of uint32" default="[0, 0, 0, 0, 0, 0, 0, 0]" description="An array of 8 uint values, where the array index corresponds to the Priority Group ID (0 - 7) and the value indicates the percentage of link bandwidth allocated to that group. Allowed values are 0 - 100, and the sum of all values must total 100 percents." /> + <property name="priority-group-bandwidth" name_upper="PRIORITY_GROUP_BANDWIDTH" type="array of uint32" default="[0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L]" description="An array of 8 uint values, where the array index corresponds to the Priority Group ID (0 - 7) and the value indicates the percentage of link bandwidth allocated to that group. Allowed values are 0 - 100, and the sum of all values must total 100 percents." /> <property name="priority-group-flags" name_upper="PRIORITY_GROUP_FLAGS" type="NMSettingDcbFlags (uint32)" description="Specifies the NMSettingDcbFlags for DCB Priority Groups. Flags may be any combination of NM_SETTING_DCB_FLAG_ENABLE (0x1), NM_SETTING_DCB_FLAG_ADVERTISE (0x2), and NM_SETTING_DCB_FLAG_WILLING (0x4)." /> - <property name="priority-group-id" name_upper="PRIORITY_GROUP_ID" type="array of uint32" default="[0, 0, 0, 0, 0, 0, 0, 0]" description="An array of 8 uint values, where the array index corresponds to the User Priority (0 - 7) and the value indicates the Priority Group ID. Allowed Priority Group ID values are 0 - 7 or 15 for the unrestricted group." /> - <property name="priority-strict-bandwidth" name_upper="PRIORITY_STRICT_BANDWIDTH" type="array of uint32" default="[0, 0, 0, 0, 0, 0, 0, 0]" description="An array of 8 boolean values, where the array index corresponds to the User Priority (0 - 7) and the value indicates whether or not the priority may use all of the bandwidth allocated to its assigned group." /> - <property name="priority-traffic-class" name_upper="PRIORITY_TRAFFIC_CLASS" type="array of uint32" default="[0, 0, 0, 0, 0, 0, 0, 0]" description="An array of 8 uint values, where the array index corresponds to the User Priority (0 - 7) and the value indicates the traffic class (0 - 7) to which the priority is mapped." /> + <property name="priority-group-id" name_upper="PRIORITY_GROUP_ID" type="array of uint32" default="[0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L]" description="An array of 8 uint values, where the array index corresponds to the User Priority (0 - 7) and the value indicates the Priority Group ID. Allowed Priority Group ID values are 0 - 7 or 15 for the unrestricted group." /> + <property name="priority-strict-bandwidth" name_upper="PRIORITY_STRICT_BANDWIDTH" type="array of uint32" default="[False, False, False, False, False, False, False, False]" description="An array of 8 boolean values, where the array index corresponds to the User Priority (0 - 7) and the value indicates whether or not the priority may use all of the bandwidth allocated to its assigned group." /> + <property name="priority-traffic-class" name_upper="PRIORITY_TRAFFIC_CLASS" type="array of uint32" default="[0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L]" description="An array of 8 uint values, where the array index corresponds to the User Priority (0 - 7) and the value indicates the traffic class (0 - 7) to which the priority is mapped." /> </setting> <setting name="dummy" description="Dummy Link Settings" name_upper="DUMMY" > <property name="name" name_upper="NAME" type="string" default="dummy" description="The setting's name, which uniquely identifies the setting within the connection. Each setting type has a name unique to that type, for example "ppp" or "wireless" or "wired"." /> @@ -171,16 +172,16 @@ <setting name="ipv4" description="IPv4 Settings" name_upper="IP4_CONFIG" > <property name="address-data" name_upper="ADDRESS_DATA" type="array of vardict" description="Array of IPv4 addresses. Each address dictionary contains at least 'address' and 'prefix' entries, containing the IP address as a string, and the prefix length as a uint32. Additional attributes may also exist on some addresses." /> <property name="addresses" name_upper="ADDRESSES" type="array of array of uint32" default="[]" description="Deprecated in favor of the 'address-data' and 'gateway' properties, but this can be used for backward-compatibility with older daemons. Note that if you send this property the daemon will ignore 'address-data' and 'gateway'. Array of IPv4 address structures. Each IPv4 address structure is composed of 3 32-bit values; the first being the IPv4 address (network byte order), the second the prefix (1 - 32), and last the IPv4 gateway (network byte order). The gateway may be left as 0 if no gateway exists for that subnet." /> - <property name="dad-timeout" name_upper="DAD_TIMEOUT" type="int32" default="-1" description="Timeout in milliseconds used to check for the presence of duplicate IP addresses on the network. If an address conflict is detected, the activation will fail. A zero value means that no duplicate address detection is performed, -1 means the default value (either configuration ipvx.dad-timeout override or 3 seconds). A value greater than zero is a timeout in milliseconds." /> - <property name="dhcp-client-id" name_upper="DHCP_CLIENT_ID" type="string" description="A string sent to the DHCP server to identify the local machine which the DHCP server may use to customize the DHCP lease and options. When the property is a hex string ('aa:bb:cc') it is interpreted as a binary client ID, in which case the first byte is assumed to be the 'type' field as per RFC 2132 section 9.14 and the remaining bytes may be an hardware address (e.g. '01:xx:xx:xx:xx:xx:xx' where 1 is the Ethernet ARP type and the rest is a MAC address). If the property is not a hex string it is considered as a non-hardware-address client ID and the 'type' field is set to 0." /> + <property name="dad-timeout" name_upper="DAD_TIMEOUT" type="int32" default="-1" description="Timeout in milliseconds used to check for the presence of duplicate IP addresses on the network. If an address conflict is detected, the activation will fail. A zero value means that no duplicate address detection is performed, -1 means the default value (either configuration ipvx.dad-timeout override or zero). A value greater than zero is a timeout in milliseconds. The property is currently implemented only for IPv4." /> + <property name="dhcp-client-id" name_upper="DHCP_CLIENT_ID" type="string" description="A string sent to the DHCP server to identify the local machine which the DHCP server may use to customize the DHCP lease and options. When the property is a hex string ('aa:bb:cc') it is interpreted as a binary client ID, in which case the first byte is assumed to be the 'type' field as per RFC 2132 section 9.14 and the remaining bytes may be an hardware address (e.g. '01:xx:xx:xx:xx:xx:xx' where 1 is the Ethernet ARP type and the rest is a MAC address). If the property is not a hex string it is considered as a non-hardware-address client ID and the 'type' field is set to 0. The special values "mac" and "perm-mac" are supported, which use the current or permanent MAC address of the device to generate a client identifier with type ethernet type (01). Currently, these options only work for ethernet type of links. The special value "stable" is supported to generate a type 0 client identifier based on the stable-id (see connection.stable-id) and a per-host key. If unset, a globally configured default is used. If still unset, the client-id from the last lease is reused." /> <property name="dhcp-fqdn" name_upper="DHCP_FQDN" type="string" description="If the "dhcp-send-hostname" property is TRUE, then the specified FQDN will be sent to the DHCP server when acquiring a lease. This property and "dhcp-hostname" are mutually exclusive and cannot be set at the same time." /> <property name="dhcp-hostname" name_upper="DHCP_HOSTNAME" type="string" description="If the "dhcp-send-hostname" property is TRUE, then the specified name will be sent to the DHCP server when acquiring a lease. This property and "dhcp-fqdn" are mutually exclusive and cannot be set at the same time." /> <property name="dhcp-send-hostname" name_upper="DHCP_SEND_HOSTNAME" type="boolean" default="TRUE" description="If TRUE, a hostname is sent to the DHCP server when acquiring a lease. Some DHCP servers use this hostname to update DNS databases, essentially providing a static hostname for the computer. If the "dhcp-hostname" property is NULL and this property is TRUE, the current persistent hostname of the computer is sent." /> <property name="dhcp-timeout" name_upper="DHCP_TIMEOUT" type="int32" default="0" description="A timeout for a DHCP transaction in seconds." /> <property name="dns" name_upper="DNS" type="array of uint32" default="[]" description="Array of IP addresses of DNS servers (as network-byte-order integers)" /> <property name="dns-options" name_upper="DNS_OPTIONS" type="array of string" default="[]" description="Array of DNS options as described in man 5 resolv.conf. NULL means that the options are unset and left at the default. In this case NetworkManager will use default options. This is distinct from an empty list of properties." /> - <property name="dns-priority" name_upper="DNS_PRIORITY" type="int32" default="0" description="Intra-connection DNS priority. The relative priority to be used when determining the order of DNS servers in resolv.conf. A lower value means that servers will be on top of the file. Zero selects the default value, which is 50 for VPNs and 100 for other connections. Note that the priority is to order DNS settings for multiple active connections. It does not disambiguate multiple DNS servers within the same connection profile. For that, just specify the DNS servers in the desired order. When multiple devices have configurations with the same priority, the one with an active default route will be preferred. Note that when using dns=dnsmasq the order is meaningless since dnsmasq forwards queries to all known servers at the same time. Negative values have the special effect of excluding other configurations with a greater priority value; so in presence of at least a negative priority, only DNS servers from connections with the lowest priority value will be used." /> - <property name="dns-search" name_upper="DNS_SEARCH" type="array of string" default="[]" description="Array of DNS search domains." /> + <property name="dns-priority" name_upper="DNS_PRIORITY" type="int32" default="0" description="DNS servers priority. The relative priority for DNS servers specified by this setting. A lower value is better (higher priority). Zero selects the default value, which is 50 for VPNs and 100 for other connections. Note that the priority is to order DNS settings for multiple active connections. It does not disambiguate multiple DNS servers within the same connection profile. When using dns=default, servers with higher priority will be on top of resolv.conf. To prioritize a given server over another one within the same connection, just specify them in the desired order. When multiple devices have configurations with the same priority, the one with an active default route will be preferred. Negative values have the special effect of excluding other configurations with a greater priority value; so in presence of at least a negative priority, only DNS servers from connections with the lowest priority value will be used. When using a DNS resolver that supports split-DNS as dns=dnsmasq or dns=systemd-resolved, each connection is used to query domains in its search list. Queries for domains not present in any search list are routed through connections having the '~.' special wildcard domain, which is added automatically to connections with the default route (or can be added manually). When multiple connections specify the same domain, the one with the highest priority (lowest numerical value) wins. If a connection specifies a domain which is subdomain of another domain with a negative DNS priority value, the subdomain is ignored." /> + <property name="dns-search" name_upper="DNS_SEARCH" type="array of string" default="[]" description="Array of DNS search domains. Domains starting with a tilde ('~') are considered 'routing' domains and are used only to decide the interface over which a query must be forwarded; they are not used to complete unqualified host names." /> <property name="gateway" name_upper="GATEWAY" type="string" description="The gateway associated with this configuration. This is only meaningful if "addresses" is also set." /> <property name="ignore-auto-dns" name_upper="IGNORE_AUTO_DNS" type="boolean" default="FALSE" description="When "method" is set to "auto" and this property to TRUE, automatically configured nameservers and search domains are ignored and only nameservers and search domains specified in the "dns" and "dns-search" properties, if any, are used." /> <property name="ignore-auto-routes" name_upper="IGNORE_AUTO_ROUTES" type="boolean" default="FALSE" description="When "method" is set to "auto" and this property to TRUE, automatically configured routes are ignored and only routes specified in the "routes" property, if any, are used." /> @@ -197,14 +198,14 @@ <property name="addr-gen-mode" name_upper="ADDR_GEN_MODE" type="int32" default="1" description="Configure method for creating the address for use with RFC4862 IPv6 Stateless Address Autoconfiguration. The permitted values are: NM_SETTING_IP6_CONFIG_ADDR_GEN_MODE_EUI64 (0) or NM_SETTING_IP6_CONFIG_ADDR_GEN_MODE_STABLE_PRIVACY (1). If the property is set to EUI64, the addresses will be generated using the interface tokens derived from hardware address. This makes the host part of the address to stay constant, making it possible to track host's presence when it changes networks. The address changes when the interface hardware is replaced. The value of stable-privacy enables use of cryptographically secure hash of a secret host-specific key along with the connection's stable-id and the network address as specified by RFC7217. This makes it impossible to use the address track host's presence, and makes the address stable when the network interface hardware is replaced. On D-Bus, the absence of an addr-gen-mode setting equals enabling stable-privacy. For keyfile plugin, the absence of the setting on disk means EUI64 so that the property doesn't change on upgrade from older versions. Note that this setting is distinct from the Privacy Extensions as configured by "ip6-privacy" property and it does not affect the temporary addresses configured with this option." /> <property name="address-data" name_upper="ADDRESS_DATA" type="array of vardict" description="Array of IPv6 addresses. Each address dictionary contains at least 'address' and 'prefix' entries, containing the IP address as a string, and the prefix length as a uint32. Additional attributes may also exist on some addresses." /> <property name="addresses" name_upper="ADDRESSES" type="array of legacy IPv6 address struct (a(ayuay))" default="[]" description="Deprecated in favor of the 'address-data' and 'gateway' properties, but this can be used for backward-compatibility with older daemons. Note that if you send this property the daemon will ignore 'address-data' and 'gateway'. Array of IPv6 address structures. Each IPv6 address structure is composed of an IPv6 address, a prefix length (1 - 128), and an IPv6 gateway address. The gateway may be zeroed out if no gateway exists for that subnet." /> - <property name="dad-timeout" name_upper="DAD_TIMEOUT" type="int32" default="-1" description="Timeout in milliseconds used to check for the presence of duplicate IP addresses on the network. If an address conflict is detected, the activation will fail. A zero value means that no duplicate address detection is performed, -1 means the default value (either configuration ipvx.dad-timeout override or 3 seconds). A value greater than zero is a timeout in milliseconds." /> + <property name="dad-timeout" name_upper="DAD_TIMEOUT" type="int32" default="-1" description="Timeout in milliseconds used to check for the presence of duplicate IP addresses on the network. If an address conflict is detected, the activation will fail. A zero value means that no duplicate address detection is performed, -1 means the default value (either configuration ipvx.dad-timeout override or zero). A value greater than zero is a timeout in milliseconds. The property is currently implemented only for IPv4." /> <property name="dhcp-hostname" name_upper="DHCP_HOSTNAME" type="string" description="If the "dhcp-send-hostname" property is TRUE, then the specified name will be sent to the DHCP server when acquiring a lease. This property and "dhcp-fqdn" are mutually exclusive and cannot be set at the same time." /> <property name="dhcp-send-hostname" name_upper="DHCP_SEND_HOSTNAME" type="boolean" default="TRUE" description="If TRUE, a hostname is sent to the DHCP server when acquiring a lease. Some DHCP servers use this hostname to update DNS databases, essentially providing a static hostname for the computer. If the "dhcp-hostname" property is NULL and this property is TRUE, the current persistent hostname of the computer is sent." /> <property name="dhcp-timeout" name_upper="DHCP_TIMEOUT" type="int32" default="0" description="A timeout for a DHCP transaction in seconds." /> <property name="dns" name_upper="DNS" type="array of byte array" default="[]" description="Array of IP addresses of DNS servers (in network byte order)" /> <property name="dns-options" name_upper="DNS_OPTIONS" type="array of string" default="[]" description="Array of DNS options as described in man 5 resolv.conf. NULL means that the options are unset and left at the default. In this case NetworkManager will use default options. This is distinct from an empty list of properties." /> - <property name="dns-priority" name_upper="DNS_PRIORITY" type="int32" default="0" description="Intra-connection DNS priority. The relative priority to be used when determining the order of DNS servers in resolv.conf. A lower value means that servers will be on top of the file. Zero selects the default value, which is 50 for VPNs and 100 for other connections. Note that the priority is to order DNS settings for multiple active connections. It does not disambiguate multiple DNS servers within the same connection profile. For that, just specify the DNS servers in the desired order. When multiple devices have configurations with the same priority, the one with an active default route will be preferred. Note that when using dns=dnsmasq the order is meaningless since dnsmasq forwards queries to all known servers at the same time. Negative values have the special effect of excluding other configurations with a greater priority value; so in presence of at least a negative priority, only DNS servers from connections with the lowest priority value will be used." /> - <property name="dns-search" name_upper="DNS_SEARCH" type="array of string" default="[]" description="Array of DNS search domains." /> + <property name="dns-priority" name_upper="DNS_PRIORITY" type="int32" default="0" description="DNS servers priority. The relative priority for DNS servers specified by this setting. A lower value is better (higher priority). Zero selects the default value, which is 50 for VPNs and 100 for other connections. Note that the priority is to order DNS settings for multiple active connections. It does not disambiguate multiple DNS servers within the same connection profile. When using dns=default, servers with higher priority will be on top of resolv.conf. To prioritize a given server over another one within the same connection, just specify them in the desired order. When multiple devices have configurations with the same priority, the one with an active default route will be preferred. Negative values have the special effect of excluding other configurations with a greater priority value; so in presence of at least a negative priority, only DNS servers from connections with the lowest priority value will be used. When using a DNS resolver that supports split-DNS as dns=dnsmasq or dns=systemd-resolved, each connection is used to query domains in its search list. Queries for domains not present in any search list are routed through connections having the '~.' special wildcard domain, which is added automatically to connections with the default route (or can be added manually). When multiple connections specify the same domain, the one with the highest priority (lowest numerical value) wins. If a connection specifies a domain which is subdomain of another domain with a negative DNS priority value, the subdomain is ignored." /> + <property name="dns-search" name_upper="DNS_SEARCH" type="array of string" default="[]" description="Array of DNS search domains. Domains starting with a tilde ('~') are considered 'routing' domains and are used only to decide the interface over which a query must be forwarded; they are not used to complete unqualified host names." /> <property name="gateway" name_upper="GATEWAY" type="string" description="The gateway associated with this configuration. This is only meaningful if "addresses" is also set." /> <property name="ignore-auto-dns" name_upper="IGNORE_AUTO_DNS" type="boolean" default="FALSE" description="When "method" is set to "auto" and this property to TRUE, automatically configured nameservers and search domains are ignored and only nameservers and search domains specified in the "dns" and "dns-search" properties, if any, are used." /> <property name="ignore-auto-routes" name_upper="IGNORE_AUTO_ROUTES" type="boolean" default="FALSE" description="When "method" is set to "auto" and this property to TRUE, automatically configured routes are ignored and only routes specified in the "routes" property, if any, are used." /> @@ -221,6 +222,7 @@ </setting> <setting name="ip-tunnel" description="IP Tunneling Settings" name_upper="IP_TUNNEL" > <property name="encapsulation-limit" name_upper="ENCAPSULATION_LIMIT" type="uint32" default="0" description="How many additional levels of encapsulation are permitted to be prepended to packets. This property applies only to IPv6 tunnels." /> + <property name="flags" name_upper="FLAGS" type="uint32" default="0" description="Tunnel flags. Currently the following values are supported: NM_IP_TUNNEL_FLAG_IP6_IGN_ENCAP_LIMIT (0x1), NM_IP_TUNNEL_FLAG_IP6_USE_ORIG_TCLASS (0x2), NM_IP_TUNNEL_FLAG_IP6_USE_ORIG_FLOWLABEL (0x4), NM_IP_TUNNEL_FLAG_IP6_MIP6_DEV (0x8), NM_IP_TUNNEL_FLAG_IP6_RCV_DSCP_COPY (0x10), NM_IP_TUNNEL_FLAG_IP6_USE_ORIG_FWMARK (0x20). They are valid only for IPv6 tunnels." /> <property name="flow-label" name_upper="FLOW_LABEL" type="uint32" default="0" description="The flow label to assign to tunnel packets. This property applies only to IPv6 tunnels." /> <property name="input-key" name_upper="INPUT_KEY" type="string" description="The key used for tunnel input packets; the property is valid only for certain tunnel modes (GRE, IP6GRE). If empty, no key is used." /> <property name="local" name_upper="LOCAL" type="string" description="The local endpoint of the tunnel; the value can be empty, otherwise it must contain an IPv4 or IPv6 address." /> @@ -441,7 +443,7 @@ <property name="channel" name_upper="CHANNEL" type="uint32" default="0" description="Wireless channel to use for the Wi-Fi connection. The device will only join (or create for Ad-Hoc networks) a Wi-Fi network on the specified channel. Because channel numbers overlap between bands, this property also requires the "band" property to be set." /> <property name="cloned-mac-address" name_upper="CLONED_MAC_ADDRESS" type="byte array" description="This D-Bus field is deprecated in favor of "assigned-mac-address" which is more flexible and allows specifying special variants like "random". For libnm and nmcli, this field is called "cloned-mac-address"." /> <property name="generate-mac-address-mask" name_upper="GENERATE_MAC_ADDRESS_MASK" type="string" description="With "cloned-mac-address" setting "random" or "stable", by default all bits of the MAC address are scrambled and a locally-administered, unicast MAC address is created. This property allows to specify that certain bits are fixed. Note that the least significant bit of the first MAC address will always be unset to create a unicast MAC address. If the property is NULL, it is eligible to be overwritten by a default connection setting. If the value is still NULL or an empty string, the default is to create a locally-administered, unicast MAC address. If the value contains one MAC address, this address is used as mask. The set bits of the mask are to be filled with the current MAC address of the device, while the unset bits are subject to randomization. Setting "FE:FF:FF:00:00:00" means to preserve the OUI of the current MAC address and only randomize the lower 3 bytes using the "random" or "stable" algorithm. If the value contains one additional MAC address after the mask, this address is used instead of the current MAC address to fill the bits that shall not be randomized. For example, a value of "FE:FF:FF:00:00:00 68:F7:28:00:00:00" will set the OUI of the MAC address to 68:F7:28, while the lower bits are randomized. A value of "02:00:00:00:00:00 00:00:00:00:00:00" will create a fully scrambled globally-administered, burned-in MAC address. If the value contains more than one additional MAC addresses, one of them is chosen randomly. For example, "02:00:00:00:00:00 00:00:00:00:00:00 02:00:00:00:00:00" will create a fully scrambled MAC address, randomly locally or globally administered." /> - <property name="hidden" name_upper="HIDDEN" type="boolean" default="FALSE" description="If TRUE, indicates this network is a non-broadcasting network that hides its SSID. In this case various workarounds may take place, such as probe-scanning the SSID for more reliable network discovery. However, these workarounds expose inherent insecurities with hidden SSID networks, and thus hidden SSID networks should be used with caution." /> + <property name="hidden" name_upper="HIDDEN" type="boolean" default="FALSE" description="If TRUE, indicates this network is a non-broadcasting network that hides its SSID. In this case various workarounds may take place, such as probe-scanning the SSID for more reliable network discovery. However, these workarounds expose inherent insecurities with hidden SSID networks, and thus hidden SSID networks should be used with caution. Note that marking the network as hidden may be a privacy issue for you, as the explicit probe-scans may be distinctly recognizable on the air." /> <property name="mac-address" name_upper="MAC_ADDRESS" type="byte array" description="If specified, this connection will only apply to the Wi-Fi device whose permanent MAC address matches. This property does not change the MAC address of the device (i.e. MAC spoofing)." /> <property name="mac-address-blacklist" name_upper="MAC_ADDRESS_BLACKLIST" type="array of string" default="[]" description="A list of permanent MAC addresses of Wi-Fi devices to which this connection should never apply. Each MAC address should be given in the standard hex-digits-and-colons notation (eg "00:11:22:33:44:55")." /> <property name="mac-address-randomization" name_upper="MAC_ADDRESS_RANDOMIZATION" type="uint32" default="0" description="One of NM_SETTING_MAC_RANDOMIZATION_DEFAULT (0) (never randomize unless the user has set a global default to randomize and the supplicant supports randomization), NM_SETTING_MAC_RANDOMIZATION_NEVER (1) (never randomize the MAC address), or NM_SETTING_MAC_RANDOMIZATION_ALWAYS (2) (always randomize the MAC address). This property is deprecated for 'cloned-mac-address'. Deprecated: 1" /> @@ -457,6 +459,7 @@ </setting> <setting name="802-11-wireless-security" description="Wi-Fi Security Settings" name_upper="WIRELESS_SECURITY" > <property name="auth-alg" name_upper="AUTH_ALG" type="string" description="When WEP is used (ie, key-mgmt = "none" or "ieee8021x") indicate the 802.11 authentication algorithm required by the AP here. One of "open" for Open System, "shared" for Shared Key, or "leap" for Cisco LEAP. When using Cisco LEAP (ie, key-mgmt = "ieee8021x" and auth-alg = "leap") the "leap-username" and "leap-password" properties must be specified." /> + <property name="fils" name_upper="FILS" type="int32" default="0" description="Indicates whether Fast Initial Link Setup (802.11ai) must be enabled for the connection. One of NM_SETTING_WIRELESS_SECURITY_FILS_DEFAULT (0) (use global default value), NM_SETTING_WIRELESS_SECURITY_FILS_DISABLE (1) (disable FILS), NM_SETTING_WIRELESS_SECURITY_FILS_OPTIONAL (2) (enable FILS if the supplicant and the access point support it) or NM_SETTING_WIRELESS_SECURITY_FILS_REQUIRED (3) (enable FILS and fail if not supported). When set to NM_SETTING_WIRELESS_SECURITY_FILS_DEFAULT (0) and no global default is set, FILS will be optionally enabled." /> <property name="group" name_upper="GROUP" type="array of string" default="[]" description="A list of group/broadcast encryption algorithms which prevents connections to Wi-Fi networks that do not utilize one of the algorithms in the list. For maximum compatibility leave this property empty. Each list element may be one of "wep40", "wep104", "tkip", or "ccmp"." /> <property name="key-mgmt" name_upper="KEY_MGMT" type="string" description="Key management used for the connection. One of "none" (WEP), "ieee8021x" (Dynamic WEP), "wpa-none" (Ad-Hoc WPA-PSK), "wpa-psk" (infrastructure WPA-PSK), or "wpa-eap" (WPA-Enterprise). This property must be set for any Wi-Fi connection that uses security." /> <property name="leap-password" name_upper="LEAP_PASSWORD" type="string" description="The login password for legacy LEAP connections (ie, key-mgmt = "ieee8021x" and auth-alg = "leap")." /> diff --git a/libnm/nm-settings-ifcfg-rh-docs.xml b/libnm/nm-settings-ifcfg-rh-docs.xml index 4fa11864..03d935ea 100644 --- a/libnm/nm-settings-ifcfg-rh-docs.xml +++ b/libnm/nm-settings-ifcfg-rh-docs.xml @@ -109,6 +109,7 @@ pinging the gateway and waiting for the specified timeout (in seconds)."/> <property name="metered" variable="CONNECTION_METERED(+)" format="" values="yes,no,unknown" default="" example="CONNECTION_METERED=yes" description="Whether the device is metered"/> <property name="lldp" variable="LLDP(+)" format="" values="boolean value or 'rx'" default="missing variable means global default" example="LLDP=no" description="whether LLDP is enabled for the connection"/> <property name="auth-retries" variable="AUTH_RETRIES(+)" format="" values="" default="0" example="" description="Number of retries for authentication."/> +<property name="mdns" variable="CONNECTION_MDNS(+)" format="" values="yes,no,resolve" default="missing variable means global default" example="CONNECTION_MDNS=yes" description="Whether or not mDNS is enabled for the connection"/> </setting> <setting name="dcb"> <property name="app-fcoe-flags" variable="DCB_APP_FCOE_ENABLE, DCB_APP_FCOE_ADVERTISE, DCB_APP_FCOE_WILLING" format="" values="" default="no" example="DCB_APP_FCOE_ENABLE=yes DCB_APP_FCOE_ADVERTISE=yes" description="FCOE flags."/> @@ -178,10 +179,11 @@ If set to -1, a default metric based on the device type is used."/> <property name="dns-priority" variable="IPV4_DNS_PRIORITY(+)" format="" values="" default="0" example="IPV4_DNS_PRIORITY=20" description="The priority for DNS servers of this connection. Lower values have higher priority. If zero, the default value will be used (50 for VPNs, 100 for other connections). A negative value prevents DNS from other connections with greater values to be used."/> -<property name="dhcp-client-id" variable="DHCP_CLIENT_ID(+)" format="" values="" default="" example="DHCP_CLIENT_ID=ax-srv-1; DHCP_CLIENT_ID=01:44:44:44:44:44:44"" description="A string sent to the DHCP server to identify the local machine. +<property name="dhcp-client-id" variable="DHCP_CLIENT_ID(+)" format="" values="" default="" example="DHCP_CLIENT_ID=ax-srv-1; DHCP_CLIENT_ID=01:44:44:44:44:44:44" description="A string sent to the DHCP server to identify the local machine. A binary value can be specified using hex notation ('aa:bb:cc')."/> -<property name="dad-timeout" variable="ARPING_WAIT" format="" values="" default="missing variable means global default (config override or 3)" example="ARPING_WAIT=2" description="Timeout (in seconds) for performing DAD before configuring -IPv4 addresses. 0 turns off the DAD completely, -1 means default value."/> +<property name="dad-timeout" variable="ACD_TIMEOUT, ARPING_WAIT" format="" values="" default="missing variable means global default (config override or zero)" example="ACD_TIMEOUT=2000 or ARPING_WAIT=2" description="Timeout (in milliseconds for ACD_TIMEOUT or in seconds +for ARPING_WAIT) for address conflict detection before configuring +IPv4 addresses. 0 turns off the ACD completely, -1 means default value."/> <property name="dhcp-timeout" variable="IPV4_DHCP_TIMEOUT(+)" format="" values="" default="" example="IPV4_DHCP_TIMEOUT=10" description="A timeout after which the DHCP transaction fails in case of no response."/> <property name="dhcp-fqdn" variable="DHCP_FQDN" format="" values="" default="" example="DHCP_FQDN=foo.bar.com" description="FQDN to send to the DHCP server. When both DHCP_HOSTNAME and DHCP_FQDN are specified only the latter is used."/> @@ -333,6 +335,7 @@ for WEP passphrases. KEY_TYPE specifies the key type and can be either <property name="wps-method" variable="WPS_METHOD" format="" values="" default="" example="WPS_METHOD=disabled, WPS_METHOD="pin pbc"" description="Used to control the WPS methods to be used Valid values are "default", "auto", "disabled", "pin" and "pbc". If omitted, whatver the AP announces is used."/> +<property name="fils" variable="FILS(+)" format="" values="default, disable, optional, required" default="" example="FILS=required" description="Enables or disables FILS (802.11ai)"/> </setting> <setting name="802-11-wireless"> <property name="ssid" variable="ESSID" format="" values="" default="" example="ESSID="Quick Net"" description="SSID of Wi-Fi network."/> diff --git a/libnm/nm-types.h b/libnm/nm-types.h index 4310120f..dff8cb90 100644 --- a/libnm/nm-types.h +++ b/libnm/nm-types.h @@ -28,6 +28,7 @@ typedef struct _NMAccessPoint NMAccessPoint; typedef struct _NMActiveConnection NMActiveConnection; +typedef struct _NMCheckpoint NMCheckpoint; typedef struct _NMClient NMClient; typedef struct _NMDevice NMDevice; typedef struct _NMDeviceAdsl NMDeviceAdsl; diff --git a/libnm/nm-vpn-connection.c b/libnm/nm-vpn-connection.c index 636c3950..5a3c4e56 100644 --- a/libnm/nm-vpn-connection.c +++ b/libnm/nm-vpn-connection.c @@ -59,7 +59,6 @@ enum { static guint signals[LAST_SIGNAL] = { 0 }; - /** * nm_vpn_connection_get_banner: * @vpn: a #NMVpnConnection diff --git a/libnm/nm-vpn-editor.h b/libnm/nm-vpn-editor.h index 26e48662..1b09c813 100644 --- a/libnm/nm-vpn-editor.h +++ b/libnm/nm-vpn-editor.h @@ -83,4 +83,4 @@ gboolean nm_vpn_editor_update_connection (NMVpnEditor *editor, G_END_DECLS -#endif /* __NM_VPN_EDITOR_H__ */ +#endif /* __NM_VPN_EDITOR_H__ */ diff --git a/libnm/nm-vpn-plugin-old.c b/libnm/nm-vpn-plugin-old.c index 897f6d40..bfafc7b7 100644 --- a/libnm/nm-vpn-plugin-old.c +++ b/libnm/nm-vpn-plugin-old.c @@ -33,6 +33,7 @@ #include "nm-dbus-helpers.h" #include "nm-core-internal.h" #include "nm-simple-connection.h" +#include "nm-vpn-service-plugin.h" #include "introspection/org.freedesktop.NetworkManager.VPN.Plugin.h" @@ -93,7 +94,6 @@ enum { static GSList *active_plugins = NULL; - static void nm_vpn_plugin_old_set_connection (NMVpnPluginOld *plugin, GDBusConnection *connection) @@ -683,20 +683,6 @@ nm_vpn_plugin_old_secrets_required (NMVpnPluginOld *plugin, /*****************************************************************************/ -#define DATA_KEY_TAG "DATA_KEY=" -#define DATA_VAL_TAG "DATA_VAL=" -#define SECRET_KEY_TAG "SECRET_KEY=" -#define SECRET_VAL_TAG "SECRET_VAL=" - -static void -free_secret (gpointer data) -{ - char *secret = data; - - memset (secret, 0, strlen (secret)); - g_free (secret); -} - /** * nm_vpn_plugin_old_read_vpn_details: * @fd: file descriptor to read from, usually stdin (0) @@ -717,87 +703,7 @@ nm_vpn_plugin_old_read_vpn_details (int fd, GHashTable **out_data, GHashTable **out_secrets) { - GHashTable *data, *secrets; - gboolean success = FALSE; - char *key = NULL, *val = NULL; - GString *line; - gchar c; - - if (out_data) - g_return_val_if_fail (*out_data == NULL, FALSE); - if (out_secrets) - g_return_val_if_fail (*out_secrets == NULL, FALSE); - - data = g_hash_table_new_full (g_str_hash, g_str_equal, g_free, g_free); - secrets = g_hash_table_new_full (g_str_hash, g_str_equal, g_free, free_secret); - - line = g_string_new (NULL); - - /* Read stdin for data and secret items until we get a DONE */ - while (1) { - ssize_t nr; - GHashTable *hash = NULL; - - errno = 0; - nr = read (fd, &c, 1); - if (nr == -1) { - if (errno == EAGAIN) { - g_usleep (100); - continue; - } - break; - } - - if (c != '\n') { - g_string_append_c (line, c); - continue; - } - - /* Check for the finish marker */ - if (strcmp (line->str, "DONE") == 0) - break; - - /* Otherwise it's a data/secret item */ - if (strncmp (line->str, DATA_KEY_TAG, strlen (DATA_KEY_TAG)) == 0) { - hash = data; - key = g_strdup (line->str + strlen (DATA_KEY_TAG)); - } else if (strncmp (line->str, DATA_VAL_TAG, strlen (DATA_VAL_TAG)) == 0) { - hash = data; - val = g_strdup (line->str + strlen (DATA_VAL_TAG)); - } else if (strncmp (line->str, SECRET_KEY_TAG, strlen (SECRET_KEY_TAG)) == 0) { - hash = secrets; - key = g_strdup (line->str + strlen (SECRET_KEY_TAG)); - } else if (strncmp (line->str, SECRET_VAL_TAG, strlen (SECRET_VAL_TAG)) == 0) { - hash = secrets; - val = g_strdup (line->str + strlen (SECRET_VAL_TAG)); - } - g_string_truncate (line, 0); - - if (key && val && hash) { - g_hash_table_insert (hash, key, val); - key = NULL; - val = NULL; - success = TRUE; /* Got at least one value */ - } - } - - if (success) { - if (out_data) - *out_data = data; - else - g_hash_table_destroy (data); - - if (out_secrets) - *out_secrets = secrets; - else - g_hash_table_destroy (secrets); - } else { - g_hash_table_destroy (data); - g_hash_table_destroy (secrets); - } - - g_string_free (line, TRUE); - return success; + return nm_vpn_service_plugin_read_vpn_details (fd, out_data, out_secrets); } /** @@ -820,31 +726,7 @@ nm_vpn_plugin_old_get_secret_flags (GHashTable *data, const char *secret_name, NMSettingSecretFlags *out_flags) { - char *flag_name; - const char *val; - unsigned long tmp; - gboolean success = FALSE; - - g_return_val_if_fail (data != NULL, FALSE); - g_return_val_if_fail (secret_name != NULL, FALSE); - g_return_val_if_fail (out_flags != NULL, FALSE); - g_return_val_if_fail (*out_flags == NM_SETTING_SECRET_FLAG_NONE, FALSE); - - flag_name = g_strdup_printf ("%s-flags", secret_name); - - /* Try new flags value first */ - val = g_hash_table_lookup (data, flag_name); - if (val) { - errno = 0; - tmp = strtoul (val, NULL, 10); - if (errno == 0 && tmp <= NM_SETTING_SECRET_FLAGS_ALL) { - *out_flags = (NMSettingSecretFlags) tmp; - success = TRUE; - } - } - - g_free (flag_name); - return success; + return nm_vpn_service_plugin_get_secret_flags (data, secret_name, out_flags); } /*****************************************************************************/ diff --git a/libnm/nm-vpn-service-plugin.c b/libnm/nm-vpn-service-plugin.c index bf289375..da4c2446 100644 --- a/libnm/nm-vpn-service-plugin.c +++ b/libnm/nm-vpn-service-plugin.c @@ -96,7 +96,6 @@ enum { static GSList *active_plugins = NULL; - static void nm_vpn_service_plugin_set_connection (NMVpnServicePlugin *plugin, GDBusConnection *connection) @@ -151,7 +150,8 @@ nm_vpn_service_plugin_set_state (NMVpnServicePlugin *plugin, if (priv->state != state) { priv->state = state; g_signal_emit (plugin, signals[STATE_CHANGED], 0, state); - nmdbus_vpn_plugin_emit_state_changed (priv->dbus_vpn_service_plugin, state); + if (priv->dbus_vpn_service_plugin) + nmdbus_vpn_plugin_emit_state_changed (priv->dbus_vpn_service_plugin, state); } } @@ -166,7 +166,8 @@ nm_vpn_service_plugin_set_login_banner (NMVpnServicePlugin *plugin, priv = NM_VPN_SERVICE_PLUGIN_GET_PRIVATE (plugin); g_signal_emit (plugin, signals[LOGIN_BANNER], 0, banner); - nmdbus_vpn_plugin_emit_login_banner (priv->dbus_vpn_service_plugin, banner); + if (priv->dbus_vpn_service_plugin) + nmdbus_vpn_plugin_emit_login_banner (priv->dbus_vpn_service_plugin, banner); } static void @@ -176,7 +177,8 @@ _emit_failure (NMVpnServicePlugin *plugin, NMVpnServicePluginPrivate *priv = NM_VPN_SERVICE_PLUGIN_GET_PRIVATE (plugin); g_signal_emit (plugin, signals[FAILURE], 0, reason); - nmdbus_vpn_plugin_emit_failure (priv->dbus_vpn_service_plugin, reason); + if (priv->dbus_vpn_service_plugin) + nmdbus_vpn_plugin_emit_failure (priv->dbus_vpn_service_plugin, reason); } void @@ -192,13 +194,11 @@ nm_vpn_service_plugin_failure (NMVpnServicePlugin *plugin, gboolean nm_vpn_service_plugin_disconnect (NMVpnServicePlugin *plugin, GError **err) { - NMVpnServicePluginPrivate *priv; gboolean ret = FALSE; NMVpnServiceState state; g_return_val_if_fail (NM_IS_VPN_SERVICE_PLUGIN (plugin), FALSE); - priv = NM_VPN_SERVICE_PLUGIN_GET_PRIVATE (plugin); state = nm_vpn_service_plugin_get_state (plugin); switch (state) { case NM_VPN_SERVICE_STATE_STOPPING: @@ -243,6 +243,51 @@ nm_vpn_service_plugin_emit_quit (NMVpnServicePlugin *plugin) g_signal_emit (plugin, signals[QUIT], 0); } +/** + * nm_vpn_service_plugin_shutdown: + * @plugin: the #NMVpnServicePlugin instance + * + * Shutdown the @plugin and disconnect from D-Bus. After this, + * the plugin instance is dead and should no longer be used. + * It ensures to get no more requests from D-Bus. In principle, + * you don't need to shutdown the plugin, disposing the instance + * has the same effect. However, this gives a way to deactivate + * the plugin before giving up the last reference. + * + * Since: 1.12 + */ +void +nm_vpn_service_plugin_shutdown (NMVpnServicePlugin *plugin) +{ + NMVpnServicePluginPrivate *priv; + NMVpnServiceState state; + GError *error = NULL; + + g_return_if_fail (NM_IS_VPN_SERVICE_PLUGIN (plugin)); + + priv = NM_VPN_SERVICE_PLUGIN_GET_PRIVATE (plugin); + + nm_clear_g_source (&priv->fail_stop_id); + nm_clear_g_source (&priv->quit_timer); + nm_clear_g_source (&priv->connect_timer); + + state = nm_vpn_service_plugin_get_state (plugin); + if (state == NM_VPN_SERVICE_STATE_STARTED || + state == NM_VPN_SERVICE_STATE_STARTING) { + nm_vpn_service_plugin_disconnect (plugin, &error); + + if (error) { + g_warning ("Error disconnecting VPN connection: %s", error->message); + g_error_free (error); + } + } + + if (priv->dbus_vpn_service_plugin) { + g_dbus_interface_skeleton_unexport (G_DBUS_INTERFACE_SKELETON (priv->dbus_vpn_service_plugin)); + g_clear_object (&priv->dbus_vpn_service_plugin); + } +} + static gboolean connect_timer_expired (gpointer data) { @@ -338,7 +383,8 @@ nm_vpn_service_plugin_set_config (NMVpnServicePlugin *plugin, G_VARIANT_TYPE ("u")); g_signal_emit (plugin, signals[CONFIG], 0, config); - nmdbus_vpn_plugin_emit_config (priv->dbus_vpn_service_plugin, config); + if (priv->dbus_vpn_service_plugin) + nmdbus_vpn_plugin_emit_config (priv->dbus_vpn_service_plugin, config); } void @@ -389,7 +435,8 @@ nm_vpn_service_plugin_set_ip4_config (NMVpnServicePlugin *plugin, combined_config = g_variant_builder_end (&builder); g_variant_ref_sink (combined_config); g_signal_emit (plugin, signals[IP4_CONFIG], 0, combined_config); - nmdbus_vpn_plugin_emit_ip4_config (priv->dbus_vpn_service_plugin, combined_config); + if (priv->dbus_vpn_service_plugin) + nmdbus_vpn_plugin_emit_ip4_config (priv->dbus_vpn_service_plugin, combined_config); g_variant_unref (combined_config); if ( priv->has_ip4 == priv->got_ip4 @@ -410,7 +457,8 @@ nm_vpn_service_plugin_set_ip6_config (NMVpnServicePlugin *plugin, priv->got_ip6 = TRUE; g_signal_emit (plugin, signals[IP6_CONFIG], 0, ip6_config); - nmdbus_vpn_plugin_emit_ip6_config (priv->dbus_vpn_service_plugin, ip6_config); + if (priv->dbus_vpn_service_plugin) + nmdbus_vpn_plugin_emit_ip6_config (priv->dbus_vpn_service_plugin, ip6_config); g_variant_unref (ip6_config); @@ -700,7 +748,8 @@ nm_vpn_service_plugin_secrets_required (NMVpnServicePlugin *plugin, nm_clear_g_source (&priv->connect_timer); g_signal_emit (plugin, signals[SECRETS_REQUIRED], 0, message, hints); - nmdbus_vpn_plugin_emit_secrets_required (priv->dbus_vpn_service_plugin, message, hints); + if (priv->dbus_vpn_service_plugin) + nmdbus_vpn_plugin_emit_secrets_required (priv->dbus_vpn_service_plugin, message, hints); } /*****************************************************************************/ @@ -710,15 +759,6 @@ nm_vpn_service_plugin_secrets_required (NMVpnServicePlugin *plugin, #define SECRET_KEY_TAG "SECRET_KEY=" #define SECRET_VAL_TAG "SECRET_VAL=" -static void -free_secret (gpointer data) -{ - char *secret = data; - - memset (secret, 0, strlen (secret)); - g_free (secret); -} - /** * nm_vpn_service_plugin_read_vpn_details: * @fd: file descriptor to read from, usually stdin (0) @@ -739,10 +779,11 @@ nm_vpn_service_plugin_read_vpn_details (int fd, GHashTable **out_data, GHashTable **out_secrets) { - GHashTable *data, *secrets; + gs_unref_hashtable GHashTable *data = NULL; + gs_unref_hashtable GHashTable *secrets = NULL; gboolean success = FALSE; char *key = NULL, *val = NULL; - GString *line; + nm_auto_free_gstring GString *line = NULL; gchar c; if (out_data) @@ -750,8 +791,8 @@ nm_vpn_service_plugin_read_vpn_details (int fd, if (out_secrets) g_return_val_if_fail (*out_secrets == NULL, FALSE); - data = g_hash_table_new_full (g_str_hash, g_str_equal, g_free, g_free); - secrets = g_hash_table_new_full (g_str_hash, g_str_equal, g_free, free_secret); + data = g_hash_table_new_full (nm_str_hash, g_str_equal, g_free, g_free); + secrets = g_hash_table_new_full (nm_str_hash, g_str_equal, g_free, (GDestroyNotify) nm_free_secret); line = g_string_new (NULL); @@ -804,21 +845,9 @@ nm_vpn_service_plugin_read_vpn_details (int fd, } if (success) { - if (out_data) - *out_data = data; - else - g_hash_table_destroy (data); - - if (out_secrets) - *out_secrets = secrets; - else - g_hash_table_destroy (secrets); - } else { - g_hash_table_destroy (data); - g_hash_table_destroy (secrets); + NM_SET_OUT (out_data, g_steal_pointer (&data)); + NM_SET_OUT (out_secrets, g_steal_pointer (&secrets)); } - - g_string_free (line, TRUE); return success; } @@ -842,31 +871,28 @@ nm_vpn_service_plugin_get_secret_flags (GHashTable *data, const char *secret_name, NMSettingSecretFlags *out_flags) { - char *flag_name; - const char *val; - unsigned long tmp; - gboolean success = FALSE; - - g_return_val_if_fail (data != NULL, FALSE); - g_return_val_if_fail (secret_name != NULL, FALSE); - g_return_val_if_fail (out_flags != NULL, FALSE); - g_return_val_if_fail (*out_flags == NM_SETTING_SECRET_FLAG_NONE, FALSE); - - flag_name = g_strdup_printf ("%s-flags", secret_name); - - /* Try new flags value first */ - val = g_hash_table_lookup (data, flag_name); - if (val) { - errno = 0; - tmp = strtoul (val, NULL, 10); - if (errno == 0 && tmp <= NM_SETTING_SECRET_FLAGS_ALL) { - *out_flags = (NMSettingSecretFlags) tmp; - success = TRUE; - } - } - - g_free (flag_name); - return success; + gs_free char *flag_name_free = NULL; + const char *s; + gint64 t1; + NMSettingSecretFlags t0; + + g_return_val_if_fail (data, FALSE); + g_return_val_if_fail (out_flags && *out_flags == NM_SETTING_SECRET_FLAG_NONE, FALSE); + if (!secret_name || !*secret_name) + g_return_val_if_reached (FALSE); + + s = g_hash_table_lookup (data, + nm_construct_name_a ("%s-flags", secret_name, &flag_name_free)); + if (!s) + return FALSE; + t1 = _nm_utils_ascii_str_to_int64 (s, 10, 0, G_MAXINT64, -1); + if (t1 == -1) + return FALSE; + t0 = (NMSettingSecretFlags) t1; + if ((gint64) t0 != t1) + return FALSE; + NM_SET_OUT (out_flags, t0); + return TRUE; } /*****************************************************************************/ @@ -977,10 +1003,9 @@ init_sync (GInitable *initable, GCancellable *cancellable, GError **error) { NMVpnServicePlugin *plugin = NM_VPN_SERVICE_PLUGIN (initable); NMVpnServicePluginPrivate *priv = NM_VPN_SERVICE_PLUGIN_GET_PRIVATE (plugin); - GDBusConnection *connection = NULL; - GDBusProxy *proxy; + gs_unref_object GDBusConnection *connection = NULL; + gs_unref_object GDBusProxy *proxy = NULL; GVariant *ret; - gboolean success = FALSE; if (!priv->dbus_service_name) { g_set_error_literal (error, NM_VPN_PLUGIN_ERROR, NM_VPN_PLUGIN_ERROR_BAD_ARGUMENTS, @@ -1001,7 +1026,7 @@ init_sync (GInitable *initable, GCancellable *cancellable, GError **error) DBUS_INTERFACE_DBUS, cancellable, error); if (!proxy) - goto out; + return FALSE; priv->dbus_vpn_service_plugin = nmdbus_vpn_plugin_skeleton_new (); @@ -1022,7 +1047,7 @@ init_sync (GInitable *initable, GCancellable *cancellable, GError **error) connection, NM_VPN_DBUS_PLUGIN_PATH, error)) - goto out; + return FALSE; nm_vpn_service_plugin_set_connection (plugin, connection); nm_vpn_service_plugin_set_state (plugin, NM_VPN_SERVICE_STATE_INIT); @@ -1032,20 +1057,14 @@ init_sync (GInitable *initable, GCancellable *cancellable, GError **error) g_variant_new ("(su)", priv->dbus_service_name, 0), G_DBUS_CALL_FLAGS_NONE, -1, cancellable, error); - g_object_unref (proxy); if (!ret) { if (error && *error) g_dbus_error_strip_remote_error (*error); - goto out; + return FALSE; } g_variant_unref (ret); - success = TRUE; - - out: - g_clear_object (&connection); - - return success; + return TRUE; } static void @@ -1065,7 +1084,7 @@ set_property (GObject *object, guint prop_id, break; case PROP_STATE: nm_vpn_service_plugin_set_state (NM_VPN_SERVICE_PLUGIN (object), - (NMVpnServiceState) g_value_get_enum (value)); + (NMVpnServiceState) g_value_get_enum (value)); break; default: G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec); @@ -1098,31 +1117,7 @@ get_property (GObject *object, guint prop_id, static void dispose (GObject *object) { - NMVpnServicePlugin *plugin = NM_VPN_SERVICE_PLUGIN (object); - NMVpnServicePluginPrivate *priv = NM_VPN_SERVICE_PLUGIN_GET_PRIVATE (plugin); - NMVpnServiceState state; - GError *err = NULL; - - nm_clear_g_source (&priv->fail_stop_id); - nm_clear_g_source (&priv->quit_timer); - nm_clear_g_source (&priv->connect_timer); - - state = nm_vpn_service_plugin_get_state (plugin); - - if (state == NM_VPN_SERVICE_STATE_STARTED || - state == NM_VPN_SERVICE_STATE_STARTING) - nm_vpn_service_plugin_disconnect (plugin, &err); - - if (err) { - g_warning ("Error disconnecting VPN connection: %s", err->message); - g_error_free (err); - } - - if (priv->dbus_vpn_service_plugin) { - g_dbus_interface_skeleton_unexport (G_DBUS_INTERFACE_SKELETON (priv->dbus_vpn_service_plugin)); - g_clear_object (&priv->dbus_vpn_service_plugin); - } - + nm_vpn_service_plugin_shutdown (NM_VPN_SERVICE_PLUGIN (object)); G_OBJECT_CLASS (nm_vpn_service_plugin_parent_class)->dispose (object); } diff --git a/libnm/nm-vpn-service-plugin.h b/libnm/nm-vpn-service-plugin.h index 329345ea..71e031b0 100644 --- a/libnm/nm-vpn-service-plugin.h +++ b/libnm/nm-vpn-service-plugin.h @@ -150,6 +150,9 @@ NM_AVAILABLE_IN_1_2 gboolean nm_vpn_service_plugin_disconnect (NMVpnServicePlugin *plugin, GError **err); +NM_AVAILABLE_IN_1_12 +void nm_vpn_service_plugin_shutdown (NMVpnServicePlugin *plugin); + /* Utility functions */ NM_AVAILABLE_IN_1_2 diff --git a/libnm/tests/meson.build b/libnm/tests/meson.build new file mode 100644 index 00000000..e2b88273 --- /dev/null +++ b/libnm/tests/meson.build @@ -0,0 +1,42 @@ +test_units = [ + ['test-general', [libnm_utils, libnm_core]], + ['test-nm-client', []], + ['test-remote-settings-client', []], + ['test-secret-agent', []], +] + +cflags = [ + '-DNETWORKMANAGER_COMPILATION_TEST', + '-DNETWORKMANAGER_COMPILATION=NM_NETWORKMANAGER_COMPILATION_LIBNM', +] + nm_build_cflags + +foreach test_unit: test_units + exe = executable( + 'libnm-' + test_unit[0], + [ + test_unit[0] + '.c', + shared_nm_test_utils_impl_c, + ], + dependencies: [ + libnm_dep, + nm_core_dep, + ], + c_args: cflags, + link_with: test_unit[1] + ) + + test( + 'libnm/' + test_unit[0], + test_script, + args: test_args + [exe.full_path()] + ) +endforeach + +# just test, that we can build "nm-vpn-plugin-utils.c" +libnm_vpn_plugin_utils_test = static_library( + 'nm-vpn-plugin-utils-test', + sources: shared_nm_utils_nm_vpn_plugin_utils_c + [libnm_enum[1]], + include_directories: libnm_inc, + dependencies: nm_core_dep, + c_args: cflags +) diff --git a/libnm/tests/test-general.c b/libnm/tests/test-general.c index 7e0b7bb7..5959a4e6 100644 --- a/libnm/tests/test-general.c +++ b/libnm/tests/test-general.c @@ -26,33 +26,2134 @@ /*****************************************************************************/ +typedef struct { + const char *desc; + const char *expected; + int line; +} TestFixupData; + static void -do_test_fixup_desc_string (const char *desc, const char *expected) +_test_fixup_string (const TestFixupData *data, + guint n_data, + char *(*func) (const char *)) { - gs_free char *result = NULL; + guint i; + + g_assert (data); + g_assert (n_data > 0); + g_assert (func); + + for (i = 0; i < n_data; i++, data++) { + gs_free char *value = func (data->desc); - result = nm_utils_fixup_desc_string (desc); - g_assert_cmpstr (result, ==, expected); + if (!nm_streq0 (value, data->expected)) { + g_error ("Error comparing value: %s:%i: expected %s%s%s for %s%s%s, but got %s%s%s", + __FILE__, data->line, + NM_PRINT_FMT_QUOTE_STRING (data->expected), + NM_PRINT_FMT_QUOTE_STRING (data->desc), + NM_PRINT_FMT_QUOTE_STRING (value)); + } + } } -#define do_test_fixup_desc_string_same(desc) (do_test_fixup_desc_string (""desc"", ""desc"")) +#define T_DATA(_desc, _expected) \ + { \ + .desc = _desc, \ + .expected = _expected, \ + .line = __LINE__, \ + } static void -test_fixup_desc_string (void) +test_fixup_vendor_string (void) { - do_test_fixup_desc_string (NULL, NULL); - do_test_fixup_desc_string ("", NULL); - do_test_fixup_desc_string_same ("a"); - do_test_fixup_desc_string_same ("a b"); - do_test_fixup_desc_string ("a b ", "a b"); - do_test_fixup_desc_string (" a bbc ", "a bbc"); - do_test_fixup_desc_string (" a \xcc bbc ", "a bbc"); - do_test_fixup_desc_string (" a\xcc bbc ", "a bbc"); - do_test_fixup_desc_string (" a\xcc""bbc Wireless PC", "a bbc"); - do_test_fixup_desc_string (" a\xcc""bbc Wireless PC ", "a bbc"); - do_test_fixup_desc_string (" a\xcc""bbcWireless PC ", "a bbcWireless PC"); - do_test_fixup_desc_string (" a\xcc""bbc Wireless PCx", "a bbc Wireless PCx"); - do_test_fixup_desc_string (" a\xcc""bbc Inc Wireless PC ", "a bbc"); + static const TestFixupData data[] = { + T_DATA ("3Com", "3Com"), + T_DATA ("3Com Corp.", "3Com"), + T_DATA ("3Com Corporation", "3Com"), + T_DATA ("Abocom Systems Inc", "Abocom"), + T_DATA ("AboCom Systems Inc", "AboCom"), + T_DATA ("Accton Technology Corp.", "Accton"), + T_DATA ("Accton Technology Corporation", "Accton"), + T_DATA ("Acer Communications & Multimedia", "Acer"), + T_DATA ("Actiontec Electronics, Inc. [hex]", "Actiontec"), + T_DATA ("Adaptec", "Adaptec"), + T_DATA ("Addtron Technology Co, Inc.", "Addtron"), + T_DATA ("ADMtek", "ADMtek"), + T_DATA ("ADMtek, Inc.", "ADMtek"), + T_DATA ("ADS Technologies, Inc.", "ADS"), + T_DATA ("Advanced Micro Devices, Inc. [AMD]", "AMD"), + T_DATA ("Advance Multimedia Internet Technology Inc. (AMIT)", "Advance"), + T_DATA ("AEI", "AEI"), + T_DATA ("Airprime, Incorporated", "Airprime"), + T_DATA ("AirTies Wireless Networks", "AirTies"), + T_DATA ("AirVast", "AirVast"), + T_DATA ("Alcatel Telecom", "Alcatel Telecom"), + T_DATA ("ALi Corp.", "ALi"), + T_DATA ("Allied Telesis", "Allied Telesis"), + T_DATA ("Allied Telesyn International", "Allied Telesyn"), + T_DATA ("Alteon Networks Inc.", "Alteon"), + T_DATA ("Altima (nee Broadcom)", "Altima"), + T_DATA ("A-Max Technology Macao Commercial Offshore Co. Ltd.", "A-Max"), + T_DATA ("Amigo Technology Inc.", "Amigo"), + T_DATA ("AMIT Technology, Inc.", "AMIT"), + T_DATA ("Anchor Chips, Inc.", "Anchor"), + T_DATA ("AnyDATA Corporation", "AnyDATA"), + T_DATA ("Apple Inc.", "Apple"), + T_DATA ("Apple, Inc.", "Apple"), + T_DATA ("ARC International", "ARC"), + T_DATA ("ASIX Electronics Corp.", "ASIX"), + T_DATA ("Asix Electronics Corporation", "Asix"), + T_DATA ("Askey Computer Corp. [hex]", "Askey"), + T_DATA ("ASUSTek Computer, Inc.", "ASUSTek Computer"), + T_DATA ("ASUSTek Computer, Inc. (wrong ID)", "ASUSTek Computer"), + T_DATA ("ATEN International Co., Ltd", "ATEN"), + T_DATA ("Atheros Communications", "Atheros"), + T_DATA ("Atheros Communications, Inc.", "Atheros"), + T_DATA ("AVM GmbH", "AVM"), + T_DATA ("AzureWave", "AzureWave"), + T_DATA ("Belkin", "Belkin"), + T_DATA ("Belkin Components", "Belkin"), + T_DATA ("Billionton Systems, Inc.", "Billionton"), + T_DATA ("Broadcom Corp.", "Broadcom"), + T_DATA ("Broadcom Limited", "Broadcom"), + T_DATA ("Brocade Communications Systems, Inc.", "Brocade"), + T_DATA ("BUFFALO INC. (formerly MelCo., Inc.)", "BUFFALO"), + T_DATA ("CACE Technologies Inc.", "CACE"), + T_DATA ("Cadence Design Systems, Inc.", "Cadence"), + T_DATA ("Chelsio Communications Inc", "Chelsio"), + T_DATA ("Chicony Electronics Co., Ltd", "Chicony"), + T_DATA ("Chu Yuen Enterprise Co., Ltd", "Chu Yuen"), + T_DATA ("Cisco Systems Inc", "Cisco"), + T_DATA ("Cisco Systems, Inc.", "Cisco"), + T_DATA ("CMOTECH Co., Ltd.", "CMOTECH"), + T_DATA ("CNet Technology Inc.", "CNet"), + T_DATA ("CNet Technology Inc", "CNet"), + T_DATA ("Comneon", "Comneon"), + T_DATA ("Compaq Computer Corp.", "Compaq"), + T_DATA ("Compaq Computer Corporation", "Compaq"), + T_DATA ("Compex", "Compex"), + T_DATA ("Computer Access Technology Corp.", "Computer Access"), + T_DATA ("Conexant Systems, Inc.", "Conexant"), + T_DATA ("Conexant Systems (Rockwell), Inc.", "Conexant"), + T_DATA ("Corega K.K.", "Corega K.K."), + T_DATA ("Curitel Communications, Inc.", "Curitel"), + T_DATA ("CyberTAN Technology", "CyberTAN"), + T_DATA ("Cypress Semiconductor Corp.", "Cypress"), + T_DATA ("Davicom Semiconductor, Inc.", "Davicom"), + T_DATA ("Dell Computer Corp.", "Dell"), + T_DATA ("DELTA Electronics, Inc", "DELTA"), + T_DATA ("Digital Equipment Corporation", "Digital Equipment"), + T_DATA ("D-Link Corp.", "D-Link"), + T_DATA ("D-Link System", "D-Link System"), + T_DATA ("D-Link System Inc", "D-Link System"), + T_DATA ("DrayTek Corp.", "DrayTek"), + T_DATA ("d'TV", "d'TV"), + T_DATA ("DVICO", "DVICO"), + T_DATA ("Edimax Computer Co.", "Edimax"), + T_DATA ("Edimax Technology Co., Ltd", "Edimax"), + T_DATA ("Efar Microsystems", "Efar"), + T_DATA ("Efficient Networks, Inc.", "Efficient"), + T_DATA ("ELCON Systemtechnik", "ELCON"), + T_DATA ("Elecom Co., Ltd", "Elecom"), + T_DATA ("ELSA AG", "ELSA"), + T_DATA ("Emulex Corporation", "Emulex"), + T_DATA ("Encore Electronics Inc.", "Encore"), + T_DATA ("EndPoints, Inc.", "EndPoints"), + T_DATA ("Entrega [hex]", "Entrega"), + T_DATA ("Ericsson Business Mobile Networks BV", "Ericsson"), + T_DATA ("eTEK Labs", "eTEK"), + T_DATA ("Exar Corp.", "Exar"), + T_DATA ("Fiberline", "Fiberline"), + T_DATA ("Fujitsu Limited.", "Fujitsu"), + T_DATA ("Fujitsu Siemens Computers", "Fujitsu Siemens"), + T_DATA ("Gateway, Inc.", "Gateway"), + T_DATA ("Gemtek", "Gemtek"), + T_DATA ("Genesys Logic, Inc.", "Genesys Logic"), + T_DATA ("Global Sun Technology", "Global Sun"), + T_DATA ("Global Sun Technology, Inc.", "Global Sun"), + T_DATA ("GlobeSpan, Inc.", "GlobeSpan"), + T_DATA ("Gmate, Inc.", "Gmate"), + T_DATA ("Good Way Technology", "Good Way"), + T_DATA ("Guillemot Corp.", "Guillemot"), + T_DATA ("Hangzhou Silan Microelectronics Co., Ltd.", "Hangzhou Silan"), + T_DATA ("Hawking Technologies", "Hawking"), + T_DATA ("Hewlett-Packard", "Hewlett-Packard"), + T_DATA ("Hirose Electric", "Hirose Electric"), + T_DATA ("Holtek Microelectronics Inc", "Holtek"), + T_DATA ("Huawei-3Com", "Huawei-3Com"), + T_DATA ("Huawei Technologies Co., Ltd.", "Huawei"), + T_DATA ("ICS Advent", "ICS Advent"), + T_DATA ("IMC Networks", "IMC"), + T_DATA ("Intel Corp.", "Intel"), + T_DATA ("Intel Corporation", "Intel"), + T_DATA ("Intellon Corp.", "Intellon"), + T_DATA ("InterBiometrics", "InterBiometrics"), + T_DATA ("Intersil Corp.", "Intersil"), + T_DATA ("Intersil Corporation", "Intersil"), + T_DATA ("I-O Data Device, Inc.", "I-O Data Device"), + T_DATA ("Jaton Corp.", "Jaton"), + T_DATA ("JMicron Technology Corp.", "JMicron"), + T_DATA ("Kawasaki LSI", "Kawasaki LSI"), + T_DATA ("KC Technology, Inc.", "KC"), + T_DATA ("Kingston Technology", "Kingston"), + T_DATA ("KTI", "KTI"), + T_DATA ("Kvaser AB", "Kvaser"), + T_DATA ("LapLink, Inc.", "LapLink"), + T_DATA ("Lenovo", "Lenovo"), + T_DATA ("LevelOne", "LevelOne"), + T_DATA ("LG Electronics, Inc.", "LG"), + T_DATA ("LG Electronics USA, Inc.", "LG"), + T_DATA ("Linksys, Inc.", "Linksys"), + T_DATA ("Linksys (?)", "Linksys"), + T_DATA ("Linksys", "Linksys"), + T_DATA ("Lite-On Communications Inc", "Lite-On"), + T_DATA ("Lite-On Technology Corp.", "Lite-On"), + T_DATA ("Logitec Corp.", "Logitec"), + T_DATA ("Logitech, Inc.", "Logitech"), + T_DATA ("LSI Corporation", "LSI"), + T_DATA ("LSI Logic / Symbios Logic", "LSI Logic"), + T_DATA ("Macronix, Inc. [MXIC]", "MXIC"), + T_DATA ("Marvell Semiconductor, Inc.", "Marvell"), + T_DATA ("Marvell Technology Group Ltd.", "Marvell"), + T_DATA ("MediaTek Inc.", "MediaTek"), + T_DATA ("Mellanox Technologies", "Mellanox"), + T_DATA ("Memorex", "Memorex"), + T_DATA ("Micrel-Kendin", "Micrel-Kendin"), + T_DATA ("Microchip Technology, Inc.", "Microchip"), + T_DATA ("Microcomputer Systems (M) Son", "Microcomputer"), + T_DATA ("Microsoft Corp.", "Microsoft"), + T_DATA ("Microsoft Corporation", "Microsoft"), + T_DATA ("Micro-Star International Co., Ltd. [MSI]", "MSI"), + T_DATA ("Micro Star International", "Micro Star"), + T_DATA ("Mobility", "Mobility"), + T_DATA ("MosChip Semiconductor", "MosChip"), + T_DATA ("Motorola PCS", "Motorola"), + T_DATA ("MYRICOM Inc.", "MYRICOM"), + T_DATA ("MYSON Technology Inc", "MYSON"), + T_DATA ("National Instruments Corp.", "National"), + T_DATA ("National Semiconductor Corporation", "National"), + T_DATA ("NEC Corp.", "NEC"), + T_DATA ("Netchip Technology, Inc.", "Netchip"), + T_DATA ("Netgear, Inc", "Netgear"), + T_DATA ("NetGear, Inc.", "NetGear"), + T_DATA ("Netgear", "Netgear"), + T_DATA ("Netopia, Inc.", "Netopia"), + T_DATA ("Netronome Systems, Inc.", "Netronome"), + T_DATA ("NetVin", "NetVin"), + T_DATA ("NetXen Incorporated", "NetXen"), + T_DATA ("Nordic Semiconductor ASA", "Nordic"), + T_DATA ("Northern Telecom", "Northern Telecom"), + T_DATA ("NovaTech", "NovaTech"), + T_DATA ("Novatel Wireless", "Novatel Wireless"), + T_DATA ("NVIDIA Corp.", "NVIDIA"), + T_DATA ("NVIDIA Corporation", "NVIDIA"), + T_DATA ("Olicom", "Olicom"), + T_DATA ("Olivetti Techcenter", "Olivetti"), + T_DATA ("Olympus Optical Co., Ltd", "Olympus"), + T_DATA ("OMEGA TECHNOLOGY", "OMEGA"), + T_DATA ("Omnidirectional Control Technology, Inc.", "Omnidirectional Control"), + T_DATA ("OpenMoko, Inc.", "OpenMoko"), + T_DATA ("Option", "Option"), + T_DATA ("OQO", "OQO"), + T_DATA ("Oracle/SUN", "Oracle"), + T_DATA ("Ovislink Corp.", "Ovislink"), + T_DATA ("Packet Engines Inc.", "Packet Engines"), + T_DATA ("Panasonic (Matsushita)", "Panasonic"), + T_DATA ("PEAK System", "PEAK System"), + T_DATA ("PEAK-System Technik GmbH", "PEAK-System"), + T_DATA ("PEGATRON CORPORATION", "PEGATRON CORPORATION"), + T_DATA ("Peppercon AG", "Peppercon"), + T_DATA ("Peracom Networks, Inc.", "Peracom"), + T_DATA ("Philips (or NXP)", "Philips"), + T_DATA ("Planex Communications, Inc", "Planex"), + T_DATA ("Planex Communications", "Planex"), + T_DATA ("Planex", "Planex"), + T_DATA ("PLANEX", "PLANEX"), + T_DATA ("Portsmith", "Portsmith"), + T_DATA ("Prolific Technology, Inc.", "Prolific"), + T_DATA ("Qcom", "Qcom"), + T_DATA ("Qi Hardware", "Qi"), + T_DATA ("QinHeng Electronics", "QinHeng"), + T_DATA ("QLogic Corp.", "QLogic"), + T_DATA ("Qualcomm Atheros Communications", "Qualcomm Atheros"), + T_DATA ("Qualcomm Atheros", "Qualcomm Atheros"), + T_DATA ("Qualcomm, Inc.", "Qualcomm"), + T_DATA ("Qualcomm / Option", "Qualcomm"), + T_DATA ("Quanta Computer, Inc.", "Quanta Computer"), + T_DATA ("Quanta Microsystems, Inc.", "Quanta"), + T_DATA ("Quantenna Communications, Inc.", "Quantenna"), + T_DATA ("RadioShack Corp. (Tandy)", "RadioShack"), + T_DATA ("Ralink corp.", "Ralink"), + T_DATA ("Ralink Technology, Corp.", "Ralink"), + T_DATA ("RDC Semiconductor, Inc.", "RDC"), + T_DATA ("Realtek Semiconductor Co., Ltd.", "Realtek"), + T_DATA ("Realtek Semiconductor Corp.", "Realtek"), + T_DATA ("Red Hat, Inc.", "Red Hat"), + T_DATA ("SafeNet (wrong ID)", "SafeNet"), + T_DATA ("Sagem", "Sagem"), + T_DATA ("Samsung Electronics Co., Ltd", "Samsung"), + T_DATA ("Sega Enterprises Ltd", "Sega"), + T_DATA ("Senao", "Senao"), + T_DATA ("Shark Multimedia", "Shark"), + T_DATA ("Sharp Corp.", "Sharp"), + T_DATA ("Siemens Information and Communication Products", "Siemens"), + T_DATA ("Sierra Wireless, Inc.", "Sierra Wireless"), + T_DATA ("Silicom", "Silicom"), + T_DATA ("Silicon Graphics Intl. Corp.", "Silicon Graphics"), + T_DATA ("Silicon Integrated Systems [SiS]", "SiS"), + T_DATA ("Sitecom Europe B.V.", "Sitecom"), + T_DATA ("Sitecom", "Sitecom"), + T_DATA ("smartBridges, Inc.", "smartBridges"), + T_DATA ("SohoWare", "SohoWare"), + T_DATA ("Solarflare Communications", "Solarflare"), + T_DATA ("Sony Corp.", "Sony"), + T_DATA ("SpeedStream", "SpeedStream"), + T_DATA ("Sphairon Access Systems GmbH", "Sphairon"), + T_DATA ("Standard Microsystems Corp [SMC]", "SMC"), + T_DATA ("Standard Microsystems Corp.", "Standard"), + T_DATA ("STMicroelectronics", "STMicroelectronics"), + T_DATA ("Sundance Technology Inc / IC Plus Corp", "Sundance"), + T_DATA ("Surecom Technology Corp.", "Surecom"), + T_DATA ("Surecom Technology", "Surecom"), + T_DATA ("Sweex", "Sweex"), + T_DATA ("SysKonnect", "SysKonnect"), + T_DATA ("T & A Mobile Phones", "T & A"), + T_DATA ("TDK Semiconductor Corp.", "TDK"), + T_DATA ("Tehuti Networks Ltd.", "Tehuti"), + T_DATA ("Tekram Technology Co., Ltd", "Tekram"), + T_DATA ("Telit Wireless Solutions", "Telit"), + T_DATA ("Texas Instruments, Inc.", "Texas"), + T_DATA ("Thales Norway A/S", "Thales"), + T_DATA ("TMT Technology, Inc.", "TMT"), + T_DATA ("Toshiba Corp.", "Toshiba"), + T_DATA ("TRENDnet", "TRENDnet"), + T_DATA ("Trident Microsystems", "Trident"), + T_DATA ("Trust International B.V.", "Trust"), + T_DATA ("TTTech Computertechnik AG (Wrong ID)", "TTTech"), + T_DATA ("TwinMOS", "TwinMOS"), + T_DATA ("U-Blox AG", "U-Blox"), + T_DATA ("ULi Electronics Inc.", "ULi"), + T_DATA ("U.S. Robotics", "U.S. Robotics"), + T_DATA ("Vaillant", "Vaillant"), + T_DATA ("VIA Technologies, Inc.", "VIA"), + T_DATA ("Victor Company of Japan, Ltd", "Victor"), + T_DATA ("VMware", "VMware"), + T_DATA ("VTech Holdings, Ltd", "VTech"), + T_DATA ("Wavecom", "Wavecom"), + T_DATA ("Westell", "Westell"), + T_DATA ("Western Digital Technologies, Inc.", "Western Digital"), + T_DATA ("Wilocity Ltd.", "Wilocity"), + T_DATA ("Winbond Electronics Corp", "Winbond"), + T_DATA ("Winbond", "Winbond"), + T_DATA ("Wistron NeWeb", "Wistron NeWeb"), + T_DATA ("Xircom", "Xircom"), + T_DATA ("Z-Com", "Z-Com"), + T_DATA ("Zinwell", "Zinwell"), + T_DATA ("Zoom Telephonics, Inc.", "Zoom"), + T_DATA ("ZTE WCDMA Technologies MSM", "ZTE"), + T_DATA ("ZyDAS", "ZyDAS"), + T_DATA ("ZyXEL Communications Corp.", "ZyXEL"), + }; + + _test_fixup_string (data, G_N_ELEMENTS (data), nm_utils_fixup_vendor_string); +} + +static void +test_fixup_product_string (void) +{ + static const TestFixupData data[] = { + T_DATA ("10/100BaseTX [RTL81xx]", "RTL81xx"), + T_DATA ("10/100 Ethernet", NULL), + T_DATA ("10/100 Ethernet [pegasus]", "pegasus"), + T_DATA ("10/100 USB Ethernet", NULL), + T_DATA ("10/100 USB NIC", NULL), + T_DATA ("1010/1020/1007/1741 10Gbps CNA", "1010/1020/1007/1741"), + T_DATA ("1012 PCMCIA 10/100 Ethernet Card [RTL81xx]", "1012"), + T_DATA ("101 Ethernet [klsi]", "101"), + T_DATA ("10GbE Converged Network Adapter (TCP/IP Networking)", NULL), + T_DATA ("10GbE Ethernet Adapter", NULL), + T_DATA ("10 Gigabit BR KX4 Dual Port Network Connection", "BR KX4"), + T_DATA ("10-Giga TOE SmartNIC 2-Port", "SmartNIC"), + T_DATA ("10-Giga TOE SmartNIC", "SmartNIC"), + T_DATA ("10Mbps Ethernet [klsi]", "klsi"), + T_DATA ("1860 16Gbps/10Gbps Fabric Adapter", "1860"), + T_DATA ("190 Ethernet Adapter", "190"), + T_DATA ("191 Gigabit Ethernet Adapter", "191"), + T_DATA ("21145 Fast Ethernet", "21145"), + T_DATA ("21x4x DEC-Tulip compatible 10/100 Ethernet", "21x4x"), + T_DATA ("21x4x DEC-Tulip compatible Fast Ethernet", "21x4x"), + T_DATA ("2202 Ethernet [klsi]", "2202"), + T_DATA ("2202 Ethernet [pegasus]", "2202"), + T_DATA ("3C19250 Ethernet [klsi]", "3C19250"), + T_DATA ("3c450 HomePNA [Tornado]", "3c450 HomePNA"), + T_DATA ("3C460B 10/100 Ethernet Adapter", "3C460B"), + T_DATA ("3c555 Laptop Hurricane", "3c555 Hurricane"), + T_DATA ("3c556B CardBus [Tornado]", "3c556B"), + T_DATA ("3c556 Hurricane CardBus [Cyclone]", "3c556 Hurricane"), + T_DATA ("3c575 Megahertz 10/100 LAN CardBus [Boomerang]", "3c575 Megahertz"), + T_DATA ("3c590 10BaseT [Vortex]", "3c590"), + T_DATA ("3c592 EISA 10mbps Demon/Vortex", "3c592 Demon/Vortex"), + T_DATA ("3c595 100Base-MII [Vortex]", "3c595"), + T_DATA ("3c595 100BaseT4 [Vortex]", "3c595"), + T_DATA ("3c595 100BaseTX [Vortex]", "3c595"), + T_DATA ("3c595 Megahertz 10/100 LAN CardBus [Boomerang]", "3c595 Megahertz"), + T_DATA ("3c597 EISA Fast Demon/Vortex", "3c597 Fast Demon/Vortex"), + T_DATA ("3c900 10BaseT [Boomerang]", "3c900"), + T_DATA ("3c900 10Mbps Combo [Boomerang]", "3c900 Combo"), + T_DATA ("3c900B-Combo Etherlink XL [Cyclone]", "3c900B-Combo Etherlink XL"), + T_DATA ("3c900B-FL 10base-FL [Cyclone]", "3c900B-FL"), + T_DATA ("3c900B-TPC Etherlink XL [Cyclone]", "3c900B-TPC Etherlink XL"), + T_DATA ("3c900B-TPO Etherlink XL [Cyclone]", "3c900B-TPO Etherlink XL"), + T_DATA ("3c905 100BaseT4 [Boomerang]", "3c905"), + T_DATA ("3c905 100BaseTX [Boomerang]", "3c905"), + T_DATA ("3c905B 100BaseTX [Cyclone]", "3c905B"), + T_DATA ("3c905B Deluxe Etherlink 10/100/BNC [Cyclone]", "3c905B Deluxe Etherlink"), + T_DATA ("3c905B-FX Fast Etherlink XL FX 100baseFx [Cyclone]", "3c905B-FX Fast Etherlink XL FX"), + T_DATA ("3c905B-T4 Fast EtherLink XL [Cyclone]", "3c905B-T4 Fast EtherLink XL"), + T_DATA ("3C905B-TX Fast Etherlink XL PCI", "3C905B-TX Fast Etherlink XL"), + T_DATA ("3c905C-TX/TX-M [Tornado]", "3c905C-TX/TX-M"), + T_DATA ("3C920B-EMB Integrated Fast Ethernet Controller [Tornado]", "3C920B-EMB"), + T_DATA ("3C920B-EMB-WNM Integrated Fast Ethernet Controller", "3C920B-EMB-WNM"), + T_DATA ("3c940 10/100/1000Base-T [Marvell]", "3c940"), + T_DATA ("3c940B 10/100/1000Base-T", "3c940B"), + T_DATA ("3c980-C 10/100baseTX NIC [Python-T]", "3c980-C"), + T_DATA ("3c980-TX Fast Etherlink XL Server Adapter [Cyclone]", "3c980-TX Fast Etherlink XL"), + T_DATA ("3c982-TXM 10/100baseTX Dual Port A [Hydra]", "3c982-TXM A"), + T_DATA ("3c982-TXM 10/100baseTX Dual Port B [Hydra]", "3c982-TXM B"), + T_DATA ("3c985 1000BaseSX (SX/TX)", "3c985"), + T_DATA ("3C990B-TX-M/3C990BSVR [Typhoon2]", "3C990B-TX-M/3C990BSVR"), + T_DATA ("3C990SVR [Typhoon Server]", "3C990SVR"), + T_DATA ("3C990-TX [Typhoon]", "3C990-TX"), + T_DATA ("3cCFE575BT Megahertz 10/100 LAN CardBus [Cyclone]", "3cCFE575BT Megahertz"), + T_DATA ("3cCFE575CT CardBus [Cyclone]", "3cCFE575CT"), + T_DATA ("3cCFE656 CardBus [Cyclone]", "3cCFE656"), + T_DATA ("3cCFEM656B 10/100 LAN+Winmodem CardBus [Cyclone]", "3cCFEM656B"), + T_DATA ("3Com 3C920B-EMB-WNM Integrated Fast Ethernet Controller", "3Com 3C920B-EMB-WNM"), + T_DATA ("3Com 3CRUSBN275 802.11abgn Wireless Adapter [Atheros AR9170]", "3Com 3CRUSBN275"), + T_DATA ("3com 3CRWE154G72 [Office Connect Wireless LAN Adapter]", "3com 3CRWE154G72"), + T_DATA ("3CR990-FX-95/97/95 [Typhon Fiber]", "3CR990-FX-95/97/95"), + T_DATA ("3CR990SVR95 [Typhoon Server 56-bit]", "3CR990SVR95"), + T_DATA ("3CR990SVR97 [Typhoon Server 168-bit]", "3CR990SVR97"), + T_DATA ("3CR990-TX-95 [Typhoon 56-bit]", "3CR990-TX-95"), + T_DATA ("3CR990-TX-97 [Typhoon 168-bit]", "3CR990-TX-97"), + T_DATA ("3CRPAG175 Wireless PC Card", "3CRPAG175"), + T_DATA ("3CRUSB10075 802.11bg [ZyDAS ZD1211]", "3CRUSB10075"), + T_DATA ("3CRWE254G72 802.11g Adapter", "3CRWE254G72"), + T_DATA ("3CSOHO100B-TX 910-A01 [tulip]", "3CSOHO100B-TX 910-A01"), + T_DATA ("3cSOHO100-TX Hurricane", "3cSOHO100-TX Hurricane"), + T_DATA ("3cXFEM656C 10/100 LAN+Winmodem CardBus [Tornado]", "3cXFEM656C"), + T_DATA ("4410a Wireless-G Adapter [Intersil ISL3887]", "4410a"), + T_DATA ("4DWave DX", "4DWave DX"), + T_DATA ("4G LTE adapter", NULL), + T_DATA ("54g USB Network Adapter", NULL), + T_DATA ("570x 10/100 Integrated Controller", "570x"), + T_DATA ("79c970 [PCnet32 LANCE]", "79c970"), + T_DATA ("79c978 [HomePNA]", "79c978"), + T_DATA ("80003ES2LAN Gigabit Ethernet Controller (Copper)", "80003ES2LAN"), + T_DATA ("80003ES2LAN Gigabit Ethernet Controller (Serdes)", "80003ES2LAN"), + T_DATA ("802.11a/b/g/n USB Wireless LAN Card", NULL), + T_DATA ("802.11 Adapter", NULL), + T_DATA ("802.11bgn 1T1R Mini Card Wireless Adapter", "1T1R"), + T_DATA ("802.11bg", NULL), + T_DATA ("802.11b/g/n USB Wireless LAN Card", NULL), + T_DATA ("802.11b/g/n USB Wireless Network Adapter", NULL), + T_DATA ("802.11b/g/n Wireless Network Adapter", NULL), + T_DATA ("802.11b/g Turbo Wireless Adapter", NULL), + T_DATA ("802.11b/g Wireless Network Adapter", NULL), + T_DATA ("802.11g Wireless Adapter [Intersil ISL3886]", "Intersil ISL3886"), + T_DATA ("802.11n adapter", NULL), + T_DATA ("802.11n/b/g Mini Wireless LAN USB2.0 Adapter", NULL), + T_DATA ("802.11n/b/g Wireless LAN USB2.0 Adapter", NULL), + T_DATA ("802.11 n/g/b Wireless LAN Adapter", NULL), + T_DATA ("802.11 n/g/b Wireless LAN USB Adapter", NULL), + T_DATA ("802.11 n/g/b Wireless LAN USB Mini-Card", NULL), + T_DATA ("802.11n Network Adapter", NULL), + T_DATA ("802.11n Network Adapter (wrong ID - swapped vendor and device)", NULL), + T_DATA ("802.11n USB Wireless Card", NULL), + T_DATA ("802.11n Wireless Adapter", NULL), + T_DATA ("802.11n Wireless LAN Card", NULL), + T_DATA ("802.11n Wireless USB Card", NULL), + T_DATA ("802AIN Wireless N Network Adapter [Atheros AR9170+AR9101]", "Atheros AR9170+AR9101"), + T_DATA ("802UIG-1 802.11g Wireless Mini Adapter [Intersil ISL3887]", "Intersil ISL3887"), + T_DATA ("82540EM Gigabit Ethernet Controller", "82540EM"), + T_DATA ("82540EM Gigabit Ethernet Controller (LOM)", "82540EM"), + T_DATA ("82540EP Gigabit Ethernet Controller", "82540EP"), + T_DATA ("82540EP Gigabit Ethernet Controller (Mobile)", "82540EP"), + T_DATA ("82541EI Gigabit Ethernet Controller", "82541EI"), + T_DATA ("82541ER Gigabit Ethernet Controller", "82541ER"), + T_DATA ("82541GI Gigabit Ethernet Controller", "82541GI"), + T_DATA ("82541PI Gigabit Ethernet Controller", "82541PI"), + T_DATA ("82542 Gigabit Ethernet Controller (Fiber)", "82542"), + T_DATA ("82543GC Gigabit Ethernet Controller (Copper)", "82543GC"), + T_DATA ("82543GC Gigabit Ethernet Controller (Fiber)", "82543GC"), + T_DATA ("82544EI Gigabit Ethernet Controller (Copper)", "82544EI"), + T_DATA ("82544EI Gigabit Ethernet Controller (Fiber)", "82544EI"), + T_DATA ("82544GC Gigabit Ethernet Controller (Copper)", "82544GC"), + T_DATA ("82544GC Gigabit Ethernet Controller (LOM)", "82544GC"), + T_DATA ("82545EM Gigabit Ethernet Controller (Copper)", "82545EM"), + T_DATA ("82545EM Gigabit Ethernet Controller (Fiber)", "82545EM"), + T_DATA ("82545GM Gigabit Ethernet Controller", "82545GM"), + T_DATA ("82546EB Gigabit Ethernet Controller", "82546EB"), + T_DATA ("82546EB Gigabit Ethernet Controller (Copper)", "82546EB"), + T_DATA ("82546EB Gigabit Ethernet Controller (Fiber)", "82546EB"), + T_DATA ("82546GB Gigabit Ethernet Controller", "82546GB"), + T_DATA ("82546GB Gigabit Ethernet Controller (Copper)", "82546GB"), + T_DATA ("82547EI Gigabit Ethernet Controller", "82547EI"), + T_DATA ("82547EI Gigabit Ethernet Controller (Mobile)", "82547EI"), + T_DATA ("82547GI Gigabit Ethernet Controller", "82547GI"), + T_DATA ("82551QM Ethernet Controller", "82551QM"), + T_DATA ("82552 10/100 Network Connection", "82552"), + T_DATA ("82557/8/9/0/1 Ethernet Pro 100", "82557/8/9/0/1"), + T_DATA ("82559 Ethernet Controller", "82559"), + T_DATA ("82559 InBusiness 10/100", "82559 InBusiness"), + T_DATA ("8255xER/82551IT Fast Ethernet Controller", "8255xER/82551IT"), + T_DATA ("82562 EM/EX/GX - PRO/100 VM Ethernet Controller", "82562 EM/EX/GX"), + T_DATA ("82562 EM/EX/GX - PRO/100 VM (LOM) Ethernet Controller", "82562 EM/EX/GX"), + T_DATA ("82562EM/EX/GX - PRO/100 VM (LOM) Ethernet Controller Mobile", "82562EM/EX/GX"), + T_DATA ("82562ET/EZ/GT/GZ - PRO/100 VE Ethernet Controller", "82562ET/EZ/GT/GZ"), + T_DATA ("82562ET/EZ/GT/GZ - PRO/100 VE (LOM) Ethernet Controller", "82562ET/EZ/GT/GZ"), + T_DATA ("82562ET/EZ/GT/GZ - PRO/100 VE (LOM) Ethernet Controller Mobile", "82562ET/EZ/GT/GZ"), + T_DATA ("82562EZ 10/100 Ethernet Controller", "82562EZ"), + T_DATA ("82562G 10/100 Network Connection", "82562G"), + T_DATA ("82562G-2 10/100 Network Connection", "82562G-2"), + T_DATA ("82562G - PRO/100 VE Ethernet Controller Mobile", "82562G"), + T_DATA ("82562G - PRO/100 VE (LOM) Ethernet Controller", "82562G"), + T_DATA ("82562GT 10/100 Network Connection", "82562GT"), + T_DATA ("82562GT-2 10/100 Network Connection", "82562GT-2"), + T_DATA ("82562V 10/100 Network Connection", "82562V"), + T_DATA ("82562V-2 10/100 Network Connection", "82562V-2"), + T_DATA ("82566DC-2 Gigabit Network Connection", "82566DC-2"), + T_DATA ("82566DC Gigabit Network Connection", "82566DC"), + T_DATA ("82566DM-2 Gigabit Network Connection", "82566DM-2"), + T_DATA ("82566DM Gigabit Network Connection", "82566DM"), + T_DATA ("82566MC Gigabit Network Connection", "82566MC"), + T_DATA ("82566MM Gigabit Network Connection", "82566MM"), + T_DATA ("82567LF-2 Gigabit Network Connection", "82567LF-2"), + T_DATA ("82567LF-3 Gigabit Network Connection", "82567LF-3"), + T_DATA ("82567LF Gigabit Network Connection", "82567LF"), + T_DATA ("82567LM-2 Gigabit Network Connection", "82567LM-2"), + T_DATA ("82567LM-3 Gigabit Network Connection", "82567LM-3"), + T_DATA ("82567LM-4 Gigabit Network Connection", "82567LM-4"), + T_DATA ("82567LM Gigabit Network Connection", "82567LM"), + T_DATA ("82567V-2 Gigabit Network Connection", "82567V-2"), + T_DATA ("82567V-3 Gigabit Network Connection", "82567V-3"), + T_DATA ("82567V-4 Gigabit Network Connection", "82567V-4"), + T_DATA ("82567V Gigabit Network Connection", "82567V"), + T_DATA ("82571EB Dual Port Gigabit Mezzanine Adapter", "82571EB Mezzanine"), + T_DATA ("82571EB Gigabit Ethernet Controller", "82571EB"), + T_DATA ("82571EB Gigabit Ethernet Controller (Copper)", "82571EB"), + T_DATA ("82571EB Gigabit Ethernet Controller (Fiber)", "82571EB"), + T_DATA ("82571EB Quad Port Gigabit Mezzanine Adapter", "82571EB Quad Port Mezzanine"), + T_DATA ("82571PT Gigabit PT Quad Port Server ExpressModule", "82571PT PT Quad Port"), + T_DATA ("82572EI Gigabit Ethernet Controller", "82572EI"), + T_DATA ("82572EI Gigabit Ethernet Controller (Copper)", "82572EI"), + T_DATA ("82572EI Gigabit Ethernet Controller (Fiber)", "82572EI"), + T_DATA ("82573E Gigabit Ethernet Controller (Copper)", "82573E"), + T_DATA ("82573L Gigabit Ethernet Controller", "82573L"), + T_DATA ("82573V Gigabit Ethernet Controller (Copper)", "82573V"), + T_DATA ("82574L Gigabit Network Connection", "82574L"), + T_DATA ("82575EB Gigabit Backplane Connection", "82575EB Backplane Connection"), + T_DATA ("82575EB Gigabit Network Connection", "82575EB"), + T_DATA ("82575GB Gigabit Network Connection", "82575GB"), + T_DATA ("82576 Gigabit Backplane Connection", "82576 Backplane Connection"), + T_DATA ("82576 Gigabit Network Connection", "82576"), + T_DATA ("82576NS Gigabit Network Connection", "82576NS"), + T_DATA ("82576NS SerDes Gigabit Network Connection", "82576NS SerDes"), + T_DATA ("82576 Virtual Function", "82576 Virtual Function"), + T_DATA ("82577LC Gigabit Network Connection", "82577LC"), + T_DATA ("82577LM Gigabit Network Connection", "82577LM"), + T_DATA ("82578DC Gigabit Network Connection", "82578DC"), + T_DATA ("82578DM Gigabit Network Connection", "82578DM"), + T_DATA ("82579LM Gigabit Network Connection (Lewisville)", "82579LM"), + T_DATA ("82579V Gigabit Network Connection", "82579V"), + T_DATA ("82580 Gigabit Backplane Connection", "82580 Backplane Connection"), + T_DATA ("82580 Gigabit Fiber Network Connection", "82580"), + T_DATA ("82580 Gigabit Network Connection", "82580"), + T_DATA ("82580 Gigabit SFP Connection", "82580 SFP Connection"), + T_DATA ("82583V Gigabit Network Connection", "82583V"), + T_DATA ("82597EX 10GbE Ethernet Controller", "82597EX"), + T_DATA ("82598 10GbE PCI-Express Ethernet Controller", "82598"), + T_DATA ("82598EB 10-Gigabit AF Dual Port Network Connection", "82598EB AF"), + T_DATA ("82598EB 10-Gigabit AF Network Connection", "82598EB AF"), + T_DATA ("82598EB 10-Gigabit AT2 Server Adapter", "82598EB AT2"), + T_DATA ("82598EB 10-Gigabit AT CX4 Network Connection", "82598EB AT CX4"), + T_DATA ("82598EB 10-Gigabit AT Network Connection", "82598EB AT"), + T_DATA ("82598EB 10-Gigabit Dual Port Network Connection", "82598EB"), + T_DATA ("82598EB Gigabit BX Network Connection", "82598EB BX"), + T_DATA ("82599 10 Gigabit Dual Port Backplane Connection", "82599 Backplane Connection"), + T_DATA ("82599 10 Gigabit Dual Port Backplane Connection with FCoE", "82599 Backplane Connection with FCoE"), + T_DATA ("82599 10 Gigabit Dual Port Network Connection", "82599"), + T_DATA ("82599 10 Gigabit Dual Port Network Connection with FCoE", "82599 with FCoE"), + T_DATA ("82599 10 Gigabit Network Connection", "82599"), + T_DATA ("82599 10 Gigabit TN Network Connection", "82599 TN"), + T_DATA ("82599ES 10 Gigabit Network Connection", "82599ES"), + T_DATA ("82599ES 10-Gigabit SFI/SFP+ Network Connection", "82599ES SFI/SFP+"), + T_DATA ("82599 Ethernet Controller Virtual Function", "82599 Virtual Function"), + T_DATA ("82599 Virtual Function", "82599 Virtual Function"), + T_DATA ("82801BA/BAM/CA/CAM Ethernet Controller", "82801BA/BAM/CA/CAM"), + T_DATA ("82801CAM (ICH3) PRO/100 VE Ethernet Controller", "82801CAM"), + T_DATA ("82801CAM (ICH3) PRO/100 VE (LOM) Ethernet Controller", "82801CAM"), + T_DATA ("82801CAM (ICH3) PRO/100 VM Ethernet Controller", "82801CAM"), + T_DATA ("82801CAM (ICH3) PRO/100 VM (KM) Ethernet Controller", "82801CAM"), + T_DATA ("82801CAM (ICH3) PRO/100 VM (LOM) Ethernet Controller", "82801CAM"), + T_DATA ("82801DB PRO/100 VE (CNR) Ethernet Controller", "82801DB PRO/100 VE"), + T_DATA ("82801DB PRO/100 VE (LOM) Ethernet Controller", "82801DB PRO/100 VE"), + T_DATA ("82801DB PRO/100 VE (MOB) Ethernet Controller", "82801DB PRO/100 VE"), + T_DATA ("82801DB PRO/100 VM (CNR) Ethernet Controller", "82801DB PRO/100 VM"), + T_DATA ("82801DB PRO/100 VM (LOM) Ethernet Controller", "82801DB PRO/100 VM"), + T_DATA ("82801DB PRO/100 VM (MOB) Ethernet Controller", "82801DB PRO/100 VM"), + T_DATA ("82801EB/ER (ICH5/ICH5R) integrated LAN Controller", "82801EB/ER"), + T_DATA ("82801E Ethernet Controller 0", "82801E 0"), + T_DATA ("82801E Ethernet Controller 1", "82801E 1"), + T_DATA ("83c170 EPIC/100 Fast Ethernet Adapter", "83c170 EPIC/100"), + T_DATA ("83c175 EPIC/100 Fast Ethernet Adapter", "83c175 EPIC/100"), + T_DATA ("83C885 NT50 DigitalScape Fast Ethernet", "83C885 NT50 DigitalScape"), + T_DATA ("88E8001 Gigabit Ethernet Controller", "88E8001"), + T_DATA ("88E8021 PCI-X IPMI Gigabit Ethernet Controller", "88E8021 IPMI"), + T_DATA ("88E8022 PCI-X IPMI Gigabit Ethernet Controller", "88E8022 IPMI"), + T_DATA ("88E8035 PCI-E Fast Ethernet Controller", "88E8035"), + T_DATA ("88E8036 PCI-E Fast Ethernet Controller", "88E8036"), + T_DATA ("88E8038 PCI-E Fast Ethernet Controller", "88E8038"), + T_DATA ("88E8039 PCI-E Fast Ethernet Controller", "88E8039"), + T_DATA ("88E8040 PCI-E Fast Ethernet Controller", "88E8040"), + T_DATA ("88E8040T PCI-E Fast Ethernet Controller", "88E8040T"), + T_DATA ("88E8042 PCI-E Fast Ethernet Controller", "88E8042"), + T_DATA ("88E8048 PCI-E Fast Ethernet Controller", "88E8048"), + T_DATA ("88E8050 PCI-E ASF Gigabit Ethernet Controller", "88E8050 ASF"), + T_DATA ("88E8052 PCI-E ASF Gigabit Ethernet Controller", "88E8052 ASF"), + T_DATA ("88E8053 PCI-E Gigabit Ethernet Controller", "88E8053"), + T_DATA ("88E8055 PCI-E Gigabit Ethernet Controller", "88E8055"), + T_DATA ("88E8056 PCI-E Gigabit Ethernet Controller", "88E8056"), + T_DATA ("88E8057 PCI-E Gigabit Ethernet Controller", "88E8057"), + T_DATA ("88E8058 PCI-E Gigabit Ethernet Controller", "88E8058"), + T_DATA ("88E8061 PCI-E IPMI Gigabit Ethernet Controller", "88E8061 IPMI"), + T_DATA ("88E8062 PCI-E IPMI Gigabit Ethernet Controller", "88E8062 IPMI"), + T_DATA ("88E8070 based Ethernet Controller", "88E8070 based"), + T_DATA ("88E8071 PCI-E Gigabit Ethernet Controller", "88E8071"), + T_DATA ("88E8072 PCI-E Gigabit Ethernet Controller", "88E8072"), + T_DATA ("88E8075 PCI-E Gigabit Ethernet Controller", "88E8075"), + T_DATA ("88EC032 Ethernet Controller", "88EC032"), + T_DATA ("88EC033 PCI-E Fast Ethernet Controller", "88EC033"), + T_DATA ("88EC034 Ethernet Controller", "88EC034"), + T_DATA ("88EC036 PCI-E Gigabit Ethernet Controller", "88EC036"), + T_DATA ("88EC042 Ethernet Controller", "88EC042"), + T_DATA ("88W8363 [TopDog] 802.11n Wireless", "88W8363"), + T_DATA ("88W8366 [TopDog] 802.11n Wireless", "88W8366"), + T_DATA ("88W8388 802.11a/b/g WLAN", "88W8388"), + T_DATA ("88W8687 [TopDog] 802.11b/g Wireless", "88W8687"), + T_DATA ("88W8764 [Avastar] 802.11n Wireless", "88W8764"), + T_DATA ("88W8897 [AVASTAR] 802.11ac Wireless", "88W8897"), + T_DATA ("A90-211WG-01 802.11g Adapter [Intersil ISL3887]", "A90-211WG-01"), + T_DATA ("A9T wireless 802.11bg", "A9T"), + T_DATA ("AboCom Systems Inc [WN2001 Prolink Wireless-N Nano Adapter]", "AboCom Systems Inc"), + T_DATA ("AC1000 Gigabit Ethernet", "AC1000"), + T_DATA ("AC1001 Gigabit Ethernet", "AC1001"), + T_DATA ("AC1003 Gigabit Ethernet", "AC1003"), + T_DATA ("AC9100 Gigabit Ethernet", "AC9100"), + T_DATA ("AceNIC Gigabit Ethernet", "AceNIC"), + T_DATA ("AceNIC Gigabit Ethernet (Copper)", "AceNIC"), + T_DATA ("Acer Gobi 2000 Wireless Modem", "Acer Gobi 2000"), + T_DATA ("Acer Gobi Wireless Modem", "Acer Gobi"), + T_DATA ("ADM8511 Pegasus II Ethernet", "ADM8511 Pegasus II"), + T_DATA ("ADMtek ADM8515 NIC", "ADMtek ADM8515"), + T_DATA ("ADMtek Centaur-C rev 17 [D-Link DFE-680TX] CardBus Fast Ethernet Adapter", "ADMtek Centaur-C"), + T_DATA ("ADSL Modem", NULL), + T_DATA ("AE1000 v1 802.11n [Ralink RT3572]", "AE1000"), + T_DATA ("AE1200 802.11bgn Wireless Adapter [Broadcom BCM43235]", "AE1200"), + T_DATA ("AE3000 802.11abgn (3x3) Wireless Adapter [Ralink RT3573]", "AE3000"), + T_DATA ("AG-225H 802.11bg", "AG-225H"), + T_DATA ("Air2210 54 Mbps Wireless Adapter", "Air2210"), + T_DATA ("Air2310 150 Mbps Wireless Adapter", "Air2310"), + T_DATA ("Airlink101 AWLL6070 802.11bgn Wireless Adapter [Ralink RT2770]", "Airlink101 AWLL6070"), + T_DATA ("Airlink101 AWLL6080 802.11bgn Wireless Adapter [Ralink RT2870]", "Airlink101 AWLL6080"), + T_DATA ("AirLive WL-1600USB 802.11g Adapter [Realtek RTL8187L]", "AirLive WL-1600USB"), + T_DATA ("AirLive WN-200USB wireless 11b/g/n dongle", "AirLive WN-200USB"), + T_DATA ("AirLive WN-360USB adapter", "AirLive WN-360USB"), + T_DATA ("AirLive X.USB 802.11abgn [Atheros AR9170+AR9104]", "AirLive X.USB"), + T_DATA ("AirPcap NX [Atheros AR9001U-(2)NG]", "AirPcap NX"), + T_DATA ("AirPlus G DWL-G120 Wireless Adapter(rev.C) [Intersil ISL3887]", "AirPlus G DWL-G120"), + T_DATA ("AirPlus G DWL-G122 Wireless Adapter(rev.A1) [Intersil ISL3880]", "AirPlus G DWL-G122"), + T_DATA ("AirPlus G DWL-G122 Wireless Adapter(rev.A2) [Intersil ISL3887]", "AirPlus G DWL-G122"), + T_DATA ("AirPlus G DWL-G122 Wireless Adapter(rev.B1) [Ralink RT2571]", "AirPlus G DWL-G122"), + T_DATA ("AirPlus G DWL-G122 Wireless Adapter(rev.C1) [Ralink RT2571W]", "AirPlus G DWL-G122"), + T_DATA ("AirPlus G DWL-G122 Wireless Adapter(rev.E1) [Ralink RT2070]", "AirPlus G DWL-G122"), + T_DATA ("Alcatel One Touch L100V / Telekom Speedstick LTE II", "Alcatel One Touch L100V / Telekom Speedstick II"), + T_DATA ("Allnet ALL0283 [AR5523]", "Allnet ALL0283"), + T_DATA ("Allnet ALL0283 [AR5523](no firmware)", "Allnet ALL0283"), + T_DATA ("Allnet ALL0298 v2 802.11bg", "Allnet ALL0298"), + T_DATA ("AM10 v1 802.11n [Ralink RT3072]", "AM10"), + T_DATA ("AMD-8111 Ethernet", "AMD-8111"), + T_DATA ("AN2720 USB-USB Bridge", "AN2720 USB-USB Bridge"), + T_DATA ("AN8513 Ethernet", "AN8513"), + T_DATA ("AN8515 Ethernet", "AN8515"), + T_DATA ("AN986A Ethernet", "AN986A"), + T_DATA ("AN986 Pegasus Ethernet", "AN986 Pegasus"), + T_DATA ("ANA620xx/ANA69011A", "ANA620xx/ANA69011A"), + T_DATA ("AN-WF500 802.11abgn + BT Wireless Adapter [Broadcom BCM43242]", "AN-WF500"), + T_DATA ("Aolynk WUB320g", "Aolynk WUB320g"), + T_DATA ("AR2413/AR2414 Wireless Network Adapter [AR5005G(S) 802.11bg]", "AR2413/AR2414"), + T_DATA ("AR2417 Wireless Network Adapter [AR5007G 802.11bg]", "AR2417"), + T_DATA ("AR2425 Wireless Network Adapter [AR5007EG 802.11bg]", "AR2425"), + T_DATA ("AR2427 802.11bg Wireless Network Adapter (PCI-Express)", "AR2427"), + T_DATA ("AR242x / AR542x Wireless Network Adapter (PCI-Express)", "AR242x / AR542x"), + T_DATA ("AR5210 Wireless Network Adapter [AR5000 802.11a]", "AR5210"), + T_DATA ("AR5211 Wireless Network Adapter [AR5001A 802.11a]", "AR5211"), + T_DATA ("AR5211 Wireless Network Adapter [AR5001X 802.11ab]", "AR5211"), + T_DATA ("AR5212/5213/2414 Wireless Network Adapter", "AR5212/5213/2414"), + T_DATA ("AR5212 802.11abg NIC (3CRDAG675)", "AR5212"), + T_DATA ("AR5212 802.11abg NIC", "AR5212"), + T_DATA ("AR5413/AR5414 Wireless Network Adapter [AR5006X(S) 802.11abg]", "AR5413/AR5414"), + T_DATA ("AR5416 Wireless Network Adapter [AR5008 802.11(a)bgn]", "AR5416"), + T_DATA ("AR5418 Wireless Network Adapter [AR5008E 802.11(a)bgn] (PCI-Express)", "AR5418"), + T_DATA ("AR5523", "AR5523"), + T_DATA ("AR5523 driver (no firmware)", "AR5523"), + T_DATA ("AR5523 (no firmware)", "AR5523"), + T_DATA ("AR7010 (no firmware)", "AR7010"), + T_DATA ("AR8121/AR8113/AR8114 Gigabit or Fast Ethernet", "AR8121/AR8113/AR8114"), + T_DATA ("AR8131 Gigabit Ethernet", "AR8131"), + T_DATA ("AR8132 Fast Ethernet", "AR8132"), + T_DATA ("AR8151 v1.0 Gigabit Ethernet", "AR8151 v1.0"), + T_DATA ("AR8151 v2.0 Gigabit Ethernet", "AR8151 v2.0"), + T_DATA ("AR8152 v1.1 Fast Ethernet", "AR8152"), + T_DATA ("AR8152 v2.0 Fast Ethernet", "AR8152 v2.0"), + T_DATA ("AR8161 Gigabit Ethernet", "AR8161"), + T_DATA ("AR8162 Fast Ethernet", "AR8162"), + T_DATA ("AR9160 Wireless Network Adapter [AR9001 802.11(a)bgn]", "AR9160"), + T_DATA ("AR9170 802.11n", "AR9170"), + T_DATA ("AR9170+AR9104 802.11abgn Wireless Adapter", "AR9170+AR9104"), + T_DATA ("AR9227 Wireless Network Adapter", "AR9227"), + T_DATA ("AR922X Wireless Network Adapter", "AR922X"), + T_DATA ("AR922X Wireless Network Adapter (Compex WLM200NX / Wistron DNMA-92)", "AR922X"), + T_DATA ("AR9271 802.11n", "AR9271"), + T_DATA ("AR9285 Wireless Network Adapter (PCI-Express)", "AR9285"), + T_DATA ("AR9285 Wireless Network Adapter (PCI-Express) (AW-NB037H 802.11bgn Wireless Half-size Mini PCIe Card [AR9002WB-1NGCD])", "AR9285"), + T_DATA ("AR9287 Wireless Network Adapter (PCI-Express)", "AR9287"), + T_DATA ("AR928X Wireless Network Adapter (PCI-Express)", "AR928X"), + T_DATA ("AR928X Wireless Network Adapter (PCI-Express) (EM306 802.11bgn Wireless Half-size Mini PCIe Card [AR9283])", "AR928X"), + T_DATA ("AR928X Wireless Network Adapter (PCI-Express) (T77H047.31 802.11bgn Wireless Half-size Mini PCIe Card [AR9283])", "AR928X"), + T_DATA ("AR93xx Wireless Network Adapter", "AR93xx"), + T_DATA ("AR93xx Wireless Network Adapter (Killer Wireless-N 1102 Half-size Mini PCIe Card [AR9382])", "AR93xx"), + T_DATA ("AR93xx Wireless Network Adapter (Killer Wireless-N 1103 Half-size Mini PCIe Card [AR9380])", "AR93xx"), + T_DATA ("AR9462 Wireless Network Adapter", "AR9462"), + T_DATA ("AR9462 Wireless Network Adapter (Wireless 1601 802.11abgn Adapter)", "AR9462"), + T_DATA ("AR9462 Wireless Network Adapter (Wireless 1802 802.11abgn Adapter)", "AR9462"), + T_DATA ("AR9485 Wireless Network Adapter", "AR9485"), + T_DATA ("AR9485 Wireless Network Adapter (AR9485WB-EG 802.11b/g/n mini-PCIe card on a series 3 laptop)", "AR9485"), + T_DATA ("AR9485 Wireless Network Adapter (AW-NE186H)", "AR9485"), + T_DATA ("AR958x 802.11abgn Wireless Network Adapter", "AR958x"), + T_DATA ("Arcadyan 802.11N Wireless Adapter", "Arcadyan"), + T_DATA ("Arcadyan WN4501 802.11b/g", "Arcadyan WN4501"), + T_DATA ("Arcadyan WN7512 802.11n", "Arcadyan WN7512"), + T_DATA ("Asus Gobi 2000 Wireless Modem", "Asus Gobi 2000"), + T_DATA ("Aterm PA-WL54GU", "Aterm PA-WL54GU"), + T_DATA ("Aterm WL300NU-AG", "Aterm WL300NU-AG"), + T_DATA ("Aterm WL300NU-G", "Aterm WL300NU-G"), + T_DATA ("Attansic L1 Gigabit Ethernet", "Attansic L1"), + T_DATA ("Attansic L2c Gigabit Ethernet", "Attansic L2c"), + T_DATA ("Attansic L2 Fast Ethernet", "Attansic L2"), + T_DATA ("AT-USB100", "AT-USB100"), + T_DATA ("AX88141 Fast Ethernet Controller", "AX88141"), + T_DATA ("AX88178", "AX88178"), + T_DATA ("AX88179 Gigabit Ethernet", "AX88179"), + T_DATA ("AX88179 Gigabit Ethernet [Sitecom]", "AX88179"), + T_DATA ("AX88179 Gigabit Ethernet [ThinkPad OneLink GigaLAN]", "AX88179"), + T_DATA ("AX88772A Fast Ethernet", "AX88772A"), + T_DATA ("AX88772", "AX88772"), + T_DATA ("AX88772B", "AX88772B"), + T_DATA ("AX88772B Fast Ethernet Controller", "AX88772B"), + T_DATA ("B404-BT Unified Wire Ethernet Controller", "B404-BT"), + T_DATA ("B404-BT Unified Wire Ethernet Controller [VF]", "B404-BT"), + T_DATA ("B420-SR Unified Wire Ethernet Controller", "B420-SR"), + T_DATA ("B420-SR Unified Wire Ethernet Controller [VF]", "B420-SR"), + T_DATA ("B504-BT Unified Wire Ethernet Controller", "B504-BT"), + T_DATA ("B504-BT Unified Wire Ethernet Controller [VF]", "B504-BT"), + T_DATA ("B520-SR Unified Wire Ethernet Controller", "B520-SR"), + T_DATA ("B520-SR Unified Wire Ethernet Controller [VF]", "B520-SR"), + T_DATA ("BCM43142 802.11b/g/n", "BCM43142"), + T_DATA ("BCM43143 802.11bgn (1x1) Wireless Adapter", "BCM43143"), + T_DATA ("BCM43143 WLAN card", "BCM43143"), + T_DATA ("BCM43236 802.11abgn Wireless Adapter", "BCM43236"), + T_DATA ("BCM43241 WLAN card", "BCM43241"), + T_DATA ("BCM43242 802.11abgn Wireless Adapter", "BCM43242"), + T_DATA ("BCM4329 WLAN card", "BCM4329"), + T_DATA ("BCM4330 WLAN card", "BCM4330"), + T_DATA ("BCM43340 WLAN card", "BCM43340"), + T_DATA ("BCM43341 WLAN card", "BCM43341"), + T_DATA ("BCM4334 WLAN card", "BCM4334"), + T_DATA ("BCM4335/BCM4339 WLAN card", "BCM4335/BCM4339"), + T_DATA ("BCM43362 WLAN card", "BCM43362"), + T_DATA ("BCM4350 802.11ac Wireless Network Adapter", "BCM4350"), + T_DATA ("BCM4354 WLAN card", "BCM4354"), + T_DATA ("BCM43567 802.11ac Wireless Network Adapter", "BCM43567"), + T_DATA ("BCM4356 802.11ac Wireless Network Adapter", "BCM4356"), + T_DATA ("BCM43570 802.11ac Wireless Network Adapter", "BCM43570"), + T_DATA ("BCM4358 802.11ac Wireless LAN SoC", "BCM4358"), + T_DATA ("BCM43602 802.11ac Wireless LAN SoC", "BCM43602"), + T_DATA ("BCM4401 100Base-T", "BCM4401"), + T_DATA ("BCM4401-B0 100Base-TX", "BCM4401-B0"), + T_DATA ("BCM4402 Integrated 10/100BaseT", "BCM4402"), + T_DATA ("BCM57301 NetXtreme-C 10Gb Ethernet Controller", "BCM57301 NetXtreme-C"), + T_DATA ("BCM57302 NetXtreme-C 10Gb/25Gb Ethernet Controller", "BCM57302 NetXtreme-C"), + T_DATA ("BCM57304 NetXtreme-C 10Gb/25Gb/40Gb/50Gb Ethernet Controller", "BCM57304 NetXtreme-C"), + T_DATA ("BCM57311 NetXtreme-C 10Gb RDMA Ethernet Controller", "BCM57311 NetXtreme-C"), + T_DATA ("BCM57312 NetXtreme-C 10Gb/25Gb RDMA Ethernet Controller", "BCM57312 NetXtreme-C"), + T_DATA ("BCM57314 NetXtreme-C 10Gb/25Gb/40Gb/50Gb RDMA Ethernet Controller", "BCM57314 NetXtreme-C"), + T_DATA ("BCM57402 NetXtreme-E 10Gb Ethernet Controller", "BCM57402 NetXtreme-E"), + T_DATA ("BCM57402 NetXtreme-E Ethernet Partition", "BCM57402 NetXtreme-E Partition"), + T_DATA ("BCM57404 NetXtreme-E 10Gb/25Gb Ethernet Controller", "BCM57404 NetXtreme-E"), + T_DATA ("BCM57404 NetXtreme-E Ethernet Partition", "BCM57404 NetXtreme-E Partition"), + T_DATA ("BCM57406 NetXtreme-E 10GBASE-T Ethernet Controller", "BCM57406 NetXtreme-E"), + T_DATA ("BCM57406 NetXtreme-E Ethernet Partition", "BCM57406 NetXtreme-E Partition"), + T_DATA ("BCM57407 NetXtreme-E 10GBase-T Ethernet Controller", "BCM57407 NetXtreme-E"), + T_DATA ("BCM57407 NetXtreme-E 25Gb Ethernet Controller", "BCM57407 NetXtreme-E"), + T_DATA ("BCM57412 NetXtreme-E 10Gb RDMA Ethernet Controller", "BCM57412 NetXtreme-E"), + T_DATA ("BCM57412 NetXtreme-E Ethernet Partition", "BCM57412 NetXtreme-E Partition"), + T_DATA ("BCM57414 NetXtreme-E 10Gb/25Gb RDMA Ethernet Controller", "BCM57414 NetXtreme-E"), + T_DATA ("BCM57414 NetXtreme-E Ethernet Partition", "BCM57414 NetXtreme-E Partition"), + T_DATA ("BCM57414 NetXtreme-E RDMA Partition", "BCM57414 NetXtreme-E Partition"), + T_DATA ("BCM57416 NetXtreme-E 10GBase-T RDMA Ethernet Controller", "BCM57416 NetXtreme-E"), + T_DATA ("BCM57416 NetXtreme-E 10Gb RDMA Ethernet Controller", "BCM57416 NetXtreme-E"), + T_DATA ("BCM57416 NetXtreme-E Ethernet Partition", "BCM57416 NetXtreme-E Partition"), + T_DATA ("BCM57416 NetXtreme-E RDMA Partition", "BCM57416 NetXtreme-E Partition"), + T_DATA ("BCM57417 NetXtreme-E 10Gb/25Gb RDMA Ethernet Controller", "BCM57417 NetXtreme-E"), + T_DATA ("BCM57417 NetXtreme-E 10GBASE-T RDMA Ethernet Controller", "BCM57417 NetXtreme-E"), + T_DATA ("BCM57417 NetXtreme-E Ethernet Partition", "BCM57417 NetXtreme-E Partition"), + T_DATA ("BCM57840 NetXtreme II 10/20-Gigabit Ethernet", "BCM57840 NetXtreme II"), + T_DATA ("BCM57840 NetXtreme II 10 Gigabit Ethernet", "BCM57840 NetXtreme II"), + T_DATA ("BCM57840 NetXtreme II Ethernet Multi Function", "BCM57840 NetXtreme II"), + T_DATA ("Belkin F5D5005 Gigabit Desktop Network PCI Card", "Belkin F5D5005"), + T_DATA ("ben-wpan, AT86RF230-based", "ben-wpan AT86RF230-based"), + T_DATA ("BladeCenter-H 10-Gigabit Ethernet High Speed Daughter Card", "BladeCenter-H High Speed Daughter"), + T_DATA ("BladeEngine2 10Gb Gen2 PCIe Network Adapter", "BladeEngine2 Gen2"), + T_DATA ("BladeEngine3 10Gb Gen2 PCIe Network Adapter", "BladeEngine3 Gen2"), + T_DATA ("BLOB boot loader firmware", "BLOB boot loader firmware"), + T_DATA ("Broadcom NetXtreme BCM5701 Gigabit Ethernet", "Broadcom NetXtreme BCM5701"), + T_DATA ("BWIFI-USB54AR 802.11bg", "BWIFI-USB54AR"), + T_DATA ("Cardbus Ethernet 10/100", NULL), + T_DATA ("Cassini 10/100/1000", "Cassini"), + T_DATA ("CE Media Processor Gigabit Ethernet Controller", NULL), + T_DATA ("Centrino Advanced-N 6200", "Centrino Advanced-N 6200"), + T_DATA ("Centrino Advanced-N 6205 [Taylor Peak]", "Centrino Advanced-N 6205"), + T_DATA ("Centrino Advanced-N 6230 [Rainbow Peak]", "Centrino Advanced-N 6230"), + T_DATA ("Centrino Advanced-N 6235", "Centrino Advanced-N 6235"), + T_DATA ("Centrino Advanced-N + WiMAX 6250 [Kilmer Peak]", "Centrino Advanced-N 6250"), + T_DATA ("Centrino Ultimate-N 6300", "Centrino Ultimate-N 6300"), + T_DATA ("Centrino Wireless-N 1000 [Condor Peak]", "Centrino 1000"), + T_DATA ("Centrino Wireless-N 100", "Centrino 100"), + T_DATA ("Centrino Wireless-N 1030 [Rainbow Peak]", "Centrino 1030"), + T_DATA ("Centrino Wireless-N 105", "Centrino 105"), + T_DATA ("Centrino Wireless-N 130", "Centrino 130"), + T_DATA ("Centrino Wireless-N 135", "Centrino 135"), + T_DATA ("Centrino Wireless-N 2200", "Centrino 2200"), + T_DATA ("Centrino Wireless-N 2230", "Centrino 2230"), + T_DATA ("Centrino Wireless-N + WiMAX 6150", "Centrino 6150"), + T_DATA ("CG-WLUSB10 Corega Wireless USB Adapter", "CG-WLUSB10 Corega"), + T_DATA ("CG-WLUSB2GNL", "CG-WLUSB2GNL"), + T_DATA ("CG-WLUSB2GNR Corega Wireless USB Adapter", "CG-WLUSB2GNR Corega"), + T_DATA ("CG-WLUSB2GO", "CG-WLUSB2GO"), + T_DATA ("CG-WLUSB2GPX [Ralink RT2571W]", "CG-WLUSB2GPX"), + T_DATA ("CG-WLUSB2GT 802.11g Wireless Adapter [Intersil ISL3880]", "CG-WLUSB2GT"), + T_DATA ("CG-WLUSB2GTST 802.11g Wireless Adapter [Intersil ISL3887]", "CG-WLUSB2GTST"), + T_DATA ("CG-WLUSB300AGN", "CG-WLUSB300AGN"), + T_DATA ("CG-WLUSB300GNM", "CG-WLUSB300GNM"), + T_DATA ("CG-WLUSB300GNS", "CG-WLUSB300GNS"), + T_DATA ("CK804 Ethernet Controller", "CK804"), + T_DATA ("CK8S Ethernet Controller", "CK8S"), + T_DATA ("cLOM8214 1/10GbE Controller", "cLOM8214"), + T_DATA ("CMOTECH CDMA Technologies modem", "CMOTECH"), + T_DATA ("Cohiba 802.11g Wireless Mini adapter [Intersil ISL3887]", "Cohiba"), + T_DATA ("Conceptronic C300RU v1 802.11bgn Wireless Adapter [Ralink RT2870]", "Conceptronic C300RU"), + T_DATA ("Conceptronic C300RU v2 802.11bgn Wireless Adapter [Ralink RT2770]", "Conceptronic C300RU"), + T_DATA ("Conceptronic C54RU v2 802.11bg Wireless Adapter [Ralink RT2571]", "Conceptronic C54RU"), + T_DATA ("Conceptronic C54RU v3 802.11bg Wireless Adapter [Ralink RT2571W]", "Conceptronic C54RU"), + T_DATA ("Connect2Air E-5400 802.11g Wireless Adapter", "Connect2Air E-5400"), + T_DATA ("Connect2Air E-5400 D1700 802.11g Wireless Adapter [Intersil ISL3887]", "Connect2Air E-5400 D1700"), + T_DATA ("CPWUE001 USB/Ethernet Adapter", "CPWUE001"), + T_DATA ("CWD-854 rev F", "CWD-854"), + T_DATA ("CWD-854 [RT2573]", "CWD-854"), + T_DATA ("CWD-854 Wireless 802.11g 54Mbps Network Adapter [RTL8187]", "CWD-854"), + T_DATA ("DECchip 21040 [Tulip]", "DECchip 21040"), + T_DATA ("DECchip 21041 [Tulip Pass 3]", "DECchip 21041"), + T_DATA ("DECchip 21140 [FasterNet]", "DECchip 21140"), + T_DATA ("DECchip 21142/43", "DECchip 21142/43"), + T_DATA ("DFE-680TXD CardBus PC Card", "DFE-680TXD"), + T_DATA ("DFE-690TXD CardBus PC Card", "DFE-690TXD"), + T_DATA ("DGE-528T Gigabit Ethernet Adapter", "DGE-528T"), + T_DATA ("DGE-528T Gigabit Ethernet Adapter (DGE-560T PCI Express (x1) Gigabit Ethernet Adapter)", "DGE-528T"), + T_DATA ("DGE-530T Gigabit Ethernet Adapter (rev 11)", "DGE-530T"), + T_DATA ("DGE-530T Gigabit Ethernet Adapter (rev.C1) [Realtek RTL8169]", "DGE-530T"), + T_DATA ("DGE-550SX PCI-X Gigabit Ethernet Adapter", "DGE-550SX"), + T_DATA ("DGE-550T Gigabit Ethernet Adapter V.B1", "DGE-550T V.B1"), + T_DATA ("DGE-560SX PCI Express Gigabit Ethernet Adapter", "DGE-560SX"), + T_DATA ("DGE-560T PCI Express Gigabit Ethernet Adapter", "DGE-560T"), + T_DATA ("DH8900CC Series Gigabit Backplane Network Connection", "DH8900CC Backplane"), + T_DATA ("DH8900CC Series Gigabit Fiber Network Connection", "DH8900CC"), + T_DATA ("DH8900CC Series Gigabit Network Connection", "DH8900CC"), + T_DATA ("DH8900CC Series Gigabit SFP Network Connection", "DH8900CC SFP"), + T_DATA ("Direct Connect", "Direct Connect"), + T_DATA ("DL10050 Sundance Ethernet (DFE-550TX/FX)", "DL10050 Sundance"), + T_DATA ("DL10050 Sundance Ethernet (DFE-580TX)", "DL10050 Sundance"), + T_DATA ("DL10050 Sundance Ethernet", "DL10050 Sundance"), + T_DATA ("DL2000-based Gigabit Ethernet", "DL2000-based"), + T_DATA ("DM9000E Fast Ethernet Adapter", "DM9000E"), + T_DATA ("DM9601 Fast Ethernet Adapter", "DM9601"), + T_DATA ("DP83065 [Saturn] 10/100/1000 Ethernet Controller", "DP83065"), + T_DATA ("DP83815 (MacPhyter) Ethernet Controller (Aculab E1/T1 PMXc cPCI carrier card)", "DP83815"), + T_DATA ("DP83815 (MacPhyter) Ethernet Controller", "DP83815"), + T_DATA ("DP83820 10/100/1000 Ethernet Controller", "DP83820"), + T_DATA ("DrayTek Vigor N61 802.11bgn Wireless Adapter [Ralink RT2870]", "DrayTek Vigor N61"), + T_DATA ("DRP-32TXD Cardbus PC Card", "DRP-32TXD"), + T_DATA ("DSB-650 10Mbps Ethernet [klsi]", "DSB-650"), + T_DATA ("DSB-650C Ethernet [klsi]", "DSB-650C"), + T_DATA ("DSB-650 Ethernet [pegasus]", "DSB-650"), + T_DATA ("DSB-650TX Ethernet [pegasus]", "DSB-650TX"), + T_DATA ("DSB-650TX-PNA Ethernet [pegasus]", "DSB-650TX-PNA"), + T_DATA ("Dual Band Wireless-AC 3165 Plus Bluetooth", "Wireless-AC 3165"), + T_DATA ("DUB-E100 Fast Ethernet Adapter(rev.A) [ASIX AX88172]", "DUB-E100"), + T_DATA ("DUB-E100 Fast Ethernet Adapter(rev.B1) [ASIX AX88772]", "DUB-E100"), + T_DATA ("DUB-E100 Fast Ethernet Adapter(rev.C1) [ASIX AX88772]", "DUB-E100"), + T_DATA ("DU-E100 Ethernet [pegasus]", "DU-E100"), + T_DATA ("DU-E10 Ethernet [klsi]", "DU-E10"), + T_DATA ("DU-E10 Ethernet [pegasus]", "DU-E10"), + T_DATA ("DWA-110 Wireless G Adapter(rev.A1) [Ralink RT2571W]", "DWA-110"), + T_DATA ("DWA-110 Wireless G Adapter(rev.B) [Ralink RT2870]", "DWA-110"), + T_DATA ("DWA-111 802.11bg Wireless Adapter [Ralink RT2571W]", "DWA-111"), + T_DATA ("DWA-121 802.11n Wireless N 150 Pico Adapter [Realtek RTL8188CUS]", "DWA-121 150 Pico"), + T_DATA ("DWA-123 Wireless N 150 Adapter(rev.A1) [Ralink RT3370]", "DWA-123 150"), + T_DATA ("DWA-125 Wireless N 150 Adapter(rev.A1) [Ralink RT3070]", "DWA-125 150"), + T_DATA ("DWA-125 Wireless N 150 Adapter(rev.A2) [Ralink RT3070]", "DWA-125 150"), + T_DATA ("DWA-125 Wireless N 150 Adapter(rev.A3) [Ralink RT5370]", "DWA-125 150"), + T_DATA ("DWA-126 802.11n Wireless Adapter [Atheros AR9271]", "DWA-126"), + T_DATA ("DWA-127 Wireless N 150 High-Gain Adapter(rev.A1) [Ralink RT3070]", "DWA-127 150 High-Gain"), + T_DATA ("DWA-130 802.11n Wireless N Adapter(rev.B) [Ralink RT2870]", "DWA-130"), + T_DATA ("DWA-130 802.11n Wireless N Adapter(rev.D) [Atheros AR9170+AR9102]", "DWA-130"), + T_DATA ("DWA-133 802.11n Wireless N Adapter [Realtek RTL8192CU]", "DWA-133"), + T_DATA ("DWA-135 802.11n Wireless N Adapter(rev.A1) [Realtek RTL8192CU]", "DWA-135"), + T_DATA ("DWA-140 RangeBooster N Adapter(rev.B1) [Ralink RT2870]", "DWA-140 RangeBooster N"), + T_DATA ("DWA-140 RangeBooster N Adapter(rev.B2) [Ralink RT3072]", "DWA-140 RangeBooster N"), + T_DATA ("DWA-140 RangeBooster N Adapter(rev.B3) [Ralink RT2870]", "DWA-140 RangeBooster N"), + T_DATA ("DWA-140 RangeBooster N Adapter(rev.B3) [Ralink RT5372]", "DWA-140 RangeBooster N"), + T_DATA ("DWA-160 802.11abgn Xtreme N Dual Band Adapter(rev.A1) [Atheros AR9170+AR9104]", "DWA-160 Xtreme N"), + T_DATA ("DWA-160 802.11abgn Xtreme N Dual Band Adapter(rev.A2) [Atheros AR9170+AR9104]", "DWA-160 Xtreme N"), + T_DATA ("DWA-160 802.11abgn Xtreme N Dual Band Adapter(rev.B2) [Ralink RT5572]", "DWA-160 Xtreme N"), + T_DATA ("DWA-160 Xtreme N Dual Band USB Adapter(rev.B) [Ralink RT2870]", "DWA-160 Xtreme N"), + T_DATA ("DWL-510 / DWL-610 802.11b [Realtek RTL8180L]", "DWL-510 / DWL-610"), + T_DATA ("DWL-AG122 [Atheros AR5523]", "DWL-AG122"), + T_DATA ("DWL-AG122 (no firmware) [Atheros AR5523]", "DWL-AG122"), + T_DATA ("DWL-AG132 [Atheros AR5523]", "DWL-AG132"), + T_DATA ("DWL-AG132 (no firmware) [Atheros AR5523]", "DWL-AG132"), + T_DATA ("DWL-G120 Spinnaker 802.11g [Intersil ISL3886]", "DWL-G120 Spinnaker"), + T_DATA ("DWL-G132 [Atheros AR5523]", "DWL-G132"), + T_DATA ("DWL-G132 (no firmware) [Atheros AR5523]", "DWL-G132"), + T_DATA ("DY-WL10 802.11abgn Adapter [Broadcom BCM4323]", "DY-WL10"), + T_DATA ("E180v", "E180v"), + T_DATA ("E45 Ethernet [klsi]", "E45"), + T_DATA ("E815", "E815"), + T_DATA ("EA101 10 Mbps 10BASE-T Ethernet [Kawasaki LSI KL5KLUSB101B]", "EA101"), + T_DATA ("EasiDock Ethernet", "EasiDock"), + T_DATA ("EH103 Wireless G Adapter", "EH103"), + T_DATA ("Eminent EM4045 [Broadcom 4320 USB]", "Eminent EM4045"), + T_DATA ("EN-1216 Ethernet Adapter", "EN-1216"), + T_DATA ("EN-1217 Ethernet Adapter", "EN-1217"), + T_DATA ("Enet2 Ethernet [klsi]", "Enet2"), + T_DATA ("Enet Ethernet [klsi]", "Enet"), + T_DATA ("EnGenius 802.11n Wireless USB Adapter", "EnGenius"), + T_DATA ("ENUWI-N3 [802.11n Wireless N150 Adapter]", "ENUWI-N3"), + T_DATA ("EP-1427X-2 Ethernet Adapter [Acer]", "EP-1427X-2"), + T_DATA ("EP-9001-g 802.11g 54M WLAN Adapter", "EP-9001-g"), + T_DATA ("ET-131x PCI-E Ethernet Controller", "ET-131x"), + T_DATA ("ET32P2", "ET32P2"), + T_DATA ("ETG-US2", "ETG-US2"), + T_DATA ("Ethernet 100/10 MBit", NULL), + T_DATA ("Ethernet 10G 2P X520 Adapter", "2P X520"), + T_DATA ("Ethernet Adapter [A1277]", "A1277"), + T_DATA ("Ethernet Adapter", NULL), + T_DATA ("Ethernet adapter [U2L 100P-Y1]", "U2L 100P-Y1"), + T_DATA ("Ethernet Adaptive Virtual Function", "Adaptive Virtual Function"), + T_DATA ("Ethernet Connection (2) I218-LM", NULL), + T_DATA ("Ethernet Connection (2) I218-V", NULL), + T_DATA ("Ethernet Connection (2) I219-LM", NULL), + T_DATA ("Ethernet Connection (2) I219-V", NULL), + T_DATA ("Ethernet Connection (3) I218-LM", NULL), + T_DATA ("Ethernet Connection (3) I218-V", NULL), + T_DATA ("Ethernet Connection (3) I219-LM", NULL), + T_DATA ("Ethernet Connection (4) I219-LM", NULL), + T_DATA ("Ethernet Connection (4) I219-V", NULL), + T_DATA ("Ethernet Connection (5) I219-LM", NULL), + T_DATA ("Ethernet Connection (5) I219-V", NULL), + T_DATA ("Ethernet Connection (6) I219-LM", NULL), + T_DATA ("Ethernet Connection (6) I219-V", NULL), + T_DATA ("Ethernet Connection (7) I219-LM", NULL), + T_DATA ("Ethernet Connection (7) I219-V", NULL), + T_DATA ("Ethernet Connection (8) I219-LM", NULL), + T_DATA ("Ethernet Connection (8) I219-V", NULL), + T_DATA ("Ethernet Connection (9) I219-LM", NULL), + T_DATA ("Ethernet Connection (9) I219-V", NULL), + T_DATA ("Ethernet Connection I217-LM", "I217-LM"), + T_DATA ("Ethernet Connection I217-V", "I217-V"), + T_DATA ("Ethernet Connection I218-LM", "I218-LM"), + T_DATA ("Ethernet Connection I218-V", "I218-V"), + T_DATA ("Ethernet Connection I219-LM", "I219-LM"), + T_DATA ("Ethernet Connection I219-V", "I219-V"), + T_DATA ("Ethernet Connection I354 1.0 GbE Backplane", "I354 Backplane"), + T_DATA ("Ethernet Connection I354 2.5 GbE Backplane", "I354 Backplane"), + T_DATA ("Ethernet Connection I354", "I354"), + T_DATA ("Ethernet Connection X552 1000BASE-T", "X552"), + T_DATA ("Ethernet Connection X552 10 GbE Backplane", "X552 Backplane"), + T_DATA ("Ethernet Connection X552 10 GbE SFP+", "X552 SFP+"), + T_DATA ("Ethernet Connection X552 Backplane", "X552 Backplane"), + T_DATA ("Ethernet Connection X552 Virtual Function", "X552 Virtual Function"), + T_DATA ("Ethernet Connection X552/X557-AT 10GBASE-T", "X552/X557-AT"), + T_DATA ("Ethernet Connection X553 10 GbE SFP+", "X553 SFP+"), + T_DATA ("Ethernet Connection X553 1GbE", "X553"), + T_DATA ("Ethernet Connection X553 Backplane", "X553 Backplane"), + T_DATA ("Ethernet Connection X553/X557-AT 10GBASE-T", "X553/X557-AT"), + T_DATA ("Ethernet Connection X722 for 10GBASE-T", "X722"), + T_DATA ("Ethernet Connection X722 for 10GbE backplane", "X722"), + T_DATA ("Ethernet Connection X722 for 10GbE QSFP+", "X722"), + T_DATA ("Ethernet Connection X722 for 10GbE SFP+", "X722"), + T_DATA ("Ethernet Connection X722 for 1GbE", "X722"), + T_DATA ("Ethernet Controller 10-Gigabit X540-AT2", "X540-AT2"), + T_DATA ("Ethernet Controller 10G X550T", "X550T"), + T_DATA ("Ethernet Controller X540", "X540"), + T_DATA ("Ethernet Controller X710 for 10GBASE-T", "X710"), + T_DATA ("Ethernet Controller X710 for 10GbE backplane", "X710"), + T_DATA ("Ethernet Controller X710 for 10GbE QSFP+", "X710"), + T_DATA ("Ethernet Controller X710 for 10GbE SFP+", "X710"), + T_DATA ("Ethernet Controller X710/X557-AT 10GBASE-T", "X710/X557-AT"), + T_DATA ("Ethernet Controller XL710 for 20GbE backplane", "XL710"), + T_DATA ("Ethernet Controller XL710 for 40GbE backplane", "XL710"), + T_DATA ("Ethernet Controller XL710 for 40GbE QSFP+", "XL710"), + T_DATA ("Ethernet Controller XXV710 for 25GbE backplane", "XXV710"), + T_DATA ("Ethernet Controller XXV710 for 25GbE SFP28", "XXV710"), + T_DATA ("Ethernet Converged Network Adapter X520-Q1", "X520-Q1"), + T_DATA ("Ethernet Express Module X520-P2", "X520-P2"), + T_DATA ("Ethernet HN210E", "HN210E"), + T_DATA ("Ethernet", NULL), + T_DATA ("Ethernet Server Adapter X520-4", "X520-4"), + T_DATA ("Ethernet Switch FM10000 Host Interface", "FM10000"), + T_DATA ("Ethernet Switch FM10000 Host Virtual Interface", "FM10000"), + T_DATA ("Ethernet X520 10GbE Dual Port KX4 Mezz", "X520 KX4 Mezz"), + T_DATA ("Ether USB-T Ethernet [klsi]", "Ether USB-T"), + T_DATA ("ET/TX Ethernet [pegasus]", "ET/TX"), + T_DATA ("ET/TX-S Ethernet [pegasus2]", "ET/TX-S"), + T_DATA ("EUB-3701 EXT 802.11g Wireless Adapter [Ralink RT2571W]", "EUB-3701 EXT"), + T_DATA ("EUB600v1 802.11abgn Wireless Adapter [Ralink RT3572]", "EUB600v1"), + T_DATA ("EUB9706 802.11n Wireless Adapter [Ralink RT3072]", "EUB9706"), + T_DATA ("EUB9801 802.11abgn Wireless Adapter [Ralink RT3572]", "EUB9801"), + T_DATA ("EW-7711UTn nLite Wireless Adapter [Ralink RT2870]", "EW-7711UTn nLite"), + T_DATA ("EW-7717UN 802.11n Wireless Adapter [Ralink RT2870]", "EW-7717UN"), + T_DATA ("EW-7718UN 802.11n Wireless Adapter [Ralink RT2870]", "EW-7718UN"), + T_DATA ("EW-7722UTn 802.11n Wireless Adapter [Ralink RT307x]", "EW-7722UTn"), + T_DATA ("EW-7811Un 802.11n Wireless Adapter [Realtek RTL8188CUS]", "EW-7811Un"), + T_DATA ("Expedite E362", "Expedite E362"), + T_DATA ("Express Ethernet", "Express"), + T_DATA ("EZ Connect USB Ethernet", "EZ Connect"), + T_DATA ("F5D5050 100Mbps Ethernet", "F5D5050"), + T_DATA ("F5D5055 Gigabit Network Adapter [AX88xxx]", "F5D5055"), + T_DATA ("F5D6001 Wireless PCI Card [Realtek RTL8180]", "F5D6001"), + T_DATA ("F5D6020 v3000 Wireless PCMCIA Card [Realtek RTL8180]", "F5D6020 v3000"), + T_DATA ("F5D7000 v7000 Wireless G Desktop Card [Realtek RTL8185]", "F5D7000 v7000"), + T_DATA ("F5D7010 v7000 Wireless G Notebook Card [Realtek RTL8185]", "F5D7010 v7000"), + T_DATA ("F5D7050 Wireless G Adapter v1000/v2000 [Intersil ISL3887]", "F5D7050 v1000/v2000"), + T_DATA ("F5D7050 Wireless G Adapter v3000 [Ralink RT2571W]", "F5D7050 v3000"), + T_DATA ("F5D7050 Wireless G Adapter v4000 [Zydas ZD1211B]", "F5D7050 v4000"), + T_DATA ("F5D7050 Wireless G Adapter v5000 [Realtek RTL8187B]", "F5D7050 v5000"), + T_DATA ("F5D7051 802.11g Adapter v1000 [Broadcom 4320 USB]", "F5D7051 v1000"), + T_DATA ("F5D8053 N Wireless Adapter v3000 [Ralink RT2870]", "F5D8053 v3000"), + T_DATA ("F5D8053 N Wireless USB Adapter v1000/v4000 [Ralink RT2870]", "F5D8053 v1000/v4000"), + T_DATA ("F5D8053 N Wireless USB Adapter v3000 [Ralink RT2870]", "F5D8053 v3000"), + T_DATA ("F5D8055 N+ Wireless Adapter v1000 [Ralink RT2870]", "F5D8055 v1000"), + T_DATA ("F5D8055 N+ Wireless Adapter v2000 [Ralink RT3072]", "F5D8055 v2000"), + T_DATA ("F5D9050 Wireless G+ MIMO Network Adapter v3000 [Ralink RT2573]", "F5D9050 MIMO v3000"), + T_DATA ("F5D9050 Wireless G+ MIMO Network Adapter v4000 [Ralink RT2573]", "F5D9050 MIMO v4000"), + T_DATA ("F5U258 Host to Host cable", "F5U258 Host to Host cable"), + T_DATA ("F6D4050 N150 Enhanced Wireless Network Adapter v1000 [Ralink RT3070]", "F6D4050 N150 v1000"), + T_DATA ("F6D4050 N150 Enhanced Wireless Network Adapter v2000 [Ralink RT3070]", "F6D4050 N150 v2000"), + T_DATA ("F7D1101 v2 Basic Wireless Adapter [Ralink RT3370]", "F7D1101"), + T_DATA ("F7D1102 N150/Surf Micro Wireless Adapter v1000 [Realtek RTL8188CUS]", "F7D1102 N150/Surf v1000"), + T_DATA ("F7D2102 802.11n N300 Micro Wireless Adapter v3000 [Realtek RTL8192CU]", "F7D2102 N300 v3000"), + T_DATA ("F9L1004 802.11n Surf N300 XR Wireless Adapter [Realtek RTL8192CU]", "F9L1004 Surf N300 XR"), + T_DATA ("F9L1103 N750 DB 802.11abgn 2x3:3 [Ralink RT3573]", "F9L1103 N750"), + T_DATA ("FA101 Fast Ethernet USB 1.1", "FA101"), + T_DATA ("FA120 Fast Ethernet USB 2.0 [Asix AX88172 / AX8817x]", "FA120"), + T_DATA ("Farallon PN9000SX Gigabit Ethernet", "Farallon PN9000SX"), + T_DATA ("Farallon PN9100-T Gigabit Ethernet", "Farallon PN9100-T"), + T_DATA ("Fast Ethernet", NULL), + T_DATA ("FastLinQ QL41000 Series 10/25/40/50GbE Controller", "FastLinQ QL41000"), + T_DATA ("FastLinQ QL41000 Series Gigabit Ethernet Controller (SR-IOV VF)", "FastLinQ QL41000"), + T_DATA ("FastLinQ QL45000 Series 100GbE Controller", "FastLinQ QL45000"), + T_DATA ("FastLinQ QL45000 Series 25GbE Controller", "FastLinQ QL45000"), + T_DATA ("FastLinQ QL45000 Series 40GbE Controller", "FastLinQ QL45000"), + T_DATA ("FastLinQ QL45000 Series Gigabit Ethernet Controller (SR-IOV VF)", "FastLinQ QL45000"), + T_DATA ("FEther USB2-TX", "FEther USB2-TX"), + T_DATA ("FEther USB-TXC", "FEther USB-TXC"), + T_DATA ("FEther USB-TX Ethernet [pegasus]", "FEther USB-TX"), + T_DATA ("FEther USB-TXS", "FEther USB-TXS"), + T_DATA ("FNW-3602-TX CardBus Fast Ethernet", "FNW-3602-TX"), + T_DATA ("FNW-3603-TX CardBus Fast Ethernet", "FNW-3603-TX"), + T_DATA ("FPC-0106TX misprogrammed [RTL81xx]", "FPC-0106TX"), + T_DATA ("Fritz!WLAN N 2.4 [Atheros AR9001U]", "Fritz!WLAN N 2.4"), + T_DATA ("Fritz!WLAN N [Atheros AR9001U]", "Fritz!WLAN N"), + T_DATA ("Fritz!WLAN N v2 [Atheros AR9271]", "Fritz!WLAN N"), + T_DATA ("FRITZ WLAN N v2 [RT5572/rt2870.bin]", "FRITZ N"), + T_DATA ("G-200 v2 802.11bg", "G-200"), + T_DATA ("G-210H 802.11g Wireless Adapter", "G-210H"), + T_DATA ("G-220 v2 802.11bg", "G-220"), + T_DATA ("G240 802.11bg", "G240"), + T_DATA ("GA620 Gigabit Ethernet", "GA620"), + T_DATA ("GA630 Gigabit Ethernet", "GA630"), + T_DATA ("GEM 10/100/1000 Ethernet [ge]", "GEM"), + T_DATA ("Gigabit Ethernet Adapter", NULL), + T_DATA ("Gigabit Network Adapter", NULL), + T_DATA ("GigaCard Network Adapter", "GigaCard"), + T_DATA ("Gigaset USB Adapter 300", "Gigaset 300"), + T_DATA ("GL620USB-A GeneLink USB-USB Bridge", "GL620USB-A GeneLink USB-USB Bridge"), + T_DATA ("GlobeTrotter Express 7.2 v2", "GlobeTrotter Express 7.2"), + T_DATA ("Globetrotter GI0505 [iCON 505]", "Globetrotter GI0505"), + T_DATA ("Globetrotter HSDPA Modem", "Globetrotter"), + T_DATA ("Globetrotter HSUPA Modem (aka icon 451)", "Globetrotter"), + T_DATA ("Globetrotter HSUPA Modem (aka iCON HSUPA E)", "Globetrotter"), + T_DATA ("Globetrotter HSUPA Modem (icon 411 aka \"Vodafone K3760\")", "Globetrotter"), + T_DATA ("Globetrotter MO40x 3G Modem (GTM 382)", "Globetrotter MO40x"), + T_DATA ("GN-54G", "GN-54G"), + T_DATA ("GN-BR402W", "GN-BR402W"), + T_DATA ("GNIC-II PCI Gigabit Ethernet [Hamachi]", "GNIC-II"), + T_DATA ("GN-WB01GS", "GN-WB01GS"), + T_DATA ("GN-WB30N 802.11n WLAN Card", "GN-WB30N"), + T_DATA ("GN-WB31N 802.11n USB WLAN Card", "GN-WB31N"), + T_DATA ("GN-WB32L 802.11n USB WLAN Card", "GN-WB32L"), + T_DATA ("GN-WBKG", "GN-WBKG"), + T_DATA ("GN-WI05GS", "GN-WI05GS"), + T_DATA ("Gobi 2000", "Gobi 2000"), + T_DATA ("Gobi 2000 Wireless Modem", "Gobi 2000"), + T_DATA ("Gobi 3000 HSPA+ Modem", "Gobi 3000 HSPA+"), + T_DATA ("Gobi 9x15 Multimode 3G/4G LTE Modem (IP passthrough mode)", "Gobi 9x15"), + T_DATA ("Gobi 9x15 Multimode 3G/4G LTE Modem (NAT mode)", "Gobi 9x15"), + T_DATA ("Gobi Wireless Modem", "Gobi"), + T_DATA ("Goldpfeil P-LAN", "Goldpfeil P-LAN"), + T_DATA ("GT-B3730 Composite LTE device (Commercial)", "GT-B3730"), + T_DATA ("GU-1000T", "GU-1000T"), + T_DATA ("GWUS300 802.11n", "GWUS300"), + T_DATA ("GW-US300MiniS", "GW-US300MiniS"), + T_DATA ("GW-US300MiniW 802.11bgn Wireless Adapter", "GW-US300MiniW"), + T_DATA ("GW-US54GXS 802.11bg", "GW-US54GXS"), + T_DATA ("GW-US54GZ", "GW-US54GZ"), + T_DATA ("GW-US54HP", "GW-US54HP"), + T_DATA ("GW-US54Mini2", "GW-US54Mini2"), + T_DATA ("GW-US54Mini 802.11bg", "GW-US54Mini"), + T_DATA ("GW-US54ZGL 802.11bg", "GW-US54ZGL"), + T_DATA ("GWUSB2E", "GWUSB2E"), + T_DATA ("GW-USEco300 802.11bgn Wireless Adapter [Realtek RTL8192CU]", "GW-USEco300"), + T_DATA ("GW-USMicro300", "GW-USMicro300"), + T_DATA ("GW-USMini2N 802.11n Wireless Adapter [Ralink RT2870]", "GW-USMini2N"), + T_DATA ("GW-USNano2 802.11n Wireless Adapter [Realtek RTL8188CUS]", "GW-USNano2"), + T_DATA ("GW-USValue-EZ 802.11n Wireless Adapter [Realtek RTL8188CUS]", "GW-USValue-EZ"), + T_DATA ("Happy Meal 10/100 Ethernet [hme]", "Happy Meal"), + T_DATA ("Harmony 900/1100 Remote", "Harmony 900/1100 Remote"), + T_DATA ("HAWNU1 Hi-Gain Wireless-150N Network Adapter with Range Amplifier [Ralink RT3070]", "HAWNU1"), + T_DATA ("HCF 56k Modem", "HCF"), + T_DATA ("Hercules HWNUp-150 802.11n Wireless N Pico [Realtek RTL8188CUS]", "Hercules HWNUp-150 Pico"), + T_DATA ("HNE-300 (RealTek RTL8139c) [iPaq Networking]", "HNE-300"), + T_DATA ("HomeConnect 3C460", "HomeConnect 3C460"), + T_DATA ("@Home Networks Ethernet [klsi]", "@Home Networks"), + T_DATA ("HU200TS Wireless Adapter", "HU200TS"), + T_DATA ("HWDN1 Hi-Gain Wireless-300N Dish Adapter [Ralink RT2870]", "HWDN1"), + T_DATA ("HWDN2 Hi-Gain Wireless-150N Dish Adapter [Ralink RT2770]", "HWDN2"), + T_DATA ("HWGUSB2-54-LB", "HWGUSB2-54-LB"), + T_DATA ("HWGUSB2-54V2-AP", "HWGUSB2-54V2-AP"), + T_DATA ("HWGUSB2-54 WLAN", "HWGUSB2-54"), + T_DATA ("HWU54DM", "HWU54DM"), + T_DATA ("HWUN1 Hi-Gain Wireless-300N Adapter w/ Upgradable Antenna [Ralink RT2870]", "HWUN1"), + T_DATA ("HWUN2 Hi-Gain Wireless-150N Adapter w/ Upgradable Antenna [Ralink RT2770]", "HWUN2"), + T_DATA ("HWUN3 Hi-Gain Wireless-N Adapter [Ralink RT3070]", "HWUN3"), + T_DATA ("I210 Gigabit Backplane Connection", "I210 Backplane Connection"), + T_DATA ("I210 Gigabit Fiber Network Connection", "I210"), + T_DATA ("I210 Gigabit Network Connection", "I210"), + T_DATA ("I211 Gigabit Network Connection", "I211"), + T_DATA ("I350 Ethernet Controller Virtual Function", "I350 Virtual Function"), + T_DATA ("I350 Gigabit Backplane Connection", "I350 Backplane Connection"), + T_DATA ("I350 Gigabit Connection", "I350 Connection"), + T_DATA ("I350 Gigabit Fiber Network Connection", "I350"), + T_DATA ("I350 Gigabit Network Connection", "I350"), + T_DATA ("IC Plus IP100A Integrated 10/100 Ethernet MAC + PHY", "IC Plus IP100A"), + T_DATA ("IEEE 802.11g Wireless Network Adapter", NULL), + T_DATA ("IFU-WLM2 USB Wireless LAN Module (Wireless Mode)", "IFU-WLM2"), + T_DATA ("Integrated NetFlex-3/P", "NetFlex-3/P"), + T_DATA ("Intrepid2 GMAC (Sun GEM)", "Intrepid2 GMAC"), + T_DATA ("IOGear GWU513 v2 802.11bg Wireless Adapter [Intersil ISL3887]", "IOGear GWU513"), + T_DATA ("IP1000 Family Gigabit Ethernet", "IP1000"), + T_DATA ("iPad 2 (3G; 64GB)", "iPad 2"), + T_DATA ("iPad 3 (3G, 16 GB)", "iPad 3"), + T_DATA ("iPad 4/Mini1", "iPad 4/Mini1"), + T_DATA ("iPad", "iPad"), + T_DATA ("iPAQ Networking 10/100 Ethernet [pegasus2]", "iPAQ Networking"), + T_DATA ("iPhone 3G", "iPhone"), + T_DATA ("iPhone 3GS", "iPhone 3GS"), + T_DATA ("iPhone 4(CDMA)", "iPhone 4"), + T_DATA ("iPhone 4", "iPhone 4"), + T_DATA ("iPhone 4S", "iPhone 4S"), + T_DATA ("iPhone5/5C/5S/6", "iPhone5/5C/5S/6"), + T_DATA ("iPhone", "iPhone"), + T_DATA ("iRex Technologies Gobi 2000 Wireless Modem", "iRex Gobi 2000"), + T_DATA ("ISL3877 [Prism Indigo]", "ISL3877"), + T_DATA ("ISL3886IK", "ISL3886IK"), + T_DATA ("ISL3886 [Prism Javelin/Prism Xbow]", "ISL3886"), + T_DATA ("ISL3890 [Prism GT/Prism Duette]/ISL3886 [Prism Javelin/Prism Xbow]", "ISL3890"), + T_DATA ("ISP4022-based Ethernet NIC", "ISP4022-based"), + T_DATA ("ISP4032-based Ethernet IPv6 NIC", "ISP4032-based IPv6"), + T_DATA ("ISP8324 1/10GbE Converged Network Controller", "ISP8324"), + T_DATA ("ISP8324 1/10GbE Converged Network Controller (NIC VF)", "ISP8324"), + T_DATA ("ISY Wireless Micro Adapter IWL 2000 [RTL8188CUS]", "ISY IWL 2000"), + T_DATA ("JMC250 PCI Express Gigabit Ethernet Controller", "JMC250"), + T_DATA ("JMC260 PCI Express Fast Ethernet Controller", "JMC260"), + T_DATA ("K2 GMAC (Sun GEM)", "K2 GMAC"), + T_DATA ("K3565-Z HSDPA", "K3565-Z"), + T_DATA ("K3570-Z", "K3570-Z"), + T_DATA ("K3571-Z", "K3571-Z"), + T_DATA ("K4505-Z", "K4505-Z"), + T_DATA ("K5006-Z vodafone LTE/UMTS/GSM Modem/Networkcard", "K5006-Z vodafone"), + T_DATA ("KC2190 USB Host-to-Host cable", "KC2190 Host-to-Host cable"), + T_DATA ("Keebox W150NU 802.11bgn Wireless Adapter [Ralink RT3070]", "Keebox W150NU"), + T_DATA ("Killer E220x Gigabit Ethernet Controller", "Killer E220x"), + T_DATA ("Killer E2400 Gigabit Ethernet Controller", "Killer E2400"), + T_DATA ("KL5KUSB101B Ethernet [klsi]", "KL5KUSB101B"), + T_DATA ("KNU101TX 100baseTX Ethernet", "KNU101TX 100baseTX"), + T_DATA ("KSZ8842-PMQL 2-Port Ethernet Switch", "KSZ8842-PMQL"), + T_DATA ("KwikLink Host-Host Connector", "KwikLink Host-Host Connector"), + T_DATA ("LAN7500 Ethernet 10/100/1000 Adapter", "LAN7500"), + T_DATA ("LAN9420/LAN9420i", "LAN9420/LAN9420i"), + T_DATA ("LAN9512/LAN9514 Ethernet 10/100 Adapter (SAL10)", "LAN9512/LAN9514"), + T_DATA ("Laneed 100Mbps Ethernet LD-USB/TX [pegasus]", "Laneed LD-USB/TX"), + T_DATA ("LAN-GTJ/U2A", "LAN-GTJ/U2A"), + T_DATA ("LAN-W150N/U2 Wireless LAN Adapter", "LAN-W150N/U2"), + T_DATA ("LAN-W150/U2M Wireless LAN Adapter", "LAN-W150/U2M"), + T_DATA ("LAN-W300AN/U2 Wireless LAN Adapter", "LAN-W300AN/U2"), + T_DATA ("LAN-W300N/U2 Wireless LAN Adapter", "LAN-W300N/U2"), + T_DATA ("LAN-WN12/U2 Wireless LAN Adapter", "LAN-WN12/U2"), + T_DATA ("LAN-WN22/U2 Wireless LAN Adapter", "LAN-WN22/U2"), + T_DATA ("LapLink Gold USB-USB Bridge [net1080]", "LapLink Gold USB-USB Bridge"), + T_DATA ("LD-USB20", "LD-USB20"), + T_DATA ("LD-USBL/TX", "LD-USBL/TX"), + T_DATA ("LD-USB/TX", "LD-USB/TX"), + T_DATA ("LE920", "LE920"), + T_DATA ("Leaf Light HS", "Leaf Light HS"), + T_DATA ("Leaf SemiPro HS", "Leaf SemiPro HS"), + T_DATA ("LevelOne WUA-0605 N_Max Wireless USB Adapter", "LevelOne WUA-0605 N Max"), + T_DATA ("LevelOne WUA-0615 N_Max Wireless USB Adapter", "LevelOne WUA-0615 N Max"), + T_DATA ("Libertas", "Libertas"), + T_DATA ("Linksys WUSB54GP v1 OEM 802.11g Adapter [Intersil ISL3886]", "Linksys WUSB54GP"), + T_DATA ("Linksys WUSB54G v1 OEM 802.11g Adapter [Intersil ISL3886]", "Linksys WUSB54G"), + T_DATA ("Linux-USB \"CDC Subset\" Device, or Itsy (experimental)", "Linux-USB or Itsy"), + T_DATA ("Linux-USB Ethernet/RNDIS Gadget", "Linux-USB Gadget"), + T_DATA ("LN-028 Network USB 2.0 Adapter", "LN-028"), + T_DATA ("LN-031 10/100/1000 Ethernet Adapter", "LN-031"), + T_DATA ("LNE100TX [Linksys EtherFast 10/100]", "LNE100TX"), + T_DATA ("LNE100TX", "LNE100TX"), + T_DATA ("lt4112 Gobi 4G Module Network Device", "lt4112 Gobi"), + T_DATA ("LTE4G O2 ZTE MF821D LTE/UMTS/GSM Modem/Networkcard", "LTE4G O2 ZTE MF821D"), + T_DATA ("LTE Storage Driver [CMC2xx]", "Storage Driver"), + T_DATA ("LUA2-TX Ethernet", "LUA2-TX"), + T_DATA ("LUA-KTX Ethernet", "LUA-KTX"), + T_DATA ("LUA-TX Ethernet", "LUA-TX"), + T_DATA ("LUA-TX Ethernet [pegasus]", "LUA-TX"), + T_DATA ("LUA-U2-GT 10/100/1000 Ethernet Adapter", "LUA-U2-GT"), + T_DATA ("LUA-U2-KTX Ethernet", "LUA-U2-KTX"), + T_DATA ("LW153 802.11n Adapter [ralink rt3070]", "LW153"), + T_DATA ("LW313 802.11n Adapter [ralink rt2770 + rt2720]", "LW313"), + T_DATA ("M-202 802.11bg", "M-202"), + T_DATA ("M5261 Ethernet Controller", "M5261"), + T_DATA ("M5632 Host-to-Host Link", "M5632 Host-to-Host Link"), + T_DATA ("Marvell 88W8388 802.11a/b/g WLAN", "Marvell 88W8388"), + T_DATA ("MC8700 Modem", "MC8700"), + T_DATA ("MCP04 Ethernet Controller", "MCP04"), + T_DATA ("MCP2A Ethernet Controller", "MCP2A"), + T_DATA ("MCP51 Ethernet Controller", "MCP51"), + T_DATA ("MCP55 Ethernet", "MCP55"), + T_DATA ("MCP61 Ethernet", "MCP61"), + T_DATA ("MCP65 Ethernet", "MCP65"), + T_DATA ("MCP67 Ethernet", "MCP67"), + T_DATA ("MCP73 Ethernet", "MCP73"), + T_DATA ("MCP77 Ethernet", "MCP77"), + T_DATA ("MCP79 Ethernet", "MCP79"), + T_DATA ("MCP89 Ethernet", "MCP89"), + T_DATA ("MCS7730 10/100 Mbps Ethernet adapter", "MCS7730"), + T_DATA ("MCS7830 10/100 Mbps Ethernet adapter", "MCS7830"), + T_DATA ("MCS7832 10/100 Mbps Ethernet adapter", "MCS7832"), + T_DATA ("Metronic 495257 wifi 802.11ng", "Metronic 495257"), + T_DATA ("MF110/MF627/MF636", "MF110/MF627/MF636"), + T_DATA ("MF632/ONDA ET502HS/MT505UP", "MF632/ONDA ET502HS/MT505UP"), + T_DATA ("MF820 4G LTE", "MF820"), + T_DATA ("Micolink USB2Ethernet [pegasus]", "Micolink USB2Ethernet"), + T_DATA ("MicroLink dLAN", "MicroLink dLAN"), + T_DATA ("MN-120 (ADMtek Centaur-C based)", "MN-120"), + T_DATA ("MN-130 (ADMtek Centaur-P based)", "MN-130"), + T_DATA ("MN-710 802.11g Wireless Adapter [Intersil ISL3886]", "MN-710"), + T_DATA ("model 01 Ethernet interface", "model 01"), + T_DATA ("model 01+ Ethernet", "model 01+"), + T_DATA ("Motorola 802.11n 5G USB Wireless Adapter", "Motorola"), + T_DATA ("Motorola 802.11n Dualband USB Wireless Adapter", "Motorola Dualband"), + T_DATA ("MP-PRX1 Ethernet", "MP-PRX1"), + T_DATA ("MS-3870 802.11bgn Wireless Module [Ralink RT3070]", "MS-3870"), + T_DATA ("MS-3871 802.11bgn Wireless Module [Ralink RT8070]", "MS-3871"), + T_DATA ("MSI-6861 802.11g WiFi adapter", "MSI-6861"), + T_DATA ("MT25400 Family [ConnectX-2 Virtual Function]", "MT25400"), + T_DATA ("MT25408 [ConnectX EN 10GigE 10GBaseT, PCIe 2.0 2.5GT/s]", "MT25408"), + T_DATA ("MT25408 [ConnectX EN 10GigE 10GBaseT, PCIe Gen2 5GT/s]", "MT25408"), + T_DATA ("MT25408 [ConnectX VPI - IB SDR / 10GigE]", "MT25408"), + T_DATA ("MT25418 [ConnectX VPI PCIe 2.0 2.5GT/s - IB DDR / 10GigE]", "MT25418"), + T_DATA ("MT25448 [ConnectX EN 10GigE, PCIe 2.0 2.5GT/s]", "MT25448"), + T_DATA ("MT26418 [ConnectX VPI PCIe 2.0 5GT/s - IB DDR / 10GigE]", "MT26418"), + T_DATA ("MT26428 [ConnectX VPI PCIe 2.0 5GT/s - IB QDR / 10GigE]", "MT26428"), + T_DATA ("MT26438 [ConnectX VPI PCIe 2.0 5GT/s - IB QDR / 10GigE Virtualization+]", "MT26438"), + T_DATA ("MT26448 [ConnectX EN 10GigE, PCIe 2.0 5GT/s]", "MT26448"), + T_DATA ("MT26468 [ConnectX EN 10GigE, PCIe 2.0 5GT/s Virtualization+]", "MT26468"), + T_DATA ("MT26478 [ConnectX EN 40GigE, PCIe 2.0 5GT/s]", "MT26478"), + T_DATA ("MT27500 Family [ConnectX-3]", "MT27500"), + T_DATA ("MT27500/MT27520 Family [ConnectX-3/ConnectX-3 Pro Virtual Function]", "MT27500/MT27520"), + T_DATA ("MT27510 Family", "MT27510"), + T_DATA ("MT27511 Family", "MT27511"), + T_DATA ("MT27520 Family [ConnectX-3 Pro]", "MT27520"), + T_DATA ("MT27530 Family", "MT27530"), + T_DATA ("MT27531 Family", "MT27531"), + T_DATA ("MT27540 Family", "MT27540"), + T_DATA ("MT27541 Family", "MT27541"), + T_DATA ("MT27550 Family", "MT27550"), + T_DATA ("MT27551 Family", "MT27551"), + T_DATA ("MT27560 Family", "MT27560"), + T_DATA ("MT27561 Family", "MT27561"), + T_DATA ("MT27600 [Connect-IB]", "MT27600"), + T_DATA ("MT27600 Family [Connect-IB Virtual Function]", "MT27600"), + T_DATA ("MT27700 Family [ConnectX-4]", "MT27700"), + T_DATA ("MT27700 Family [ConnectX-4 Virtual Function]", "MT27700"), + T_DATA ("MT27710 Family [ConnectX-4 Lx]", "MT27710"), + T_DATA ("MT27710 Family [ConnectX-4 Lx Virtual Function]", "MT27710"), + T_DATA ("MT27800 Family [ConnectX-5]", "MT27800"), + T_DATA ("MT27800 Family [ConnectX-5 Virtual Function]", "MT27800"), + T_DATA ("MT28800 Family [ConnectX-5 Ex]", "MT28800"), + T_DATA ("MT28800 Family [ConnectX-5 Ex Virtual Function]", "MT28800"), + T_DATA ("MT28908 Family [ConnectX-6]", "MT28908"), + T_DATA ("MT28908 Family [ConnectX-6 Virtual Function]", "MT28908"), + T_DATA ("MT416842 BlueField integrated ConnectX-5 network controller", "MT416842 BlueField ConnectX-5"), + T_DATA ("MT416842 BlueField multicore SoC family VF", "MT416842 BlueField VF"), + T_DATA ("MT51136", "MT51136"), + T_DATA ("MT52100", "MT52100"), + T_DATA ("MT53236", "MT53236"), + T_DATA ("MT7601U Wireless Adapter", "MT7601U"), + T_DATA ("MTD-8xx 100/10M Ethernet PCI Adapter", "MTD-8xx"), + T_DATA ("Multithreaded 10-Gigabit Ethernet Network Controller", NULL), + T_DATA ("MX98713", "MX98713"), + T_DATA ("MX987x5", "MX987x5"), + T_DATA ("Myri-10G Dual-Protocol NIC", "Myri-10G"), + T_DATA ("N10 Nano 802.11n Network Adapter [Realtek RTL8192CU]", "N10 Nano"), + T_DATA ("N220 802.11bgn Wireless Adapter", "N220"), + T_DATA ("N320-G2-CR 10GbE Dual Port Adapter", "N320-G2-CR"), + T_DATA ("N5HBZ0000055 802.11abgn Wireless Adapter [Atheros AR7010+AR9280]", "N5HBZ0000055"), + T_DATA ("Name: Voyager 1055 Laptop 802.11g Adapter [Broadcom 4320]", "Voyager 1055"), + T_DATA ("NC100 Network Everywhere Fast Ethernet 10/100", "NC100"), + T_DATA ("NE-34", "NE-34"), + T_DATA ("NET1080 USB-USB Bridge", "NET1080 USB-USB Bridge"), + T_DATA ("Netelligent 10/100 TX Embedded UTP", "Netelligent TX"), + T_DATA ("Netelligent 10/100 TX PCI UTP", "Netelligent TX"), + T_DATA ("Netelligent 10/100 TX UTP", "Netelligent TX"), + T_DATA ("Netelligent 10 T/2 PCI UTP/Coax", "Netelligent 10 T/2"), + T_DATA ("Netelligent 10 T PCI UTP", "Netelligent 10 T"), + T_DATA ("Netelligent Dual 10/100 TX PCI UTP", "Netelligent Dual TX"), + T_DATA ("Netelligent Integrated 10/100 TX UTP", "Netelligent TX"), + T_DATA ("NetFlex-3/P ThunderLAN 1.0", "NetFlex-3/P ThunderLAN 1.0"), + T_DATA ("NetFlex-3/P ThunderLAN 2.3", "NetFlex-3/P ThunderLAN 2.3"), + T_DATA ("NetLink BCM57780 Gigabit Ethernet PCIe", "NetLink BCM57780"), + T_DATA ("NetLink BCM57781 Gigabit Ethernet PCIe", "NetLink BCM57781"), + T_DATA ("NetLink BCM57785 Gigabit Ethernet PCIe", "NetLink BCM57785"), + T_DATA ("NetLink BCM57788 Gigabit Ethernet PCIe", "NetLink BCM57788"), + T_DATA ("NetLink BCM57790 Gigabit Ethernet PCIe", "NetLink BCM57790"), + T_DATA ("NetLink BCM57791 Gigabit Ethernet PCIe", "NetLink BCM57791"), + T_DATA ("NetLink BCM57795 Gigabit Ethernet PCIe", "NetLink BCM57795"), + T_DATA ("NetLink BCM5781 Gigabit Ethernet PCI Express", "NetLink BCM5781"), + T_DATA ("NetLink BCM5784M Gigabit Ethernet PCIe", "NetLink BCM5784M"), + T_DATA ("NetLink BCM5785 Fast Ethernet", "NetLink BCM5785"), + T_DATA ("NetLink BCM5785 Gigabit Ethernet", "NetLink BCM5785"), + T_DATA ("NetLink BCM5786 Gigabit Ethernet PCI Express", "NetLink BCM5786"), + T_DATA ("NetLink BCM5787F Fast Ethernet PCI Express", "NetLink BCM5787F"), + T_DATA ("NetLink BCM5787 Gigabit Ethernet PCI Express", "NetLink BCM5787"), + T_DATA ("NetLink BCM5787M Gigabit Ethernet PCI Express", "NetLink BCM5787M"), + T_DATA ("NetLink BCM5789 Gigabit Ethernet PCI Express", "NetLink BCM5789"), + T_DATA ("NetLink BCM5906 Fast Ethernet PCI Express", "NetLink BCM5906"), + T_DATA ("NetLink BCM5906M Fast Ethernet PCI Express", "NetLink BCM5906M"), + T_DATA ("NetMate2 Ethernet", "NetMate2"), + T_DATA ("NetMate Ethernet", "NetMate"), + T_DATA ("NetXen Dual Port 10GbE Multifunction Adapter for c-Class", "NetXen Multifunction for c-Class"), + T_DATA ("NetXtreme 5714S Gigabit Ethernet", "NetXtreme 5714S"), + T_DATA ("NetXtreme BCM5700 Gigabit Ethernet", "NetXtreme BCM5700"), + T_DATA ("NetXtreme BCM5701 Gigabit Ethernet", "NetXtreme BCM5701"), + T_DATA ("NetXtreme BCM5702A3 Gigabit Ethernet", "NetXtreme BCM5702A3"), + T_DATA ("NetXtreme BCM5702FE Gigabit Ethernet", "NetXtreme BCM5702FE"), + T_DATA ("NetXtreme BCM5702 Gigabit Ethernet", "NetXtreme BCM5702"), + T_DATA ("NetXtreme BCM5702X Gigabit Ethernet", "NetXtreme BCM5702X"), + T_DATA ("NetXtreme BCM5703 Gigabit Ethernet", "NetXtreme BCM5703"), + T_DATA ("NetXtreme BCM5703X Gigabit Ethernet", "NetXtreme BCM5703X"), + T_DATA ("NetXtreme BCM5704 Gigabit Ethernet", "NetXtreme BCM5704"), + T_DATA ("NetXtreme BCM5704S_2 Gigabit Ethernet", "NetXtreme BCM5704S 2"), + T_DATA ("NetXtreme BCM5704S Gigabit Ethernet", "NetXtreme BCM5704S"), + T_DATA ("NetXtreme BCM5705_2 Gigabit Ethernet", "NetXtreme BCM5705 2"), + T_DATA ("NetXtreme BCM5705 Gigabit Ethernet", "NetXtreme BCM5705"), + T_DATA ("NetXtreme BCM5705M_2 Gigabit Ethernet", "NetXtreme BCM5705M 2"), + T_DATA ("NetXtreme BCM5705M Gigabit Ethernet", "NetXtreme BCM5705M"), + T_DATA ("NetXtreme BCM5714 Gigabit Ethernet", "NetXtreme BCM5714"), + T_DATA ("NetXtreme BCM5715 Gigabit Ethernet", "NetXtreme BCM5715"), + T_DATA ("NetXtreme BCM5715S Gigabit Ethernet", "NetXtreme BCM5715S"), + T_DATA ("NetXtreme BCM5717 Gigabit Ethernet PCIe", "NetXtreme BCM5717"), + T_DATA ("NetXtreme BCM5718 Gigabit Ethernet PCIe", "NetXtreme BCM5718"), + T_DATA ("NetXtreme BCM5719 Gigabit Ethernet PCIe", "NetXtreme BCM5719"), + T_DATA ("NetXtreme BCM5720 Gigabit Ethernet PCIe", "NetXtreme BCM5720"), + T_DATA ("NetXtreme BCM5721 Gigabit Ethernet PCI Express", "NetXtreme BCM5721"), + T_DATA ("NetXtreme BCM5722 Gigabit Ethernet PCI Express", "NetXtreme BCM5722"), + T_DATA ("NetXtreme BCM5723 Gigabit Ethernet PCIe", "NetXtreme BCM5723"), + T_DATA ("NetXtreme BCM5725 Gigabit Ethernet PCIe", "NetXtreme BCM5725"), + T_DATA ("NetXtreme BCM5727 Gigabit Ethernet PCIe", "NetXtreme BCM5727"), + T_DATA ("NetXtreme BCM5751F Fast Ethernet PCI Express", "NetXtreme BCM5751F"), + T_DATA ("NetXtreme BCM5751 Gigabit Ethernet PCI Express", "NetXtreme BCM5751"), + T_DATA ("NetXtreme BCM5751M Gigabit Ethernet PCI Express", "NetXtreme BCM5751M"), + T_DATA ("NetXtreme BCM5752 Gigabit Ethernet PCI Express", "NetXtreme BCM5752"), + T_DATA ("NetXtreme BCM5752M Gigabit Ethernet PCI Express", "NetXtreme BCM5752M"), + T_DATA ("NetXtreme BCM5753F Fast Ethernet PCI Express", "NetXtreme BCM5753F"), + T_DATA ("NetXtreme BCM5753 Gigabit Ethernet PCI Express", "NetXtreme BCM5753"), + T_DATA ("NetXtreme BCM5753M Gigabit Ethernet PCI Express", "NetXtreme BCM5753M"), + T_DATA ("NetXtreme BCM5754 Gigabit Ethernet PCI Express", "NetXtreme BCM5754"), + T_DATA ("NetXtreme BCM5754M Gigabit Ethernet PCI Express", "NetXtreme BCM5754M"), + T_DATA ("NetXtreme BCM5755 Gigabit Ethernet PCI Express", "NetXtreme BCM5755"), + T_DATA ("NetXtreme BCM5755M Gigabit Ethernet PCI Express", "NetXtreme BCM5755M"), + T_DATA ("NetXtreme BCM5756ME Gigabit Ethernet PCI Express", "NetXtreme BCM5756ME"), + T_DATA ("NetXtreme BCM5761 10/100/1000BASE-T Ethernet", "NetXtreme BCM5761"), + T_DATA ("NetXtreme BCM5761e Gigabit Ethernet PCIe", "NetXtreme BCM5761e"), + T_DATA ("NetXtreme BCM5761 Gigabit Ethernet PCIe", "NetXtreme BCM5761"), + T_DATA ("NetXtreme BCM5762 Gigabit Ethernet PCIe", "NetXtreme BCM5762"), + T_DATA ("NetXtreme BCM5764M Gigabit Ethernet PCIe", "NetXtreme BCM5764M"), + T_DATA ("NetXtreme BCM57760 Gigabit Ethernet PCIe", "NetXtreme BCM57760"), + T_DATA ("NetXtreme BCM57761 Gigabit Ethernet PCIe", "NetXtreme BCM57761"), + T_DATA ("NetXtreme BCM57762 Gigabit Ethernet PCIe", "NetXtreme BCM57762"), + T_DATA ("NetXtreme BCM57764 Gigabit Ethernet PCIe", "NetXtreme BCM57764"), + T_DATA ("NetXtreme BCM57765 Gigabit Ethernet PCIe", "NetXtreme BCM57765"), + T_DATA ("NetXtreme BCM57766 Gigabit Ethernet PCIe", "NetXtreme BCM57766"), + T_DATA ("NetXtreme BCM57767 Gigabit Ethernet PCIe", "NetXtreme BCM57767"), + T_DATA ("NetXtreme BCM57782 Gigabit Ethernet PCIe", "NetXtreme BCM57782"), + T_DATA ("NetXtreme BCM57786 Gigabit Ethernet PCIe", "NetXtreme BCM57786"), + T_DATA ("NetXtreme BCM57787 Gigabit Ethernet PCIe", "NetXtreme BCM57787"), + T_DATA ("NetXtreme BCM5780 Gigabit Ethernet", "NetXtreme BCM5780"), + T_DATA ("NetXtreme BCM5780S Gigabit Ethernet", "NetXtreme BCM5780S"), + T_DATA ("NetXtreme BCM5782 Gigabit Ethernet", "NetXtreme BCM5782"), + T_DATA ("NetXtreme BCM5788 Gigabit Ethernet", "NetXtreme BCM5788"), + T_DATA ("NetXtreme BCM5901 100Base-TX", "NetXtreme BCM5901"), + T_DATA ("NetXtreme-C Ethernet Virtual Function", "NetXtreme-C Virtual Function"), + T_DATA ("NetXtreme-C RDMA Virtual Function", "NetXtreme-C Virtual Function"), + T_DATA ("NetXtreme-E Ethernet Virtual Function", "NetXtreme-E Virtual Function"), + T_DATA ("NetXtreme-E RDMA Virtual Function", "NetXtreme-E Virtual Function"), + T_DATA ("NetXtreme II BCM5706 Gigabit Ethernet (NC370i Multifunction Gigabit Server Adapter)", "NetXtreme II BCM5706"), + T_DATA ("NetXtreme II BCM5706 Gigabit Ethernet (NC370T MultifuNCtion Gigabit Server Adapter)", "NetXtreme II BCM5706"), + T_DATA ("NetXtreme II BCM5706 Gigabit Ethernet", "NetXtreme II BCM5706"), + T_DATA ("NetXtreme II BCM5706S Gigabit Ethernet (NC370F MultifuNCtion Gigabit Server Adapter)", "NetXtreme II BCM5706S"), + T_DATA ("NetXtreme II BCM5706S Gigabit Ethernet", "NetXtreme II BCM5706S"), + T_DATA ("NetXtreme II BCM5708 Gigabit Ethernet", "NetXtreme II BCM5708"), + T_DATA ("NetXtreme II BCM5708S Gigabit Ethernet", "NetXtreme II BCM5708S"), + T_DATA ("NetXtreme II BCM5709 Gigabit Ethernet", "NetXtreme II BCM5709"), + T_DATA ("NetXtreme II BCM5709S Gigabit Ethernet", "NetXtreme II BCM5709S"), + T_DATA ("NetXtreme II BCM5716 Gigabit Ethernet", "NetXtreme II BCM5716"), + T_DATA ("NetXtreme II BCM5716S Gigabit Ethernet", "NetXtreme II BCM5716S"), + T_DATA ("NetXtreme II BCM57710 10-Gigabit PCIe [Everest]", "NetXtreme II BCM57710"), + T_DATA ("NetXtreme II BCM57711 10-Gigabit PCIe", "NetXtreme II BCM57711"), + T_DATA ("NetXtreme II BCM57711E 10-Gigabit PCIe", "NetXtreme II BCM57711E"), + T_DATA ("NetXtreme II BCM57712 10 Gigabit Ethernet Multi Function", "NetXtreme II BCM57712"), + T_DATA ("NetXtreme II BCM57712 10 Gigabit Ethernet", "NetXtreme II BCM57712"), + T_DATA ("NetXtreme II BCM57712 10 Gigabit Ethernet Virtual Function", "NetXtreme II BCM57712 Virtual Function"), + T_DATA ("NetXtreme II BCM57800 1/10 Gigabit Ethernet Multi Function", "NetXtreme II BCM57800"), + T_DATA ("NetXtreme II BCM57800 1/10 Gigabit Ethernet", "NetXtreme II BCM57800"), + T_DATA ("NetXtreme II BCM57800 1/10 Gigabit Ethernet Virtual Function", "NetXtreme II BCM57800 Virtual Function"), + T_DATA ("NetXtreme II BCM57810 10 Gigabit Ethernet Multi Function", "NetXtreme II BCM57810"), + T_DATA ("NetXtreme II BCM57810 10 Gigabit Ethernet", "NetXtreme II BCM57810"), + T_DATA ("NetXtreme II BCM57810 10 Gigabit Ethernet Virtual Function", "NetXtreme II BCM57810 Virtual Function"), + T_DATA ("NetXtreme II BCM57811 10 Gigabit Ethernet Multi Function", "NetXtreme II BCM57811"), + T_DATA ("NetXtreme II BCM57811 10-Gigabit Ethernet", "NetXtreme II BCM57811"), + T_DATA ("NetXtreme II BCM57811 10-Gigabit Ethernet Virtual Function", "NetXtreme II BCM57811 Virtual Function"), + T_DATA ("NetXtreme II BCM57840 10/20 Gigabit Ethernet Multi Function", "NetXtreme II BCM57840 10/20"), + T_DATA ("NetXtreme II BCM57840 10/20 Gigabit Ethernet", "NetXtreme II BCM57840 10/20"), + T_DATA ("NetXtreme II BCM57840 10/20 Gigabit Ethernet Virtual Function", "NetXtreme II BCM57840 10/20 Virtual Function"), + T_DATA ("nForce2 Ethernet Controller", "nForce2"), + T_DATA ("nForce3 Ethernet", "nForce3"), + T_DATA ("nForce Ethernet Controller", "nForce"), + T_DATA ("Nintendo Wi-Fi", "Nintendo"), + T_DATA ("NM10/ICH7 Family LAN Controller", "NM10/ICH7"), + T_DATA ("NovaTech NV-902W", "NovaTech NV-902W"), + T_DATA ("NUB100 Ethernet [pegasus]", "NUB100"), + T_DATA ("NUB-350 802.11g Wireless Adapter [Intersil ISL3887]", "NUB-350"), + T_DATA ("NUB-8301 802.11bg", "NUB-8301"), + T_DATA ("NV5000SC", "NV5000SC"), + T_DATA ("NW-3100 802.11b/g 54Mbps Wireless Network Adapter [zd1211]", "NW-3100"), + T_DATA ("NWD2105 802.11bgn Wireless Adapter [Ralink RT3070]", "NWD2105"), + T_DATA ("NWD-210N 802.11b/g/n-draft wireless adapter", "NWD-210N"), + T_DATA ("NWD211AN 802.11abgn Wireless Adapter [Ralink RT2870]", "NWD211AN"), + T_DATA ("NWD2205 802.11n Wireless N Adapter [Realtek RTL8192CU]", "NWD2205"), + T_DATA ("NWD-270N Wireless N-lite USB Adapter", "NWD-270N N-lite"), + T_DATA ("NWD271N 802.11n Wireless Adapter [Atheros AR9001U-(2)NG]", "NWD271N"), + T_DATA ("NX3031 Multifunction 1/10-Gigabit Server Adapter", "NX3031 Multifunction"), + T_DATA ("NXB-10GCX4 10-Gigabit Ethernet PCIe Adapter with CX4 copper interface", "NXB-10GCX4"), + T_DATA ("NXB-10GXSR 10-Gigabit Ethernet PCIe Adapter with SR-XFP optical interface", "NXB-10GXSR"), + T_DATA ("NXB-4GCU Quad Gigabit Ethernet PCIe Adapter with 1000-BASE-T interface", "NXB-4GCU Quad"), + T_DATA ("OC-2183/2185", "OC-2183/2185"), + T_DATA ("OC-2325", "OC-2325"), + T_DATA ("OC-2326", "OC-2326"), + T_DATA ("OCT To Fast Ethernet Converter", "OCT To Converter"), + T_DATA ("Olicard 100", "Olicard 100"), + T_DATA ("OneConnect 10Gb NIC (be3)", "OneConnect"), + T_DATA ("OneConnect NIC (Lancer)", "OneConnect"), + T_DATA ("OneConnect NIC (Skyhawk)", "OneConnect"), + T_DATA ("OneConnect NIC (Skyhawk-VF)", "OneConnect"), + T_DATA ("OneConnect OCe10100/OCe10102 Series 10 GbE", "OneConnect OCe10100/OCe10102"), + T_DATA ("On Networks N300MA 802.11bgn [Realtek RTL8192CU]", "On Networks N300MA"), + T_DATA ("Ovation MC551", "Ovation MC551"), + T_DATA ("PCAN-PCI CAN-Bus controller", "PCAN-PCI"), + T_DATA ("PCAN Pro", "PCAN Pro"), + T_DATA ("PCAN-USB", "PCAN-USB"), + T_DATA ("PCI NE2K Ethernet", "NE2K"), + T_DATA ("PCI Rocker Ethernet switch device", "Rocker switch"), + T_DATA ("PL2301 USB-USB Bridge", "PL2301 USB-USB Bridge"), + T_DATA ("PL2302 USB-USB Bridge", "PL2302 USB-USB Bridge"), + T_DATA ("PL25A1 Host-Host Bridge", "PL25A1 Host-Host Bridge"), + T_DATA ("Platform Controller Hub EG20T Controller Area Network (CAN) Controller", "EG20T"), + T_DATA ("PN672TX 10/100 Ethernet", "PN672TX"), + T_DATA ("Pocket Ethernet [klsi]", "Pocket"), + T_DATA ("Prism GT 802.11b/g Adapter", "Prism GT"), + T_DATA ("PRO/100 VE Network Connection", "PRO/100 VE"), + T_DATA ("PRO/100 VM Network Connection", "PRO/100 VM"), + T_DATA ("PRO/Wireless 2200BG [Calexico2] Network Connection", "PRO/Wireless 2200BG"), + T_DATA ("PRO/Wireless 2915ABG [Calexico2] Network Connection", "PRO/Wireless 2915ABG"), + T_DATA ("PRO/Wireless 3945ABG [Golan] Network Connection", "PRO/Wireless 3945ABG"), + T_DATA ("PRO/Wireless 4965 AG or AGN [Kedron] Network Connection", "PRO/Wireless 4965 AG or AGN"), + T_DATA ("PRO/Wireless 5100 AGN [Shiloh] Network Connection", "PRO/Wireless 5100 AGN"), + T_DATA ("PRO/Wireless 5350 AGN [Echo Peak] Network Connection", "PRO/Wireless 5350 AGN"), + T_DATA ("PRO/Wireless LAN 2100 3B Mini PCI Adapter (Dell Latitude D800)", "PRO/Wireless 2100 3B Mini"), + T_DATA ("PRO/Wireless LAN 2100 3B Mini PCI Adapter (MIM2000/Centrino)", "PRO/Wireless 2100 3B Mini"), + T_DATA ("PRO/Wireless LAN 2100 3B Mini PCI Adapter", "PRO/Wireless 2100 3B Mini"), + T_DATA ("PRO/Wireless LAN 2100 3B Mini PCI Adapter (Samsung X10/P30 integrated WLAN)", "PRO/Wireless 2100 3B Mini"), + T_DATA ("PRO/Wireless LAN 2100 3B Mini PCI Adapter (Toshiba Satellite M10)", "PRO/Wireless 2100 3B Mini"), + T_DATA ("Psion Gold Port Ethernet", "Psion Gold Port"), + T_DATA ("PTA01 Wireless Adapter", "PTA01"), + T_DATA ("QCA6164 802.11ac Wireless Network Adapter", "QCA6164"), + T_DATA ("QCA6174 802.11ac Wireless Network Adapter", "QCA6174"), + T_DATA ("QCA8171 Gigabit Ethernet", "QCA8171"), + T_DATA ("QCA8172 Fast Ethernet", "QCA8172"), + T_DATA ("QCA9377 802.11ac Wireless Network Adapter", "QCA9377"), + T_DATA ("QCA9565 / AR9565 Wireless Network Adapter", "QCA9565 / AR9565"), + T_DATA ("QCA986x/988x 802.11ac Wireless Network Adapter", "QCA986x/988x"), + T_DATA ("QCA9887 802.11ac Wireless Network Adapter", "QCA9887"), + T_DATA ("QCA9980/9990 802.11ac Wireless Network Adapter", "QCA9980/9990"), + T_DATA ("Qualcomm HSUSB Device", "Qualcomm HSUSB"), + T_DATA ("Quectel UC20", "Quectel UC20"), + T_DATA ("QuickWLAN 802.11bg", "QuickWLAN"), + T_DATA ("R6040 MAC Controller", "R6040"), + T_DATA ("Ralink RT2770/2720 802.11b/g/n Wireless LAN Mini-USB Device", "Ralink RT2770/2720"), + T_DATA ("Ralink RT3070 802.11b/g/n Wireless Lan USB Device", "Ralink RT3070"), + T_DATA ("ReadyLink 2000", "ReadyLink 2000"), + T_DATA ("Realtek RTL8187 Wireless 802.11g 54Mbps Network Adapter", "Realtek RTL8187"), + T_DATA ("RIO 10/100 Ethernet [eri]", "RIO"), + T_DATA ("RL100-ATX 10/100", "RL100-ATX"), + T_DATA ("RL100TX Fast Ethernet", "RL100TX"), + T_DATA ("ROL/F-100 Fast Ethernet Adapter with ROL", "ROL/F-100 with ROL"), + T_DATA ("RT2070 Wireless Adapter", "RT2070"), + T_DATA ("RT2500USB Wireless Adapter", "RT2500USB"), + T_DATA ("RT2500 Wireless 802.11bg", "RT2500"), + T_DATA ("RT2501/RT2573 Wireless Adapter", "RT2501/RT2573"), + T_DATA ("RT2501USB Wireless Adapter", "RT2501USB"), + T_DATA ("RT2561/RT61 802.11g PCI", "RT2561/RT61"), + T_DATA ("RT2561/RT61 rev B 802.11g", "RT2561/RT61"), + T_DATA ("RT2570", "RT2570"), + T_DATA ("RT2570 Wireless Adapter", "RT2570"), + T_DATA ("RT2573", "RT2573"), + T_DATA ("RT2600 802.11 MIMO", "RT2600 MIMO"), + T_DATA ("RT2601/RT2671 Wireless Adapter", "RT2601/RT2671"), + T_DATA ("RT2760 Wireless 802.11n 1T/2R", "RT2760 1T/2R"), + T_DATA ("RT2770 Wireless Adapter", "RT2770"), + T_DATA ("RT2790 Wireless 802.11n 1T/2R PCIe", "RT2790 1T/2R"), + T_DATA ("RT2800 802.11n PCI", "RT2800"), + T_DATA ("RT2870/RT3070 Wireless Adapter", "RT2870/RT3070"), + T_DATA ("RT2870 Wireless Adapter", "RT2870"), + T_DATA ("RT2890 Wireless 802.11n PCIe", "RT2890"), + T_DATA ("RT3060 Wireless 802.11n 1T/1R", "RT3060 1T/1R"), + T_DATA ("RT3062 Wireless 802.11n 2T/2R", "RT3062 2T/2R"), + T_DATA ("RT3071 Wireless Adapter", "RT3071"), + T_DATA ("RT3072 Wireless Adapter", "RT3072"), + T_DATA ("RT3090 Wireless 802.11n 1T/1R PCIe", "RT3090 1T/1R"), + T_DATA ("RT3091 Wireless 802.11n 1T/2R PCIe", "RT3091 1T/2R"), + T_DATA ("RT3092 Wireless 802.11n 2T/2R PCIe", "RT3092 2T/2R"), + T_DATA ("RT3290 Wireless 802.11n 1T/1R PCIe", "RT3290 1T/1R"), + T_DATA ("RT3370 Wireless Adapter", "RT3370"), + T_DATA ("RT3572 Wireless Adapter", "RT3572"), + T_DATA ("RT3573 Wireless Adapter", "RT3573"), + T_DATA ("RT3592 PCIe Wireless Network Adapter", "RT3592"), + T_DATA ("RT3592 Wireless 802.11abgn 2T/2R PCIe", "RT3592 2T/2R"), + T_DATA ("RT5360 Wireless 802.11n 1T/1R", "RT5360 1T/1R"), + T_DATA ("RT5362 PCI 802.11n Wireless Network Adapter", "RT5362"), + T_DATA ("RT5370 Wireless Adapter", "RT5370"), + T_DATA ("RT5372 Wireless Adapter", "RT5372"), + T_DATA ("RT5390 [802.11 b/g/n 1T1R G-band PCI Express Single Chip]", "RT5390"), + T_DATA ("RT5390R 802.11bgn PCIe Wireless Network Adapter", "RT5390R"), + T_DATA ("RT5390 Wireless 802.11n 1T/1R PCIe", "RT5390 1T/1R"), + T_DATA ("RT5392 PCIe Wireless Network Adapter", "RT5392"), + T_DATA ("RT5572 Wireless Adapter", "RT5572"), + T_DATA ("RT8139 (B/C) Cardbus Fast Ethernet Adapter", "RT8139"), + T_DATA ("RTL-8029(AS)", "RTL-8029"), + T_DATA ("RTL-8100/8101L/8139 PCI Fast Ethernet Adapter", "RTL-8100/8101L/8139"), + T_DATA ("RTL8101/2/6E PCI Express Fast/Gigabit Ethernet controller", "RTL8101/2/6E"), + T_DATA ("RTL-8110SC/8169SC Gigabit Ethernet", "RTL-8110SC/8169SC"), + T_DATA ("RTL8111/8168/8411 PCI Express Gigabit Ethernet Controller", "RTL8111/8168/8411"), + T_DATA ("RTL-8129", "RTL-8129"), + T_DATA ("RTL8139D [Realtek] PCI 10/100BaseTX ethernet adaptor", "RTL8139D"), + T_DATA ("RTL8139 Ethernet", "RTL8139"), + T_DATA ("RTL8139 [FE2000VX] CardBus Fast Ethernet Attached Port Adapter", "RTL8139"), + T_DATA ("RTL8150 Fast Ethernet Adapter", "RTL8150"), + T_DATA ("RTL8151", "RTL8151"), + T_DATA ("RTL8152 Fast Ethernet Adapter", "RTL8152"), + T_DATA ("RTL8153 Gigabit Ethernet Adapter", "RTL8153"), + T_DATA ("RTL8169 PCI Gigabit Ethernet Controller", "RTL8169"), + T_DATA ("RTL8180L 802.11b MAC", "RTL8180L"), + T_DATA ("RTL-8185 IEEE 802.11a/b/g Wireless LAN Controller", "RTL-8185"), + T_DATA ("RTL8187B Wireless 802.11g 54Mbps Network Adapter", "RTL8187B"), + T_DATA ("RTL8187B Wireless Adapter", "RTL8187B"), + T_DATA ("RTL8187SE Wireless LAN Controller", "RTL8187SE"), + T_DATA ("RTL8187 Wireless Adapter", "RTL8187"), + T_DATA ("RTL8188CE 802.11b/g/n WiFi Adapter", "RTL8188CE"), + T_DATA ("RTL8188CUS 802.11n WLAN Adapter", "RTL8188CUS"), + T_DATA ("RTL8188EE Wireless Network Adapter", "RTL8188EE"), + T_DATA ("RTL8188RU 802.11n WLAN Adapter", "RTL8188RU"), + T_DATA ("RTL8191CE PCIe Wireless Network Adapter", "RTL8191CE"), + T_DATA ("RTL8191SEvA Wireless LAN Controller", "RTL8191SEvA"), + T_DATA ("RTL8191SEvB Wireless LAN Controller", "RTL8191SEvB"), + T_DATA ("RTL8192CE PCIe Wireless Network Adapter", "RTL8192CE"), + T_DATA ("RTL8192CU 802.11n WLAN Adapter", "RTL8192CU"), + T_DATA ("RTL8192DE Wireless LAN Controller", "RTL8192DE"), + T_DATA ("RTL8192EE PCIe Wireless Network Adapter", "RTL8192EE"), + T_DATA ("RTL8192E/RTL8192SE Wireless LAN Controller", "RTL8192E/RTL8192SE"), + T_DATA ("RTL8192EU 802.11b/g/n WLAN Adapter", "RTL8192EU"), + T_DATA ("RTL8192SE Wireless LAN Controller", "RTL8192SE"), + T_DATA ("RTL81xx Fast Ethernet", "RTL81xx"), + T_DATA ("RTL81xx RealTek Ethernet", "RTL81xx RealTek"), + T_DATA ("RTL8723AE PCIe Wireless Network Adapter", "RTL8723AE"), + T_DATA ("RTL8723AU 802.11n WLAN Adapter", "RTL8723AU"), + T_DATA ("RTL8723BE PCIe Wireless Network Adapter", "RTL8723BE"), + T_DATA ("RTL8812AE 802.11ac PCIe Wireless Network Adapter", "RTL8812AE"), + T_DATA ("RTL8821AE 802.11ac PCIe Wireless Network Adapter", "RTL8821AE"), + T_DATA ("S310-CR 10GbE Single Port Adapter", "S310-CR Single Port"), + T_DATA ("S320-LP-CR 10GbE Dual Port Adapter", "S320-LP-CR"), + T_DATA ("Samsung Gobi 2000 Wireless Modem", "Samsung Gobi 2000"), + T_DATA ("SC92031 PCI Fast Ethernet Adapter", "SC92031"), + T_DATA ("SD8688 WLAN", "SD8688"), + T_DATA ("SD8786 WLAN", "SD8786"), + T_DATA ("SD8787 WLAN", "SD8787"), + T_DATA ("SD8797 WLAN", "SD8797"), + T_DATA ("SD8897 WLAN", "SD8897"), + T_DATA ("SFC4000 rev A net [Solarstorm]", "SFC4000"), + T_DATA ("SFC4000 rev B [Solarstorm]", "SFC4000"), + T_DATA ("SFC9020 10G Ethernet Controller", "SFC9020"), + T_DATA ("SFC9120 10G Ethernet Controller", "SFC9120"), + T_DATA ("SFC9120 10G Ethernet Controller (Virtual Function)", "SFC9120"), + T_DATA ("SFC9140 10/40G Ethernet Controller", "SFC9140"), + T_DATA ("SFC9140 10/40G Ethernet Controller (Virtual Function)", "SFC9140"), + T_DATA ("SFC9220 10/40G Ethernet Controller", "SFC9220"), + T_DATA ("SFC9220 10/40G Ethernet Controller (Virtual Function)", "SFC9220"), + T_DATA ("SFL9021 10GBASE-T Ethernet Controller", "SFL9021"), + T_DATA ("Shasta (Sun GEM)", "Shasta"), + T_DATA ("Siemens S30853-S1016-R107 802.11g Wireless Adapter [Intersil ISL3886]", "Siemens S30853-S1016-R107"), + T_DATA ("Siemens S30853-S1031-R351 802.11g Wireless Adapter [Atheros AR5523]", "Siemens S30853-S1031-R351"), + T_DATA ("Siemens S30853-S1038-R351 802.11g Wireless Adapter [Atheros AR5523]", "Siemens S30853-S1038-R351"), + T_DATA ("Siemens S30863-S1016-R107-2 802.11g Wireless Adapter [Intersil ISL3887]", "Siemens S30863-S1016-R107-2"), + T_DATA ("Siemens SpeedStream 100MBps Ethernet", "Siemens SpeedStream"), + T_DATA ("Sierra Wireless Gobi 3000 Modem device (MC8355)", "Sierra Gobi 3000"), + T_DATA ("SIMCom SIM5218 modem", "SIMCom SIM5218"), + T_DATA ("SiS7016 PCI Fast Ethernet Adapter", "SiS7016"), + T_DATA ("SiS900 PCI Fast Ethernet", "SiS900"), + T_DATA ("SK-9871 V2.0 Gigabit Ethernet 1000Base-ZX Adapter, PCI64, Fiber ZX/SC", "SK-9871 ZX/SC"), + T_DATA ("SK-9872 Gigabit Ethernet Server Adapter (SK-NET GE-ZX dual link)", "SK-9872"), + T_DATA ("SK-9Dxx Gigabit Ethernet Adapter", "SK-9Dxx"), + T_DATA ("SK-9E21D 10/100/1000Base-T Adapter, Copper RJ-45", "SK-9E21D"), + T_DATA ("SK-9E21M 10/100/1000Base-T Adapter", "SK-9E21M"), + T_DATA ("SK-9Mxx Gigabit Ethernet Adapter", "SK-9Mxx"), + T_DATA ("SK-9S21 10/100/1000Base-T Server Adapter, PCI-X, Copper RJ-45", "SK-9S21"), + T_DATA ("smartNIC 2 PnP Ethernet", "smartNIC 2"), + T_DATA ("smartNIC Ethernet [catc]", "smartNIC"), + T_DATA ("SMC2-1211TX", "SMC2-1211TX"), + T_DATA ("SMC2862W-G v1 EZ Connect 802.11g Adapter [Intersil ISL3886]", "SMC2862W-G EZ Connect"), + T_DATA ("SMC2862W-G v2 EZ Connect 802.11g Adapter [Intersil ISL3887]", "SMC2862W-G EZ Connect"), + T_DATA ("SMC2862W-G v3 EZ Connect 802.11g Adapter [Intersil ISL3887]", "SMC2862W-G EZ Connect"), + T_DATA ("SMC SMCWUSB-N 802.11bgn 2x2:2 Wireless Adapter [Ralink RT2870]", "SMC SMCWUSB-N 2x2:2"), + T_DATA ("SMCWUSB-G 802.11bg", "SMCWUSB-G"), + T_DATA ("SMCWUSBS-N2 EZ Connect N Wireless Adapter [Ralink RT2870]", "SMCWUSBS-N2 EZ Connect"), + T_DATA ("SMCWUSBS-N3 EZ Connect N Wireless Adapter [Ralink RT3070]", "SMCWUSBS-N3 EZ Connect"), + T_DATA ("SMCWUSBS-N EZ Connect N Draft 11n Wireless Adapter [Ralink RT2870]", "SMCWUSBS-N EZ Connect"), + T_DATA ("SMCWUSBT-G (no firmware)", "SMCWUSBT-G"), + T_DATA ("SMCWUSBT-G", "SMCWUSBT-G"), + T_DATA ("SMSC9512/9514 Fast Ethernet Adapter", "SMSC9512/9514"), + T_DATA ("SNU5600 802.11bg", "SNU5600"), + T_DATA ("SoftGate 802.11 Adapter", "SoftGate"), + T_DATA ("Sony 10Mbps Ethernet [pegasus]", "Sony"), + T_DATA ("Sony Gobi 2000 Wireless Modem", "Sony Gobi 2000"), + T_DATA ("Sony UWA-BR100 802.11abgn Wireless Adapter [Atheros AR7010+AR9280]", "Sony UWA-BR100"), + T_DATA ("SparkLAN WL-682 802.11bg Wireless Adapter [Intersil ISL3887]", "SparkLAN WL-682"), + T_DATA ("Speedport W 102 Stick IEEE 802.11n USB 2.0 Adapter", "Speedport W 102 Stick"), + T_DATA ("SpeedStream 10/100 Ethernet [pegasus]", "SpeedStream"), + T_DATA ("SpeedTouch 120g 802.11g Wireless Adapter [Intersil ISL3886]", "SpeedTouch 120g"), + T_DATA ("SpeedTouch 121g Wireless Dongle", "SpeedTouch 121g Dongle"), + T_DATA ("Sphairon Homelink 1202 802.11n Wireless Adapter [Atheros AR9170]", "Sphairon Homelink 1202"), + T_DATA ("ST201 Sundance Ethernet", "ST201 Sundance"), + T_DATA ("ST268", "ST268"), + T_DATA ("SURECOM EP-320X-S 100/10M Ethernet PCI Adapter", "SURECOM EP-320X-S"), + T_DATA ("T210 Protocol Engine", "T210 Protocol Engine"), + T_DATA ("T302 1GbE Dual Port Adapter", "T302"), + T_DATA ("T310 10GbE Single Port Adapter", "T310 Single Port"), + T_DATA ("T320 10GbE Dual Port Adapter", "T320"), + T_DATA ("T404-BT Unified Wire Ethernet Controller", "T404-BT"), + T_DATA ("T404-BT Unified Wire Ethernet Controller [VF]", "T404-BT"), + T_DATA ("T420-4082 Unified Wire Ethernet Controller", "T420-4082"), + T_DATA ("T420-4082 Unified Wire Ethernet Controller [VF]", "T420-4082"), + T_DATA ("T420-4085 SFP+ Unified Wire Ethernet Controller", "T420-4085 SFP+"), + T_DATA ("T420-4085 SFP+ Unified Wire Ethernet Controller [VF]", "T420-4085 SFP+"), + T_DATA ("T420-BCH Unified Wire Ethernet Controller", "T420-BCH"), + T_DATA ("T420-BCH Unified Wire Ethernet Controller [VF]", "T420-BCH"), + T_DATA ("T420-BT Unified Wire Ethernet Controller", "T420-BT"), + T_DATA ("T420-BT Unified Wire Ethernet Controller [VF]", "T420-BT"), + T_DATA ("T420-CR Unified Wire Ethernet Controller", "T420-CR"), + T_DATA ("T420-CR Unified Wire Ethernet Controller [VF]", "T420-CR"), + T_DATA ("T420-CX Unified Wire Ethernet Controller", "T420-CX"), + T_DATA ("T420-CX Unified Wire Ethernet Controller [VF]", "T420-CX"), + T_DATA ("T420-SO Unified Wire Ethernet Controller", "T420-SO"), + T_DATA ("T420-SO Unified Wire Ethernet Controller [VF]", "T420-SO"), + T_DATA ("T420X-4083 Unified Wire Ethernet Controller", "T420X-4083"), + T_DATA ("T420X-4083 Unified Wire Ethernet Controller [VF]", "T420X-4083"), + T_DATA ("T422-CR Unified Wire Ethernet Controller", "T422-CR"), + T_DATA ("T422-CR Unified Wire Ethernet Controller [VF]", "T422-CR"), + T_DATA ("T440-4084 Unified Wire Ethernet Controller", "T440-4084"), + T_DATA ("T440-4084 Unified Wire Ethernet Controller [VF]", "T440-4084"), + T_DATA ("T440-4086 10Gbase-T Unified Wire Ethernet Controller", "T440-4086"), + T_DATA ("T440-4086 10Gbase-T Unified Wire Ethernet Controller [VF]", "T440-4086"), + T_DATA ("T440-4088 Unified Wire Ethernet Controller", "T440-4088"), + T_DATA ("T440-4088 Unified Wire Ethernet Controller [VF]", "T440-4088"), + T_DATA ("T440-BCH Unified Wire Ethernet Controller", "T440-BCH"), + T_DATA ("T440-BCH Unified Wire Ethernet Controller [VF]", "T440-BCH"), + T_DATA ("T440-CH Unified Wire Ethernet Controller", "T440-CH"), + T_DATA ("T440-CH Unified Wire Ethernet Controller [VF]", "T440-CH"), + T_DATA ("T440-CR Unified Wire Ethernet Controller", "T440-CR"), + T_DATA ("T440-CR Unified Wire Ethernet Controller [VF]", "T440-CR"), + T_DATA ("T440F-4081 T440-FCoE Unified Wire Ethernet Controller", "T440F-4081 T440-FCoE"), + T_DATA ("T440F-4081 T440-FCoE Unified Wire Ethernet Controller [VF]", "T440F-4081 T440-FCoE"), + T_DATA ("T440-LP-CR Unified Wire Ethernet Controller", "T440-LP-CR"), + T_DATA ("T440-LP-CR Unified Wire Ethernet Controller [VF]", "T440-LP-CR"), + T_DATA ("T440T-4087 Unified Wire Ethernet Controller", "T440T-4087"), + T_DATA ("T440T-4087 Unified Wire Ethernet Controller [VF]", "T440T-4087"), + T_DATA ("T480-4080 T480 Unified Wire Ethernet Controller", "T480-4080 T480"), + T_DATA ("T480-4080 T480 Unified Wire Ethernet Controller [VF]", "T480-4080 T480"), + T_DATA ("T480 Unified Wire Ethernet Controller", "T480"), + T_DATA ("T480 Unified Wire Ethernet Controller [VF]", "T480"), + T_DATA ("T502-BT Unified Wire Ethernet Controller", "T502-BT"), + T_DATA ("T502-BT Unified Wire Ethernet Controller [VF]", "T502-BT"), + T_DATA ("T504-5082 Unified Wire Ethernet Controller", "T504-5082"), + T_DATA ("T504-5082 Unified Wire Ethernet Controller [VF]", "T504-5082"), + T_DATA ("T504-BT Unified Wire Ethernet Controller", "T504-BT"), + T_DATA ("T504-BT Unified Wire Ethernet Controller [VF]", "T504-BT"), + T_DATA ("T520-5089 Unified Wire Ethernet Controller", "T520-5089"), + T_DATA ("T520-5089 Unified Wire Ethernet Controller [VF]", "T520-5089"), + T_DATA ("T520-5092 Unified Wire Ethernet Controller", "T520-5092"), + T_DATA ("T520-5092 Unified Wire Ethernet Controller [VF]", "T520-5092"), + T_DATA ("T520-5097 Unified Wire Ethernet Controller", "T520-5097"), + T_DATA ("T520-5097 Unified Wire Ethernet Controller [VF]", "T520-5097"), + T_DATA ("T520-509A Unified Wire Ethernet Controller", "T520-509A"), + T_DATA ("T520-509A Unified Wire Ethernet Controller [VF]", "T520-509A"), + T_DATA ("T520-509C Unified Wire Ethernet Controller", "T520-509C"), + T_DATA ("T520-509C Unified Wire Ethernet Controller [VF]", "T520-509C"), + T_DATA ("T520-509E Unified Wire Ethernet Controller", "T520-509E"), + T_DATA ("T520-509E Unified Wire Ethernet Controller [VF]", "T520-509E"), + T_DATA ("T520-BCH Unified Wire Ethernet Controller", "T520-BCH"), + T_DATA ("T520-BCH Unified Wire Ethernet Controller [VF]", "T520-BCH"), + T_DATA ("T520-BT Unified Wire Ethernet Controller", "T520-BT"), + T_DATA ("T520-BT Unified Wire Ethernet Controller [VF]", "T520-BT"), + T_DATA ("T520-CR Unified Wire Ethernet Controller", "T520-CR"), + T_DATA ("T520-CR Unified Wire Ethernet Controller [VF]", "T520-CR"), + T_DATA ("T520-CX Unified Wire Ethernet Controller", "T520-CX"), + T_DATA ("T520-CX Unified Wire Ethernet Controller [VF]", "T520-CX"), + T_DATA ("T520-LL-CR Unified Wire Ethernet Controller", "T520-LL-CR"), + T_DATA ("T520-LL-CR Unified Wire Ethernet Controller [VF]", "T520-LL-CR"), + T_DATA ("T520-OCP-SO Unified Wire Ethernet Controller", "T520-OCP-SO"), + T_DATA ("T520-OCP-SO Unified Wire Ethernet Controller [VF]", "T520-OCP-SO"), + T_DATA ("T520-SO Unified Wire Ethernet Controller", "T520-SO"), + T_DATA ("T520-SO Unified Wire Ethernet Controller [VF]", "T520-SO"), + T_DATA ("T522-5091 Unified Wire Ethernet Controller", "T522-5091"), + T_DATA ("T522-5091 Unified Wire Ethernet Controller [VF]", "T522-5091"), + T_DATA ("T522-CR Unified Wire Ethernet Controller", "T522-CR"), + T_DATA ("T522-CR Unified Wire Ethernet Controller [VF]", "T522-CR"), + T_DATA ("T540-5080 Unified Wire Ethernet Controller", "T540-5080"), + T_DATA ("T540-5080 Unified Wire Ethernet Controller [VF]", "T540-5080"), + T_DATA ("T540-5081 Unified Wire Ethernet Controller", "T540-5081"), + T_DATA ("T540-5081 Unified Wire Ethernet Controller [VF]", "T540-5081"), + T_DATA ("T540-5083 Unified Wire Ethernet Controller", "T540-5083"), + T_DATA ("T540-5083 Unified Wire Ethernet Controller [VF]", "T540-5083"), + T_DATA ("T540-5084 Unified Wire Ethernet Controller", "T540-5084"), + T_DATA ("T540-5084 Unified Wire Ethernet Controller [VF]", "T540-5084"), + T_DATA ("T540-5090 Unified Wire Ethernet Controller", "T540-5090"), + T_DATA ("T540-5090 Unified Wire Ethernet Controller [VF]", "T540-5090"), + T_DATA ("T540-5094 Unified Wire Ethernet Controller", "T540-5094"), + T_DATA ("T540-5094 Unified Wire Ethernet Controller [VF]", "T540-5094"), + T_DATA ("T540-5095 Unified Wire Ethernet Controller", "T540-5095"), + T_DATA ("T540-5095 Unified Wire Ethernet Controller [VF]", "T540-5095"), + T_DATA ("T540-509B Unified Wire Ethernet Controller", "T540-509B"), + T_DATA ("T540-509B Unified Wire Ethernet Controller [VF]", "T540-509B"), + T_DATA ("T540-509D Unified Wire Ethernet Controller", "T540-509D"), + T_DATA ("T540-509D Unified Wire Ethernet Controller [VF]", "T540-509D"), + T_DATA ("T540-509F Unified Wire Ethernet Controller", "T540-509F"), + T_DATA ("T540-509F Unified Wire Ethernet Controller [VF]", "T540-509F"), + T_DATA ("T540-50A0 Unified Wire Ethernet Controller", "T540-50A0"), + T_DATA ("T540-50A0 Unified Wire Ethernet Controller [VF]", "T540-50A0"), + T_DATA ("T540-50A1 Unified Wire Ethernet Controller", "T540-50A1"), + T_DATA ("T540-50A1 Unified Wire Ethernet Controller [VF]", "T540-50A1"), + T_DATA ("T540-BCH Unified Wire Ethernet Controller", "T540-BCH"), + T_DATA ("T540-BCH Unified Wire Ethernet Controller [VF]", "T540-BCH"), + T_DATA ("T540-BT Unified Wire Ethernet Controller", "T540-BT"), + T_DATA ("T540-BT Unified Wire Ethernet Controller [VF]", "T540-BT"), + T_DATA ("T540-CH Unified Wire Ethernet Controller", "T540-CH"), + T_DATA ("T540-CH Unified Wire Ethernet Controller [VF]", "T540-CH"), + T_DATA ("T540-CR Unified Wire Ethernet Controller", "T540-CR"), + T_DATA ("T540-CR Unified Wire Ethernet Controller [VF]", "T540-CR"), + T_DATA ("T540-LP-CR Unified Wire Ethernet Controller", "T540-LP-CR"), + T_DATA ("T540-LP-CR Unified Wire Ethernet Controller [VF]", "T540-LP-CR"), + T_DATA ("T560-CR Unified Wire Ethernet Controller", "T560-CR"), + T_DATA ("T560-CR Unified Wire Ethernet Controller [VF]", "T560-CR"), + T_DATA ("T570-5088 Unified Wire Ethernet Controller", "T570-5088"), + T_DATA ("T570-5088 Unified Wire Ethernet Controller [VF]", "T570-5088"), + T_DATA ("T580-5085 Unified Wire Ethernet Controller", "T580-5085"), + T_DATA ("T580-5085 Unified Wire Ethernet Controller [VF]", "T580-5085"), + T_DATA ("T580-5086 Unified Wire Ethernet Controller", "T580-5086"), + T_DATA ("T580-5086 Unified Wire Ethernet Controller [VF]", "T580-5086"), + T_DATA ("T580-5087 Unified Wire Ethernet Controller", "T580-5087"), + T_DATA ("T580-5087 Unified Wire Ethernet Controller [VF]", "T580-5087"), + T_DATA ("T580-5093 Unified Wire Ethernet Controller", "T580-5093"), + T_DATA ("T580-5093 Unified Wire Ethernet Controller [VF]", "T580-5093"), + T_DATA ("T580-5096 Unified Wire Ethernet Controller", "T580-5096"), + T_DATA ("T580-5096 Unified Wire Ethernet Controller [VF]", "T580-5096"), + T_DATA ("T580-5098 Unified Wire Ethernet Controller", "T580-5098"), + T_DATA ("T580-5098 Unified Wire Ethernet Controller [VF]", "T580-5098"), + T_DATA ("T580-5099 Unified Wire Ethernet Controller", "T580-5099"), + T_DATA ("T580-5099 Unified Wire Ethernet Controller [VF]", "T580-5099"), + T_DATA ("T580-50A2 Unified Wire Ethernet Controller", "T580-50A2"), + T_DATA ("T580-50A2 Unified Wire Ethernet Controller [VF]", "T580-50A2"), + T_DATA ("T580-CHR Unified Wire Ethernet Controller", "T580-CHR"), + T_DATA ("T580-CHR Unified Wire Ethernet Controller [VF]", "T580-CHR"), + T_DATA ("T580-CR Unified Wire Ethernet Controller", "T580-CR"), + T_DATA ("T580-CR Unified Wire Ethernet Controller [VF]", "T580-CR"), + T_DATA ("T580-LP-CR Unified Wire Ethernet Controller", "T580-LP-CR"), + T_DATA ("T580-LP-CR Unified Wire Ethernet Controller [VF]", "T580-LP-CR"), + T_DATA ("T580-OCP-SO Unified Wire Ethernet Controller", "T580-OCP-SO"), + T_DATA ("T580-OCP-SO Unified Wire Ethernet Controller [VF]", "T580-OCP-SO"), + T_DATA ("T580-SO-CR Unified Wire Ethernet Controller", "T580-SO-CR"), + T_DATA ("T580-SO-CR Unified Wire Ethernet Controller [VF]", "T580-SO-CR"), + T_DATA ("T61100-OCP-SO Unified Wire Ethernet Controller", "T61100-OCP-SO"), + T_DATA ("T61100-OCP-SO Unified Wire Ethernet Controller [VF]", "T61100-OCP-SO"), + T_DATA ("T6201-BT Unified Wire Ethernet Controller", "T6201-BT"), + T_DATA ("T6201-BT Unified Wire Ethernet Controller [VF]", "T6201-BT"), + T_DATA ("T62100-6081 Unified Wire Ethernet Controller", "T62100-6081"), + T_DATA ("T62100-6081 Unified Wire Ethernet Controller [VF]", "T62100-6081"), + T_DATA ("T62100-6083 Unified Wire Ethernet Controller", "T62100-6083"), + T_DATA ("T62100-6083 Unified Wire Ethernet Controller [VF]", "T62100-6083"), + T_DATA ("T62100-CR Unified Wire Ethernet Controller", "T62100-CR"), + T_DATA ("T62100-CR Unified Wire Ethernet Controller [VF]", "T62100-CR"), + T_DATA ("T62100-LP-CR Unified Wire Ethernet Controller", "T62100-LP-CR"), + T_DATA ("T62100-LP-CR Unified Wire Ethernet Controller [VF]", "T62100-LP-CR"), + T_DATA ("T62100-OCP-SO Unified Wire Ethernet Controller", "T62100-OCP-SO"), + T_DATA ("T62100-OCP-SO Unified Wire Ethernet Controller [VF]", "T62100-OCP-SO"), + T_DATA ("T62100-SO-CR Unified Wire Ethernet Controller", "T62100-SO-CR"), + T_DATA ("T62100-SO-CR Unified Wire Ethernet Controller [VF]", "T62100-SO-CR"), + T_DATA ("T6210-BT Unified Wire Ethernet Controller", "T6210-BT"), + T_DATA ("T6210-BT Unified Wire Ethernet Controller [VF]", "T6210-BT"), + T_DATA ("T6225-6080 Unified Wire Ethernet Controller", "T6225-6080"), + T_DATA ("T6225-6080 Unified Wire Ethernet Controller [VF]", "T6225-6080"), + T_DATA ("T6225-6082 Unified Wire Ethernet Controller", "T6225-6082"), + T_DATA ("T6225-6082 Unified Wire Ethernet Controller [VF]", "T6225-6082"), + T_DATA ("T6225-CR Unified Wire Ethernet Controller", "T6225-CR"), + T_DATA ("T6225-CR Unified Wire Ethernet Controller [VF]", "T6225-CR"), + T_DATA ("T6225-LL-CR Unified Wire Ethernet Controller", "T6225-LL-CR"), + T_DATA ("T6225-LL-CR Unified Wire Ethernet Controller [VF]", "T6225-LL-CR"), + T_DATA ("T6225-OCP-SO Unified Wire Ethernet Controller", "T6225-OCP-SO"), + T_DATA ("T6225-OCP-SO Unified Wire Ethernet Controller [VF]", "T6225-OCP-SO"), + T_DATA ("T6225-SO-CR Unified Wire Ethernet Controller", "T6225-SO-CR"), + T_DATA ("T6225-SO-CR Unified Wire Ethernet Controller [VF]", "T6225-SO-CR"), + T_DATA ("T64100-6084 Unified Wire Ethernet Controller", "T64100-6084"), + T_DATA ("T64100-6084 Unified Wire Ethernet Controller [VF]", "T64100-6084"), + T_DATA ("T6425-CR Unified Wire Ethernet Controller", "T6425-CR"), + T_DATA ("T6425-CR Unified Wire Ethernet Controller [VF]", "T6425-CR"), + T_DATA ("T6425-SO-CR Unified Wire Ethernet Controller", "T6425-SO-CR"), + T_DATA ("T6425-SO-CR Unified Wire Ethernet Controller [VF]", "T6425-SO-CR"), + T_DATA ("TalkTalk SNU5630NS/05 802.11bg", "TalkTalk SNU5630NS/05"), + T_DATA ("TC902x Gigabit Ethernet", "TC902x"), + T_DATA ("T-Com Sinus 154 data II [Intersil ISL3887]", "T-Com Sinus 154 data II"), + T_DATA ("TEW-429UB 802.11bg", "TEW-429UB"), + T_DATA ("TEW-429UB C1 802.11bg", "TEW-429UB C1"), + T_DATA ("TEW-444UB EU (no firmware)", "TEW-444UB EU"), + T_DATA ("TEW-444UB EU [TRENDnet]", "TEW-444UB EU"), + T_DATA ("TEW-509UB A1 802.11abg Wireless Adapter [ZyDAS ZD1211]", "TEW-509UB A1"), + T_DATA ("TEW-645UB 802.11bgn 1x2:2 Wireless Adapter [Ralink RT2770]", "TEW-645UB"), + T_DATA ("TEW-648UBM 802.11n 150Mbps Micro Wireless N Adapter [Realtek RTL8188CUS]", "TEW-648UBM"), + T_DATA ("TG54USB 802.11bg", "TG54USB"), + T_DATA ("Thomson TG121N [Atheros AR9001U-(2)NG]", "Thomson TG121N"), + T_DATA ("Top Global Gobi 2000 Wireless Modem", "Top Global Gobi 2000"), + T_DATA ("TP-Link TL-WN322G v3 / TL-WN422G v2 802.11g [Atheros AR9271]", "TP-Link TL-WN322G / TL-WN422G"), + T_DATA ("TP-Link TL-WN821N v2 / TL-WN822N v1 802.11n [Atheros AR9170]", "TP-Link TL-WN821N / TL-WN822N"), + T_DATA ("TP-Link TL-WN821N v3 / TL-WN822N v2 802.11n [Atheros AR7010+AR9287]", "TP-Link TL-WN821N / TL-WN822N"), + T_DATA ("TrueMobile 1300 802.11g Wireless Adapter [Intersil ISL3880]", "TrueMobile 1300"), + T_DATA ("T-Sinus 154data", "T-Sinus 154data"), + T_DATA ("TTP-Monitoring Card V2.0", "TTP-Monitoring"), + T_DATA ("Turbolink UB801RE Wireless 802.11g 54Mbps Network Adapter [RTL8187]", "Turbolink UB801RE"), + T_DATA ("Turbolink UB801R WLAN Adapter", "Turbolink UB801R"), + T_DATA ("U2E", "U2E"), + T_DATA ("U5 802.11g Adapter", "U5"), + T_DATA ("UB81 802.11bgn", "UB81"), + T_DATA ("UB82 802.11abgn", "UB82"), + T_DATA ("Ubiquiti WiFiStation 802.11n [Atheros AR9271]", "Ubiquiti WiFiStation"), + T_DATA ("Ubiquiti WiFiStationEXT 802.11n [Atheros AR9271]", "Ubiquiti WiFiStationEXT"), + T_DATA ("UBS-10BT Ethernet [klsi]", "UBS-10BT"), + T_DATA ("UBS-10BT Ethernet", "UBS-10BT"), + T_DATA ("UC-110T 100Mbps Ethernet [pegasus]", "UC-110T"), + T_DATA ("UC-210T Ethernet", "UC-210T"), + T_DATA ("UF100 Ethernet [pegasus2]", "UF100"), + T_DATA ("UF200 Ethernet", "UF200"), + T_DATA ("ULi 1689,1573 integrated ethernet.", "ULi 1689 1573"), + T_DATA ("Ultimate N WiFi Link 5300", "Ultimate N 5300"), + T_DATA ("un2400 Gobi Wireless Modem", "un2400 Gobi"), + T_DATA ("UniNorth 2 GMAC (Sun GEM)", "UniNorth 2 GMAC"), + T_DATA ("UniNorth GMAC (Sun GEM)", "UniNorth GMAC"), + T_DATA ("UniNorth/Pangea GMAC (Sun GEM)", "UniNorth/Pangea GMAC"), + T_DATA ("UR054g 802.11g Wireless Adapter [Intersil ISL3887]", "UR054g"), + T_DATA ("UR055G 802.11bg", "UR055G"), + T_DATA ("USB1000 Gigabit Notebook Adapter", "USB1000"), + T_DATA ("USB-100N Ethernet [pegasus]", "USB-100N"), + T_DATA ("USB100TX Ethernet [pegasus]", "USB100TX"), + T_DATA ("USB100TX HomePNA Ethernet [pegasus]", "USB100TX HomePNA"), + T_DATA ("USB10TX Ethernet [pegasus]", "USB10TX"), + T_DATA ("USB10TX", "USB10TX"), + T_DATA ("USB 1.1 10/100M Fast Ethernet Adapter", NULL), + T_DATA ("USB200M 100baseTX Adapter", "USB200M 100baseTX"), + T_DATA ("USB200M 10/100 Ethernet Adapter", "USB200M"), + T_DATA ("USB 2.0 Ethernet", NULL), + T_DATA ("USB2AR Ethernet", "USB2AR"), + T_DATA ("USBcan II", "USBcan II"), + T_DATA ("USBE-100 Ethernet [pegasus2]", "USBE-100"), + T_DATA ("USBEL-100 Ethernet [pegasus]", "USBEL-100"), + T_DATA ("USB Ethernet [pegasus]", "pegasus"), + T_DATA ("USB ETT", "ETT"), + T_DATA ("USBLAN", "USBLAN"), + T_DATA ("USBLP-100 HomePNA Ethernet [pegasus]", "USBLP-100 HomePNA"), + T_DATA ("USB-N10 v2 802.11b/g/n Wireless Adapter [MediaTek MT7601U]", "USB-N10"), + T_DATA ("USB-N11 802.11n Network Adapter [Ralink RT2870]", "USB-N11"), + T_DATA ("USB-N13 802.11n Network Adapter (rev. A1) [Ralink RT3072]", "USB-N13"), + T_DATA ("USB-N13 802.11n Network Adapter (rev. B1) [Realtek RTL8192CU]", "USB-N13"), + T_DATA ("USB-N14 802.11b/g/n (2x2) Wireless Adapter [Ralink RT5372]", "USB-N14"), + T_DATA ("USB-N53 802.11abgn Network Adapter [Ralink RT3572]", "USB-N53"), + T_DATA ("USB TO Ethernet", NULL), + T_DATA ("USR5420 802.11g Adapter [Broadcom 4320 USB]", "USR5420"), + T_DATA ("USR5423 802.11bg Wireless Adapter [ZyDAS ZD1211B]", "USR5423"), + T_DATA ("USR997902 10/100/1000 Mbps PCI Network Card", "USR997902 Mbps"), + T_DATA ("VIC Ethernet NIC Dynamic", "VIC Dynamic"), + T_DATA ("VIC Ethernet NIC", "VIC"), + T_DATA ("VIC SR-IOV VF", "VIC SR-IOV VF"), + T_DATA ("Vigor530 IEEE 802.11G Adapter (ISL3880+NET2280)", "Vigor530"), + T_DATA ("Virtual media for 802.11bg", NULL), + T_DATA ("VMXNET3 Ethernet Controller", "VMXNET3"), + T_DATA ("VT6102/VT6103 [Rhine-II]", "VT6102/VT6103"), + T_DATA ("VT6105M [Rhine-III]", "VT6105M"), + T_DATA ("VT6105/VT6106S [Rhine-III]", "VT6105/VT6106S"), + T_DATA ("VT6120/VT6121/VT6122 Gigabit Ethernet Adapter", "VT6120/VT6121/VT6122"), + T_DATA ("VT82C926 [Amazon]", "VT82C926"), + T_DATA ("VT86C100A [Rhine]", "VT86C100A"), + T_DATA ("W89C840", "W89C840"), + T_DATA ("W89C940F", "W89C940F"), + T_DATA ("W89C940 misprogrammed [ne2k]", "W89C940"), + T_DATA ("W89C940", "W89C940"), + T_DATA ("WG111T (no firmware)", "WG111T"), + T_DATA ("WG111T", "WG111T"), + T_DATA ("WG111U Double 108 Mbps Wireless [Atheros AR5004X / AR5005UX]", "WG111U"), + T_DATA ("WG111U (no firmware) Double 108 Mbps Wireless [Atheros AR5004X / AR5005UX]", "WG111U"), + T_DATA ("WG111(v1) 54 Mbps Wireless [Intersil ISL3886]", "WG111"), + T_DATA ("WG111(v1) rev 2 54 Mbps Wireless [Intersil ISL3887]", "WG111"), + T_DATA ("WG111v2 54 Mbps Wireless [RealTek RTL8187L]", "WG111v2"), + T_DATA ("WG111v3 54 Mbps Wireless [realtek RTL8187B]", "WG111v3"), + T_DATA ("WG121(v1) 54 Mbps Wireless [Intersil ISL3886]", "WG121"), + T_DATA ("WG121(v2) 54 Mbps Wireless [Intersil ISL3886]", "WG121"), + T_DATA ("WGU-210 802.11g Adapter [Intersil ISL3886]", "WGU-210"), + T_DATA ("WHG-AGDN/US Wireless LAN Adapter", "WHG-AGDN/US"), + T_DATA ("Wi-Fi 11g adapter", NULL), + T_DATA ("WiFi Link 5100", "5100"), + T_DATA ("Wil6200 802.11ad Wireless Network Adapter", "Wil6200"), + T_DATA ("WiMAX/WiFi Link 5150", "5150"), + T_DATA ("Wireless 11n USB Adapter", "11n"), + T_DATA ("Wireless 1450 Dual-band (802.11a/b/g) Adapter [Intersil ISL3887]", "1450"), + T_DATA ("Wireless 3160", "3160"), + T_DATA ("Wireless 3165", "3165"), + T_DATA ("Wireless 7260", "7260"), + T_DATA ("Wireless 7265", "7265"), + T_DATA ("Wireless 802.11g 54Mbps Network Adapter [RTL8187]", "RTL8187"), + T_DATA ("Wireless 8260", "8260"), + T_DATA ("Wireless 8265 / 8275", "8265 / 8275"), + T_DATA ("Wireless Adapter 11g", NULL), + T_DATA ("Wireless LAN USB Mini-Card", NULL), + T_DATA ("Wireless MAXg Adapter [Broadcom 4320]", "MAXg"), + T_DATA ("Wireless Network Adapter", NULL), + T_DATA ("Wireless-N Network Adapter [Ralink RT2870]", "Ralink RT2870"), + T_DATA ("Wireless PCI Adapter RT2400 / RT2460", "RT2400 / RT2460"), + T_DATA ("WIS09ABGN LinkStick Wireless LAN Adapter", "WIS09ABGN LinkStick"), + T_DATA ("WL-113 rev 1 Wireless Network USB Adapter", "WL-113"), + T_DATA ("WL-113 rev 2 Wireless Network USB Adapter", "WL-113"), + T_DATA ("WL-117 Hi-Speed USB Adapter", "WL-117"), + T_DATA ("WL1271", "WL1271"), + T_DATA ("WL-159g 802.11bg [ZyDAS ZD1211B+AL2230]", "WL-159g"), + T_DATA ("WL-167G v1 802.11g Adapter [Ralink RT2571]", "WL-167G"), + T_DATA ("WL-167G v2 802.11g Adapter [Ralink RT2571W]", "WL-167G"), + T_DATA ("WL-168 Wireless Network Adapter 54g", "WL-168"), + T_DATA ("WL169gE 802.11g Adapter [Broadcom 4320 USB]", "WL169gE"), + T_DATA ("WL-172 Wireless Network USB Adapter 54g Turbo", "WL-172 Turbo"), + T_DATA ("WL-182 Wireless-N Network USB Card", "WL-182"), + T_DATA ("WL-188 Wireless Network 300N USB Adapter", "WL-188 300N"), + T_DATA ("WL-301 Wireless Network 300N USB Adapter", "WL-301 300N"), + T_DATA ("WL-302 Wireless Network 300N USB dongle", "WL-302 300N"), + T_DATA ("WL-315 Wireless-N USB Adapter", "WL-315"), + T_DATA ("WL-321 Wireless USB Gaming Adapter 300N", "WL-321 Gaming 300N"), + T_DATA ("WL-323 Wireless-N USB Adapter", "WL-323"), + T_DATA ("WL-324 Wireless USB Adapter 300N", "WL-324 300N"), + T_DATA ("WL-329 Wireless Dualband USB adapter 300N", "WL-329 Dualband 300N"), + T_DATA ("WL-343 Wireless USB Adapter 150N X1", "WL-343 150N X1"), + T_DATA ("WL-344 Wireless Adapter 300N X2 [Ralink RT3071]", "WL-344 300N X2"), + T_DATA ("WL-345 Wireless USB adapter 300N X3", "WL-345 300N X3"), + T_DATA ("WL-349v1 Wireless Adapter 150N 002 [Ralink RT3070]", "WL-349v1 150N 002"), + T_DATA ("WL-349v4 Wireless Micro Adapter 150N X1 [Ralink RT3370]", "WL-349v4 150N X1"), + T_DATA ("WL-352v1 Wireless USB Adapter 300N 002", "WL-352v1 300N 002"), + T_DATA ("WL-358v1 Wireless Micro USB Adapter 300N X3 002", "WL-358v1 300N X3 002"), + T_DATA ("WL-430U 802.11bg", "WL-430U"), + T_DATA ("WL532U 802.11g Adapter", "WL532U"), + T_DATA ("WL-603 Wireless Adapter", "WL-603"), + T_DATA ("WL-608 Wireless USB Adapter 54g", "WL-608"), + T_DATA ("WLA3310 Wireless Adapter [Intersil ISL3887]", "WLA3310"), + T_DATA ("WLA-4000 802.11bgn [Ralink RT3072]", "WLA-4000"), + T_DATA ("WLA-5000 802.11abgn [Ralink RT3572]", "WLA-5000"), + T_DATA ("WLA-5100", "WLA-5100"), + T_DATA ("WLI2-USB2-G54 Wireless LAN Adapter", "WLI2-USB2-G54"), + T_DATA ("WLI-U2-G54HP", "WLI-U2-G54HP"), + T_DATA ("WLI-U2-KG125S 802.11g Adapter [Broadcom 4320 USB]", "WLI-U2-KG125S"), + T_DATA ("WLI-U2-KG54-AI WLAN", "WLI-U2-KG54-AI"), + T_DATA ("WLI-U2-KG54-BB", "WLI-U2-KG54-BB"), + T_DATA ("WLI-U2-KG54L 802.11bg [ZyDAS ZD1211B]", "WLI-U2-KG54L"), + T_DATA ("WLI-U2-KG54 WLAN", "WLI-U2-KG54"), + T_DATA ("WLI-U2-KG54-YB WLAN", "WLI-U2-KG54-YB"), + T_DATA ("WLI-U2-SG54HP", "WLI-U2-SG54HP"), + T_DATA ("WLI-UC-AG300N Wireless LAN Adapter", "WLI-UC-AG300N"), + T_DATA ("WLI-UC-G300HP Wireless LAN Adapter", "WLI-UC-G300HP"), + T_DATA ("WLI-UC-G300N Wireless LAN Adapter [Ralink RT2870]", "WLI-UC-G300N"), + T_DATA ("WLI-UC-G301N Wireless LAN Adapter [Ralink RT3072]", "WLI-UC-G301N"), + T_DATA ("WLI-UC-G450 Wireless LAN Adapter", "WLI-UC-G450"), + T_DATA ("WLI-UC-GNHP Wireless LAN Adapter", "WLI-UC-GNHP"), + T_DATA ("WLI-UC-GNM2 Wireless LAN Adapter [Ralink RT3070]", "WLI-UC-GNM2"), + T_DATA ("WLI-UC-GNM Wireless LAN Adapter [Ralink RT8070]", "WLI-UC-GNM"), + T_DATA ("WLI-UC-GN Wireless LAN Adapter [Ralink RT3070]", "WLI-UC-GN"), + T_DATA ("WLI-USB-G54 802.11g Adapter [Broadcom 4320 USB]", "WLI-USB-G54"), + T_DATA ("WLM-10U1 802.11abgn Wireless Adapter [Ralink RT3572]", "WLM-10U1"), + T_DATA ("WLM-20U2/GN-1080 802.11abgn Wireless Adapter [Atheros AR7010+AR9280]", "WLM-20U2/GN-1080"), + T_DATA ("WLP-UC-AG300 Wireless LAN Adapter", "WLP-UC-AG300"), + T_DATA ("WM168g 802.11bg Wireless Adapter [Intersil ISL3886]", "WM168g"), + T_DATA ("WN111(v2) RangeMax Next Wireless [Atheros AR9170+AR9101]", "WN111"), + T_DATA ("WNA1000M 802.11bgn [Realtek RTL8188CUS]", "WNA1000M"), + T_DATA ("WNA1000Mv2 802.11bgn [Realtek RTL8188CUS?]", "WNA1000Mv2"), + T_DATA ("WNA1000 Wireless-N 150 [Atheros AR9170+AR9101]", "WNA1000 150"), + T_DATA ("WNA1100 Wireless-N 150 [Atheros AR9271]", "WNA1100 150"), + T_DATA ("WNA3100M(v1) Wireless-N 300 [Realtek RTL8192CU]", "WNA3100M"), + T_DATA ("WNDA3100v1 802.11abgn [Atheros AR9170+AR9104]", "WNDA3100v1"), + T_DATA ("WNDA3200 802.11abgn Wireless Adapter [Atheros AR7010+AR9280]", "WNDA3200"), + T_DATA ("WNDA4100 802.11abgn 3x3:3 [Ralink RT3573]", "WNDA4100"), + T_DATA ("WN-G150U Wireless LAN Adapter", "WN-G150U"), + T_DATA ("WN-G300U Wireless LAN Adapter", "WN-G300U"), + T_DATA ("WNGDNUS2 802.11n", "WNGDNUS2"), + T_DATA ("WN-GDN/US3 Wireless LAN Adapter", "WN-GDN/US3"), + T_DATA ("WPN111 802.11g Wireless Adapter [Atheros AR5523]", "WPN111"), + T_DATA ("WPN111 (no firmware)", "WPN111"), + T_DATA ("WPN111 RangeMax(TM) Wireless USB 2.0 Adapter", "WPN111 RangeMax"), + T_DATA ("WUA-1340", "WUA-1340"), + T_DATA ("WUA-2340 RangeBooster G Adapter(rev.A) [Atheros AR5523]", "WUA-2340 RangeBooster"), + T_DATA ("WUA-2340 RangeBooster G Adapter(rev.A) (no firmware) [Atheros AR5523]", "WUA-2340 RangeBooster"), + T_DATA ("WUA-2340 RangeBooster G Adapter(rev.B) [Ralink RT2070]", "WUA-2340 RangeBooster"), + T_DATA ("WUBR-177G [Ralink RT2571W]", "WUBR-177G"), + T_DATA ("WUBR-208N 802.11abgn Wireless Adapter [Ralink RT2870]", "WUBR-208N"), + T_DATA ("WUG2690 802.11bg Wireless Module [ZyDAS ZD1211+AL2230]", "WUG2690"), + T_DATA ("WUG2700", "WUG2700"), + T_DATA ("WUS-201 802.11bg", "WUS-201"), + T_DATA ("WUSB100 v1 RangePlus Wireless Network Adapter [Ralink RT2870]", "WUSB100 RangePlus"), + T_DATA ("WUSB100 v2 RangePlus Wireless Network Adapter [Ralink RT3070]", "WUSB100 RangePlus"), + T_DATA ("WUSB200 802.11g Adapter [Ralink RT2671]", "WUSB200"), + T_DATA ("WUSB54AG 802.11a/g Adapter [Intersil ISL3887]", "WUSB54AG"), + T_DATA ("WUSB54GC v1 802.11g Adapter [Ralink RT73]", "WUSB54GC"), + T_DATA ("WUSB54GC v2 802.11g Adapter [Realtek RTL8187B]", "WUSB54GC"), + T_DATA ("WUSB54GC v3 802.11g Adapter [Ralink RT2070L]", "WUSB54GC"), + T_DATA ("WUSB54GP v1 802.11g Adapter [Intersil ISL3886]", "WUSB54GP"), + T_DATA ("WUSB54GP v4.0 802.11g Adapter [Ralink RT2500USB]", "WUSB54GP v4.0"), + T_DATA ("WUSB54GR", "WUSB54GR"), + T_DATA ("WUSB54GSC v1 802.11g Adapter [Broadcom 4320 USB]", "WUSB54GSC"), + T_DATA ("WUSB54GS v1 802.11g Adapter [Broadcom 4320 USB]", "WUSB54GS"), + T_DATA ("WUSB54GS v2 802.11g Adapter [Broadcom 4320 USB]", "WUSB54GS"), + T_DATA ("WUSB54G v1 802.11g Adapter [Intersil ISL3886]", "WUSB54G"), + T_DATA ("WUSB54G v2 802.11g Adapter [Intersil ISL3887]", "WUSB54G"), + T_DATA ("WUSB54G v4 802.11g Adapter [Ralink RT2500USB]", "WUSB54G"), + T_DATA ("WUSB600N v1 Dual-Band Wireless-N Network Adapter [Ralink RT2870]", "WUSB600N Dual-Band"), + T_DATA ("WUSB600N v2 Dual-Band Wireless-N Network Adapter [Ralink RT3572]", "WUSB600N Dual-Band"), + T_DATA ("WUSBF54G 802.11bg", "WUSBF54G"), + T_DATA ("WUSBF54G v1.1 802.11bg", "WUSBF54G"), + T_DATA ("X3100 Series 10 Gigabit Ethernet PCIe", "X3100"), + T_DATA ("X540 Ethernet Controller Virtual Function", "X540 Virtual Function"), + T_DATA ("X540 Virtual Function", "X540 Virtual Function"), + T_DATA ("X550 Virtual Function", "X550 Virtual Function"), + T_DATA ("X552 Virtual Function", "X552 Virtual Function"), + T_DATA ("X553 Virtual Function", "X553 Virtual Function"), + T_DATA ("X722 Virtual Function", "X722 Virtual Function"), + T_DATA ("Xframe 10-Gigabit Ethernet PCI-X", "Xframe"), + T_DATA ("Xframe II 10-Gigabit Ethernet PCI-X 2.0", "Xframe II 2.0"), + T_DATA ("XG-300 802.11b Adapter", "XG-300"), + T_DATA ("XG-703A 802.11g Wireless Adapter [Intersil ISL3887]", "XG-703A"), + T_DATA ("XG-705A 802.11g Wireless Adapter [Intersil ISL3887]", "XG-705A"), + T_DATA ("XG-760A 802.11bg", "XG-760A"), + T_DATA ("XG-76NA 802.11bg", "XG-76NA"), + T_DATA ("XG Mgmt", "XG Mgmt"), + T_DATA ("Xircom PGUNET USB-USB Bridge", "Xircom PGUNET USB-USB Bridge"), + T_DATA ("XL710/X710 Virtual Function", "XL710/X710 Virtual Function"), + T_DATA ("XX1", "XX1"), + T_DATA ("XX2", "XX2"), + T_DATA ("XX4", "XX4"), + T_DATA ("XX5", "XX5"), + T_DATA ("XX6", "XX6"), + T_DATA ("XX7", "XX7"), + T_DATA ("XX9", "XX9"), + T_DATA ("Yellowfin G-NIC gigabit ethernet", "Yellowfin"), + T_DATA ("YP3X00 PDA", "YP3X00"), + T_DATA ("Yukon Optima 88E8059 [PCIe Gigabit Ethernet Controller with AVB]", "Yukon Optima 88E8059"), + T_DATA ("Zaurus A-300", "Zaurus A-300"), + T_DATA ("Zaurus C-700 PDA", "Zaurus C-700"), + T_DATA ("Zaurus C-750/C-760/C-860/SL-C3000 PDA", "Zaurus C-750/C-760/C-860/SL-C3000"), + T_DATA ("Zaurus C-860 PDA", "Zaurus C-860"), + T_DATA ("Zaurus SL-5000D/SL-5500 PDA", "Zaurus SL-5000D/SL-5500"), + T_DATA ("Zaurus SL-6000", "Zaurus SL-6000"), + T_DATA ("Zaurus SL-B500/SL-5600 PDA", "Zaurus SL-B500/SL-5600"), + T_DATA ("ZD1211 802.11b/g Wireless Adapter", "ZD1211"), + T_DATA ("ZD1211 802.11g", "ZD1211"), + T_DATA ("ZD1211B 802.11g", "ZD1211B"), + T_DATA ("ZD1211B", "ZD1211B"), + T_DATA ("ZD1221 802.11n", "ZD1221"), + T_DATA ("Zoom 4410 Wireless-G [Intersil ISL3887]", "Zoom 4410"), + T_DATA ("ZT6688 Fast Ethernet Adapter", "ZT6688"), + T_DATA ("ZyAIR AG-225H v2 802.11bg", "ZyAIR AG-225H"), + T_DATA ("ZyAIR G-202 802.11bg", "ZyAIR G-202"), + T_DATA ("ZyAIR G-220 802.11bg", "ZyAIR G-220"), + T_DATA ("ZyAIR G-220F 802.11bg", "ZyAIR G-220F"), + }; + + _test_fixup_string (data, G_N_ELEMENTS (data), nm_utils_fixup_product_string); } /*****************************************************************************/ @@ -63,7 +2164,8 @@ int main (int argc, char **argv) { nmtst_init (&argc, &argv, TRUE); - g_test_add_func ("/libnm/general/fixup_desc_string", test_fixup_desc_string); + g_test_add_func ("/libnm/general/fixup_product_string", test_fixup_product_string); + g_test_add_func ("/libnm/general/fixup_vendor_string", test_fixup_vendor_string); return g_test_run (); } diff --git a/libnm/tests/test-nm-client.c b/libnm/tests/test-nm-client.c index 63822882..21272e4d 100644 --- a/libnm/tests/test-nm-client.c +++ b/libnm/tests/test-nm-client.c @@ -70,6 +70,9 @@ test_device_added (void) GError *error = NULL; sinfo = nmtstc_service_init (); + if (!nmtstc_service_available (sinfo)) + return; + client = nm_client_new (NULL, &error); g_assert_no_error (error); @@ -163,6 +166,9 @@ test_device_added_signal_after_init (void) GError *error = NULL; sinfo = nmtstc_service_init (); + if (!nmtstc_service_available (sinfo)) + return; + client = nm_client_new (NULL, &error); g_assert_no_error (error); @@ -311,6 +317,9 @@ test_wifi_ap_added_removed (void) char *expected_path = NULL; sinfo = nmtstc_service_init (); + if (!nmtstc_service_available (sinfo)) + return; + client = nm_client_new (NULL, &error); g_assert_no_error (error); @@ -510,6 +519,9 @@ test_wimax_nsp_added_removed (void) char *expected_path = NULL; sinfo = nmtstc_service_init (); + if (!nmtstc_service_available (sinfo)) + return; + client = nm_client_new (NULL, &error); g_assert_no_error (error); @@ -686,6 +698,8 @@ test_devices_array (void) GVariant *ret; sinfo = nmtstc_service_init (); + if (!nmtstc_service_available (sinfo)) + return; /* Make sure that we test the async codepath in at least one test... */ nm_client_new_async (NULL, new_client_cb, &client); @@ -778,7 +792,8 @@ nm_running_changed (GObject *client, static void test_client_nm_running (void) { - NMClient *client1, *client2; + gs_unref_object NMClient *client1 = NULL; + gs_unref_object NMClient *client2 = NULL; guint quit_id; int running_changed = 0; GError *error = NULL; @@ -801,6 +816,9 @@ test_client_nm_running (void) /* Now start the test service. */ sinfo = nmtstc_service_init (); + if (!nmtstc_service_available (sinfo)) + return; + client2 = nm_client_new (NULL, &error); g_assert_no_error (error); @@ -828,9 +846,6 @@ test_client_nm_running (void) g_assert_cmpint (running_changed, ==, 2); g_assert (!nm_client_get_nm_running (client1)); g_source_remove (quit_id); - - g_object_unref (client1); - g_object_unref (client2); } typedef struct { @@ -934,6 +949,9 @@ test_active_connections (void) GError *error = NULL; sinfo = nmtstc_service_init (); + if (!nmtstc_service_available (sinfo)) + return; + client = nm_client_new (NULL, &error); g_assert_no_error (error); @@ -1063,6 +1081,9 @@ test_activate_virtual (void) GError *error = NULL; sinfo = nmtstc_service_init (); + if (!nmtstc_service_available (sinfo)) + return; + client = nm_client_new (NULL, &error); g_assert_no_error (error); @@ -1138,6 +1159,9 @@ test_activate_failed (void) GError *error = NULL; sinfo = nmtstc_service_init (); + if (!nmtstc_service_available (sinfo)) + return; + client = nm_client_new (NULL, &error); g_assert_no_error (error); @@ -1172,6 +1196,9 @@ test_device_connection_compatibility (void) const char *hw_addr2 = "52:54:00:ab:db:24"; sinfo = nmtstc_service_init (); + if (!nmtstc_service_available (sinfo)) + return; + client = nm_client_new (NULL, &error); g_assert_no_error (error); @@ -1345,10 +1372,8 @@ test_connection_invalid (void) FALSE, &path3); - nmtst_main_loop_run (loop, 1000); - connections = nm_client_get_connections (client); g_assert (connections); @@ -1595,4 +1620,3 @@ main (int argc, char **argv) return g_test_run (); } - diff --git a/libnm/tests/test-remote-settings-client.c b/libnm/tests/test-remote-settings-client.c index f6c37e91..45d60c06 100644 --- a/libnm/tests/test-remote-settings-client.c +++ b/libnm/tests/test-remote-settings-client.c @@ -63,6 +63,9 @@ test_add_connection (void) time_t start, now; gboolean done = FALSE; + if (!nmtstc_service_available (sinfo)) + return; + connection = nmtst_create_minimal_connection (TEST_CON_ID, NULL, NM_SETTING_WIRED_SETTING_NAME, NULL); nm_client_add_connection_async (client, @@ -137,6 +140,9 @@ test_make_invisible (void) gboolean has_settings = FALSE; char *path; + if (!nmtstc_service_available (sinfo)) + return; + g_assert (remote != NULL); /* Listen for the remove event when the connection becomes invisible */ @@ -215,6 +221,9 @@ test_make_visible (void) char *path; NMRemoteConnection *new = NULL; + if (!nmtstc_service_available (sinfo)) + return; + g_assert (remote != NULL); /* Wait for the new-connection signal when the connection is visible again */ @@ -304,6 +313,9 @@ test_remove_connection (void) gboolean done = FALSE; char *path; + if (!nmtstc_service_available (sinfo)) + return; + /* Find a connection to delete */ conns = nm_client_get_connections (client); g_assert_cmpint (conns->len, >, 0); @@ -384,6 +396,9 @@ test_add_remove_connection (void) time_t start, now; gboolean done = FALSE; + if (!nmtstc_service_available (sinfo)) + return; + /* This will cause the test server to immediately delete the connection * after creating it. */ @@ -437,6 +452,9 @@ test_add_bad_connection (void) time_t start, now; gboolean done = FALSE; + if (!nmtstc_service_available (sinfo)) + return; + /* The test daemon doesn't support bond connections */ connection = nmtst_create_minimal_connection ("bad connection test", NULL, NM_SETTING_BOND_SETTING_NAME, NULL); @@ -480,6 +498,9 @@ test_save_hostname (void) gboolean done = FALSE; GError *error = NULL; + if (!nmtstc_service_available (sinfo)) + return; + /* test-networkmanager-service.py requires the hostname to contain a '.' */ nm_client_save_hostname (client, "foo", NULL, &error); g_assert_error (error, NM_SETTINGS_ERROR, NM_SETTINGS_ERROR_INVALID_HOSTNAME); diff --git a/libnm/tests/test-secret-agent.c b/libnm/tests/test-secret-agent.c index 77f972f5..746a9e64 100644 --- a/libnm/tests/test-secret-agent.c +++ b/libnm/tests/test-secret-agent.c @@ -247,6 +247,9 @@ test_setup (TestSecretAgentData *sadata, gconstpointer test_data) GError *error = NULL; sadata->sinfo = nmtstc_service_init (); + if (!sadata->sinfo) + return; + sadata->client = nm_client_new (NULL, &error); g_assert_no_error (error); @@ -311,6 +314,9 @@ test_cleanup (TestSecretAgentData *sadata, gconstpointer test_data) GVariant *ret; GError *error = NULL; + if (!sadata->sinfo) + return; + if (sadata->agent) { if (nm_secret_agent_old_get_registered (sadata->agent)) { nm_secret_agent_old_unregister (sadata->agent, NULL, &error); @@ -349,10 +355,9 @@ connection_activated_none_cb (GObject *c, gpointer user_data) { TestSecretAgentData *sadata = user_data; - NMActiveConnection *ac; gs_free_error GError *error = NULL; - ac = nm_client_activate_connection_finish (sadata->client, result, &error); + nm_client_activate_connection_finish (sadata->client, result, &error); g_assert_error (error, NM_AGENT_MANAGER_ERROR, NM_AGENT_MANAGER_ERROR_NO_SECRETS); g_main_loop_quit (sadata->loop); @@ -361,6 +366,9 @@ connection_activated_none_cb (GObject *c, static void test_secret_agent_none (TestSecretAgentData *sadata, gconstpointer test_data) { + if (!nmtstc_service_available (sadata->sinfo)) + return; + nm_client_activate_connection_async (sadata->client, sadata->connection, sadata->device, @@ -406,6 +414,9 @@ connection_activated_no_secrets_cb (GObject *c, static void test_secret_agent_no_secrets (TestSecretAgentData *sadata, gconstpointer test_data) { + if (!nmtstc_service_available (sadata->sinfo)) + return; + g_signal_connect (sadata->agent, "secret-requested", G_CALLBACK (secrets_requested_no_secrets_cb), sadata); @@ -457,6 +468,9 @@ secrets_requested_cancel_cb (TestSecretAgent *agent, static void test_secret_agent_cancel (TestSecretAgentData *sadata, gconstpointer test_data) { + if (!nmtstc_service_available (sadata->sinfo)) + return; + g_signal_connect (sadata->agent, "secret-requested", G_CALLBACK (secrets_requested_cancel_cb), sadata); @@ -511,6 +525,9 @@ secrets_requested_good_cb (TestSecretAgent *agent, static void test_secret_agent_good (TestSecretAgentData *sadata, gconstpointer test_data) { + if (!nmtstc_service_available (sadata->sinfo)) + return; + g_signal_connect (sadata->agent, "secret-requested", G_CALLBACK (secrets_requested_good_cb), sadata); @@ -527,7 +544,6 @@ test_secret_agent_good (TestSecretAgentData *sadata, gconstpointer test_data) g_assert_cmpint (sadata->secrets_requested, ==, 1); } - static void async_init_cb (GObject *object, GAsyncResult *result, gpointer user_data) { @@ -567,7 +583,6 @@ test_secret_agent_nm_not_running (void) g_main_loop_unref (loop); } - static void registered_changed (GObject *object, GParamSpec *pspec, gpointer user_data) { @@ -585,6 +600,9 @@ test_secret_agent_auto_register (void) GError *error = NULL; sinfo = nmtstc_service_init (); + if (!nmtstc_service_available (sinfo)) + return; + loop = g_main_loop_new (NULL, FALSE); agent = test_secret_agent_new (); @@ -612,6 +630,8 @@ test_secret_agent_auto_register (void) /* Restart test service */ sinfo = nmtstc_service_init (); + g_assert (nmtstc_service_available (sinfo)); + g_main_loop_run (loop); g_assert (nm_secret_agent_old_get_registered (agent)); |