• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1// Copyright (C) 2017 The Android Open Source Project
2//
3// Licensed under the Apache License, Version 2.0 (the "License");
4// you may not use this file except in compliance with the License.
5// You may obtain a copy of the License at
6//
7//      http://www.apache.org/licenses/LICENSE-2.0
8//
9// Unless required by applicable law or agreed to in writing, software
10// distributed under the License is distributed on an "AS IS" BASIS,
11// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12// See the License for the specific language governing permissions and
13// limitations under the License.
14
15package {
16    // See: http://go/android-license-faq
17    // A large-scale-change added 'default_applicable_licenses' to import
18    // all of the 'license_kinds' from "system_netd_license"
19    // to get the below license kinds:
20    //   SPDX-license-identifier-Apache-2.0
21    default_applicable_licenses: ["system_netd_license"],
22}
23
24cc_library {
25    name: "libnetd_client",
26    srcs: [
27        "FwmarkClient.cpp",
28        "NetdClient.cpp",
29    ],
30    header_libs: [
31        "dnsproxyd_protocol_headers", // NETID_USE_LOCAL_NAMESERVERS
32        "libnetd_client_headers",
33        "libbase_headers", // for unique_fd.h
34    ],
35    export_header_lib_headers: ["libnetd_client_headers"],
36    include_dirs: [
37        "system/netd/libnetdutils/include",
38    ],
39    defaults: ["netd_defaults"],
40    sanitize: {
41        cfi: true,
42    },
43    apex_available: [
44        "//apex_available:platform",
45        "com.android.tethering",
46    ],
47}
48
49cc_test {
50    name: "netdclient_test",
51    srcs: [
52        "NetdClientTest.cpp",
53    ],
54    defaults: ["netd_defaults"],
55    test_suites: ["device-tests"],
56    include_dirs: [
57        "system/netd/include",
58    ],
59    static_libs: [
60        "libgmock",
61        "libbase",
62        "libnetd_client",
63    ],
64    sanitize: {
65        address: false,
66        recover: [ "all" ],
67    },
68}
69