Bob Badour | 4114d1a | 2021-02-12 15:38:42 -0800 | [diff] [blame] | 1 | package { |
| 2 | // See: http://go/android-license-faq |
| 3 | // A large-scale-change added 'default_applicable_licenses' to import |
| 4 | // all of the 'license_kinds' from "system_netd_license" |
| 5 | // to get the below license kinds: |
| 6 | // SPDX-license-identifier-Apache-2.0 |
| 7 | default_applicable_licenses: ["system_netd_license"], |
| 8 | } |
| 9 | |
Jeongik Cha | 62dde9d | 2021-02-04 19:57:47 +0900 | [diff] [blame] | 10 | java_library { |
| 11 | name: "netd_aidl_interface-lateststable-java", |
| 12 | sdk_version: "system_current", |
Jeongik Cha | a29bdc2 | 2021-02-15 19:57:26 +0900 | [diff] [blame] | 13 | min_sdk_version: "29", |
Jeongik Cha | 62dde9d | 2021-02-04 19:57:47 +0900 | [diff] [blame] | 14 | static_libs: [ |
Ken Chen | 95c9d40 | 2021-06-24 23:35:19 +0800 | [diff] [blame] | 15 | "netd_aidl_interface-V7-java", |
Jeongik Cha | 62dde9d | 2021-02-04 19:57:47 +0900 | [diff] [blame] | 16 | ], |
| 17 | apex_available: [ |
| 18 | "//apex_available:platform", // used from services.net |
| 19 | "com.android.bluetooth.updatable", |
| 20 | "com.android.tethering", |
| 21 | "com.android.wifi", |
| 22 | ], |
| 23 | } |
| 24 | |
Jeongik Cha | a158547 | 2021-03-05 21:17:18 +0900 | [diff] [blame] | 25 | cc_library_static { |
| 26 | name: "netd_event_listener_interface-lateststable-ndk_platform", |
| 27 | whole_static_libs: [ |
| 28 | "netd_event_listener_interface-V1-ndk_platform", |
| 29 | ], |
| 30 | apex_available: [ |
| 31 | "com.android.resolv", |
| 32 | ], |
| 33 | min_sdk_version: "29", |
| 34 | } |
| 35 | |
| 36 | cc_library_static { |
| 37 | name: "netd_aidl_interface-lateststable-ndk_platform", |
| 38 | whole_static_libs: [ |
Ken Chen | 95c9d40 | 2021-06-24 23:35:19 +0800 | [diff] [blame] | 39 | "netd_aidl_interface-V7-ndk_platform", |
Jeongik Cha | a158547 | 2021-03-05 21:17:18 +0900 | [diff] [blame] | 40 | ], |
| 41 | apex_available: [ |
| 42 | "com.android.resolv", |
| 43 | ], |
| 44 | min_sdk_version: "29", |
| 45 | } |
| 46 | |
| 47 | cc_library_static { |
| 48 | name: "netd_aidl_interface-lateststable-cpp", |
| 49 | whole_static_libs: [ |
Ken Chen | 95c9d40 | 2021-06-24 23:35:19 +0800 | [diff] [blame] | 50 | "netd_aidl_interface-V7-cpp", |
Jeongik Cha | a158547 | 2021-03-05 21:17:18 +0900 | [diff] [blame] | 51 | ], |
| 52 | } |
| 53 | |
Luke Huang | caebcbb | 2018-09-27 20:37:14 +0800 | [diff] [blame] | 54 | aidl_interface { |
| 55 | name: "netd_aidl_interface", |
| 56 | local_include_dir: "binder", |
| 57 | srcs: [ |
Luke Huang | 03074eb | 2018-11-23 17:03:03 +0800 | [diff] [blame] | 58 | "binder/android/net/INetd.aidl", |
Luke Huang | 528af60 | 2018-08-29 19:06:05 +0800 | [diff] [blame] | 59 | // AIDL interface that callers can implement to receive networking events from netd. |
| 60 | "binder/android/net/INetdUnsolicitedEventListener.aidl", |
Luke Huang | 03074eb | 2018-11-23 17:03:03 +0800 | [diff] [blame] | 61 | "binder/android/net/InterfaceConfigurationParcel.aidl", |
Chiachang Wang | 00fc62f | 2019-12-04 20:38:26 +0800 | [diff] [blame] | 62 | "binder/android/net/MarkMaskParcel.aidl", |
Ken Chen | ab5f347 | 2021-04-04 11:28:06 +0800 | [diff] [blame] | 63 | "binder/android/net/NativeNetworkConfig.aidl", |
| 64 | "binder/android/net/NativeNetworkType.aidl", |
| 65 | "binder/android/net/NativeVpnType.aidl", |
Tyler Wear | fa94a27 | 2019-12-05 15:01:48 -0800 | [diff] [blame] | 66 | "binder/android/net/RouteInfoParcel.aidl", |
Chiachang Wang | 08cb211 | 2019-12-10 09:53:24 +0800 | [diff] [blame] | 67 | "binder/android/net/TetherConfigParcel.aidl", |
Lorenzo Colitti | 182cd3c | 2020-04-04 00:44:01 +0900 | [diff] [blame] | 68 | "binder/android/net/TetherOffloadRuleParcel.aidl", |
Luke Huang | caebcbb | 2018-09-27 20:37:14 +0800 | [diff] [blame] | 69 | "binder/android/net/TetherStatsParcel.aidl", |
Luke Huang | 94658ac | 2018-10-18 19:35:12 +0900 | [diff] [blame] | 70 | "binder/android/net/UidRangeParcel.aidl", |
Ken Chen | d9aa98a | 2021-05-23 14:56:43 +0800 | [diff] [blame] | 71 | // Add new AIDL classes in android.net.netd.aidl to consist with other network modules. |
| 72 | "binder/android/net/netd/aidl/**/*.aidl", |
Luke Huang | caebcbb | 2018-09-27 20:37:14 +0800 | [diff] [blame] | 73 | ], |
Luke Huang | f778204 | 2018-08-08 13:13:04 +0800 | [diff] [blame] | 74 | backend: { |
Xiao Ma | 33d562a | 2018-12-16 16:27:38 +0900 | [diff] [blame] | 75 | cpp: { |
| 76 | gen_log: true, |
| 77 | }, |
Luke Huang | a06ea9c | 2020-04-01 01:17:42 +0800 | [diff] [blame] | 78 | java: { |
Lorenzo Colitti | c3bc584 | 2020-04-28 16:52:21 +0900 | [diff] [blame] | 79 | // TODO: Remove apex_available and restrict visibility to only mainline modules that are |
| 80 | // either outside the system server or use jarjar to rename the generated AIDL classes. |
Luke Huang | a06ea9c | 2020-04-01 01:17:42 +0800 | [diff] [blame] | 81 | apex_available: [ |
Jiyong Park | 973164a | 2020-04-08 14:12:27 +0900 | [diff] [blame] | 82 | "//apex_available:platform", // used from services.net |
Luke Huang | a06ea9c | 2020-04-01 01:17:42 +0800 | [diff] [blame] | 83 | "com.android.bluetooth.updatable", |
Hungming Chen | 47b21a6 | 2020-05-29 19:54:57 +0800 | [diff] [blame] | 84 | "com.android.tethering", |
Luke Huang | 6764931 | 2020-04-01 01:17:42 +0800 | [diff] [blame] | 85 | "com.android.wifi", |
Luke Huang | a06ea9c | 2020-04-01 01:17:42 +0800 | [diff] [blame] | 86 | ], |
Jooyung Han | 6e30c3b | 2020-06-16 01:53:16 +0900 | [diff] [blame] | 87 | // this is part of updatable modules(NetworkStack) which targets 29(Q) |
| 88 | min_sdk_version: "29", |
Luke Huang | a06ea9c | 2020-04-01 01:17:42 +0800 | [diff] [blame] | 89 | }, |
Luke Huang | fb124d6 | 2021-03-30 08:46:30 +0800 | [diff] [blame] | 90 | ndk: { |
| 91 | apex_available: [ |
| 92 | "//apex_available:platform", |
| 93 | ], |
| 94 | // This is necessary for the DnsResovler tests to run in Android Q. |
| 95 | // Soong would recognize this value and produce the Q compatible aidl library. |
| 96 | min_sdk_version: "29", |
| 97 | }, |
Luke Huang | f778204 | 2018-08-08 13:13:04 +0800 | [diff] [blame] | 98 | }, |
Luke Huang | 0068128 | 2019-04-26 12:09:05 +0800 | [diff] [blame] | 99 | versions: [ |
| 100 | "1", |
| 101 | "2", |
Luke Huang | aa98099 | 2020-04-07 16:31:03 +0800 | [diff] [blame] | 102 | "3", |
Lorenzo Colitti | 565a43d | 2020-06-09 12:47:27 +0900 | [diff] [blame] | 103 | "4", |
lucaslin | 0022925 | 2020-12-28 13:23:17 +0800 | [diff] [blame] | 104 | "5", |
Ken Chen | 25b6157 | 2021-05-11 12:50:07 +0800 | [diff] [blame] | 105 | "6", |
Ken Chen | 95c9d40 | 2021-06-24 23:35:19 +0800 | [diff] [blame] | 106 | "7", |
Luke Huang | 0068128 | 2019-04-26 12:09:05 +0800 | [diff] [blame] | 107 | ], |
Luke Huang | caebcbb | 2018-09-27 20:37:14 +0800 | [diff] [blame] | 108 | } |
| 109 | |
Jeongik Cha | 62dde9d | 2021-02-04 19:57:47 +0900 | [diff] [blame] | 110 | java_library { |
| 111 | name: "netd_event_listener_interface-lateststable-java", |
| 112 | sdk_version: "system_current", |
Lorenzo Colitti | 7194f1f | 2021-02-25 22:18:17 +0900 | [diff] [blame] | 113 | min_sdk_version: "29", |
Jeongik Cha | 62dde9d | 2021-02-04 19:57:47 +0900 | [diff] [blame] | 114 | static_libs: [ |
| 115 | "netd_event_listener_interface-V1-java", |
| 116 | ], |
| 117 | apex_available: [ |
| 118 | "//apex_available:platform", |
| 119 | "com.android.bluetooth.updatable", |
| 120 | "com.android.wifi", |
| 121 | "com.android.tethering", |
| 122 | ], |
| 123 | } |
| 124 | |
Luke Huang | 0e5e69d | 2019-03-06 15:42:38 +0800 | [diff] [blame] | 125 | aidl_interface { |
Lorenzo Colitti | c3bc584 | 2020-04-28 16:52:21 +0900 | [diff] [blame] | 126 | name: "netd_event_listener_interface", |
| 127 | local_include_dir: "binder", |
| 128 | srcs: [ |
| 129 | "binder/android/net/metrics/INetdEventListener.aidl", |
| 130 | ], |
| 131 | versions: ["1"], |
| 132 | backend: { |
| 133 | ndk: { |
| 134 | apex_available: [ |
| 135 | "//apex_available:platform", |
| 136 | "com.android.resolv", |
| 137 | ], |
Jooyung Han | 3c22255 | 2020-04-16 18:48:35 +0900 | [diff] [blame] | 138 | min_sdk_version: "29", |
Lorenzo Colitti | c3bc584 | 2020-04-28 16:52:21 +0900 | [diff] [blame] | 139 | }, |
Jiyong Park | 1da1d3a | 2020-09-21 21:38:53 +0900 | [diff] [blame] | 140 | java: { |
| 141 | apex_available: [ |
| 142 | "//apex_available:platform", |
| 143 | "com.android.bluetooth.updatable", |
| 144 | "com.android.wifi", |
lucaslin | afb858b | 2020-12-28 13:24:59 +0800 | [diff] [blame] | 145 | "com.android.tethering", |
Jiyong Park | 1da1d3a | 2020-09-21 21:38:53 +0900 | [diff] [blame] | 146 | ], |
lucaslin | afb858b | 2020-12-28 13:24:59 +0800 | [diff] [blame] | 147 | min_sdk_version: "29", |
Jiyong Park | 1da1d3a | 2020-09-21 21:38:53 +0900 | [diff] [blame] | 148 | }, |
Lorenzo Colitti | c3bc584 | 2020-04-28 16:52:21 +0900 | [diff] [blame] | 149 | }, |
| 150 | } |
| 151 | |
| 152 | aidl_interface { |
Luke Huang | 2ff8b34 | 2019-04-30 15:33:33 +0800 | [diff] [blame] | 153 | // This interface is for OEM calls to netd and vice versa that do not exist in AOSP. |
| 154 | // Those calls cannot be part of INetd.aidl and INetdUnsolicitedEventListener.aidl |
| 155 | // because those interfaces are versioned. |
| 156 | // These interfaces must never be versioned or OEMs will not be able to change them. |
Luke Huang | 0e5e69d | 2019-03-06 15:42:38 +0800 | [diff] [blame] | 157 | name: "oemnetd_aidl_interface", |
Jiyong Park | cfdd338 | 2020-04-13 15:09:35 +0900 | [diff] [blame] | 158 | unstable: true, |
Luke Huang | 0e5e69d | 2019-03-06 15:42:38 +0800 | [diff] [blame] | 159 | local_include_dir: "binder", |
| 160 | srcs: [ |
| 161 | "binder/com/android/internal/net/IOemNetd.aidl", |
Luke Huang | 2ff8b34 | 2019-04-30 15:33:33 +0800 | [diff] [blame] | 162 | "binder/com/android/internal/net/IOemNetdUnsolicitedEventListener.aidl", |
Luke Huang | 0e5e69d | 2019-03-06 15:42:38 +0800 | [diff] [blame] | 163 | ], |
| 164 | } |
| 165 | |
Lorenzo Colitti | c3bc584 | 2020-04-28 16:52:21 +0900 | [diff] [blame] | 166 | // These are used in netd_integration_test |
| 167 | // TODO: fold these into a cc_library_static after converting netd/server to Android.bp |
| 168 | filegroup { |
| 169 | name: "netd_integration_test_shared", |
| 170 | srcs: [ |
| 171 | "NetdConstants.cpp", |
| 172 | "InterfaceController.cpp", |
| 173 | "NetlinkCommands.cpp", |
| 174 | "NetlinkListener.cpp", |
Maciej Żenczykowski | e5bc243 | 2020-06-01 01:24:22 -0700 | [diff] [blame] | 175 | "OffloadUtils.cpp", |
Lorenzo Colitti | c3bc584 | 2020-04-28 16:52:21 +0900 | [diff] [blame] | 176 | "SockDiag.cpp", |
| 177 | "XfrmController.cpp", |
| 178 | "TrafficController.cpp", |
| 179 | ], |
| 180 | } |
| 181 | |
Bernie Innocenti | 9895179 | 2018-06-26 17:13:44 +0900 | [diff] [blame] | 182 | // Modules common to both netd and netd_unit_test |
| 183 | cc_library_static { |
| 184 | name: "libnetd_server", |
| 185 | defaults: ["netd_defaults"], |
| 186 | include_dirs: [ |
Bernie Innocenti | 9895179 | 2018-06-26 17:13:44 +0900 | [diff] [blame] | 187 | "system/netd/include", |
| 188 | "system/netd/server/binder", |
| 189 | ], |
| 190 | srcs: [ |
| 191 | "BandwidthController.cpp", |
Lorenzo Colitti | 7ef8c0f | 2019-01-11 22:34:58 +0900 | [diff] [blame] | 192 | "ClatdController.cpp", |
Bernie Innocenti | 9895179 | 2018-06-26 17:13:44 +0900 | [diff] [blame] | 193 | "Controllers.cpp", |
| 194 | "NetdConstants.cpp", |
| 195 | "FirewallController.cpp", |
| 196 | "IdletimerController.cpp", |
| 197 | "InterfaceController.cpp", |
| 198 | "IptablesRestoreController.cpp", |
| 199 | "NFLogListener.cpp", |
| 200 | "NetlinkCommands.cpp", |
| 201 | "NetlinkListener.cpp", |
| 202 | "NetlinkManager.cpp", |
Maciej Żenczykowski | e5bc243 | 2020-06-01 01:24:22 -0700 | [diff] [blame] | 203 | "OffloadUtils.cpp", |
Bernie Innocenti | 9895179 | 2018-06-26 17:13:44 +0900 | [diff] [blame] | 204 | "RouteController.cpp", |
| 205 | "SockDiag.cpp", |
| 206 | "StrictController.cpp", |
| 207 | "TcpSocketMonitor.cpp", |
| 208 | "TetherController.cpp", |
| 209 | "TrafficController.cpp", |
| 210 | "UidRanges.cpp", |
| 211 | "WakeupController.cpp", |
| 212 | "XfrmController.cpp", |
Bernie Innocenti | 9895179 | 2018-06-26 17:13:44 +0900 | [diff] [blame] | 213 | ], |
| 214 | shared_libs: [ |
Chenbo Feng | a54aaf5 | 2018-11-07 17:51:51 -0800 | [diff] [blame] | 215 | "libbpf_android", |
Bernie Innocenti | 9895179 | 2018-06-26 17:13:44 +0900 | [diff] [blame] | 216 | "libbase", |
| 217 | "libbinder", |
Chenbo Feng | d6104d1 | 2018-10-16 20:29:29 -0700 | [diff] [blame] | 218 | "libnetdbpf", |
Bernie Innocenti | 9895179 | 2018-06-26 17:13:44 +0900 | [diff] [blame] | 219 | "libnetutils", |
| 220 | "libnetdutils", |
| 221 | "libpcap", |
| 222 | "libqtaguid", |
| 223 | "libssl", |
Elliott Hughes | ab68352 | 2020-08-20 15:15:45 -0700 | [diff] [blame] | 224 | "libsysutils", |
Ken Chen | d9aa98a | 2021-05-23 14:56:43 +0800 | [diff] [blame] | 225 | "netd_aidl_interface-V7-cpp", |
Jeongik Cha | 5f72c8f | 2021-01-26 22:35:13 +0900 | [diff] [blame] | 226 | "netd_event_listener_interface-V1-cpp", |
Bernie Innocenti | 9895179 | 2018-06-26 17:13:44 +0900 | [diff] [blame] | 227 | ], |
| 228 | aidl: { |
| 229 | export_aidl_headers: true, |
| 230 | local_include_dirs: ["binder"], |
| 231 | }, |
| 232 | } |
| 233 | |
| 234 | cc_binary { |
| 235 | name: "netd", |
| 236 | defaults: ["netd_defaults"], |
| 237 | include_dirs: [ |
Bernie Innocenti | 9895179 | 2018-06-26 17:13:44 +0900 | [diff] [blame] | 238 | "external/mdnsresponder/mDNSShared", |
| 239 | "system/netd/include", |
| 240 | ], |
| 241 | init_rc: ["netd.rc"], |
Maciej Żenczykowski | f428d6e | 2020-02-19 10:26:35 -0800 | [diff] [blame] | 242 | required: [ |
| 243 | "bpfloader", |
| 244 | "clatd.o", |
| 245 | "netd.o", |
Maciej Żenczykowski | f428d6e | 2020-02-19 10:26:35 -0800 | [diff] [blame] | 246 | ], |
Bernie Innocenti | 9895179 | 2018-06-26 17:13:44 +0900 | [diff] [blame] | 247 | shared_libs: [ |
| 248 | "android.system.net.netd@1.0", |
| 249 | "android.system.net.netd@1.1", |
Bernie Innocenti | f89b351 | 2018-08-30 07:34:37 +0900 | [diff] [blame] | 250 | "libbase", |
Bernie Innocenti | 9895179 | 2018-06-26 17:13:44 +0900 | [diff] [blame] | 251 | "libbinder", |
Chenbo Feng | a54aaf5 | 2018-11-07 17:51:51 -0800 | [diff] [blame] | 252 | "libbpf_android", |
Bernie Innocenti | 9895179 | 2018-06-26 17:13:44 +0900 | [diff] [blame] | 253 | "libcutils", |
| 254 | "libdl", |
| 255 | "libhidlbase", |
Bernie Innocenti | 9895179 | 2018-06-26 17:13:44 +0900 | [diff] [blame] | 256 | "liblog", |
Bernie Innocenti | 9895179 | 2018-06-26 17:13:44 +0900 | [diff] [blame] | 257 | "libmdnssd", |
Jooyung Han | 3e64aa1 | 2019-11-27 15:36:29 +0900 | [diff] [blame] | 258 | "libnetd_resolv", |
Chenbo Feng | d6104d1 | 2018-10-16 20:29:29 -0700 | [diff] [blame] | 259 | "libnetdbpf", |
Bernie Innocenti | 9895179 | 2018-06-26 17:13:44 +0900 | [diff] [blame] | 260 | "libnetdutils", |
Bernie Innocenti | f89b351 | 2018-08-30 07:34:37 +0900 | [diff] [blame] | 261 | "libnetutils", |
Bernie Innocenti | 9895179 | 2018-06-26 17:13:44 +0900 | [diff] [blame] | 262 | "libpcap", |
Suren Baghdasaryan | e072a3c | 2019-01-16 14:36:07 -0800 | [diff] [blame] | 263 | "libprocessgroup", |
Bernie Innocenti | 9895179 | 2018-06-26 17:13:44 +0900 | [diff] [blame] | 264 | "libqtaguid", |
| 265 | "libselinux", |
Bernie Innocenti | 9895179 | 2018-06-26 17:13:44 +0900 | [diff] [blame] | 266 | "libsysutils", |
Bernie Innocenti | 9895179 | 2018-06-26 17:13:44 +0900 | [diff] [blame] | 267 | "libutils", |
Ken Chen | d9aa98a | 2021-05-23 14:56:43 +0800 | [diff] [blame] | 268 | "netd_aidl_interface-V7-cpp", |
Jeongik Cha | 5f72c8f | 2021-01-26 22:35:13 +0900 | [diff] [blame] | 269 | "netd_event_listener_interface-V1-cpp", |
Luke Huang | 0e5e69d | 2019-03-06 15:42:38 +0800 | [diff] [blame] | 270 | "oemnetd_aidl_interface-cpp", |
Bernie Innocenti | 9895179 | 2018-06-26 17:13:44 +0900 | [diff] [blame] | 271 | ], |
| 272 | static_libs: [ |
| 273 | "libnetd_server", |
Bernie Innocenti | 9895179 | 2018-06-26 17:13:44 +0900 | [diff] [blame] | 274 | ], |
| 275 | srcs: [ |
Bernie Innocenti | 9895179 | 2018-06-26 17:13:44 +0900 | [diff] [blame] | 276 | "DummyNetwork.cpp", |
Bernie Innocenti | 9895179 | 2018-06-26 17:13:44 +0900 | [diff] [blame] | 277 | "EventReporter.cpp", |
| 278 | "FwmarkServer.cpp", |
| 279 | "LocalNetwork.cpp", |
| 280 | "MDnsSdListener.cpp", |
| 281 | "NetdCommand.cpp", |
| 282 | "NetdHwService.cpp", |
| 283 | "NetdNativeService.cpp", |
| 284 | "NetlinkHandler.cpp", |
| 285 | "Network.cpp", |
| 286 | "NetworkController.cpp", |
Luke Huang | 0e5e69d | 2019-03-06 15:42:38 +0800 | [diff] [blame] | 287 | "OemNetdListener.cpp", |
Bernie Innocenti | 9895179 | 2018-06-26 17:13:44 +0900 | [diff] [blame] | 288 | "PhysicalNetwork.cpp", |
| 289 | "PppController.cpp", |
| 290 | "Process.cpp", |
Ken Chen | 4e8ef9b | 2021-03-17 01:57:19 +0800 | [diff] [blame] | 291 | "UnreachableNetwork.cpp", |
Bernie Innocenti | 9895179 | 2018-06-26 17:13:44 +0900 | [diff] [blame] | 292 | "VirtualNetwork.cpp", |
| 293 | "main.cpp", |
| 294 | "oem_iptables_hook.cpp", |
| 295 | ], |
Ken Chen | 2e413c3 | 2020-01-13 11:59:53 +0800 | [diff] [blame] | 296 | sanitize: { |
| 297 | cfi: true, |
Ken Chen | 2e413c3 | 2020-01-13 11:59:53 +0800 | [diff] [blame] | 298 | }, |
Bernie Innocenti | 9895179 | 2018-06-26 17:13:44 +0900 | [diff] [blame] | 299 | } |
| 300 | |
| 301 | cc_binary { |
| 302 | name: "ndc", |
| 303 | defaults: ["netd_defaults"], |
Luke Huang | cfd04b2 | 2019-03-18 15:53:21 +0800 | [diff] [blame] | 304 | include_dirs: [ |
| 305 | "system/netd/include", |
| 306 | ], |
| 307 | header_libs: [ |
| 308 | "libnetd_client_headers", |
| 309 | ], |
| 310 | shared_libs: [ |
| 311 | "libbase", |
| 312 | "libnetdutils", |
| 313 | "libnetutils", |
| 314 | "libcutils", |
| 315 | "liblog", |
| 316 | "libutils", |
| 317 | "libbinder", |
Jeongik Cha | 5f72c8f | 2021-01-26 22:35:13 +0900 | [diff] [blame] | 318 | "dnsresolver_aidl_interface-V7-cpp", |
Jiyong Park | dbdd8f0 | 2021-06-04 12:13:29 +0900 | [diff] [blame] | 319 | "netd_aidl_interface-V6-cpp", |
Luke Huang | cfd04b2 | 2019-03-18 15:53:21 +0800 | [diff] [blame] | 320 | ], |
| 321 | srcs: [ |
| 322 | "ndc.cpp", |
| 323 | "UidRanges.cpp", |
| 324 | "NdcDispatcher.cpp", |
| 325 | ], |
Ken Chen | 2e413c3 | 2020-01-13 11:59:53 +0800 | [diff] [blame] | 326 | sanitize: { |
| 327 | cfi: true, |
Evgenii Stepanov | 9e5d65c | 2021-04-02 15:46:24 -0700 | [diff] [blame] | 328 | memtag_heap: true, |
Ken Chen | 2e413c3 | 2020-01-13 11:59:53 +0800 | [diff] [blame] | 329 | }, |
Bernie Innocenti | 9895179 | 2018-06-26 17:13:44 +0900 | [diff] [blame] | 330 | } |
| 331 | |
| 332 | cc_test { |
| 333 | name: "netd_unit_test", |
| 334 | defaults: ["netd_defaults"], |
| 335 | test_suites: ["device-tests"], |
Bernie Innocenti | 83a67ca | 2019-06-19 16:28:05 +0900 | [diff] [blame] | 336 | require_root: true, |
Bernie Innocenti | 9895179 | 2018-06-26 17:13:44 +0900 | [diff] [blame] | 337 | include_dirs: [ |
| 338 | "system/netd/include", |
| 339 | "system/netd/server/binder", |
| 340 | "system/netd/tests", |
Bernie Innocenti | 9895179 | 2018-06-26 17:13:44 +0900 | [diff] [blame] | 341 | ], |
| 342 | srcs: [ |
| 343 | "BandwidthControllerTest.cpp", |
Lorenzo Colitti | 7ef8c0f | 2019-01-11 22:34:58 +0900 | [diff] [blame] | 344 | "ClatdControllerTest.cpp", |
Bernie Innocenti | 9895179 | 2018-06-26 17:13:44 +0900 | [diff] [blame] | 345 | "ControllersTest.cpp", |
| 346 | "FirewallControllerTest.cpp", |
| 347 | "IdletimerControllerTest.cpp", |
| 348 | "InterfaceControllerTest.cpp", |
| 349 | "IptablesBaseTest.cpp", |
| 350 | "IptablesRestoreControllerTest.cpp", |
| 351 | "NFLogListenerTest.cpp", |
Maciej Żenczykowski | eec7208 | 2020-02-04 23:29:41 -0800 | [diff] [blame] | 352 | "OffloadUtilsTest.cpp", |
Bernie Innocenti | 9895179 | 2018-06-26 17:13:44 +0900 | [diff] [blame] | 353 | "RouteControllerTest.cpp", |
| 354 | "SockDiagTest.cpp", |
| 355 | "StrictControllerTest.cpp", |
| 356 | "TetherControllerTest.cpp", |
| 357 | "TrafficControllerTest.cpp", |
| 358 | "XfrmControllerTest.cpp", |
| 359 | "WakeupControllerTest.cpp", |
| 360 | ], |
| 361 | static_libs: [ |
| 362 | "libgmock", |
| 363 | "libnetd_server", |
| 364 | "libnetd_test_tun_interface", |
Lorenzo Colitti | 3f52fae | 2019-06-27 18:46:22 +0900 | [diff] [blame] | 365 | "libqtaguid", |
Ken Chen | d9aa98a | 2021-05-23 14:56:43 +0800 | [diff] [blame] | 366 | "netd_aidl_interface-V7-cpp", |
Jeongik Cha | 5f72c8f | 2021-01-26 22:35:13 +0900 | [diff] [blame] | 367 | "netd_event_listener_interface-V1-cpp", |
Bernie Innocenti | 9895179 | 2018-06-26 17:13:44 +0900 | [diff] [blame] | 368 | ], |
| 369 | shared_libs: [ |
| 370 | "libbase", |
| 371 | "libbinder", |
Chenbo Feng | a54aaf5 | 2018-11-07 17:51:51 -0800 | [diff] [blame] | 372 | "libbpf_android", |
Bernie Innocenti | 9895179 | 2018-06-26 17:13:44 +0900 | [diff] [blame] | 373 | "libcrypto", |
| 374 | "libcutils", |
| 375 | "liblog", |
Chenbo Feng | d6104d1 | 2018-10-16 20:29:29 -0700 | [diff] [blame] | 376 | "libnetdbpf", |
Bernie Innocenti | 9895179 | 2018-06-26 17:13:44 +0900 | [diff] [blame] | 377 | "libnetdutils", |
| 378 | "libnetutils", |
Bernie Innocenti | 9895179 | 2018-06-26 17:13:44 +0900 | [diff] [blame] | 379 | "libsysutils", |
| 380 | "libutils", |
| 381 | ], |
Lorenzo Colitti | 10819c5 | 2020-09-17 21:32:44 +0900 | [diff] [blame] | 382 | // tidy: false, // cuts test build time by almost 1 minute |
Bernie Innocenti | 9895179 | 2018-06-26 17:13:44 +0900 | [diff] [blame] | 383 | } |