mirror of
https://git.proxmox.com/git/mirror_frr
synced 2025-08-03 06:32:33 +00:00
lib: Add zapi_rule_notify_owner2str() function
Add a function for converting the zapi_rule_notify_owner enum type to a string for ease of use. Signed-off-by: Stephen Worley <sworley@cumulusnetworks.com>
This commit is contained in:
parent
47f94d175a
commit
eb5d458b3f
@ -485,6 +485,29 @@ enum zapi_iptable_notify_owner {
|
||||
ZAPI_IPTABLE_FAIL_REMOVE,
|
||||
};
|
||||
|
||||
static inline const char *
|
||||
zapi_rule_notify_owner2str(enum zapi_rule_notify_owner note)
|
||||
{
|
||||
const char *ret = "UNKNOWN";
|
||||
|
||||
switch (note) {
|
||||
case ZAPI_RULE_FAIL_INSTALL:
|
||||
ret = "ZAPI_RULE_FAIL_INSTALL";
|
||||
break;
|
||||
case ZAPI_RULE_INSTALLED:
|
||||
ret = "ZAPI_RULE_INSTALLED";
|
||||
break;
|
||||
case ZAPI_RULE_FAIL_REMOVE:
|
||||
ret = "ZAPI_RULE_FAIL_REMOVE";
|
||||
break;
|
||||
case ZAPI_RULE_REMOVED:
|
||||
ret = "ZAPI_RULE_REMOVED";
|
||||
break;
|
||||
}
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
/* Zebra MAC types */
|
||||
#define ZEBRA_MACIP_TYPE_STICKY 0x01 /* Sticky MAC*/
|
||||
#define ZEBRA_MACIP_TYPE_GW 0x02 /* gateway (SVI) mac*/
|
||||
|
Loading…
Reference in New Issue
Block a user