• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1# Copyright (c) 2022 Huawei Device Co., Ltd.
2# Licensed under the Apache License, Version 2.0 (the "License");
3# you may not use this file except in compliance with the License.
4# You may obtain a copy of the License at
5#
6#     http://www.apache.org/licenses/LICENSE-2.0
7#
8# Unless required by applicable law or agreed to in writing, software
9# distributed under the License is distributed on an "AS IS" BASIS,
10# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
11# See the License for the specific language governing permissions and
12# limitations under the License.
13
14import("//build/ohos.gni")
15import("//foundation/communication/netmanager_base/netmanager_base_config.gni")
16
17config("bpf_public_config") {
18  include_dirs = [
19    "$NETSYSBPFMAP_SOURCE_DIR/include",
20    "$NETMANAGER_BASE_ROOT/interfaces/innerkits/netmanagernative/include/",
21    "$INNERKITS_ROOT/netstatsclient/include",
22  ]
23}
24
25config("bpf_config") {
26  include_dirs = [
27    "include",
28    "$C_UTILS_ROOT/base/include",
29  ]
30}
31
32ohos_shared_library("netsys_bpf_stats") {
33  configs = [ ":bpf_config" ]
34  public_configs = [ ":bpf_public_config" ]
35  sources = [ "src/netsys_bpf_stats.cpp" ]
36
37  public_deps = [ "$C_UTILS_ROOT/base:utils" ]
38
39  if (is_standard_system) {
40    external_deps = [ "hiviewdfx_hilog_native:libhilog" ]
41  } else {
42    external_deps = [ "hilog:libhilog" ]
43  }
44
45  defines = [
46    "NETMGRNATIVE_LOG_TAG = \"NetsysBpfStats\"",
47    "LOG_DOMAIN = 0xD0015B0",
48  ]
49
50  part_name = "netmanager_base"
51  subsystem_name = "communication"
52}
53