tests: P2P SD using per-peer query
Signed-hostap: Jouni Malinen <j@w1.fi>
This commit is contained in:
parent
8fdcca3452
commit
474d209057
1 changed files with 12 additions and 10 deletions
|
@ -62,21 +62,23 @@ def run_sd(dev, dst, query, exp_query=None, fragment=False):
|
|||
|
||||
def test_p2p_service_discovery(dev):
|
||||
"""P2P service discovery"""
|
||||
ev = run_sd(dev, "00:00:00:00:00:00", "02000001")
|
||||
if "0b5f6166706f766572746370c00c000c01" not in ev:
|
||||
raise Exception("Unexpected service discovery response contents (Bonjour)")
|
||||
if "496e7465726e6574" not in ev:
|
||||
raise Exception("Unexpected service discovery response contents (UPnP)")
|
||||
|
||||
def test_p2p_service_discovery_fragmentation(dev):
|
||||
"""P2P service discovery with fragmentation"""
|
||||
ev = run_sd(dev, "00:00:00:00:00:00", "02000001", fragment=True)
|
||||
if not "long response" in ev:
|
||||
for dst in [ "00:00:00:00:00:00", dev[0].p2p_dev_addr() ]:
|
||||
ev = run_sd(dev, dst, "02000001")
|
||||
if "0b5f6166706f766572746370c00c000c01" not in ev:
|
||||
raise Exception("Unexpected service discovery response contents (Bonjour)")
|
||||
if "496e7465726e6574" not in ev:
|
||||
raise Exception("Unexpected service discovery response contents (UPnP)")
|
||||
|
||||
def test_p2p_service_discovery_fragmentation(dev):
|
||||
"""P2P service discovery with fragmentation"""
|
||||
for dst in [ "00:00:00:00:00:00", dev[0].p2p_dev_addr() ]:
|
||||
ev = run_sd(dev, dst, "02000001", fragment=True)
|
||||
if not "long response" in ev:
|
||||
if "0b5f6166706f766572746370c00c000c01" not in ev:
|
||||
raise Exception("Unexpected service discovery response contents (Bonjour)")
|
||||
if "496e7465726e6574" not in ev:
|
||||
raise Exception("Unexpected service discovery response contents (UPnP)")
|
||||
|
||||
def test_p2p_service_discovery_bonjour(dev):
|
||||
"""P2P service discovery (Bonjour)"""
|
||||
ev = run_sd(dev, "00:00:00:00:00:00", "02000101")
|
||||
|
|
Loading…
Reference in a new issue