mirror of
https://github.com/vanhoefm/fragattacks.git
synced 2025-01-17 18:34:03 -05:00
dbus: Export the peer's device address as a property
This could be useful in some cases. Signed-off-by: Tomasz Bursztyka <tomasz.bursztyka@linux.intel.com>
This commit is contained in:
parent
442adfde3d
commit
c6f356f85b
@ -3274,6 +3274,10 @@ static const struct wpa_dbus_property_desc wpas_dbus_p2p_peer_properties[] = {
|
|||||||
wpas_dbus_getter_p2p_peer_ies,
|
wpas_dbus_getter_p2p_peer_ies,
|
||||||
NULL
|
NULL
|
||||||
},
|
},
|
||||||
|
{ "DeviceAddress", WPAS_DBUS_NEW_IFACE_P2P_PEER, "ay",
|
||||||
|
wpas_dbus_getter_p2p_peer_device_address,
|
||||||
|
NULL
|
||||||
|
},
|
||||||
{ NULL, NULL, NULL, NULL, NULL }
|
{ NULL, NULL, NULL, NULL, NULL }
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -1487,6 +1487,27 @@ dbus_bool_t wpas_dbus_getter_p2p_peer_ies(DBusMessageIter *iter,
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
dbus_bool_t wpas_dbus_getter_p2p_peer_device_address(DBusMessageIter *iter,
|
||||||
|
DBusError *error,
|
||||||
|
void *user_data)
|
||||||
|
{
|
||||||
|
struct peer_handler_args *peer_args = user_data;
|
||||||
|
const struct p2p_peer_info *info;
|
||||||
|
|
||||||
|
info = p2p_get_peer_found(peer_args->wpa_s->global->p2p,
|
||||||
|
peer_args->p2p_device_addr, 0);
|
||||||
|
if (info == NULL) {
|
||||||
|
dbus_set_error(error, DBUS_ERROR_FAILED,
|
||||||
|
"failed to find peer");
|
||||||
|
return FALSE;
|
||||||
|
}
|
||||||
|
|
||||||
|
return wpas_dbus_simple_array_property_getter(
|
||||||
|
iter, DBUS_TYPE_BYTE, (char *) peer_args->p2p_device_addr,
|
||||||
|
ETH_ALEN, error);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* wpas_dbus_getter_persistent_groups - Get array of persistent group objects
|
* wpas_dbus_getter_persistent_groups - Get array of persistent group objects
|
||||||
* @iter: Pointer to incoming dbus message iter
|
* @iter: Pointer to incoming dbus message iter
|
||||||
|
@ -147,6 +147,10 @@ dbus_bool_t wpas_dbus_getter_p2p_peer_ies(DBusMessageIter *iter,
|
|||||||
DBusError *error,
|
DBusError *error,
|
||||||
void *user_data);
|
void *user_data);
|
||||||
|
|
||||||
|
dbus_bool_t wpas_dbus_getter_p2p_peer_device_address(DBusMessageIter *iter,
|
||||||
|
DBusError *error,
|
||||||
|
void *user_data);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* P2P Group properties
|
* P2P Group properties
|
||||||
*/
|
*/
|
||||||
|
Loading…
Reference in New Issue
Block a user