xref: /aosp_15_r20/external/pigweed/pw_router/BUILD.bazel (revision 61c4878ac05f98d0ceed94b57d316916de578985)
1# Copyright 2021 The Pigweed Authors
2#
3# Licensed under the Apache License, Version 2.0 (the "License"); you may not
4# use this file except in compliance with the License. You may obtain a copy of
5# the License at
6#
7#     https://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, WITHOUT
11# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
12# License for the specific language governing permissions and limitations under
13# the License.
14
15load("//pw_unit_test:pw_cc_test.bzl", "pw_cc_test")
16
17package(default_visibility = ["//visibility:public"])
18
19licenses(["notice"])
20
21cc_library(
22    name = "static_router",
23    srcs = ["static_router.cc"],
24    hdrs = ["public/pw_router/static_router.h"],
25    strip_include_prefix = "public",
26    deps = [
27        ":egress",
28        ":packet_parser",
29        "//pw_log",
30        "//pw_metric:metric",
31    ],
32)
33
34cc_library(
35    name = "egress",
36    hdrs = ["public/pw_router/egress.h"],
37    strip_include_prefix = "public",
38    deps = [
39        ":packet_parser",
40        "//pw_bytes",
41    ],
42)
43
44cc_library(
45    name = "packet_parser",
46    hdrs = ["public/pw_router/packet_parser.h"],
47    strip_include_prefix = "public",
48    deps = ["//pw_bytes"],
49)
50
51cc_library(
52    name = "egress_function",
53    hdrs = ["public/pw_router/egress_function.h"],
54    strip_include_prefix = "public",
55    deps = [
56        ":egress",
57        "//pw_function",
58    ],
59)
60
61pw_cc_test(
62    name = "static_router_test",
63    srcs = ["static_router_test.cc"],
64    deps = [
65        ":egress_function",
66        ":static_router",
67    ],
68)
69