diff options
author | Yu Watanabe <watanabe.yu+github@gmail.com> | 2021-11-14 17:36:33 +0900 |
---|---|---|
committer | Yu Watanabe <watanabe.yu+github@gmail.com> | 2021-11-25 22:35:35 +0900 |
commit | 965153054a80def1d7df09151a474e870d404b7e (patch) | |
tree | 24efaae740197a827c6aaf7e391ba4393236c1bc /src/network/networkd-routing-policy-rule.c | |
parent | 6e66b981d5bfbdb87d61eecb7b9bb8404377a476 (diff) | |
download | systemd-965153054a80def1d7df09151a474e870d404b7e.tar.gz |
network: routing policy rule: introduce fr_act_type_full_to_string()
Diffstat (limited to 'src/network/networkd-routing-policy-rule.c')
-rw-r--r-- | src/network/networkd-routing-policy-rule.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/src/network/networkd-routing-policy-rule.c b/src/network/networkd-routing-policy-rule.c index 72ef39f457..90086f35a7 100644 --- a/src/network/networkd-routing-policy-rule.c +++ b/src/network/networkd-routing-policy-rule.c @@ -29,8 +29,18 @@ static const char *const fr_act_type_table[__FR_ACT_MAX] = { [FR_ACT_PROHIBIT] = "prohibit", }; +static const char *const fr_act_type_full_table[__FR_ACT_MAX] = { + [FR_ACT_TO_TBL] = "table", + [FR_ACT_GOTO] = "goto", + [FR_ACT_NOP] = "nop", + [FR_ACT_BLACKHOLE] = "blackhole", + [FR_ACT_UNREACHABLE] = "unreachable", + [FR_ACT_PROHIBIT] = "prohibit", +}; + assert_cc(__FR_ACT_MAX <= UINT8_MAX); DEFINE_PRIVATE_STRING_TABLE_LOOKUP_FROM_STRING(fr_act_type, int); +DEFINE_STRING_TABLE_LOOKUP_TO_STRING(fr_act_type_full, int); RoutingPolicyRule *routing_policy_rule_free(RoutingPolicyRule *rule) { if (!rule) |