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", |
| 23 | "XfrmController.cpp", |
| 24 | ], |
| 25 | } |
| 26 | |
Steven Moreland | 0b7e380 | 2018-03-02 12:41:52 -0800 | [diff] [blame] | 27 | cc_library { |
| 28 | name: "libnetdaidl", |
Bernie Innocenti | 0c53274 | 2018-06-11 14:12:08 +0900 | [diff] [blame] | 29 | defaults: ["netd_defaults"], |
Steven Moreland | 0b7e380 | 2018-03-02 12:41:52 -0800 | [diff] [blame] | 30 | shared_libs: [ |
| 31 | "libbinder", |
| 32 | "libutils", |
| 33 | ], |
Steven Moreland | 0b7e380 | 2018-03-02 12:41:52 -0800 | [diff] [blame] | 34 | aidl: { |
| 35 | export_aidl_headers: true, |
| 36 | local_include_dirs: ["binder"], |
| 37 | include_dirs: ["frameworks/native/aidl/binder"], |
| 38 | }, |
| 39 | srcs: [ |
Bernie Innocenti | a28c5f2 | 2018-10-01 20:02:21 +0900 | [diff] [blame^] | 40 | ":netd_aidl", |
Steven Moreland | 0b7e380 | 2018-03-02 12:41:52 -0800 | [diff] [blame] | 41 | "binder/android/net/UidRange.cpp", |
| 42 | ], |
Steven Moreland | 0b7e380 | 2018-03-02 12:41:52 -0800 | [diff] [blame] | 43 | export_include_dirs: ["binder"], |
| 44 | } |
Bernie Innocenti | 9895179 | 2018-06-26 17:13:44 +0900 | [diff] [blame] | 45 | |
| 46 | // Modules common to both netd and netd_unit_test |
| 47 | cc_library_static { |
| 48 | name: "libnetd_server", |
| 49 | defaults: ["netd_defaults"], |
| 50 | include_dirs: [ |
Bernie Innocenti | 9895179 | 2018-06-26 17:13:44 +0900 | [diff] [blame] | 51 | "system/netd/include", |
| 52 | "system/netd/server/binder", |
| 53 | ], |
| 54 | srcs: [ |
| 55 | "BandwidthController.cpp", |
| 56 | "Controllers.cpp", |
| 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 | a28c5f2 | 2018-10-01 20:02:21 +0900 | [diff] [blame^] | 75 | ":netd_metrics_aidl", |
Bernie Innocenti | 9895179 | 2018-06-26 17:13:44 +0900 | [diff] [blame] | 76 | ], |
| 77 | shared_libs: [ |
| 78 | "libbpf", |
Bernie Innocenti | f89b351 | 2018-08-30 07:34:37 +0900 | [diff] [blame] | 79 | "libnetd_resolv", |
Bernie Innocenti | 9895179 | 2018-06-26 17:13:44 +0900 | [diff] [blame] | 80 | "libnetdaidl", |
| 81 | "libbase", |
| 82 | "libbinder", |
| 83 | "liblogwrap", |
| 84 | "libnetutils", |
| 85 | "libnetdutils", |
| 86 | "libpcap", |
| 87 | "libqtaguid", |
| 88 | "libssl", |
| 89 | ], |
| 90 | aidl: { |
| 91 | export_aidl_headers: true, |
| 92 | local_include_dirs: ["binder"], |
| 93 | }, |
| 94 | } |
| 95 | |
| 96 | cc_binary { |
| 97 | name: "netd", |
| 98 | defaults: ["netd_defaults"], |
| 99 | include_dirs: [ |
Bernie Innocenti | 9895179 | 2018-06-26 17:13:44 +0900 | [diff] [blame] | 100 | "external/mdnsresponder/mDNSShared", |
| 101 | "system/netd/include", |
| 102 | ], |
| 103 | init_rc: ["netd.rc"], |
| 104 | shared_libs: [ |
| 105 | "android.system.net.netd@1.0", |
| 106 | "android.system.net.netd@1.1", |
Bernie Innocenti | f89b351 | 2018-08-30 07:34:37 +0900 | [diff] [blame] | 107 | "libbase", |
Bernie Innocenti | 9895179 | 2018-06-26 17:13:44 +0900 | [diff] [blame] | 108 | "libbinder", |
| 109 | "libbpf", |
| 110 | "libcrypto", |
| 111 | "libcutils", |
| 112 | "libdl", |
| 113 | "libhidlbase", |
| 114 | "libhidltransport", |
| 115 | "liblog", |
| 116 | "liblogwrap", |
| 117 | "libmdnssd", |
Bernie Innocenti | f89b351 | 2018-08-30 07:34:37 +0900 | [diff] [blame] | 118 | "libnetd_resolv", |
Bernie Innocenti | 9895179 | 2018-06-26 17:13:44 +0900 | [diff] [blame] | 119 | "libnetdaidl", |
Bernie Innocenti | 9895179 | 2018-06-26 17:13:44 +0900 | [diff] [blame] | 120 | "libnetdutils", |
Bernie Innocenti | f89b351 | 2018-08-30 07:34:37 +0900 | [diff] [blame] | 121 | "libnetutils", |
Bernie Innocenti | 9895179 | 2018-06-26 17:13:44 +0900 | [diff] [blame] | 122 | "libpcap", |
| 123 | "libqtaguid", |
| 124 | "libselinux", |
| 125 | "libssl", |
| 126 | "libsysutils", |
Bernie Innocenti | 9895179 | 2018-06-26 17:13:44 +0900 | [diff] [blame] | 127 | "libutils", |
| 128 | ], |
| 129 | static_libs: [ |
| 130 | "libnetd_server", |
| 131 | "libnetddns", |
| 132 | ], |
| 133 | srcs: [ |
| 134 | "ClatdController.cpp", |
| 135 | "CommandListener.cpp", |
| 136 | "DnsProxyListener.cpp", |
| 137 | "DummyNetwork.cpp", |
| 138 | "DumpWriter.cpp", |
| 139 | "EventReporter.cpp", |
| 140 | "FwmarkServer.cpp", |
| 141 | "LocalNetwork.cpp", |
| 142 | "MDnsSdListener.cpp", |
| 143 | "NetdCommand.cpp", |
| 144 | "NetdHwService.cpp", |
| 145 | "NetdNativeService.cpp", |
| 146 | "NetlinkHandler.cpp", |
| 147 | "Network.cpp", |
| 148 | "NetworkController.cpp", |
| 149 | "PhysicalNetwork.cpp", |
| 150 | "PppController.cpp", |
| 151 | "Process.cpp", |
| 152 | "ResolverController.cpp", |
| 153 | "VirtualNetwork.cpp", |
| 154 | "main.cpp", |
| 155 | "oem_iptables_hook.cpp", |
| 156 | ], |
| 157 | } |
| 158 | |
| 159 | cc_binary { |
| 160 | name: "ndc", |
| 161 | defaults: ["netd_defaults"], |
| 162 | shared_libs: ["libcutils"], |
| 163 | srcs: ["ndc.cpp"], |
| 164 | } |
| 165 | |
| 166 | cc_test { |
| 167 | name: "netd_unit_test", |
| 168 | defaults: ["netd_defaults"], |
| 169 | test_suites: ["device-tests"], |
| 170 | include_dirs: [ |
| 171 | "system/netd/include", |
| 172 | "system/netd/server/binder", |
| 173 | "system/netd/tests", |
| 174 | "system/core/logwrapper/include", |
| 175 | ], |
| 176 | srcs: [ |
| 177 | "BandwidthControllerTest.cpp", |
| 178 | "ControllersTest.cpp", |
| 179 | "FirewallControllerTest.cpp", |
| 180 | "IdletimerControllerTest.cpp", |
| 181 | "InterfaceControllerTest.cpp", |
| 182 | "IptablesBaseTest.cpp", |
| 183 | "IptablesRestoreControllerTest.cpp", |
| 184 | "NFLogListenerTest.cpp", |
| 185 | "RouteControllerTest.cpp", |
| 186 | "SockDiagTest.cpp", |
| 187 | "StrictControllerTest.cpp", |
| 188 | "TetherControllerTest.cpp", |
| 189 | "TrafficControllerTest.cpp", |
| 190 | "XfrmControllerTest.cpp", |
| 191 | "WakeupControllerTest.cpp", |
| 192 | ], |
| 193 | static_libs: [ |
| 194 | "libgmock", |
| 195 | "libnetd_server", |
| 196 | "libnetd_test_tun_interface", |
| 197 | "libnetddns", |
| 198 | ], |
| 199 | shared_libs: [ |
| 200 | "libbase", |
| 201 | "libbinder", |
| 202 | "libbpf", |
| 203 | "libcrypto", |
| 204 | "libcutils", |
| 205 | "liblog", |
| 206 | "libnetdaidl", |
| 207 | "libnetdutils", |
| 208 | "libnetutils", |
| 209 | "libqtaguid", |
| 210 | "libsysutils", |
| 211 | "libutils", |
| 212 | ], |
| 213 | } |