Commit 00e64d13 authored by Benjamin Berg's avatar Benjamin Berg Committed by Thomas Haller

core/devices: Add P2P Wifi device and peer tracking

This only adds the new device type and simple peer list handling.
parent 42e60e32
This diff is collapsed.
......@@ -352,6 +352,7 @@ NM_UTILS_LOOKUP_STR_DEFINE (nmc_device_reason_to_string, NMDeviceStateReason,
NM_UTILS_LOOKUP_ITEM (NM_DEVICE_STATE_REASON_IP_ADDRESS_DUPLICATE, N_("A duplicate IP address was detected")),
NM_UTILS_LOOKUP_ITEM (NM_DEVICE_STATE_REASON_IP_METHOD_UNSUPPORTED, N_("The selected IP method is not supported")),
NM_UTILS_LOOKUP_ITEM (NM_DEVICE_STATE_REASON_SRIOV_CONFIGURATION_FAILED, N_("Failed to configure SR-IOV parameters")),
NM_UTILS_LOOKUP_ITEM (NM_DEVICE_STATE_REASON_PEER_NOT_FOUND, N_("The Wi-Fi P2P peer could not be found")),
)
NM_UTILS_LOOKUP_STR_DEFINE (nm_active_connection_state_reason_to_string, NMActiveConnectionStateReason,
......
......@@ -42,42 +42,43 @@ MKHTML_OPTIONS=--path="$(abs_srcdir)"
content_files = \
$(GENERATED_FILES) \
dbus-org.freedesktop.NetworkManager.AccessPoint.xml \
dbus-org.freedesktop.NetworkManager.AgentManager.xml \
dbus-org.freedesktop.NetworkManager.Connection.Active.xml \
dbus-org.freedesktop.NetworkManager.Device.Team.xml \
dbus-org.freedesktop.NetworkManager.DHCP4Config.xml \
dbus-org.freedesktop.NetworkManager.DHCP6Config.xml \
dbus-org.freedesktop.NetworkManager.Device.Wireless.xml \
dbus-org.freedesktop.NetworkManager.xml \
dbus-org.freedesktop.NetworkManager.VPN.Connection.xml \
dbus-org.freedesktop.NetworkManager.SecretAgent.xml \
dbus-org.freedesktop.NetworkManager.Device.xml \
dbus-org.freedesktop.NetworkManager.VPN.Plugin.xml \
dbus-org.freedesktop.NetworkManager.Device.Adsl.xml \
dbus-org.freedesktop.NetworkManager.Device.Bluetooth.xml \
dbus-org.freedesktop.NetworkManager.Device.Dummy.xml \
dbus-org.freedesktop.NetworkManager.Device.Vxlan.xml \
dbus-org.freedesktop.NetworkManager.Settings.Connection.xml \
dbus-org.freedesktop.NetworkManager.Device.Bond.xml \
dbus-org.freedesktop.NetworkManager.Device.Macvlan.xml \
dbus-org.freedesktop.NetworkManager.Device.Macsec.xml \
dbus-org.freedesktop.NetworkManager.PPP.xml \
dbus-org.freedesktop.NetworkManager.Device.Vlan.xml \
dbus-org.freedesktop.NetworkManager.Device.Adsl.xml \
dbus-org.freedesktop.NetworkManager.AgentManager.xml \
dbus-org.freedesktop.NetworkManager.Device.IPTunnel.xml \
dbus-org.freedesktop.NetworkManager.Device.Tun.xml \
dbus-org.freedesktop.NetworkManager.Device.Bridge.xml \
dbus-org.freedesktop.NetworkManager.Device.OlpcMesh.xml \
dbus-org.freedesktop.NetworkManager.DHCP4Config.xml \
dbus-org.freedesktop.NetworkManager.Device.Dummy.xml \
dbus-org.freedesktop.NetworkManager.Device.Generic.xml \
dbus-org.freedesktop.NetworkManager.Device.IPTunnel.xml \
dbus-org.freedesktop.NetworkManager.Device.Infiniband.xml \
dbus-org.freedesktop.NetworkManager.Device.Macsec.xml \
dbus-org.freedesktop.NetworkManager.Device.Macvlan.xml \
dbus-org.freedesktop.NetworkManager.Device.Modem.xml \
dbus-org.freedesktop.NetworkManager.IP6Config.xml \
dbus-org.freedesktop.NetworkManager.Device.OlpcMesh.xml \
dbus-org.freedesktop.NetworkManager.Device.Statistics.xml \
dbus-org.freedesktop.NetworkManager.Device.Team.xml \
dbus-org.freedesktop.NetworkManager.Device.Tun.xml \
dbus-org.freedesktop.NetworkManager.Device.Veth.xml \
dbus-org.freedesktop.NetworkManager.Settings.xml \
dbus-org.freedesktop.NetworkManager.Device.Wired.xml \
dbus-org.freedesktop.NetworkManager.Device.Vlan.xml \
dbus-org.freedesktop.NetworkManager.Device.Vxlan.xml \
dbus-org.freedesktop.NetworkManager.Device.WireGuard.xml \
dbus-org.freedesktop.NetworkManager.IP4Config.xml \
dbus-org.freedesktop.NetworkManager.Device.Statistics.xml \
dbus-org.freedesktop.NetworkManager.Device.P2PWireless.xml \
dbus-org.freedesktop.NetworkManager.Device.Wired.xml \
dbus-org.freedesktop.NetworkManager.Device.Wireless.xml \
dbus-org.freedesktop.NetworkManager.Device.xml \
dbus-org.freedesktop.NetworkManager.DnsManager.xml \
dbus-org.freedesktop.NetworkManager.IP4Config.xml \
dbus-org.freedesktop.NetworkManager.IP6Config.xml \
dbus-org.freedesktop.NetworkManager.PPP.xml \
dbus-org.freedesktop.NetworkManager.SecretAgent.xml \
dbus-org.freedesktop.NetworkManager.Settings.Connection.xml \
dbus-org.freedesktop.NetworkManager.Settings.xml \
dbus-org.freedesktop.NetworkManager.VPN.Connection.xml \
dbus-org.freedesktop.NetworkManager.VPN.Plugin.xml \
dbus-org.freedesktop.NetworkManager.xml \
$(top_builddir)/libnm-core/nm-dbus-types.xml \
$(top_builddir)/libnm-core/nm-vpn-dbus-types.xml \
$(top_builddir)/man/nmcli.xml \
......
......@@ -206,6 +206,7 @@
<xi:include href="dbus-org.freedesktop.NetworkManager.Device.Vxlan.xml"/>
<xi:include href="dbus-org.freedesktop.NetworkManager.Device.WireGuard.xml"/>
<xi:include href="dbus-org.freedesktop.NetworkManager.Device.Wireless.xml"/>
<xi:include href="dbus-org.freedesktop.NetworkManager.Device.P2PWireless.xml"/>
<xi:include href="dbus-org.freedesktop.NetworkManager.Device.Wpan.xml"/>
<xi:include href="dbus-org.freedesktop.NetworkManager.PPP.xml"/>
</chapter>
......@@ -247,6 +248,12 @@
<xi:include href="dbus-org.freedesktop.NetworkManager.AccessPoint.xml"/>
</chapter>
<chapter id="ref-dbus-p2p-peers">
<title>The <literal>/org/freedesktop/NetworkManager/P2PPeer/*</literal> objects</title>
<!-- TODO: Describe the objects here -->
<xi:include href="dbus-org.freedesktop.NetworkManager.P2PPeer.xml"/>
</chapter>
<chapter id="ref-dbus-checkpoint">
<title>The <literal>/org/freedesktop/NetworkManager/Checkpoint/*</literal> objects</title>
<!-- TODO: Describe the objects here -->
......
......@@ -23,6 +23,7 @@ ifaces = [
'org.freedesktop.NetworkManager.Device.OvsInterface',
'org.freedesktop.NetworkManager.Device.OvsPort',
'org.freedesktop.NetworkManager.Device.OvsBridge',
'org.freedesktop.NetworkManager.Device.P2PWireless',
'org.freedesktop.NetworkManager.Device.Ppp',
'org.freedesktop.NetworkManager.Device.Statistics',
'org.freedesktop.NetworkManager.Device.Team',
......@@ -42,6 +43,7 @@ ifaces = [
'org.freedesktop.NetworkManager.IP4Config',
'org.freedesktop.NetworkManager.IP6Config',
'org.freedesktop.NetworkManager',
'org.freedesktop.NetworkManager.P2PPeer',
'org.freedesktop.NetworkManager.PPP',
'org.freedesktop.NetworkManager.SecretAgent',
'org.freedesktop.NetworkManager.Settings.Connection',
......
<?xml version="1.0" encoding="UTF-8"?>
<node name="/">
<!--
org.freedesktop.NetworkManager.Device.P2PWireless:
@short_description: P2P Wi-Fi Device
-->
<interface name="org.freedesktop.NetworkManager.Device.P2PWireless">
<annotation name="org.gtk.GDBus.C.Name" value="Device_P2P_Wifi"/>
<!--
HwAddress:
The active hardware address of the device.
-->
<property name="HwAddress" type="s" access="read"/>
<!--
GroupOwner:
Whether this device is currently the group owner.
-->
<property name="GroupOwner" type="b" access="read"/>
<!--
WFDIEs:
The Wi-Fi Display information elements.
-->
<property name="WFDIEs" type="ay" access="read">
<!-- gdbus-codegen assumes that "ay" means "non-UTF-8 string" and
won't deal with '\0' bytes correctly.
-->
<annotation name="org.gtk.GDBus.C.ForceGVariant" value="1"/>
</property>
<!--
Peers:
List of object paths of peers visible to this p2p wireless device.
-->
<property name="Peers" type="ao" access="read"/>
<!--
PeerAdded:
@peer: The object path of the newly found access point.
Emitted when a new P2P peer is found by the device.
-->
<signal name="PeerAdded">
<arg name="peer" type="o"/>
</signal>
<!--
PeerRemoved:
@peer: The object path of the P2P peer that has disappeared.
Emitted when a P2P peer disappears from view of the device.
-->
<signal name="PeerRemoved">
<arg name="peer" type="o"/>
</signal>
</interface>
</node>
<?xml version="1.0" encoding="UTF-8"?>
<node name="/">
<!--
org.freedesktop.NetworkManager.P2PPeer:
@short_description: P2P Wi-Fi Peer
-->
<interface name="org.freedesktop.NetworkManager.P2PPeer">
<annotation name="org.gtk.GDBus.C.Name" value="P2P_Peer"/>
<!--
Flags:
Flags describing the capabilities of the access point.
Returns: <link linkend="NM80211ApFlags">NM80211ApFlags</link>
-->
<property name="Flags" type="u" access="read"/>
<!--
Manufacturer:
The manufacturer of the P2P peer.
-->
<property name="Manufacturer" type="s" access="read"/>
<!--
Model:
The model of the P2P peer.
-->
<property name="Model" type="s" access="read"/>
<!--
ModelNumber:
The model number of the P2P peer.
-->
<property name="ModelNumber" type="s" access="read"/>
<!--
Serial:
The serial number of the P2P peer.
-->
<property name="Serial" type="s" access="read"/>
<!--
Wfdies:
The Wi-Fi Display Information Elements of the P2P peer.
-->
<property name="WfdIEs" type="ay" access="read"/>
<!--
HwAddress:
The hardware address (BSSID) of the access point.
-->
<property name="HwAddress" type="s" access="read"/>
<!--
Strength:
The current signal quality of the access point, in percent.
-->
<property name="Strength" type="y" access="read"/>
<!--
LastSeen:
The timestamp (in CLOCK_BOOTTIME seconds) for the last time the access
point was found in scan results. A value of -1 means the access point has
never been found in scan results.
-->
<property name="LastSeen" type="i" access="read"/>
</interface>
</node>
......@@ -44,6 +44,7 @@
#define NM_DBUS_INTERFACE_DEVICE_WIRED NM_DBUS_INTERFACE_DEVICE ".Wired"
#define NM_DBUS_INTERFACE_DEVICE_ADSL NM_DBUS_INTERFACE_DEVICE ".Adsl"
#define NM_DBUS_INTERFACE_DEVICE_WIRELESS NM_DBUS_INTERFACE_DEVICE ".Wireless"
#define NM_DBUS_INTERFACE_DEVICE_P2P_WIRELESS NM_DBUS_INTERFACE_DEVICE ".P2PWireless"
#define NM_DBUS_INTERFACE_DEVICE_BLUETOOTH NM_DBUS_INTERFACE_DEVICE ".Bluetooth"
#define NM_DBUS_INTERFACE_DEVICE_OLPC_MESH NM_DBUS_INTERFACE_DEVICE ".OlpcMesh"
#define NM_DBUS_INTERFACE_DEVICE_OVS_INTERFACE NM_DBUS_INTERFACE_DEVICE ".OvsInterface"
......@@ -51,6 +52,8 @@
#define NM_DBUS_INTERFACE_DEVICE_OVS_BRIDGE NM_DBUS_INTERFACE_DEVICE ".OvsBridge"
#define NM_DBUS_PATH_ACCESS_POINT NM_DBUS_PATH "/AccessPoint"
#define NM_DBUS_INTERFACE_ACCESS_POINT NM_DBUS_INTERFACE ".AccessPoint"
#define NM_DBUS_PATH_P2P_PEER NM_DBUS_PATH "/P2PPeer"
#define NM_DBUS_INTERFACE_P2P_PEER NM_DBUS_INTERFACE ".P2PPeer"
#define NM_DBUS_INTERFACE_DEVICE_MODEM NM_DBUS_INTERFACE_DEVICE ".Modem"
#define NM_DBUS_INTERFACE_DEVICE_WIMAX NM_DBUS_INTERFACE_DEVICE ".WiMax"
#define NM_DBUS_INTERFACE_WIMAX_NSP NM_DBUS_INTERFACE ".WiMax.Nsp"
......@@ -563,6 +566,7 @@ typedef enum {
* @NM_DEVICE_STATE_REASON_IP_ADDRESS_DUPLICATE: a duplicate IP address was detected
* @NM_DEVICE_STATE_REASON_IP_METHOD_UNSUPPORTED: The selected IP method is not supported
* @NM_DEVICE_STATE_REASON_SRIOV_CONFIGURATION_FAILED: configuration of SR-IOV parameters failed
* @NM_DEVICE_STATE_REASON_PEER_NOT_FOUND: The Wi-Fi P2P peer could not be found
*
* Device state change reason codes
*/
......@@ -634,6 +638,7 @@ typedef enum {
NM_DEVICE_STATE_REASON_IP_ADDRESS_DUPLICATE = 64,
NM_DEVICE_STATE_REASON_IP_METHOD_UNSUPPORTED = 65,
NM_DEVICE_STATE_REASON_SRIOV_CONFIGURATION_FAILED = 66,
NM_DEVICE_STATE_REASON_PEER_NOT_FOUND = 67,
} NMDeviceStateReason;
/**
......
......@@ -742,6 +742,7 @@ NM_UTILS_LOOKUP_STR_DEFINE (nm_device_state_reason_to_str, NMDeviceStateReason,
NM_UTILS_LOOKUP_STR_ITEM (NM_DEVICE_STATE_REASON_IP_ADDRESS_DUPLICATE, "ip-address-duplicate"),
NM_UTILS_LOOKUP_STR_ITEM (NM_DEVICE_STATE_REASON_IP_METHOD_UNSUPPORTED, "ip-method-unsupported"),
NM_UTILS_LOOKUP_STR_ITEM (NM_DEVICE_STATE_REASON_SRIOV_CONFIGURATION_FAILED, "sriov-configuration-failed"),
NM_UTILS_LOOKUP_STR_ITEM (NM_DEVICE_STATE_REASON_PEER_NOT_FOUND, "peer-not-found"),
);
#define reason_to_string_a(reason) NM_UTILS_LOOKUP_STR_A (nm_device_state_reason_to_str, reason)
......
common_sources = files(
'nm-wifi-ap.c',
'nm-wifi-p2p-peer.c',
'nm-wifi-utils.c',
)
sources = common_sources + files(
'nm-wifi-factory.c',
'nm-wifi-common.c',
'nm-device-wifi.c',
'nm-device-olpc-mesh.c',
'nm-device-p2p-wifi.c',
'nm-device-wifi.c',
'nm-wifi-common.c',
'nm-wifi-factory.c',
)
if enable_iwd
......
This diff is collapsed.
/* NetworkManager -- P2P Wi-Fi Device
*
* 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.
*
* (C) Copyright 2018 Red Hat, Inc.
*/
#ifndef __NM_DEVICE_P2P_WIFI_H__
#define __NM_DEVICE_P2P_WIFI_H__
#include "devices/nm-device.h"
#include "supplicant/nm-supplicant-interface.h"
#define NM_TYPE_DEVICE_P2P_WIFI (nm_device_p2p_wifi_get_type ())
#define NM_DEVICE_P2P_WIFI(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), NM_TYPE_DEVICE_P2P_WIFI, NMDeviceP2PWifi))
#define NM_DEVICE_P2P_WIFI_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), NM_TYPE_DEVICE_P2P_WIFI, NMDeviceP2PWifiClass))
#define NM_IS_DEVICE_P2P_WIFI(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), NM_TYPE_DEVICE_P2P_WIFI))
#define NM_IS_DEVICE_P2P_WIFI_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), NM_TYPE_DEVICE_P2P_WIFI))
#define NM_DEVICE_P2P_WIFI_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), NM_TYPE_DEVICE_P2P_WIFI, NMDeviceP2PWifiClass))
#define NM_DEVICE_P2P_WIFI_GROUP_OWNER "group-owner"
#define NM_DEVICE_P2P_WIFI_PEERS "peers"
#define NM_DEVICE_P2P_WIFI_GROUPS "groups"
#define NM_DEVICE_P2P_WIFI_WFDIES "WFDIEs"
#define NM_DEVICE_P2P_WIFI_MGMT_IFACE "mgmt-iface"
typedef struct _NMDeviceP2PWifi NMDeviceP2PWifi;
typedef struct _NMDeviceP2PWifiClass NMDeviceP2PWifiClass;
GType nm_device_p2p_wifi_get_type (void);
NMDevice* nm_device_p2p_wifi_new (NMSupplicantInterface *mgmt_iface,
const char* iface);
NMSupplicantInterface * nm_device_p2p_wifi_get_mgmt_iface (NMDeviceP2PWifi *self);
void nm_device_p2p_wifi_set_mgmt_iface (NMDeviceP2PWifi *self,
NMSupplicantInterface *iface);
void nm_device_p2p_wifi_remove (NMDeviceP2PWifi *self);
#endif /* __NM_DEVICE_P2P_WIFI_H__ */
This diff is collapsed.
/* NetworkManager -- P2P Wi-Fi Peer
*
* 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 (C) 2018 Red Hat, Inc.
*/
#ifndef __NM_WIFI_P2P_PEER_H__
#define __NM_WIFI_P2P_PEER_H__
#include "nm-dbus-object.h"
#include "nm-dbus-interface.h"
#include "nm-connection.h"
#define NM_TYPE_WIFI_P2P_PEER (nm_wifi_p2p_peer_get_type ())
#define NM_WIFI_P2P_PEER(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), NM_TYPE_WIFI_P2P_PEER, NMWifiP2PPeer))
#define NM_WIFI_P2P_PEER_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), NM_TYPE_WIFI_P2P_PEER, NMWifiP2PPeerClass))
#define NM_IS_WIFI_P2P_PEER(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), NM_TYPE_WIFI_P2P_PEER))
#define NM_IS_WIFI_P2P_PEER_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), NM_TYPE_WIFI_P2P_PEER))
#define NM_WIFI_P2P_PEER_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), NM_TYPE_WIFI_P2P_PEER, NMWifiP2PPeerClass))
#define NM_WIFI_P2P_PEER_FLAGS "flags"
#define NM_WIFI_P2P_PEER_NAME "name"
#define NM_WIFI_P2P_PEER_MANUFACTURER "manufacturer"
#define NM_WIFI_P2P_PEER_MODEL "model"
#define NM_WIFI_P2P_PEER_MODEL_NUMBER "model-number"
#define NM_WIFI_P2P_PEER_SERIAL "serial"
#define NM_WIFI_P2P_PEER_WFD_IES "wfd-ies"
#define NM_WIFI_P2P_PEER_GROUPS "groups"
#define NM_WIFI_P2P_PEER_HW_ADDRESS "hw-address"
#define NM_WIFI_P2P_PEER_STRENGTH "strength"
#define NM_WIFI_P2P_PEER_LAST_SEEN "last-seen"
typedef struct {
NMDBusObject parent;
NMDevice *wifi_device;
CList peers_lst;
struct _NMWifiP2PPeerPrivate *_priv;
} NMWifiP2PPeer;
typedef struct _NMWifiP2PPeerClass NMWifiP2PPeerClass;
GType nm_wifi_p2p_peer_get_type (void);
NMWifiP2PPeer * nm_wifi_p2p_peer_new_from_properties (const char *supplicant_path,
GVariant *properties);
gboolean nm_wifi_p2p_peer_update_from_properties (NMWifiP2PPeer *peer,
const char *supplicant_path,
GVariant *properties);
gboolean nm_wifi_p2p_peer_check_compatible (NMWifiP2PPeer *self,
NMConnection *connection);
const char * nm_wifi_p2p_peer_get_supplicant_path (NMWifiP2PPeer *peer);
const char * nm_wifi_p2p_peer_get_name (const NMWifiP2PPeer *peer);
gboolean nm_wifi_p2p_peer_set_name (NMWifiP2PPeer *peer,
const char *name);
const char * nm_wifi_p2p_peer_get_manufacturer (const NMWifiP2PPeer *peer);
gboolean nm_wifi_p2p_peer_set_manufacturer (NMWifiP2PPeer *peer,
const char *manufacturer);
const char * nm_wifi_p2p_peer_get_model (const NMWifiP2PPeer *peer);
gboolean nm_wifi_p2p_peer_set_model (NMWifiP2PPeer *peer,
const char *model);
const char * nm_wifi_p2p_peer_get_model_number (const NMWifiP2PPeer *peer);
gboolean nm_wifi_p2p_peer_set_model_number (NMWifiP2PPeer *peer,
const char *number);
const char * nm_wifi_p2p_peer_get_serial (const NMWifiP2PPeer *peer);
gboolean nm_wifi_p2p_peer_set_serial (NMWifiP2PPeer *peer,
const char *serial);
GBytes * nm_wifi_p2p_peer_get_wfd_ies (const NMWifiP2PPeer *peer);
gboolean nm_wifi_p2p_peer_set_wfd_ies (NMWifiP2PPeer *peer,
GBytes *bytes);
const char *const*nm_wifi_p2p_peer_get_groups (const NMWifiP2PPeer *peer);
const char * nm_wifi_p2p_peer_get_address (const NMWifiP2PPeer *peer);
gboolean nm_wifi_p2p_peer_set_address (NMWifiP2PPeer *peer,
const char *addr);
gint8 nm_wifi_p2p_peer_get_strength (NMWifiP2PPeer *peer);
gboolean nm_wifi_p2p_peer_set_strength (NMWifiP2PPeer *peer,
gint8 strength);
NM80211ApFlags nm_wifi_p2p_peer_get_flags (const NMWifiP2PPeer *self);
const char *nm_wifi_p2p_peer_to_string (const NMWifiP2PPeer *self,
char *str_buf,
gsize buf_len,
gint32 now_s);
const char **nm_wifi_p2p_peers_get_paths (const CList *peers_lst_head);
NMWifiP2PPeer *nm_wifi_p2p_peers_find_first_compatible (const CList *peers_lst_head,
NMConnection *connection);
NMWifiP2PPeer *nm_wifi_p2p_peers_find_by_supplicant_path (const CList *peers_lst_head, const char *path);
NMWifiP2PPeer *nm_wifi_p2p_peer_lookup_for_device (NMDevice *device, const char *exported_path);
#endif /* __NM_WIFI_P2P_PEER_H__ */
......@@ -152,6 +152,7 @@ typedef enum {
NM_LINK_TYPE_WIMAX,
NM_LINK_TYPE_WPAN,
NM_LINK_TYPE_6LOWPAN,
NM_LINK_TYPE_P2P_WIFI,
/* Software types */
NM_LINK_TYPE_BNEP = 0x10000, /* Bluetooth Ethernet emulation */
......
......@@ -84,6 +84,8 @@
send_interface="org.freedesktop.NetworkManager.WiMax.Nsp"/>
<allow send_destination="org.freedesktop.NetworkManager"
send_interface="org.freedesktop.NetworkManager.AccessPoint"/>
<allow send_destination="org.freedesktop.NetworkManager"
send_interface="org.freedesktop.NetworkManager.P2PPeer"/>
<!-- Devices (read-only, no security required) -->
<allow send_destination="org.freedesktop.NetworkManager"
......@@ -92,6 +94,8 @@
<!-- Devices (read/write, secured with PolicyKit) -->
<allow send_destination="org.freedesktop.NetworkManager"
send_interface="org.freedesktop.NetworkManager.Device.Wireless"/>
<allow send_destination="org.freedesktop.NetworkManager"
send_interface="org.freedesktop.NetworkManager.Device.P2PWireless"/>
<allow send_destination="org.freedesktop.NetworkManager"
send_interface="org.freedesktop.NetworkManager.Device"/>
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment