diff --git a/tests/hwsim/test_gas.py b/tests/hwsim/test_gas.py index 9a5a91ff3..f1c5f3bd3 100644 --- a/tests/hwsim/test_gas.py +++ b/tests/hwsim/test_gas.py @@ -11,6 +11,7 @@ import binascii import logging logger = logging.getLogger() import re +import struct import hostapd @@ -240,6 +241,66 @@ def test_gas_timeout(dev, apdev): expect_gas_result(dev[0], "TIMEOUT") +MGMT_SUBTYPE_ACTION = 13 +ACTION_CATEG_PUBLIC = 4 + +GAS_INITIAL_REQUEST = 10 +GAS_INITIAL_RESPONSE = 11 +GAS_COMEBACK_REQUEST = 12 +GAS_COMEBACK_RESPONSE = 13 +GAS_ACTIONS = [ GAS_INITIAL_REQUEST, GAS_INITIAL_RESPONSE, + GAS_COMEBACK_REQUEST, GAS_COMEBACK_RESPONSE ] + +def anqp_adv_proto(): + return struct.pack('BBBB', 108, 2, 127, 0) + +def anqp_comeback_resp(dialog_token): + return struct.pack('