summaryrefslogtreecommitdiffstats
path: root/nest/route.h
diff options
context:
space:
mode:
authorMartin Mares <mj@ucw.cz>1999-11-18 15:41:29 +0100
committerMartin Mares <mj@ucw.cz>1999-11-18 15:41:29 +0100
commit8d24b6899d0aba52fef8c48921ce4d1481ee212c (patch)
tree05647436846040fcd1b3fb204720ea1df6276505 /nest/route.h
parentf31156ca217226ad110cc46e6365d70e64c527e0 (diff)
downloadbird-8d24b6899d0aba52fef8c48921ce4d1481ee212c.tar
bird-8d24b6899d0aba52fef8c48921ce4d1481ee212c.zip
Allow EA type to be set to 'undefined' which overrides all further definitons
of that EA in the same list and causes ea_find() to fail unless you add EA_ALLOW_UNDEF to the second argument. ea_sort (resp. ea_do_prune()) removes all undef'd attributes from the list. I hope this works :)
Diffstat (limited to 'nest/route.h')
-rw-r--r--nest/route.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/nest/route.h b/nest/route.h
index 799e0a2..e79affb 100644
--- a/nest/route.h
+++ b/nest/route.h
@@ -265,12 +265,16 @@ typedef struct eattr {
#define EA_PROTO(ea) ((ea) >> 8)
#define EA_ID(ea) ((ea) & 0xff)
+#define EA_CODE_MASK 0xffff
+#define EA_ALLOW_UNDEF 0x10000 /* ea_find: allow EAF_TYPE_UNDEF */
+
#define EAF_TYPE_MASK 0x0f /* Mask with this to get type */
#define EAF_TYPE_INT 0x01 /* 32-bit signed integer number */
#define EAF_TYPE_OPAQUE 0x02 /* Opaque byte string (not filterable) */
#define EAF_TYPE_IP_ADDRESS 0x04 /* IP address [FIXME: embed at least for IPv4?] */
#define EAF_TYPE_AS_PATH 0x06 /* BGP AS path [FIXME: define storage layout] */
#define EAF_TYPE_INT_SET 0x0a /* Set of integers (e.g., a community list) */
+#define EAF_TYPE_UNDEF 0x0f /* `force undefined' entry */
#define EAF_EMBEDDED 0x01 /* Data stored in eattr.u.data (part of type spec) */
#define EAF_VAR_LENGTH 0x02 /* Attribute length is variable */
#define EAF_INLINE 0x80 /* Copy of an attribute inlined in rte (temporary ea_lists only) */