mirror of
https://github.com/vanhoefm/fragattacks.git
synced 2024-11-29 02:38:22 -05:00
tests: Add asp_provision method to wpa_supplicant
Add asp_provision method which issues either P2PS PD Request or, if the status is provided, continues the deferred flow by sending follow on PD Request. Signed-off-by: Andrei Otcheretianski <andrei.otcheretianski@intel.com> Reviewed-by: Max Stepanov <Max.Stepanov@intel.com> Reviewed-by: Ilan Peer <ilan.peer@intel.com>
This commit is contained in:
parent
f751368ec3
commit
1a1b015622
@ -1104,3 +1104,16 @@ class WpaSupplicant:
|
|||||||
[name,value] = l.split('=', 1)
|
[name,value] = l.split('=', 1)
|
||||||
vals[name] = value
|
vals[name] = value
|
||||||
return vals
|
return vals
|
||||||
|
|
||||||
|
def asp_provision(self, peer, adv_id, adv_mac, session_id, session_mac,
|
||||||
|
method="1000", info="", status=None):
|
||||||
|
if status is None:
|
||||||
|
cmd = "P2P_ASP_PROVISION"
|
||||||
|
params = "info='%s' method=%s" % (info, method)
|
||||||
|
else:
|
||||||
|
cmd = "P2P_ASP_PROVISION_RESP"
|
||||||
|
params = "status=%d" % status
|
||||||
|
|
||||||
|
if "OK" not in self.global_request("%s %s adv_id=%s adv_mac=%s session=%d session_mac=%s %s" %
|
||||||
|
(cmd, peer, adv_id, adv_mac, session_id, session_mac, params)):
|
||||||
|
raise Exception("%s request failed" % cmd)
|
||||||
|
Loading…
Reference in New Issue
Block a user