Colin Cross | 1a8e797 | 2017-12-05 22:35:52 -0800 | [diff] [blame] | 1 | // AIDL interface between netd and services.core |
Lorenzo Colitti | 57bca9f | 2018-12-11 13:02:05 +0900 | [diff] [blame^] | 2 | aidl_interface { |
| 3 | name: "netd_event_listener_interface", |
| 4 | local_include_dir: "binder", |
| 5 | srcs: [ |
| 6 | "binder/android/net/metrics/INetdEventListener.aidl" |
| 7 | ], |
| 8 | api_dir: "binder/api", |
Colin Cross | 1a8e797 | 2017-12-05 22:35:52 -0800 | [diff] [blame] | 9 | } |
Steven Moreland | 0b7e380 | 2018-03-02 12:41:52 -0800 | [diff] [blame] | 10 | |
Lorenzo Colitti | 57bca9f | 2018-12-11 13:02:05 +0900 | [diff] [blame^] | 11 | |
| 12 | |
Bernie Innocenti | 37ceb53 | 2018-06-11 21:10:44 +0900 | [diff] [blame] | 13 | // These are used in netd_integration_test |
| 14 | // TODO: fold these into a cc_library_static after converting netd/server to Android.bp |
| 15 | filegroup { |
| 16 | name: "netd_integration_test_shared", |
| 17 | srcs: [ |
| 18 | "NetdConstants.cpp", |
| 19 | "InterfaceController.cpp", |
| 20 | "NetlinkCommands.cpp", |
Chenbo Feng | 4958664 | 2018-08-30 18:01:53 -0700 | [diff] [blame] | 21 | "NetlinkListener.cpp", |
Bernie Innocenti | 37ceb53 | 2018-06-11 21:10:44 +0900 | [diff] [blame] | 22 | "XfrmController.cpp", |
Chenbo Feng | 4958664 | 2018-08-30 18:01:53 -0700 | [diff] [blame] | 23 | "TrafficController.cpp", |
Bernie Innocenti | 37ceb53 | 2018-06-11 21:10:44 +0900 | [diff] [blame] | 24 | ], |
| 25 | } |
| 26 | |
Luke Huang | caebcbb | 2018-09-27 20:37:14 +0800 | [diff] [blame] | 27 | aidl_interface { |
| 28 | name: "netd_aidl_interface", |
| 29 | local_include_dir: "binder", |
| 30 | srcs: [ |
Luke Huang | 03074eb | 2018-11-23 17:03:03 +0800 | [diff] [blame] | 31 | "binder/android/net/INetd.aidl", |
| 32 | "binder/android/net/InterfaceConfigurationParcel.aidl", |
Luke Huang | caebcbb | 2018-09-27 20:37:14 +0800 | [diff] [blame] | 33 | "binder/android/net/TetherStatsParcel.aidl", |
Luke Huang | 94658ac | 2018-10-18 19:35:12 +0900 | [diff] [blame] | 34 | "binder/android/net/UidRangeParcel.aidl", |
Luke Huang | caebcbb | 2018-09-27 20:37:14 +0800 | [diff] [blame] | 35 | ], |
| 36 | api_dir: "binder/api", |
Luke Huang | f778204 | 2018-08-08 13:13:04 +0800 | [diff] [blame] | 37 | // NDK doesn't support array now. |
| 38 | backend: { |
| 39 | ndk: { |
| 40 | enabled: false, |
| 41 | }, |
| 42 | }, |
Luke Huang | caebcbb | 2018-09-27 20:37:14 +0800 | [diff] [blame] | 43 | } |
| 44 | |
Bernie Innocenti | 9895179 | 2018-06-26 17:13:44 +0900 | [diff] [blame] | 45 | // Modules common to both netd and netd_unit_test |
| 46 | cc_library_static { |
| 47 | name: "libnetd_server", |
| 48 | defaults: ["netd_defaults"], |
| 49 | include_dirs: [ |
Bernie Innocenti | 9895179 | 2018-06-26 17:13:44 +0900 | [diff] [blame] | 50 | "system/netd/include", |
| 51 | "system/netd/server/binder", |
| 52 | ], |
| 53 | srcs: [ |
| 54 | "BandwidthController.cpp", |
| 55 | "Controllers.cpp", |
Mike Yu | 5ae6154 | 2018-10-19 22:11:43 +0800 | [diff] [blame] | 56 | "Dns64Configuration.cpp", |
Bernie Innocenti | 9895179 | 2018-06-26 17:13:44 +0900 | [diff] [blame] | 57 | "NetdConstants.cpp", |
| 58 | "FirewallController.cpp", |
| 59 | "IdletimerController.cpp", |
| 60 | "InterfaceController.cpp", |
| 61 | "IptablesRestoreController.cpp", |
| 62 | "NFLogListener.cpp", |
| 63 | "NetlinkCommands.cpp", |
| 64 | "NetlinkListener.cpp", |
| 65 | "NetlinkManager.cpp", |
| 66 | "RouteController.cpp", |
| 67 | "SockDiag.cpp", |
| 68 | "StrictController.cpp", |
| 69 | "TcpSocketMonitor.cpp", |
| 70 | "TetherController.cpp", |
| 71 | "TrafficController.cpp", |
| 72 | "UidRanges.cpp", |
| 73 | "WakeupController.cpp", |
| 74 | "XfrmController.cpp", |
Bernie Innocenti | 9895179 | 2018-06-26 17:13:44 +0900 | [diff] [blame] | 75 | ], |
| 76 | shared_libs: [ |
Chenbo Feng | a54aaf5 | 2018-11-07 17:51:51 -0800 | [diff] [blame] | 77 | "libbpf_android", |
Bernie Innocenti | f89b351 | 2018-08-30 07:34:37 +0900 | [diff] [blame] | 78 | "libnetd_resolv", |
Bernie Innocenti | 9895179 | 2018-06-26 17:13:44 +0900 | [diff] [blame] | 79 | "libbase", |
| 80 | "libbinder", |
| 81 | "liblogwrap", |
Chenbo Feng | d6104d1 | 2018-10-16 20:29:29 -0700 | [diff] [blame] | 82 | "libnetdbpf", |
Bernie Innocenti | 9895179 | 2018-06-26 17:13:44 +0900 | [diff] [blame] | 83 | "libnetutils", |
| 84 | "libnetdutils", |
| 85 | "libpcap", |
| 86 | "libqtaguid", |
| 87 | "libssl", |
Luke Huang | 03074eb | 2018-11-23 17:03:03 +0800 | [diff] [blame] | 88 | "netd_aidl_interface-cpp", |
Lorenzo Colitti | 57bca9f | 2018-12-11 13:02:05 +0900 | [diff] [blame^] | 89 | "netd_event_listener_interface-cpp", |
Bernie Innocenti | 9895179 | 2018-06-26 17:13:44 +0900 | [diff] [blame] | 90 | ], |
| 91 | aidl: { |
| 92 | export_aidl_headers: true, |
| 93 | local_include_dirs: ["binder"], |
| 94 | }, |
| 95 | } |
| 96 | |
| 97 | cc_binary { |
| 98 | name: "netd", |
| 99 | defaults: ["netd_defaults"], |
| 100 | include_dirs: [ |
Bernie Innocenti | 9895179 | 2018-06-26 17:13:44 +0900 | [diff] [blame] | 101 | "external/mdnsresponder/mDNSShared", |
| 102 | "system/netd/include", |
| 103 | ], |
| 104 | init_rc: ["netd.rc"], |
| 105 | shared_libs: [ |
| 106 | "android.system.net.netd@1.0", |
| 107 | "android.system.net.netd@1.1", |
Bernie Innocenti | f89b351 | 2018-08-30 07:34:37 +0900 | [diff] [blame] | 108 | "libbase", |
Bernie Innocenti | 9895179 | 2018-06-26 17:13:44 +0900 | [diff] [blame] | 109 | "libbinder", |
Chenbo Feng | a54aaf5 | 2018-11-07 17:51:51 -0800 | [diff] [blame] | 110 | "libbpf_android", |
Bernie Innocenti | 9895179 | 2018-06-26 17:13:44 +0900 | [diff] [blame] | 111 | "libcrypto", |
| 112 | "libcutils", |
| 113 | "libdl", |
| 114 | "libhidlbase", |
| 115 | "libhidltransport", |
| 116 | "liblog", |
| 117 | "liblogwrap", |
| 118 | "libmdnssd", |
Bernie Innocenti | f89b351 | 2018-08-30 07:34:37 +0900 | [diff] [blame] | 119 | "libnetd_resolv", |
Chenbo Feng | d6104d1 | 2018-10-16 20:29:29 -0700 | [diff] [blame] | 120 | "libnetdbpf", |
Bernie Innocenti | 9895179 | 2018-06-26 17:13:44 +0900 | [diff] [blame] | 121 | "libnetdutils", |
Bernie Innocenti | f89b351 | 2018-08-30 07:34:37 +0900 | [diff] [blame] | 122 | "libnetutils", |
Bernie Innocenti | 9895179 | 2018-06-26 17:13:44 +0900 | [diff] [blame] | 123 | "libpcap", |
| 124 | "libqtaguid", |
| 125 | "libselinux", |
Bernie Innocenti | 9895179 | 2018-06-26 17:13:44 +0900 | [diff] [blame] | 126 | "libsysutils", |
Bernie Innocenti | 9895179 | 2018-06-26 17:13:44 +0900 | [diff] [blame] | 127 | "libutils", |
Luke Huang | caebcbb | 2018-09-27 20:37:14 +0800 | [diff] [blame] | 128 | "netd_aidl_interface-cpp", |
Lorenzo Colitti | 57bca9f | 2018-12-11 13:02:05 +0900 | [diff] [blame^] | 129 | "netd_event_listener_interface-cpp", |
Bernie Innocenti | 9895179 | 2018-06-26 17:13:44 +0900 | [diff] [blame] | 130 | ], |
| 131 | static_libs: [ |
| 132 | "libnetd_server", |
Bernie Innocenti | 9895179 | 2018-06-26 17:13:44 +0900 | [diff] [blame] | 133 | ], |
| 134 | srcs: [ |
| 135 | "ClatdController.cpp", |
| 136 | "CommandListener.cpp", |
| 137 | "DnsProxyListener.cpp", |
| 138 | "DummyNetwork.cpp", |
| 139 | "DumpWriter.cpp", |
| 140 | "EventReporter.cpp", |
| 141 | "FwmarkServer.cpp", |
| 142 | "LocalNetwork.cpp", |
| 143 | "MDnsSdListener.cpp", |
| 144 | "NetdCommand.cpp", |
| 145 | "NetdHwService.cpp", |
| 146 | "NetdNativeService.cpp", |
| 147 | "NetlinkHandler.cpp", |
| 148 | "Network.cpp", |
| 149 | "NetworkController.cpp", |
| 150 | "PhysicalNetwork.cpp", |
| 151 | "PppController.cpp", |
| 152 | "Process.cpp", |
| 153 | "ResolverController.cpp", |
| 154 | "VirtualNetwork.cpp", |
| 155 | "main.cpp", |
| 156 | "oem_iptables_hook.cpp", |
| 157 | ], |
| 158 | } |
| 159 | |
| 160 | cc_binary { |
| 161 | name: "ndc", |
| 162 | defaults: ["netd_defaults"], |
| 163 | shared_libs: ["libcutils"], |
| 164 | srcs: ["ndc.cpp"], |
| 165 | } |
| 166 | |
| 167 | cc_test { |
| 168 | name: "netd_unit_test", |
| 169 | defaults: ["netd_defaults"], |
| 170 | test_suites: ["device-tests"], |
| 171 | include_dirs: [ |
| 172 | "system/netd/include", |
| 173 | "system/netd/server/binder", |
| 174 | "system/netd/tests", |
| 175 | "system/core/logwrapper/include", |
| 176 | ], |
| 177 | srcs: [ |
| 178 | "BandwidthControllerTest.cpp", |
| 179 | "ControllersTest.cpp", |
| 180 | "FirewallControllerTest.cpp", |
| 181 | "IdletimerControllerTest.cpp", |
| 182 | "InterfaceControllerTest.cpp", |
| 183 | "IptablesBaseTest.cpp", |
| 184 | "IptablesRestoreControllerTest.cpp", |
| 185 | "NFLogListenerTest.cpp", |
| 186 | "RouteControllerTest.cpp", |
| 187 | "SockDiagTest.cpp", |
| 188 | "StrictControllerTest.cpp", |
| 189 | "TetherControllerTest.cpp", |
| 190 | "TrafficControllerTest.cpp", |
| 191 | "XfrmControllerTest.cpp", |
| 192 | "WakeupControllerTest.cpp", |
| 193 | ], |
| 194 | static_libs: [ |
| 195 | "libgmock", |
| 196 | "libnetd_server", |
| 197 | "libnetd_test_tun_interface", |
Bernie Innocenti | 9895179 | 2018-06-26 17:13:44 +0900 | [diff] [blame] | 198 | ], |
| 199 | shared_libs: [ |
| 200 | "libbase", |
| 201 | "libbinder", |
Chenbo Feng | a54aaf5 | 2018-11-07 17:51:51 -0800 | [diff] [blame] | 202 | "libbpf_android", |
Bernie Innocenti | 9895179 | 2018-06-26 17:13:44 +0900 | [diff] [blame] | 203 | "libcrypto", |
| 204 | "libcutils", |
| 205 | "liblog", |
Chenbo Feng | d6104d1 | 2018-10-16 20:29:29 -0700 | [diff] [blame] | 206 | "libnetdbpf", |
Bernie Innocenti | 9895179 | 2018-06-26 17:13:44 +0900 | [diff] [blame] | 207 | "libnetdutils", |
| 208 | "libnetutils", |
| 209 | "libqtaguid", |
| 210 | "libsysutils", |
| 211 | "libutils", |
Luke Huang | 94658ac | 2018-10-18 19:35:12 +0900 | [diff] [blame] | 212 | "netd_aidl_interface-cpp", |
Lorenzo Colitti | 57bca9f | 2018-12-11 13:02:05 +0900 | [diff] [blame^] | 213 | "netd_event_listener_interface-cpp", |
Bernie Innocenti | 9895179 | 2018-06-26 17:13:44 +0900 | [diff] [blame] | 214 | ], |
| 215 | } |