123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259 |
- // AIDL interface between netd and services.core
- aidl_interface {
- name: "netd_event_listener_interface",
- local_include_dir: "binder",
- srcs: [
- "binder/android/net/metrics/INetdEventListener.aidl",
- ],
- api_dir: "aidl/netdeventlistener",
- versions: ["1"],
- }
- // 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/INetd.aidl",
- // AIDL interface that callers can implement to receive networking events from netd.
- "binder/android/net/INetdUnsolicitedEventListener.aidl",
- "binder/android/net/InterfaceConfigurationParcel.aidl",
- "binder/android/net/TetherStatsParcel.aidl",
- "binder/android/net/UidRangeParcel.aidl",
- ],
- api_dir: "aidl/netd",
- backend: {
- cpp: {
- gen_log: true,
- },
- },
- versions: [
- "1",
- "2",
- ],
- }
- aidl_interface {
- // This interface is for OEM calls to netd and vice versa that do not exist in AOSP.
- // Those calls cannot be part of INetd.aidl and INetdUnsolicitedEventListener.aidl
- // because those interfaces are versioned.
- // These interfaces must never be versioned or OEMs will not be able to change them.
- name: "oemnetd_aidl_interface",
- local_include_dir: "binder",
- srcs: [
- "binder/com/android/internal/net/IOemNetd.aidl",
- "binder/com/android/internal/net/IOemNetdUnsolicitedEventListener.aidl",
- ],
- }
- // 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",
- "ClatdController.cpp",
- "ClatUtils.cpp",
- "Controllers.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",
- ],
- shared_libs: [
- "libbpf_android",
- "libbase",
- "libbinder",
- "liblogwrap",
- "libnetdbpf",
- "libnetutils",
- "libnetdutils",
- "libpcap",
- "libqtaguid",
- "libssl",
- "netd_aidl_interface-V2-cpp",
- "netd_event_listener_interface-V1-cpp",
- ],
- header_libs: [
- "libnetd_resolv_headers",
- ],
- 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: [
- "[email protected]",
- "[email protected]",
- "libbase",
- "libbinder",
- "libbpf_android",
- "libcutils",
- "libdl",
- "libhidlbase",
- "libhidltransport",
- "libjsoncpp",
- "liblog",
- "liblogwrap",
- "libmdnssd",
- "libnetdbpf",
- "libnetdutils",
- "libnetutils",
- "libpcap",
- "libprocessgroup",
- "libqtaguid",
- "libselinux",
- "libsysutils",
- "libutils",
- "netd_aidl_interface-V2-cpp",
- "netd_event_listener_interface-V1-cpp",
- "oemnetd_aidl_interface-cpp",
- ],
- static_libs: [
- "libnetd_server",
- ],
- header_libs: [
- "libnetd_resolv_headers",
- ],
- srcs: [
- "DummyNetwork.cpp",
- "EventReporter.cpp",
- "FwmarkServer.cpp",
- "LocalNetwork.cpp",
- "MDnsSdListener.cpp",
- "NetdCommand.cpp",
- "NetdHwService.cpp",
- "NetdNativeService.cpp",
- "NetlinkHandler.cpp",
- "Network.cpp",
- "NetworkController.cpp",
- "OemNetdListener.cpp",
- "PhysicalNetwork.cpp",
- "PppController.cpp",
- "Process.cpp",
- "ResolvStub.cpp",
- "VirtualNetwork.cpp",
- "main.cpp",
- "oem_iptables_hook.cpp",
- ],
- }
- cc_binary {
- name: "ndc",
- defaults: ["netd_defaults"],
- include_dirs: [
- "system/netd/include",
- ],
- header_libs: [
- "libnetd_client_headers",
- ],
- shared_libs: [
- "libbase",
- "libnetdutils",
- "libnetutils",
- "libcutils",
- "liblog",
- "libutils",
- "libbinder",
- "dnsresolver_aidl_interface-V2-cpp",
- "netd_aidl_interface-V2-cpp",
- ],
- srcs: [
- "ndc.cpp",
- "UidRanges.cpp",
- "NdcDispatcher.cpp",
- ],
- }
- cc_test {
- name: "netd_unit_test",
- defaults: ["netd_defaults"],
- test_suites: ["device-tests"],
- require_root: true,
- include_dirs: [
- "system/netd/include",
- "system/netd/server/binder",
- "system/netd/tests",
- "system/core/logwrapper/include",
- ],
- srcs: [
- "BandwidthControllerTest.cpp",
- "ClatdControllerTest.cpp",
- "ClatUtilsTest.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_android",
- "libcrypto",
- "libcutils",
- "liblog",
- "libnetdbpf",
- "libnetdutils",
- "libnetutils",
- "libqtaguid",
- "libsysutils",
- "libutils",
- "netd_aidl_interface-V2-cpp",
- "netd_event_listener_interface-V1-cpp",
- ],
- }
|