In the era of ebpf offload the speed of writing packets via tun and reading via udp socket aren't all that important. Test: builds Bug: 144730808 Signed-off-by: Maciej Żenczykowski <maze@google.com> Change-Id: Ie2b49c8b109052b9212d3b21fd16784a464e2a1b
98 lines
1.9 KiB
Text
98 lines
1.9 KiB
Text
cc_defaults {
|
|
name: "clatd_defaults",
|
|
|
|
cflags: [
|
|
"-Wall",
|
|
"-Werror",
|
|
"-Wunused-parameter",
|
|
|
|
// Bug: http://b/33566695
|
|
"-Wno-address-of-packed-member",
|
|
],
|
|
|
|
// For NETID_UNSET and MARK_UNSET.
|
|
include_dirs: ["bionic/libc/dns/include"],
|
|
|
|
// For NETID_USE_LOCAL_NAMESERVERS.
|
|
header_libs: ["libnetd_client_headers"],
|
|
}
|
|
|
|
// Code used both by the daemon and by unit tests.
|
|
filegroup {
|
|
name: "clatd_common",
|
|
srcs: [
|
|
"config.c",
|
|
"clatd.c",
|
|
"dns64.c",
|
|
"dump.c",
|
|
"getaddr.c",
|
|
"icmp.c",
|
|
"ipv4.c",
|
|
"ipv6.c",
|
|
"logging.c",
|
|
"mtu.c",
|
|
"netlink_callbacks.c",
|
|
"netlink_msg.c",
|
|
"ring.c",
|
|
"setif.c",
|
|
"translate.c",
|
|
],
|
|
}
|
|
|
|
// The clat daemon.
|
|
cc_binary {
|
|
name: "clatd",
|
|
defaults: ["clatd_defaults"],
|
|
srcs: [
|
|
":clatd_common",
|
|
"main.c"
|
|
],
|
|
static_libs: ["libnl"],
|
|
shared_libs: [
|
|
"libcutils",
|
|
"liblog",
|
|
"libnetutils",
|
|
],
|
|
|
|
// Only enable clang-tidy for the daemon, not the tests, because enabling it for the
|
|
// tests substantially increases build/compile cycle times and doesn't really provide a
|
|
// security benefit.
|
|
tidy: true,
|
|
tidy_checks: [
|
|
"-*",
|
|
"cert-*",
|
|
"clang-analyzer-security*",
|
|
"android-*",
|
|
],
|
|
tidy_flags: [
|
|
"-warnings-as-errors=clang-analyzer-security*,cert-*,android-*",
|
|
],
|
|
}
|
|
|
|
// The configuration file.
|
|
prebuilt_etc {
|
|
name: "clatd.conf",
|
|
src: "clatd.conf",
|
|
}
|
|
|
|
// Unit tests.
|
|
cc_test {
|
|
name: "clatd_test",
|
|
defaults: ["clatd_defaults"],
|
|
srcs: [
|
|
":clatd_common",
|
|
"clatd_test.cpp"
|
|
],
|
|
static_libs: [
|
|
"libbase",
|
|
"libnetd_test_tun_interface",
|
|
"libnl",
|
|
],
|
|
shared_libs: [
|
|
"libcutils",
|
|
"liblog",
|
|
"libnetutils",
|
|
],
|
|
test_suites: ["device-tests"],
|
|
require_root: true,
|
|
}
|