2020-12-23 22:21:36 +01:00
|
|
|
/* SPDX-License-Identifier: GPL-2.0-or-later */
|
2019-09-25 13:13:40 +02:00
|
|
|
/*
|
2019-10-01 09:20:35 +02:00
|
|
|
* Copyright (C) 2018 Red Hat, Inc.
|
2018-05-22 16:25:54 +02:00
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
#include "nm-default.h"
|
|
|
|
|
|
|
|
|
|
#include "nm-device-6lowpan.h"
|
|
|
|
|
|
|
|
|
|
#include "nm-device-private.h"
|
|
|
|
|
#include "settings/nm-settings.h"
|
|
|
|
|
#include "platform/nm-platform.h"
|
|
|
|
|
#include "nm-device-factory.h"
|
|
|
|
|
#include "nm-setting-6lowpan.h"
|
|
|
|
|
#include "nm-utils.h"
|
|
|
|
|
|
2020-11-06 18:22:11 +01:00
|
|
|
#define _NMLOG_DEVICE_TYPE NMDevice6Lowpan
|
2018-05-22 16:25:54 +02:00
|
|
|
#include "nm-device-logging.h"
|
|
|
|
|
|
|
|
|
|
/*****************************************************************************/
|
|
|
|
|
|
|
|
|
|
typedef struct {
|
|
|
|
|
gulong parent_state_id;
|
|
|
|
|
} NMDevice6LowpanPrivate;
|
|
|
|
|
|
|
|
|
|
struct _NMDevice6Lowpan {
|
|
|
|
|
NMDevice parent;
|
|
|
|
|
NMDevice6LowpanPrivate _priv;
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
struct _NMDevice6LowpanClass {
|
|
|
|
|
NMDeviceClass parent;
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
G_DEFINE_TYPE(NMDevice6Lowpan, nm_device_6lowpan, NM_TYPE_DEVICE)
|
|
|
|
|
|
2020-02-14 10:50:25 +01:00
|
|
|
#define NM_DEVICE_6LOWPAN_GET_PRIVATE(self) \
|
|
|
|
|
_NM_GET_PRIVATE(self, NMDevice6Lowpan, NM_IS_DEVICE_6LOWPAN, NMDevice)
|
2018-05-22 16:25:54 +02:00
|
|
|
|
|
|
|
|
/*****************************************************************************/
|
|
|
|
|
|
|
|
|
|
static void
|
|
|
|
|
parent_state_changed(NMDevice * parent,
|
|
|
|
|
NMDeviceState new_state,
|
|
|
|
|
NMDeviceState old_state,
|
|
|
|
|
NMDeviceStateReason reason,
|
|
|
|
|
gpointer user_data)
|
|
|
|
|
{
|
|
|
|
|
NMDevice6Lowpan *self = NM_DEVICE_6LOWPAN(user_data);
|
|
|
|
|
|
|
|
|
|
nm_device_set_unmanaged_by_flags(NM_DEVICE(self),
|
|
|
|
|
NM_UNMANAGED_PARENT,
|
|
|
|
|
!nm_device_get_managed(parent, FALSE),
|
|
|
|
|
reason);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
static void
|
|
|
|
|
parent_changed_notify(NMDevice *device,
|
|
|
|
|
int old_ifindex,
|
|
|
|
|
NMDevice *old_parent,
|
|
|
|
|
int new_ifindex,
|
|
|
|
|
NMDevice *new_parent)
|
|
|
|
|
{
|
|
|
|
|
NMDevice6Lowpan * self = NM_DEVICE_6LOWPAN(device);
|
|
|
|
|
NMDevice6LowpanPrivate *priv = NM_DEVICE_6LOWPAN_GET_PRIVATE(self);
|
|
|
|
|
|
|
|
|
|
NM_DEVICE_CLASS(nm_device_6lowpan_parent_class)
|
|
|
|
|
->parent_changed_notify(device, old_ifindex, old_parent, new_ifindex, new_parent);
|
|
|
|
|
|
|
|
|
|
/* note that @self doesn't have to clear @parent_state_id on dispose,
|
|
|
|
|
* because NMDevice's dispose() will unset the parent, which in turn calls
|
|
|
|
|
* parent_changed_notify(). */
|
|
|
|
|
nm_clear_g_signal_handler(old_parent, &priv->parent_state_id);
|
2020-09-28 16:03:33 +02:00
|
|
|
|
2018-05-22 16:25:54 +02:00
|
|
|
if (new_parent) {
|
|
|
|
|
priv->parent_state_id = g_signal_connect(new_parent,
|
|
|
|
|
NM_DEVICE_STATE_CHANGED,
|
|
|
|
|
G_CALLBACK(parent_state_changed),
|
|
|
|
|
device);
|
2020-09-28 16:03:33 +02:00
|
|
|
|
2018-05-22 16:25:54 +02:00
|
|
|
/* Set parent-dependent unmanaged flag */
|
|
|
|
|
nm_device_set_unmanaged_by_flags(device,
|
|
|
|
|
NM_UNMANAGED_PARENT,
|
|
|
|
|
!nm_device_get_managed(new_parent, FALSE),
|
|
|
|
|
NM_DEVICE_STATE_REASON_PARENT_MANAGED_CHANGED);
|
|
|
|
|
}
|
2020-09-28 16:03:33 +02:00
|
|
|
|
2018-05-22 16:25:54 +02:00
|
|
|
if (new_ifindex > 0) {
|
|
|
|
|
/* Recheck availability now that the parent has changed */
|
|
|
|
|
nm_device_queue_recheck_available(device,
|
|
|
|
|
NM_DEVICE_STATE_REASON_PARENT_CHANGED,
|
|
|
|
|
NM_DEVICE_STATE_REASON_PARENT_CHANGED);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
static gboolean
|
|
|
|
|
create_and_realize(NMDevice * device,
|
|
|
|
|
NMConnection * connection,
|
|
|
|
|
NMDevice * parent,
|
|
|
|
|
const NMPlatformLink **out_plink,
|
|
|
|
|
GError ** error)
|
|
|
|
|
{
|
|
|
|
|
const char * iface = nm_device_get_iface(device);
|
|
|
|
|
NMSetting6Lowpan *s_6lowpan;
|
|
|
|
|
int parent_ifindex;
|
platform: merge NMPlatformError with nm-error
Platform had it's own scheme for reporting errors: NMPlatformError.
Before, NMPlatformError indicated success via zero, negative integer
values are numbers from <errno.h>, and positive integer values are
platform specific codes. This changes now according to nm-error:
success is still zero. Negative values indicate a failure, where the
numeric value is either from <errno.h> or one of our error codes.
The meaning of positive values depends on the functions. Most functions
can only report an error reason (negative) and success (zero). For such
functions, positive values should never be returned (but the caller
should anticipate them).
For some functions, positive values could mean additional information
(but still success). That depends.
This is also what systemd does, except that systemd only returns
(negative) integers from <errno.h>, while we merge our own error codes
into the range of <errno.h>.
The advantage is to get rid of one way how to signal errors. The other
advantage is, that these error codes are compatible with all other
nm-errno values. For example, previously negative values indicated error
codes from <errno.h>, but it did not entail error codes from netlink.
2018-12-22 14:13:05 +01:00
|
|
|
int r;
|
2020-09-28 16:03:33 +02:00
|
|
|
|
2018-09-14 16:01:45 +02:00
|
|
|
s_6lowpan = NM_SETTING_6LOWPAN(nm_connection_get_setting(connection, NM_TYPE_SETTING_6LOWPAN));
|
2018-05-22 16:25:54 +02:00
|
|
|
g_return_val_if_fail(s_6lowpan, FALSE);
|
2020-09-28 16:03:33 +02:00
|
|
|
|
2018-05-22 16:25:54 +02:00
|
|
|
parent_ifindex = parent ? nm_device_get_ifindex(parent) : 0;
|
2020-09-28 16:03:33 +02:00
|
|
|
|
2018-05-22 16:25:54 +02:00
|
|
|
if (parent_ifindex <= 0) {
|
|
|
|
|
g_set_error(error,
|
|
|
|
|
NM_DEVICE_ERROR,
|
|
|
|
|
NM_DEVICE_ERROR_MISSING_DEPENDENCIES,
|
|
|
|
|
"6LoWPAN devices can not be created without a parent interface");
|
|
|
|
|
g_return_val_if_fail(!parent, FALSE);
|
|
|
|
|
return FALSE;
|
|
|
|
|
}
|
2020-09-28 16:03:33 +02:00
|
|
|
|
platform: merge NMPlatformError with nm-error
Platform had it's own scheme for reporting errors: NMPlatformError.
Before, NMPlatformError indicated success via zero, negative integer
values are numbers from <errno.h>, and positive integer values are
platform specific codes. This changes now according to nm-error:
success is still zero. Negative values indicate a failure, where the
numeric value is either from <errno.h> or one of our error codes.
The meaning of positive values depends on the functions. Most functions
can only report an error reason (negative) and success (zero). For such
functions, positive values should never be returned (but the caller
should anticipate them).
For some functions, positive values could mean additional information
(but still success). That depends.
This is also what systemd does, except that systemd only returns
(negative) integers from <errno.h>, while we merge our own error codes
into the range of <errno.h>.
The advantage is to get rid of one way how to signal errors. The other
advantage is, that these error codes are compatible with all other
nm-errno values. For example, previously negative values indicated error
codes from <errno.h>, but it did not entail error codes from netlink.
2018-12-22 14:13:05 +01:00
|
|
|
r = nm_platform_link_6lowpan_add(nm_device_get_platform(device),
|
|
|
|
|
iface,
|
|
|
|
|
parent_ifindex,
|
|
|
|
|
out_plink);
|
|
|
|
|
if (r < 0) {
|
2018-05-22 16:25:54 +02:00
|
|
|
g_set_error(error,
|
|
|
|
|
NM_DEVICE_ERROR,
|
|
|
|
|
NM_DEVICE_ERROR_CREATION_FAILED,
|
|
|
|
|
"Failed to create 6lowpan interface '%s' for '%s': %s",
|
|
|
|
|
iface,
|
|
|
|
|
nm_connection_get_id(connection),
|
platform: merge NMPlatformError with nm-error
Platform had it's own scheme for reporting errors: NMPlatformError.
Before, NMPlatformError indicated success via zero, negative integer
values are numbers from <errno.h>, and positive integer values are
platform specific codes. This changes now according to nm-error:
success is still zero. Negative values indicate a failure, where the
numeric value is either from <errno.h> or one of our error codes.
The meaning of positive values depends on the functions. Most functions
can only report an error reason (negative) and success (zero). For such
functions, positive values should never be returned (but the caller
should anticipate them).
For some functions, positive values could mean additional information
(but still success). That depends.
This is also what systemd does, except that systemd only returns
(negative) integers from <errno.h>, while we merge our own error codes
into the range of <errno.h>.
The advantage is to get rid of one way how to signal errors. The other
advantage is, that these error codes are compatible with all other
nm-errno values. For example, previously negative values indicated error
codes from <errno.h>, but it did not entail error codes from netlink.
2018-12-22 14:13:05 +01:00
|
|
|
nm_strerror(r));
|
2018-05-22 16:25:54 +02:00
|
|
|
return FALSE;
|
|
|
|
|
}
|
2020-09-28 16:03:33 +02:00
|
|
|
|
2018-05-22 16:25:54 +02:00
|
|
|
nm_device_parent_set_ifindex(device, parent_ifindex);
|
2020-09-28 16:03:33 +02:00
|
|
|
|
2018-05-22 16:25:54 +02:00
|
|
|
return TRUE;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
static NMDeviceCapabilities
|
|
|
|
|
get_generic_capabilities(NMDevice *dev)
|
|
|
|
|
{
|
|
|
|
|
return NM_DEVICE_CAP_CARRIER_DETECT | NM_DEVICE_CAP_IS_SOFTWARE;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
static void
|
|
|
|
|
link_changed(NMDevice *device, const NMPlatformLink *pllink)
|
|
|
|
|
{
|
|
|
|
|
NMDevice6Lowpan *self = NM_DEVICE_6LOWPAN(device);
|
|
|
|
|
int parent = 0;
|
|
|
|
|
int ifindex;
|
|
|
|
|
|
|
|
|
|
NM_DEVICE_CLASS(nm_device_6lowpan_parent_class)->link_changed(device, pllink);
|
|
|
|
|
|
|
|
|
|
ifindex = nm_device_get_ifindex(device);
|
|
|
|
|
if (!nm_platform_link_6lowpan_get_properties(nm_device_get_platform(device),
|
|
|
|
|
ifindex,
|
|
|
|
|
&parent)) {
|
|
|
|
|
_LOGW(LOGD_DEVICE, "could not get 6lowpan properties");
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
nm_device_parent_set_ifindex(device, parent);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
static gboolean
|
|
|
|
|
is_available(NMDevice *device, NMDeviceCheckDevAvailableFlags flags)
|
|
|
|
|
{
|
|
|
|
|
if (!nm_device_parent_get_device(device))
|
|
|
|
|
return FALSE;
|
|
|
|
|
return NM_DEVICE_CLASS(nm_device_6lowpan_parent_class)->is_available(device, flags);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
static gboolean
|
|
|
|
|
complete_connection(NMDevice * device,
|
|
|
|
|
NMConnection * connection,
|
|
|
|
|
const char * specific_object,
|
|
|
|
|
NMConnection *const *existing_connections,
|
|
|
|
|
GError ** error)
|
|
|
|
|
{
|
|
|
|
|
NMSetting6Lowpan *s_6lowpan;
|
2020-09-28 16:03:33 +02:00
|
|
|
|
2018-05-22 16:25:54 +02:00
|
|
|
nm_utils_complete_generic(nm_device_get_platform(device),
|
|
|
|
|
connection,
|
|
|
|
|
NM_SETTING_6LOWPAN_SETTING_NAME,
|
|
|
|
|
existing_connections,
|
|
|
|
|
NULL,
|
|
|
|
|
_("6LOWPAN connection"),
|
2020-09-28 16:03:33 +02:00
|
|
|
NULL,
|
2018-05-22 16:25:54 +02:00
|
|
|
NULL,
|
|
|
|
|
TRUE);
|
2020-09-28 16:03:33 +02:00
|
|
|
|
2018-09-14 16:01:45 +02:00
|
|
|
s_6lowpan = NM_SETTING_6LOWPAN(nm_connection_get_setting(connection, NM_TYPE_SETTING_6LOWPAN));
|
2018-05-22 16:25:54 +02:00
|
|
|
if (!s_6lowpan) {
|
|
|
|
|
g_set_error_literal(error,
|
|
|
|
|
NM_DEVICE_ERROR,
|
|
|
|
|
NM_DEVICE_ERROR_INVALID_CONNECTION,
|
|
|
|
|
"A '6lowpan' setting is required.");
|
|
|
|
|
return FALSE;
|
|
|
|
|
}
|
2020-09-28 16:03:33 +02:00
|
|
|
|
2018-05-22 16:25:54 +02:00
|
|
|
/* If there's no 6LoWPAN interface, no parent, and no hardware address in the
|
|
|
|
|
* settings, then there's not enough information to complete the setting.
|
|
|
|
|
*/
|
|
|
|
|
if (!nm_setting_6lowpan_get_parent(s_6lowpan)
|
2018-06-27 22:48:50 +02:00
|
|
|
&& !nm_device_match_parent_hwaddr(device, connection, TRUE)) {
|
2018-05-22 16:25:54 +02:00
|
|
|
g_set_error_literal(
|
|
|
|
|
error,
|
|
|
|
|
NM_DEVICE_ERROR,
|
|
|
|
|
NM_DEVICE_ERROR_INVALID_CONNECTION,
|
|
|
|
|
"The '6lowpan' setting had no interface name, parent, or hardware address.");
|
|
|
|
|
return FALSE;
|
|
|
|
|
}
|
2020-09-28 16:03:33 +02:00
|
|
|
|
2018-05-22 16:25:54 +02:00
|
|
|
return TRUE;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
static void
|
|
|
|
|
update_connection(NMDevice *device, NMConnection *connection)
|
|
|
|
|
{
|
2018-09-14 16:01:45 +02:00
|
|
|
NMSetting6Lowpan *s_6lowpan =
|
|
|
|
|
NM_SETTING_6LOWPAN(nm_connection_get_setting(connection, NM_TYPE_SETTING_6LOWPAN));
|
2020-09-28 16:03:33 +02:00
|
|
|
|
2018-05-22 16:25:54 +02:00
|
|
|
if (!s_6lowpan) {
|
|
|
|
|
s_6lowpan = (NMSetting6Lowpan *) nm_setting_6lowpan_new();
|
|
|
|
|
nm_connection_add_setting(connection, (NMSetting *) s_6lowpan);
|
|
|
|
|
}
|
2020-09-28 16:03:33 +02:00
|
|
|
|
2018-08-17 22:18:17 +02:00
|
|
|
g_object_set(
|
|
|
|
|
s_6lowpan,
|
|
|
|
|
NM_SETTING_6LOWPAN_PARENT,
|
|
|
|
|
nm_device_parent_find_for_connection(device, nm_setting_6lowpan_get_parent(s_6lowpan)),
|
|
|
|
|
NULL);
|
2018-05-22 16:25:54 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/*****************************************************************************/
|
|
|
|
|
|
|
|
|
|
static void
|
|
|
|
|
nm_device_6lowpan_init(NMDevice6Lowpan *self)
|
|
|
|
|
{}
|
|
|
|
|
|
|
|
|
|
static const NMDBusInterfaceInfoExtended interface_info_device_6lowpan = {
|
|
|
|
|
.parent = NM_DEFINE_GDBUS_INTERFACE_INFO_INIT(
|
|
|
|
|
NM_DBUS_INTERFACE_DEVICE_6LOWPAN,
|
|
|
|
|
.properties = NM_DEFINE_GDBUS_PROPERTY_INFOS(
|
|
|
|
|
NM_DEFINE_DBUS_PROPERTY_INFO_EXTENDED_READABLE("HwAddress", "s", NM_DEVICE_HW_ADDRESS),
|
|
|
|
|
NM_DEFINE_DBUS_PROPERTY_INFO_EXTENDED_READABLE("Parent", "o", NM_DEVICE_PARENT), ), ),
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
static void
|
|
|
|
|
nm_device_6lowpan_class_init(NMDevice6LowpanClass *klass)
|
|
|
|
|
{
|
|
|
|
|
NMDBusObjectClass *dbus_object_class = NM_DBUS_OBJECT_CLASS(klass);
|
|
|
|
|
NMDeviceClass * device_class = NM_DEVICE_CLASS(klass);
|
2020-09-28 16:03:33 +02:00
|
|
|
|
2018-05-22 16:25:54 +02:00
|
|
|
dbus_object_class->interface_infos = NM_DBUS_INTERFACE_INFOS(&interface_info_device_6lowpan);
|
2020-09-28 16:03:33 +02:00
|
|
|
|
2018-07-10 09:26:42 +02:00
|
|
|
device_class->connection_type_supported = NM_SETTING_6LOWPAN_SETTING_NAME;
|
2018-06-27 17:00:55 +02:00
|
|
|
device_class->connection_type_check_compatible = NM_SETTING_6LOWPAN_SETTING_NAME;
|
2018-07-10 09:26:42 +02:00
|
|
|
device_class->link_types = NM_DEVICE_DEFINE_LINK_TYPES(NM_LINK_TYPE_6LOWPAN);
|
2020-09-28 16:03:33 +02:00
|
|
|
|
2019-08-22 09:40:45 +02:00
|
|
|
device_class->act_stage1_prepare_set_hwaddr_ethernet = TRUE;
|
2018-05-22 16:25:54 +02:00
|
|
|
device_class->complete_connection = complete_connection;
|
|
|
|
|
device_class->create_and_realize = create_and_realize;
|
|
|
|
|
device_class->get_generic_capabilities = get_generic_capabilities;
|
|
|
|
|
device_class->get_configured_mtu = nm_device_get_configured_mtu_for_wired;
|
|
|
|
|
device_class->link_changed = link_changed;
|
|
|
|
|
device_class->is_available = is_available;
|
|
|
|
|
device_class->parent_changed_notify = parent_changed_notify;
|
|
|
|
|
device_class->update_connection = update_connection;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/*****************************************************************************/
|
|
|
|
|
|
|
|
|
|
#define NM_TYPE_6LOWPAN_DEVICE_FACTORY (nm_6lowpan_device_factory_get_type())
|
|
|
|
|
#define NM_6LOWPAN_DEVICE_FACTORY(obj) \
|
|
|
|
|
(G_TYPE_CHECK_INSTANCE_CAST((obj), NM_TYPE_6LOWPAN_DEVICE_FACTORY, NM6LowpanDeviceFactory))
|
|
|
|
|
|
|
|
|
|
static NMDevice *
|
|
|
|
|
create_device(NMDeviceFactory * factory,
|
|
|
|
|
const char * iface,
|
|
|
|
|
const NMPlatformLink *plink,
|
|
|
|
|
NMConnection * connection,
|
|
|
|
|
gboolean * out_ignore)
|
|
|
|
|
{
|
2020-11-12 15:57:06 +01:00
|
|
|
return g_object_new(NM_TYPE_DEVICE_6LOWPAN,
|
|
|
|
|
NM_DEVICE_IFACE,
|
|
|
|
|
iface,
|
|
|
|
|
NM_DEVICE_TYPE_DESC,
|
|
|
|
|
"6LoWPAN",
|
|
|
|
|
NM_DEVICE_DEVICE_TYPE,
|
|
|
|
|
NM_DEVICE_TYPE_6LOWPAN,
|
|
|
|
|
NM_DEVICE_LINK_TYPE,
|
|
|
|
|
NM_LINK_TYPE_6LOWPAN,
|
|
|
|
|
NULL);
|
2018-05-22 16:25:54 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
static const char *
|
|
|
|
|
get_connection_parent(NMDeviceFactory *factory, NMConnection *connection)
|
|
|
|
|
{
|
|
|
|
|
NMSetting6Lowpan *s_6lowpan;
|
|
|
|
|
|
|
|
|
|
g_return_val_if_fail(nm_connection_is_type(connection, NM_SETTING_6LOWPAN_SETTING_NAME), NULL);
|
|
|
|
|
|
2018-09-14 16:01:45 +02:00
|
|
|
s_6lowpan = NM_SETTING_6LOWPAN(nm_connection_get_setting(connection, NM_TYPE_SETTING_6LOWPAN));
|
2018-05-22 16:25:54 +02:00
|
|
|
g_assert(s_6lowpan);
|
|
|
|
|
|
|
|
|
|
return nm_setting_6lowpan_get_parent(s_6lowpan);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
static char *
|
|
|
|
|
get_connection_iface(NMDeviceFactory *factory, NMConnection *connection, const char *parent_iface)
|
|
|
|
|
{
|
|
|
|
|
NMSetting6Lowpan *s_6lowpan;
|
|
|
|
|
const char * ifname;
|
|
|
|
|
|
|
|
|
|
g_return_val_if_fail(nm_connection_is_type(connection, NM_SETTING_6LOWPAN_SETTING_NAME), NULL);
|
|
|
|
|
|
2018-09-14 16:01:45 +02:00
|
|
|
s_6lowpan = NM_SETTING_6LOWPAN(nm_connection_get_setting(connection, NM_TYPE_SETTING_6LOWPAN));
|
2018-05-22 16:25:54 +02:00
|
|
|
g_assert(s_6lowpan);
|
|
|
|
|
|
|
|
|
|
if (!parent_iface)
|
|
|
|
|
return NULL;
|
|
|
|
|
|
|
|
|
|
ifname = nm_connection_get_interface_name(connection);
|
|
|
|
|
return g_strdup(ifname);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
NM_DEVICE_FACTORY_DEFINE_INTERNAL(
|
|
|
|
|
6LOWPAN,
|
|
|
|
|
6Lowpan,
|
|
|
|
|
6lowpan,
|
|
|
|
|
NM_DEVICE_FACTORY_DECLARE_LINK_TYPES(NM_LINK_TYPE_6LOWPAN)
|
|
|
|
|
NM_DEVICE_FACTORY_DECLARE_SETTING_TYPES(NM_SETTING_6LOWPAN_SETTING_NAME),
|
|
|
|
|
factory_class->create_device = create_device;
|
|
|
|
|
factory_class->get_connection_parent = get_connection_parent;
|
|
|
|
|
factory_class->get_connection_iface = get_connection_iface;);
|