blob: b06528b9d59272e9212c054c17261363fa44ac35 [file] [log] [blame]
Hungming Chen56c632c2020-09-10 15:42:58 +08001//
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//
Lorenzo Colitti734b14e2021-02-05 23:56:09 +090018// struct definitions shared with JNI
19//
20cc_library_headers {
21 name: "bpf_tethering_headers",
22 vendor_available: false,
23 host_supported: false,
24 export_include_dirs: ["."],
25 cflags: [
26 "-Wall",
27 "-Werror",
28 ],
29 sdk_version: "30",
30 min_sdk_version: "30",
31 apex_available: ["com.android.tethering"],
32 visibility: [
33 "//packages/modules/Connectivity/Tethering",
34 ],
35}
36
37//
Hungming Chen56c632c2020-09-10 15:42:58 +080038// bpf kernel programs
39//
40bpf {
41 name: "offload.o",
42 srcs: ["offload.c"],
43 cflags: [
44 "-Wall",
45 "-Werror",
46 ],
47 include_dirs: [
48 // TODO: get rid of system/netd.
49 "system/netd/bpf_progs", // for bpf_net_helpers.h
50 "system/netd/libnetdbpf/include", // for bpf_shared.h
51 "system/netd/libnetdutils/include", // for UidConstants.h
52 ],
53}
Maciej Żenczykowskie9810ff2021-01-14 20:02:08 -080054
55bpf {
56 name: "test.o",
57 srcs: ["test.c"],
58 cflags: [
59 "-Wall",
60 "-Werror",
61 ],
62 include_dirs: [
63 // TODO: get rid of system/netd.
64 "system/netd/bpf_progs", // for bpf_net_helpers.h
65 "system/netd/libnetdbpf/include", // for bpf_shared.h
66 "system/netd/libnetdutils/include", // for UidConstants.h
67 ],
68}