Updated June 2021
The Architecture document provides an overview of Shill's architecture.
Shill is the connection manager for Chrome OS. It is responsible for such functionality as:
wpa_supplicantfor WiFi or 802.1X on Ethernet, or ModemManager for cellular, for technology-specific behavior.
patchpanel; Shill‘s main responsibility is to ensure that traffic which doesn’t originate in Android and should go through the VPN is sent to ARC rather than directly out of a physical interface).
In addition, Shill provides a D-Bus service for use by D-Bus clients. One of the largest clients is Chrome, which provides an actual UI for the underlying network functionality provided by Shill. Chrome both drives some part of Shill state (e.g., a user pressing a Connect button for a WiFi network, which causes Chrome to call the Connect D-Bus method) and reads Shill state (e.g., to display the proper network icon and provide accurate and up-to-date network information). Policy-derived network configuration is also applied to Shill through Chrome.
Shill is not the first connection manager that was used on Chrome OS. The first consideration was to use Intel's ConnMan connection manager. Following issues with upstream responsiveness, Chrome OS forked ConnMan into the Flimflam connection manager. A number of remaining issues with the legacy of ConnMan, including a GPL license and a supposedly poor separation of concerns within the project, led to the decision to create a new connection manager and hence Shill was born.
Initially, the intention was for Shill to be D-Bus compatible with Flimflam, allowing for the two to be interchangeable. D-Bus API compatibility with Flimflam is no longer of any interest. Future changes to both the architecture and D-Bus interface of Shill should be made on the basis of suitability to our needs and the maintainability of the project. Ultimately the legacy of ConnMan still lives within Shill to some degree based on that initial decision to design Shill around Flimflam's D-Bus API, and future design decisions must be evaluated with the understanding that the goals and requirements for Shill are not what they were in 2012.
Shill is controlled exclusively via D-Bus, and currently (see also b/172222930), there is no proper Command Line Interface for it. Instead, there are a patchwork of scripts and utilities that can be useful in a pinch.
/usr/local/autotest/cros/scripts/wifi: useful for connecting to WiFi networks. Written in Python, and only available on test images.
connectivity: shell script that dumps Device or Service information. Available on all images.
ff_debug: configures “flimflam” debugging level. See also TESTING docs. Available on all images.
There are a variety of other connectivity-related CLI tools which are useful, even if not directly tied to Shill:
ip6tables: packet filtering utility.
ping: generate ICMP traffic.
traceroute6: tool to track the route taken by IP packets from source to destination.
dig: DNS lookup utility.
Some of these CLI utilities (or wrapper helpers) are also available in crosh. See its
help_advanced output for info.