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

Shill

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