summaryrefslogtreecommitdiff
path: root/nest/route.h
diff options
context:
space:
mode:
authorJan Maria Matejka <mq@ucw.cz>2018-12-06 09:55:34 +0100
committerJan Maria Matejka <mq@ucw.cz>2018-12-06 09:55:34 +0100
commit9a5ef043c11ad9fba00557dedcc0d7ae0d2794e9 (patch)
tree09697ffd0d9707b7799309369460d369698ad0fc /nest/route.h
parent0e4920632aa30dab4fbfb0530bce5a959e7a7675 (diff)
parent265419a3695b9a5c0a01d9fffc60f66fea8bee13 (diff)
Merge branch 'mq-custom' into int-new
Diffstat (limited to 'nest/route.h')
-rw-r--r--nest/route.h9
1 files changed, 8 insertions, 1 deletions
diff --git a/nest/route.h b/nest/route.h
index 080bbf58..2600f087 100644
--- a/nest/route.h
+++ b/nest/route.h
@@ -471,13 +471,20 @@ typedef struct eattr {
} u;
} eattr;
+
#define EA_CODE(proto,id) (((proto) << 8) | (id))
-#define EA_PROTO(ea) ((ea) >> 8)
#define EA_ID(ea) ((ea) & 0xff)
+#define EA_PROTO(ea) ((ea) >> 8)
+#define EA_CUSTOM(id) ((id) | EA_CUSTOM_BIT)
+#define EA_IS_CUSTOM(ea) ((ea) & EA_CUSTOM_BIT)
+#define EA_CUSTOM_ID(ea) ((ea) & ~EA_CUSTOM_BIT)
+
+const char *ea_custom_name(uint ea);
#define EA_GEN_IGP_METRIC EA_CODE(PROTOCOL_NONE, 0)
#define EA_CODE_MASK 0xffff
+#define EA_CUSTOM_BIT 0x8000
#define EA_ALLOW_UNDEF 0x10000 /* ea_find: allow EAF_TYPE_UNDEF */
#define EA_BIT(n) ((n) << 24) /* Used in bitfield accessors */