mirror of
https://github.com/vanhoefm/fragattacks.git
synced 2024-11-28 18:28:23 -05:00
dbus: Add vendor specific information element in peer properties
Make vendor specific information elements (VSIE) available in peer properties, so that VSIE of a specific peer can be retrieved using peer's object path. Signed-off-by: Nishant Chaprana <n.chaprana@samsung.com>
This commit is contained in:
parent
e3523cece4
commit
46efa3dae0
@ -4320,6 +4320,11 @@ static const struct wpa_dbus_property_desc wpas_dbus_p2p_peer_properties[] = {
|
|||||||
NULL,
|
NULL,
|
||||||
NULL
|
NULL
|
||||||
},
|
},
|
||||||
|
{ "VSIE", WPAS_DBUS_NEW_IFACE_P2P_PEER, "ay",
|
||||||
|
wpas_dbus_getter_p2p_peer_vsie,
|
||||||
|
NULL,
|
||||||
|
NULL
|
||||||
|
},
|
||||||
{ NULL, NULL, NULL, NULL, NULL, NULL }
|
{ NULL, NULL, NULL, NULL, NULL, NULL }
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -1916,6 +1916,30 @@ out:
|
|||||||
return success;
|
return success;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
dbus_bool_t wpas_dbus_getter_p2p_peer_vsie(
|
||||||
|
const struct wpa_dbus_property_desc *property_desc,
|
||||||
|
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) {
|
||||||
|
dbus_set_error(error, DBUS_ERROR_FAILED, "failed to find peer");
|
||||||
|
return FALSE;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!info->vendor_elems)
|
||||||
|
return wpas_dbus_simple_array_property_getter(iter,
|
||||||
|
DBUS_TYPE_BYTE,
|
||||||
|
NULL, 0, error);
|
||||||
|
|
||||||
|
return wpas_dbus_simple_array_property_getter(
|
||||||
|
iter, DBUS_TYPE_BYTE, (char *) info->vendor_elems->buf,
|
||||||
|
info->vendor_elems->used, error);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* wpas_dbus_getter_persistent_groups - Get array of persistent group objects
|
* wpas_dbus_getter_persistent_groups - Get array of persistent group objects
|
||||||
|
@ -114,6 +114,7 @@ DECLARE_ACCESSOR(wpas_dbus_getter_p2p_peer_vendor_extension);
|
|||||||
DECLARE_ACCESSOR(wpas_dbus_getter_p2p_peer_ies);
|
DECLARE_ACCESSOR(wpas_dbus_getter_p2p_peer_ies);
|
||||||
DECLARE_ACCESSOR(wpas_dbus_getter_p2p_peer_device_address);
|
DECLARE_ACCESSOR(wpas_dbus_getter_p2p_peer_device_address);
|
||||||
DECLARE_ACCESSOR(wpas_dbus_getter_p2p_peer_groups);
|
DECLARE_ACCESSOR(wpas_dbus_getter_p2p_peer_groups);
|
||||||
|
DECLARE_ACCESSOR(wpas_dbus_getter_p2p_peer_vsie);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* P2P Group properties
|
* P2P Group properties
|
||||||
|
Loading…
Reference in New Issue
Block a user