• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1//
2// Copyright (C) 2020 The Android Open Source Project
3//
4// Licensed under the Apache License, Version 2.0 (the "License");
5// you may not use this file except in compliance with the License.
6// You may obtain a copy of the License at
7//
8//      http://www.apache.org/licenses/LICENSE-2.0
9//
10// Unless required by applicable law or agreed to in writing, software
11// distributed under the License is distributed on an "AS IS" BASIS,
12// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13// See the License for the specific language governing permissions and
14// limitations under the License.
15//
16
17//
18// struct definitions shared with JNI
19//
20package {
21    default_team: "trendy_team_fwk_core_networking",
22    default_applicable_licenses: ["Android-Apache-2.0"],
23}
24
25cc_library_headers {
26    name: "bpf_connectivity_headers",
27    vendor_available: false,
28    host_supported: false,
29    header_libs: [
30        "bpf_headers",
31        "netd_mainline_headers",
32    ],
33    export_header_lib_headers: [
34        "bpf_headers",
35        "netd_mainline_headers",
36    ],
37    export_include_dirs: ["."],
38    cflags: [
39        "-Wall",
40        "-Werror",
41        "-Wextra",
42    ],
43    sdk_version: "30",
44    min_sdk_version: "30",
45    apex_available: [
46        "//apex_available:platform",
47        "com.android.tethering",
48    ],
49    visibility: [
50        "//packages/modules/Connectivity/bpf/dns_helper",
51        "//packages/modules/Connectivity/bpf/netd",
52        "//packages/modules/Connectivity/service",
53        "//packages/modules/Connectivity/service/native/libs/libclat",
54        "//packages/modules/Connectivity/Tethering",
55        "//packages/modules/Connectivity/service/native",
56        "//packages/modules/Connectivity/tests/native/connectivity_native_test",
57        "//packages/modules/Connectivity/tests/native/utilities",
58        "//packages/modules/Connectivity/service-t/native/libs/libnetworkstats",
59        "//packages/modules/Connectivity/tests/unit/jni",
60    ],
61}
62
63//
64// bpf kernel programs
65//
66bpf {
67    name: "dscpPolicy.o",
68    srcs: ["dscpPolicy.c"],
69    sub_dir: "net_shared",
70}
71
72bpf {
73    name: "offload.o",
74    srcs: ["offload.c"],
75    sub_dir: "tethering",
76}
77
78bpf {
79    name: "test.o",
80    srcs: ["test.c"],
81    sub_dir: "tethering",
82}
83
84bpf {
85    name: "clatd.o",
86    srcs: ["clatd.c"],
87    sub_dir: "net_shared",
88}
89
90bpf {
91    // WARNING: Android T's non-updatable netd depends on 'netd' string for xt_bpf programs it loads
92    name: "netd.o",
93    srcs: ["netd.c"],
94    // WARNING: Android T's non-updatable netd depends on 'netd_shared' string for xt_bpf programs
95    sub_dir: "netd_shared",
96}
97