network

package
v0.0.0-...-683b059 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 23, 2022 License: BSD-3-Clause Imports: 21 Imported by: 0

Documentation

Overview

Package network provides general CrOS network goodies.

Package network provides general CrOS network goodies.

Package network provides general CrOS network goodies.

Package network provides general CrOS network goodies.

Index

Constants

View Source
const (
	DBusWPASupplicantInterface = "fi.w1.wpa_supplicant1.Interface"
)

Constants for interacting with wpa_supplicant via dbus.

Variables

This section is empty.

Functions

func BlockShillPortalDetector

func BlockShillPortalDetector(ctx context.Context) error

BlockShillPortalDetector blocks outgoing HTTP and HTTPS packets. When captive portal is checked in this state, it will return the state of "no-connectivity" of captive portal.

func ExecFuncOnChromeOffline

func ExecFuncOnChromeOffline(ctx context.Context, f func(ctx context.Context) error) (result error)

ExecFuncOnChromeOffline disconnect Chrome browser internet connection through iptables. Then it executes given function and reverts it back to the original state.

func Gateway

func Gateway(ctx context.Context, ifname string) (string, error)

Gateway returns IPv4 gateway address of an interface by calling "ip route get 8.8.8.8".

func LockCheckNetworkHook

func LockCheckNetworkHook(ctx context.Context) (unlock func(), e error)

LockCheckNetworkHook prevents the 'check_ethernet' recovery hook (runs on machines in the lab) from interrupting us (e.g., trying to restart shill or forcibly reset the Ethernet device). Use this if your test is going to perform operations that may interrupt the DUT's network connectivity (e.g., restarting shill; configuring non-standard network profiles; suspending the system).

func RunArcConnectivityApp

func RunArcConnectivityApp(ctx context.Context, a *arc.ARC, tconn *chrome.TestConn, url string, useSystemProxy bool, username, password string) (string, error)

RunArcConnectivityApp tests ARC++ app connectivity through the system-proxy Chrome OS daemon using the following steps: - installs a test ARC++ app; - connects to `url` in the app; - clicks on the system-proxy notification which informs the user that system-proxy requires credentials; - enters proxy credentials in the system-proxy dialog; - reads the network request's HTTP response code. In case of success it returns the global proxy. If the app fails to connect to the url or if the test fails, it returns an error. Note: If you require additional network configurations info for your test, please add the info to the ArcConnectivityTest app.

func UnblockShillPortalDetector

func UnblockShillPortalDetector(ctx context.Context) error

UnblockShillPortalDetector unblocks outgoing HTTP and HTTPS packets.

Types

This section is empty.

Directories

Path Synopsis
Package cmd contains the interface for running commands in packages such as iw and ping.
Package cmd contains the interface for running commands in packages such as iw and ping.
Package iface contains utility functions for a network interface.
Package iface contains utility functions for a network interface.
Package ip contains utility functions to wrap around the ip program.
Package ip contains utility functions to wrap around the ip program.
Package iw contains utility functions to wrap around the iw program.
Package iw contains utility functions to wrap around the iw program.
Package netconfig contains the mojo connection to cros_network_config.
Package netconfig contains the mojo connection to cros_network_config.
Package patchpanel interacts with the patchpanel system daemon.
Package patchpanel interacts with the patchpanel system daemon.
Package ping provides a factory to run ping on DUT.
Package ping provides a factory to run ping on DUT.
Package systemproxy contains utility functions to authenticate to the system-proxy daemon.
Package systemproxy contains utility functions to authenticate to the system-proxy daemon.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL