• Home
  • Raw
  • Download

Lines Matching +full:avahi +full:- +full:utils

3 # Use of this source code is governed by a BSD-style license that can be
20 from autotest_lib.client.common_lib import utils
71 @param enable_avahi: boolean True iff avahi should be started on the router.
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.
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'
165 @param enable_avahi: boolean True iff avahi should be started on the
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
238 self.host.run('start avahi', ignore_status=True)
240 self.host.run('stop avahi', ignore_status=True)
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 $!' % (
326 utils.poll_for_condition(
362 early_exit = self.router.run('kill -0 %d' % pid,
392 search_arg = '-f "^%s.*%s"' % (process, instance)
401 utils.poll_for_condition(
403 'pgrep -l %s' % search_arg,
407 except utils.TimeoutError:
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
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)
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),
956 control_if = self.hostapd_instances[-1].config_dict['ctrl_interface']
957 self.router.run('%s -p%s deauthenticate %s' %
970 command = ('%s -p%s BSS_TM_REQ %s neighbor=%s,0,0,0,0 pref=1' %
974 return ret.splitlines()[-1]
1005 self.router.run('%s -i %s -t %s -c %d' %
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)
1066 result = self.router.run("grep -qi '%s' %s" % (deauth_msg, log_file),
1079 coex_msg = ('nl80211: MLME event frame - hexdump(len=.*): '
1084 result = self.router.run("grep -qi '%s' %s" % (coex_msg, log_file),
1102 self.host.run('python -uc "import socket, sys;'