blob: 7c0b797f78365283d8d5b6c9584e5c58322be124 [file] [log] [blame]
Wayne Maa9716ff2022-01-12 10:37:04 +08001/*
2 * Copyright (C) 2022 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#pragma once
18// TODO: deduplicate with the constants in NetdConstants.h.
19#include <aidl/android/net/INetd.h>
20
21using aidl::android::net::INetd;
22
23enum FirewallRule { ALLOW = INetd::FIREWALL_RULE_ALLOW, DENY = INetd::FIREWALL_RULE_DENY };
24
25// ALLOWLIST means the firewall denies all by default, uids must be explicitly ALLOWed
26// DENYLIST means the firewall allows all by default, uids must be explicitly DENYed
27
28enum FirewallType { ALLOWLIST = INetd::FIREWALL_ALLOWLIST, DENYLIST = INetd::FIREWALL_DENYLIST };
29
30enum ChildChain {
31 NONE = INetd::FIREWALL_CHAIN_NONE,
32 DOZABLE = INetd::FIREWALL_CHAIN_DOZABLE,
33 STANDBY = INetd::FIREWALL_CHAIN_STANDBY,
34 POWERSAVE = INetd::FIREWALL_CHAIN_POWERSAVE,
35 RESTRICTED = INetd::FIREWALL_CHAIN_RESTRICTED,
36 INVALID_CHAIN
37};