Lines Matching refs:res
42 res = dev[0].request("GET_NETWORK " + str(id) + " proto")
43 if res != "RSN":
44 raise Exception("Unexpected SET_NETWORK/GET_NETWORK conversion for proto: " + res)
48 res = dev[0].request("GET_NETWORK " + str(id) + " key_mgmt")
49 if res != "WPA-PSK":
50 raise Exception("Unexpected SET_NETWORK/GET_NETWORK conversion for key_mgmt: " + res)
54 res = dev[0].request("GET_NETWORK " + str(id) + " auth_alg")
55 if res != "OPEN":
56 raise Exception("Unexpected SET_NETWORK/GET_NETWORK conversion for auth_alg: " + res)
60 res = dev[0].request("GET_NETWORK " + str(id) + " eap")
61 if res != "TLS":
62 raise Exception("Unexpected SET_NETWORK/GET_NETWORK conversion for eap: " + res)
89 res = dev[0].get_network(id, field)
90 if res != value:
91 raise Exception("Unexpected response for '" + field + "': '" + res + "'")
96 res = dev[0].get_network(id, "key_mgmt")
97 if res != value:
109 res = dev[0].get_network(id, field)
110 if res != '"' + value + '"':
111 raise Exception("Unexpected quoted response for '" + field + "': '" + res + "'")
115 res = dev[0].get_network(id, field)
116 if res != value:
117 raise Exception("Unexpected response for '" + field + "': '" + res + "'")
270 res = dev[0].get_network(id, "bssid_ignore")
271 if res != val:
272 raise Exception("Unexpected bssid_ignore value: %s != %s" % (res, val))
274 res = dev[0].get_network(id, "bssid_accept")
275 if res != val:
276 raise Exception("Unexpected bssid_accept value: %s != %s" % (res, val))
315 res = dev[0].request("LIST_NETWORKS")
316 if str(id) in res:
318 res = dev[0].request("LIST_NETWORKS LAST_ID=%d" % (id - 2))
319 if str(id) not in res:
358 res = dev[0].request("DUP_NETWORK {} {} {}".format(src, id, f))
359 if "OK" not in res:
392 …res = dev[0].global_request("DUP_NETWORK {} {} {} {} {}".format(dev[0].ifname, dev[0].ifname, src,…
393 if "OK" not in res:
870 res = dev[2].request("SCAN_RESULTS").splitlines()
871 if "test" not in res[1] or "test" not in res[2]:
873 if apdev[0]['bssid'] not in res[1] and apdev[1]['bssid'] not in res[1]:
875 if apdev[0]['bssid'] not in res[2] and apdev[1]['bssid'] not in res[2]:
1010 res = dev[0].get_capability("eap")
1011 if "TTLS" not in res:
1012 raise Exception("Unexpected GET_CAPABILITY eap response: " + str(res))
1014 res = dev[0].get_capability("pairwise")
1015 if "CCMP" not in res:
1016 raise Exception("Unexpected GET_CAPABILITY pairwise response: " + str(res))
1018 res = dev[0].get_capability("group")
1019 if "CCMP" not in res:
1020 raise Exception("Unexpected GET_CAPABILITY group response: " + str(res))
1022 res = dev[0].get_capability("key_mgmt")
1023 if "WPA-PSK" not in res or "WPA-EAP" not in res:
1024 raise Exception("Unexpected GET_CAPABILITY key_mgmt response: " + str(res))
1026 res = dev[0].get_capability("key_mgmt iftype=STATION")
1027 if "WPA-PSK" not in res or "WPA-EAP" not in res:
1028 raise Exception("Unexpected GET_CAPABILITY key_mgmt iftype=STATION response: " + str(res))
1033 res = dev[0].get_capability("key_mgmt iftype=" + i)
1034 logger.info("GET_CAPABILITY key_mgmt iftype=%s: %s" % (i, res))
1036 res = dev[0].get_capability("proto")
1037 if "WPA" not in res or "RSN" not in res:
1038 raise Exception("Unexpected GET_CAPABILITY proto response: " + str(res))
1040 res = dev[0].get_capability("auth_alg")
1041 if "OPEN" not in res or "SHARED" not in res:
1042 raise Exception("Unexpected GET_CAPABILITY auth_alg response: " + str(res))
1044 res = dev[0].get_capability("modes")
1045 if "IBSS" not in res or "AP" not in res:
1046 raise Exception("Unexpected GET_CAPABILITY modes response: " + str(res))
1048 res = dev[0].get_capability("channels")
1049 if "8" not in res or "36" not in res:
1050 raise Exception("Unexpected GET_CAPABILITY channels response: " + str(res))
1052 res = dev[0].get_capability("freq")
1053 if "2457" not in res or "5180" not in res:
1054 raise Exception("Unexpected GET_CAPABILITY freq response: " + str(res))
1056 res = dev[0].get_capability("tdls")
1057 if "EXTERNAL" not in res[0]:
1058 raise Exception("Unexpected GET_CAPABILITY tdls response: " + str(res))
1060 res = dev[0].get_capability("erp")
1061 if res is None or "ERP" not in res[0]:
1062 raise Exception("Unexpected GET_CAPABILITY erp response: " + str(res))
1065 raise Exception("Unexpected GET_CAPABILITY foo response: " + str(res))
1391 res = dev[0].request(cmd)
1392 if "FAIL" in res:
1394 val, = struct.unpack("@I", binascii.unhexlify(res))
1398 res = dev[0].request(cmd + " nested=1")
1399 if "FAIL" in res:
1401 val, = struct.unpack("@I", binascii.unhexlify(res))
1405 res = dev[0].request(cmd + " nested=0")
1406 if "FAIL" not in res:
1564 res = dev[0].request("GET " + field)
1565 if res == 'FAIL\n':
1566 res = "null"
1567 if res != vals[field]:
1568 print("'{}' != '{}'".format(res, vals[field]))
1862 res = dev[0].request(cmd)
1863 if exp and exp not in res:
1872 res = dev[0].global_request(cmd)
1873 if exp and exp not in res:
1887 res = dev[0].request(cmd)
1888 if exp and exp not in res:
1959 res = s.recv(100).decode()
1960 if "OK" not in res:
2072 res = dev[0].request("BSS CURRENT")
2073 if res != '':
2076 res = dev[0].request("BSS CURRENT")
2077 if bssid not in res:
2134 res = dev[0].request("GET_PREF_FREQ_LIST STATION").strip()
2135 if res != "FAIL":
2136 raise Exception("Unexpected GET_PREF_FREQ_LIST response: " + res)
2139 res = dev[0].request("GET_PREF_FREQ_LIST STATION").strip()
2140 if res != "FAIL":
2141 raise Exception("Unexpected GET_PREF_FREQ_LIST response: " + res)
2144 res = dev[0].request("GET_PREF_FREQ_LIST STATION").strip()
2145 if res != "0":
2146 raise Exception("Unexpected GET_PREF_FREQ_LIST response: " + res)
2149 res = dev[0].request("GET_PREF_FREQ_LIST STATION").strip()
2150 if res != "1,2":
2151 raise Exception("Unexpected GET_PREF_FREQ_LIST response: " + res)
2154 res = dev[0].request("GET_PREF_FREQ_LIST STATION").strip()
2155 if res != "1,2":
2156 raise Exception("Unexpected GET_PREF_FREQ_LIST response: " + res)
2159 res = dev[0].request("GET_PREF_FREQ_LIST STATION").strip()
2160 if res != "1":
2161 raise Exception("Unexpected GET_PREF_FREQ_LIST response: " + res)
2164 res = dev[0].request("GET_PREF_FREQ_LIST STATION").strip()
2165 if res != "1000,1001":
2166 raise Exception("Unexpected GET_PREF_FREQ_LIST response: " + res)
2167 res = dev[0].request("GET_PREF_FREQ_LIST AP").strip()
2168 if res != "1002,1003":
2169 raise Exception("Unexpected GET_PREF_FREQ_LIST response: " + res)
2170 res = dev[0].request("GET_PREF_FREQ_LIST P2P_GO").strip()
2171 if res != "1004,1005":
2172 raise Exception("Unexpected GET_PREF_FREQ_LIST response: " + res)
2173 res = dev[0].request("GET_PREF_FREQ_LIST P2P_CLIENT").strip()
2174 if res != "1006,1007":
2175 raise Exception("Unexpected GET_PREF_FREQ_LIST response: " + res)
2176 res = dev[0].request("GET_PREF_FREQ_LIST IBSS").strip()
2177 if res != "1008,1009":
2178 raise Exception("Unexpected GET_PREF_FREQ_LIST response: " + res)
2179 res = dev[0].request("GET_PREF_FREQ_LIST TDLS").strip()
2180 if res != "1010,1011":
2181 raise Exception("Unexpected GET_PREF_FREQ_LIST response: " + res)
2184 res = dev[0].request("GET_PREF_FREQ_LIST STATION").strip()
2185 logger.info("STATION (without override): " + res)
2190 res = dev[0].global_request("INTERFACE_ADD FOO")
2191 if "FAIL" not in res:
2192 raise Exception("Unexpected result: " + res)