mirror of
https://gitlab.labs.nic.cz/labs/bird.git
synced 2024-05-11 16:54:54 +00:00
Filter: Merged filter line item dumpers into common generated source
This commit is contained in:
13
nest/a-set.c
13
nest/a-set.c
@@ -72,15 +72,12 @@ ec_format(byte *buf, u64 ec)
|
||||
char tbuf[16], *kind;
|
||||
|
||||
type = ec >> 48;
|
||||
switch (type & 0xf0ff)
|
||||
{
|
||||
case EC_RT: kind = "rt"; break;
|
||||
case EC_RO: kind = "ro"; break;
|
||||
kind = ec_subtype_str(type & 0xf0ff);
|
||||
|
||||
default:
|
||||
kind = tbuf;
|
||||
bsprintf(kind, "unknown 0x%x", type);
|
||||
}
|
||||
if (!kind) {
|
||||
kind = tbuf;
|
||||
bsprintf(kind, "unknown 0x%x", type);
|
||||
}
|
||||
|
||||
switch (ec >> 56)
|
||||
{
|
||||
|
@@ -125,6 +125,14 @@ enum ec_subtype {
|
||||
EC_GENERIC = 0xFFFF,
|
||||
};
|
||||
|
||||
static inline const char *ec_subtype_str(const enum ec_subtype ecs) {
|
||||
switch (ecs) {
|
||||
case EC_RT: return "rt";
|
||||
case EC_RO: return "ro";
|
||||
default: return NULL;
|
||||
}
|
||||
}
|
||||
|
||||
/* Transitive bit (for first u32 half of EC) */
|
||||
#define EC_TBIT 0x40000000
|
||||
|
||||
|
Reference in New Issue
Block a user