• Home
  • Raw
  • Download

Lines Matching +full:localhost +full:- +full:test +full:- +full:mac

3 # Use of this source code is governed by a BSD-style license that can be
68 @param test_name: string name of this test (e.g. 'network_WiFi_TestName').
86 # JetstreamHost assumes ap-daemons are running.
87 # Testbed routers run the testbed-ap profile with no ap-daemons.
88 # TODO(ecgh): crbug.com/757075 Fix testbed-ap JetstreamHost detection.
96 """Linux/mac80211-style WiFi Router support for WiFiTest class.
98 This class implements test methods/steps that communicate with a
100 be pre-configured to enable ssh access and have a mac80211-based
102 and any necessary modules are pre-loaded.
112 HOSTAPD_CONF_FILE_PATTERN = 'hostapd-test-%s.conf'
113 HOSTAPD_LOG_FILE_PATTERN = 'hostapd-test-%s.log'
114 HOSTAPD_STDERR_LOG_FILE_PATTERN = 'hostapd-stderr-test-%s.log'
115 HOSTAPD_CONTROL_INTERFACE_PATTERN = 'hostapd-test-%s.ctrl'
118 MGMT_FRAME_SENDER_LOG_FILE = 'send_management_frame-test.log'
120 PROBE_RESPONSE_FOOTER_FILE = '/tmp/autotest-probe_response_footer'
164 @param test_name string name of this test. Used in SSID creation.
180 object, or to re-establish a good state after a reboot.
195 last_log_line = self.host.run('tail -1 /var/log/messages',
198 # 2014-07-23T17:29:34.961056+00:00 localhost kernel: blah blah blah
209 # hostapd configuration persists throughout the test, subsequent
253 self.host.run("sed -n -e '/%s/,$p' /var/log/messages >%s" %
261 """Reboot this router, and restore it to a known-good state.
312 '%s -dd -t -K %s > %s 2> %s & echo $!' % (
362 early_exit = self.router.run('kill -0 %d' % pid,
392 search_arg = '-f "^%s.*%s"' % (process, instance)
403 'pgrep -l %s' % search_arg,
453 """ Build our unique token by base-<len(self.SUFFIX_LETTERS)> encoding
470 return '_'.join([self._ssid_prefix, unique, salt, suffix])[-32:]
478 The on-board TPM seems to serve as a better generator, so we try to
483 WPA: Not enough entropy in random pool to proceed - reject first
484 4-way handshake
503 want_rng = "tpm-rng"
508 logging.debug("Switching RNGs: %s -> %s", current, want_rng)
509 self.host.run('echo -n "%s" > %s' % (want_rng, self._RNG_CURRENT))
530 interface = self.hostapd_instances[-1].interface
597 """Get the MAC address of the peer interface.
599 @return string MAC address of the peer interface.
732 'bind-interfaces',
733 'log-dhcp',
734 'dhcp-range=%s' % ','.join((server_addr.get_addr_in_block(1),
737 'dhcp-leasefile=%s' % self.dhcpd_leases])
740 self.router.run('dnsmasq --conf-file=%s' % dhcpd_conf_file)
825 """Return the MAC address of an AP in the test.
827 @param ap_num int index of local server to read the MAC address from.
828 @return string MAC address like 00:11:22:33:44:55.
855 """De-configure an AP (will also bring wlan down).
859 @param silent: True if instances should be brought without de-authing
926 result = self.router.run('grep -q "%s" %s' % (pmksa_match, log_file),
952 @param client_mac string containing the mac address of the client to be
956 control_if = self.hostapd_instances[-1].config_dict['ctrl_interface']
957 self.router.run('%s -p%s deauthenticate %s' %
963 @param client_mac string containing the mac address of the client.
964 @param neighbor_list list of strings containing mac addresses of
970 command = ('%s -p%s BSS_TM_REQ %s neighbor=%s,0,0,0,0 pref=1' %
974 return ret.splitlines()[-1]
978 over to test router.
1005 self.router.run('%s -i %s -t %s -c %d' %
1028 @param dest_addr string destination address (DA) MAC address.
1034 command = '%s -i %s -t %s -c %d' % (self.cmd_send_management_frame,
1037 command += ' -s %s' % (ssid_prefix)
1039 command += ' -b %d' % (num_bss)
1041 command += ' -n %d' % (frame_count)
1043 command += ' -d %d' % (delay)
1045 command += ' -a %s' % (dest_addr)
1048 command += ' -f %s' % (self.PROBE_RESPONSE_FOOTER_FILE)
1059 @param client_mac string the MAC address of the client to detect.
1066 result = self.router.run("grep -qi '%s' %s" % (deauth_msg, log_file),
1075 @param client_mac string the MAC address of the client to detect.
1079 coex_msg = ('nl80211: MLME event frame - hexdump(len=.*): '
1084 result = self.router.run("grep -qi '%s' %s" % (coex_msg, log_file),
1090 """Sends a magic packet to the NIC with the given IP and MAC addresses.
1093 @param dest_mac the hardware MAC address of the device
1102 self.host.run('python -uc "import socket, sys;'