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