blob: 49ecba3915405d2429844ed2f57bac1e880765ca [file] [log] [blame]
// AIDL interface between netd and framework.jar
filegroup {
name: "netd_aidl",
srcs: ["binder/android/net/INetd.aidl"],
path: "binder",
}
// AIDL interface between netd and services.core
filegroup {
name: "netd_metrics_aidl",
srcs: ["binder/android/net/metrics/INetdEventListener.aidl"],
path: "binder",
}
// These are used in netd_integration_test
// TODO: fold these into a cc_library_static after converting netd/server to Android.bp
filegroup {
name: "netd_integration_test_shared",
srcs: [
"NetdConstants.cpp",
"InterfaceController.cpp",
"NetlinkCommands.cpp",
"NetlinkListener.cpp",
"XfrmController.cpp",
"TrafficController.cpp",
],
}
aidl_interface {
name: "netd_aidl_interface",
local_include_dir: "binder",
srcs: [
"binder/android/net/TetherStatsParcel.aidl",
"binder/android/net/UidRangeParcel.aidl",
"binder/android/net/InterfaceConfigurationParcel.aidl",
],
api_dir: "binder/api",
// NDK doesn't support array now.
backend: {
ndk: {
enabled: false,
},
},
}
cc_library {
name: "libnetdaidl",
defaults: ["netd_defaults"],
shared_libs: [
"libbinder",
"libutils",
"netd_aidl_interface-cpp",
],
export_shared_lib_headers: [
"netd_aidl_interface-cpp",
],
aidl: {
export_aidl_headers: true,
local_include_dirs: ["binder"],
include_dirs: ["frameworks/native/aidl/binder"],
},
srcs: [
":netd_aidl",
],
export_include_dirs: ["binder"],
}
// Modules common to both netd and netd_unit_test
cc_library_static {
name: "libnetd_server",
defaults: ["netd_defaults"],
include_dirs: [
"system/netd/include",
"system/netd/server/binder",
],
srcs: [
"BandwidthController.cpp",
"Controllers.cpp",
"Dns64Configuration.cpp",
"NetdConstants.cpp",
"FirewallController.cpp",
"IdletimerController.cpp",
"InterfaceController.cpp",
"IptablesRestoreController.cpp",
"NFLogListener.cpp",
"NetlinkCommands.cpp",
"NetlinkListener.cpp",
"NetlinkManager.cpp",
"RouteController.cpp",
"SockDiag.cpp",
"StrictController.cpp",
"TcpSocketMonitor.cpp",
"TetherController.cpp",
"TrafficController.cpp",
"UidRanges.cpp",
"WakeupController.cpp",
"XfrmController.cpp",
":netd_metrics_aidl",
],
shared_libs: [
"libbpf",
"libnetd_resolv",
"libnetdaidl",
"libbase",
"libbinder",
"liblogwrap",
"libnetdbpf",
"libnetutils",
"libnetdutils",
"libpcap",
"libqtaguid",
"libssl",
],
aidl: {
export_aidl_headers: true,
local_include_dirs: ["binder"],
},
}
cc_binary {
name: "netd",
defaults: ["netd_defaults"],
include_dirs: [
"external/mdnsresponder/mDNSShared",
"system/netd/include",
],
init_rc: ["netd.rc"],
shared_libs: [
"android.system.net.netd@1.0",
"android.system.net.netd@1.1",
"libbase",
"libbinder",
"libbpf",
"libcrypto",
"libcutils",
"libdl",
"libhidlbase",
"libhidltransport",
"liblog",
"liblogwrap",
"libmdnssd",
"libnetd_resolv",
"libnetdaidl",
"libnetdbpf",
"libnetdutils",
"libnetutils",
"libpcap",
"libqtaguid",
"libselinux",
"libsysutils",
"libutils",
"netd_aidl_interface-cpp",
],
static_libs: [
"libnetd_server",
],
srcs: [
"ClatdController.cpp",
"CommandListener.cpp",
"DnsProxyListener.cpp",
"DummyNetwork.cpp",
"DumpWriter.cpp",
"EventReporter.cpp",
"FwmarkServer.cpp",
"LocalNetwork.cpp",
"MDnsSdListener.cpp",
"NetdCommand.cpp",
"NetdHwService.cpp",
"NetdNativeService.cpp",
"NetlinkHandler.cpp",
"Network.cpp",
"NetworkController.cpp",
"PhysicalNetwork.cpp",
"PppController.cpp",
"Process.cpp",
"ResolverController.cpp",
"VirtualNetwork.cpp",
"main.cpp",
"oem_iptables_hook.cpp",
],
}
cc_binary {
name: "ndc",
defaults: ["netd_defaults"],
shared_libs: ["libcutils"],
srcs: ["ndc.cpp"],
}
cc_test {
name: "netd_unit_test",
defaults: ["netd_defaults"],
test_suites: ["device-tests"],
include_dirs: [
"system/netd/include",
"system/netd/server/binder",
"system/netd/tests",
"system/core/logwrapper/include",
],
srcs: [
"BandwidthControllerTest.cpp",
"ControllersTest.cpp",
"FirewallControllerTest.cpp",
"IdletimerControllerTest.cpp",
"InterfaceControllerTest.cpp",
"IptablesBaseTest.cpp",
"IptablesRestoreControllerTest.cpp",
"NFLogListenerTest.cpp",
"RouteControllerTest.cpp",
"SockDiagTest.cpp",
"StrictControllerTest.cpp",
"TetherControllerTest.cpp",
"TrafficControllerTest.cpp",
"XfrmControllerTest.cpp",
"WakeupControllerTest.cpp",
],
static_libs: [
"libgmock",
"libnetd_server",
"libnetd_test_tun_interface",
],
shared_libs: [
"libbase",
"libbinder",
"libbpf",
"libcrypto",
"libcutils",
"liblog",
"libnetdaidl",
"libnetdbpf",
"libnetdutils",
"libnetutils",
"libqtaguid",
"libsysutils",
"libutils",
"netd_aidl_interface-cpp",
],
}