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