tree: 5edf9a8f69e49f08a8120b59ad95d8ba40ea8ed6 [path history] [tgz]
  1. bin/
  2. cellular/
  3. cli/
  4. client/
  5. dbus/
  6. dbus_bindings/
  7. dhcp/
  8. doc/
  9. ethernet/
  10. init/
  11. mobile_operator_db/
  12. net/
  13. pppoe/
  14. setuid_restrictions/
  15. setup_wifi/
  16. shims/
  17. supplicant/
  18. test-scripts/
  19. udev/
  20. upstart/
  21. vpn/
  22. wifi/
  23. .gitignore
  24. accessor_interface.h
  25. active_link_monitor.cc
  26. active_link_monitor.h
  27. active_link_monitor_test.cc
  28. adaptor_interfaces.h
  29. arp_client_test_helper.cc
  30. arp_client_test_helper.h
  31. BUILD.gn
  32. callbacks.h
  33. certificate_file.cc
  34. certificate_file.h
  35. certificate_file_test.cc
  36. connection.cc
  37. connection.h
  38. connection_diagnostics.cc
  39. connection_diagnostics.h
  40. connection_diagnostics_test.cc
  41. connection_info.cc
  42. connection_info.h
  43. connection_info_reader.cc
  44. connection_info_reader.h
  45. connection_info_reader_test.cc
  46. connection_info_test.cc
  47. connection_test.cc
  48. control_interface.h
  49. crypto.cc
  50. crypto.h
  51. crypto_test.cc
  52. daemon_task.cc
  53. daemon_task.h
  54. daemon_task_test.cc
  55. data_types.h
  56. default_profile.cc
  57. default_profile.h
  58. default_profile_test.cc
  59. default_service_observer.h
  60. device.cc
  61. device.h
  62. device_claimer.cc
  63. device_claimer.h
  64. device_claimer_test.cc
  65. device_id.cc
  66. device_id.h
  67. device_id_test.cc
  68. device_info.cc
  69. device_info.h
  70. device_info_test.cc
  71. device_stub.h
  72. device_test.cc
  73. dns_client.cc
  74. dns_client.h
  75. dns_client_factory.cc
  76. dns_client_factory.h
  77. dns_client_test.cc
  78. dns_server_tester.cc
  79. dns_server_tester.h
  80. dns_server_tester_test.cc
  81. dns_util.cc
  82. dns_util.h
  83. dns_util_test.cc
  84. eap_credentials.cc
  85. eap_credentials.h
  86. eap_credentials_test.cc
  87. eap_listener.cc
  88. eap_listener.h
  89. eap_listener_test.cc
  90. eap_protocol.h
  91. ephemeral_profile.cc
  92. ephemeral_profile.h
  93. error.cc
  94. error.h
  95. error_test.cc
  96. event_dispatcher.cc
  97. event_dispatcher.h
  98. external_task.cc
  99. external_task.h
  100. external_task_test.cc
  101. fake_store.cc
  102. fake_store.h
  103. file_io.cc
  104. file_io.h
  105. file_reader.cc
  106. file_reader.h
  107. file_reader_test.cc
  108. geolocation_info.cc
  109. geolocation_info.h
  110. HACKING.md
  111. hook_table.cc
  112. hook_table.h
  113. hook_table_test.cc
  114. http_request.cc
  115. http_request.h
  116. http_request_test.cc
  117. http_url.cc
  118. http_url.h
  119. http_url_test.cc
  120. icmp.cc
  121. icmp.h
  122. icmp_session.cc
  123. icmp_session.h
  124. icmp_session_factory.cc
  125. icmp_session_factory.h
  126. icmp_session_test.cc
  127. icmp_test.cc
  128. ip_address_store.cc
  129. ip_address_store.h
  130. ip_address_store_test.cc
  131. ipconfig.cc
  132. ipconfig.h
  133. ipconfig_test.cc
  134. key_file_store.cc
  135. key_file_store.h
  136. key_file_store_test.cc
  137. key_value_store.cc
  138. key_value_store.h
  139. key_value_store_test.cc
  140. link_monitor.cc
  141. link_monitor.h
  142. link_monitor_test.cc
  143. logging.cc
  144. logging.h
  145. manager.cc
  146. manager.h
  147. manager_test.cc
  148. metrics.cc
  149. metrics.h
  150. metrics_test.cc
  151. mock_active_link_monitor.cc
  152. mock_active_link_monitor.h
  153. mock_adaptors.cc
  154. mock_adaptors.h
  155. mock_ares.cc
  156. mock_ares.h
  157. mock_arp_client.cc
  158. mock_arp_client.h
  159. mock_certificate_file.cc
  160. mock_certificate_file.h
  161. mock_connection.cc
  162. mock_connection.h
  163. mock_connection_info_reader.cc
  164. mock_connection_info_reader.h
  165. mock_control.cc
  166. mock_control.h
  167. mock_device.cc
  168. mock_device.h
  169. mock_device_info.cc
  170. mock_device_info.h
  171. mock_dns_client.cc
  172. mock_dns_client.h
  173. mock_dns_client_factory.cc
  174. mock_dns_client_factory.h
  175. mock_eap_credentials.cc
  176. mock_eap_credentials.h
  177. mock_eap_listener.cc
  178. mock_eap_listener.h
  179. mock_event_dispatcher.cc
  180. mock_event_dispatcher.h
  181. mock_external_task.cc
  182. mock_external_task.h
  183. mock_file_io.h
  184. mock_http_request.cc
  185. mock_http_request.h
  186. mock_icmp.cc
  187. mock_icmp.h
  188. mock_icmp_session.cc
  189. mock_icmp_session.h
  190. mock_icmp_session_factory.cc
  191. mock_icmp_session_factory.h
  192. mock_ipconfig.cc
  193. mock_ipconfig.h
  194. mock_link_monitor.cc
  195. mock_link_monitor.h
  196. mock_log.cc
  197. mock_log.h
  198. mock_log_test.cc
  199. mock_manager.cc
  200. mock_manager.h
  201. mock_metrics.cc
  202. mock_metrics.h
  203. mock_passive_link_monitor.cc
  204. mock_passive_link_monitor.h
  205. mock_portal_detector.cc
  206. mock_portal_detector.h
  207. mock_power_manager.cc
  208. mock_power_manager.h
  209. mock_power_manager_proxy.cc
  210. mock_power_manager_proxy.h
  211. mock_ppp_device.cc
  212. mock_ppp_device.h
  213. mock_ppp_device_factory.cc
  214. mock_ppp_device_factory.h
  215. mock_process_manager.cc
  216. mock_process_manager.h
  217. mock_profile.cc
  218. mock_profile.h
  219. mock_resolver.cc
  220. mock_resolver.h
  221. mock_routing_table.cc
  222. mock_routing_table.h
  223. mock_service.cc
  224. mock_service.h
  225. mock_socket_info_reader.cc
  226. mock_socket_info_reader.h
  227. mock_throttler.cc
  228. mock_throttler.h
  229. mock_traffic_monitor.cc
  230. mock_traffic_monitor.h
  231. mock_virtual_device.cc
  232. mock_virtual_device.h
  233. mockable.h
  234. NETLINK_MESSAGES.txt
  235. OWNERS
  236. passive_link_monitor.cc
  237. passive_link_monitor.h
  238. passive_link_monitor_test.cc
  239. portal_detector.cc
  240. portal_detector.h
  241. portal_detector_test.cc
  242. power_manager.cc
  243. power_manager.h
  244. power_manager_proxy_interface.h
  245. power_manager_test.cc
  246. ppp_daemon.cc
  247. ppp_daemon.h
  248. ppp_daemon_test.cc
  249. ppp_device.cc
  250. ppp_device.h
  251. ppp_device_factory.cc
  252. ppp_device_factory.h
  253. ppp_device_test.cc
  254. process_manager.cc
  255. process_manager.h
  256. process_manager_test.cc
  257. profile.cc
  258. profile.h
  259. profile_test.cc
  260. property_accessor.h
  261. property_accessor_test.cc
  262. property_iterator.h
  263. property_store.cc
  264. property_store.h
  265. property_store_test.cc
  266. property_store_test.h
  267. protobuf_lite_streams.cc
  268. protobuf_lite_streams.h
  269. provider_db_unittest.bfd
  270. provider_interface.h
  271. README.md
  272. refptr_types.h
  273. resolver.cc
  274. resolver.h
  275. resolver_test.cc
  276. result_aggregator.cc
  277. result_aggregator.h
  278. result_aggregator_test.cc
  279. routing_policy_entry.cc
  280. routing_policy_entry.h
  281. routing_table.cc
  282. routing_table.h
  283. routing_table_entry.cc
  284. routing_table_entry.h
  285. routing_table_test.cc
  286. rpc_task.cc
  287. rpc_task.h
  288. rpc_task_test.cc
  289. scope_logger.cc
  290. scope_logger.h
  291. scope_logger_test.cc
  292. service.cc
  293. service.h
  294. service_property_change_test.cc
  295. service_property_change_test.h
  296. service_test.cc
  297. service_under_test.cc
  298. service_under_test.h
  299. shill_ares.cc
  300. shill_ares.h
  301. shill_config.cc
  302. shill_config.h
  303. shill_daemon.cc
  304. shill_daemon.h
  305. shill_main.cc
  306. shill_test_config.cc
  307. shill_test_config.h
  308. socket_info.cc
  309. socket_info.h
  310. socket_info_reader.cc
  311. socket_info_reader.h
  312. socket_info_reader_test.cc
  313. socket_info_test.cc
  314. static_ip_parameters.cc
  315. static_ip_parameters.h
  316. static_ip_parameters_test.cc
  317. store_interface.h
  318. stub_storage.h
  319. technology.cc
  320. technology.h
  321. technology_test.cc
  322. test_event_dispatcher.h
  323. testing.h
  324. TESTING.md
  325. testrunner.cc
  326. tethering.cc
  327. tethering.h
  328. throttler.cc
  329. throttler.h
  330. throttler_test.cc
  331. timeout_set.h
  332. timeout_set_test.cc
  333. traffic_monitor.cc
  334. traffic_monitor.h
  335. traffic_monitor_test.cc
  336. virtual_device.cc
  337. virtual_device.h
  338. virtual_device_test.cc
shill/README.md

Shill

Warning: This document is old & has moved. Please update any links:
https://chromium.googlesource.com/chromiumos/platform2/+/HEAD/shill/README.md

Overview

Shill is the connection manager for Chrome OS. It is responsible for such functionality as:

  • Setting up network interfaces to behave as desired, which involves:
    • Acquiring link information from the kernel.
    • Handling different logic for different network interface technologies like WiFi, Ethernet, or cellular.
      • For wireless interfaces, there may be many different “connectivity services” that can be connected to (e.g., different 802.11 ESSs within range of the WiFi adapter).
    • Potentially interacting with separate daemons, like wpa_supplicant for WiFi or 802.1X on Ethernet, or ModemManager for cellular, for technology-specific behavior.
    • Acquiring suitable IP configuration parameters, which may involve using DHCP.
  • Persisting relevant user information, such as previously connected networks and associated credentials.
  • Configuring DNS appropriately on the system.
  • Properly handling multiple connected interfaces, including:
    • Prioritizing connected interfaces in a predictable and intuitive manner.
    • Routing traffic to comply with the interface prioritization and ensuring that traffic always goes out of the right interface(s) (traffic may go through multiple interfaces when virtual interfaces are involved).
  • Providing VPN support for:
    • Third-party Chrome extensions that support the third-party VPN interface
    • Android VPN apps (which is primarily taken care of by 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).
    • Native OpenVPN (a very limited subset; it is recommended that OpenVPN users use an Android VPN app for this) and L2TP/IPsec VPNs.
  • Detecting connectivity issues and trying to determine potential causes.
  • Collecting non-privacy-invasive metrics to allow for a better understanding of user network experience (e.g., which WiFi disconnect reasons are most common? What is the usage of WiFi vs. Ethernet vs. cellular?).

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.

Brief History

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.

Architecture

The overall architecture of Shill is described in the Architecture document.

Subsystem Documentation

D-Bus Interface Specification