summaryrefslogtreecommitdiff
path: root/nest/protocol.h
diff options
context:
space:
mode:
authorJan Maria Matejka <mq@ucw.cz>2018-05-07 14:47:00 +0200
committerJan Maria Matejka <mq@ucw.cz>2018-05-29 12:35:06 +0200
commitee7e2ffd265fd76dbc8c94d9c2d48da54c27ff76 (patch)
tree7460254b1bd105e5bc45937e2e00aaac7da4ccf7 /nest/protocol.h
parentc3becfe1934da2dc2c0881a71eac8a26f810791f (diff)
Protocol: Introducing an enum protocol_class
This supersedes the EAP_* constants.
Diffstat (limited to 'nest/protocol.h')
-rw-r--r--nest/protocol.h21
1 files changed, 20 insertions, 1 deletions
diff --git a/nest/protocol.h b/nest/protocol.h
index 8a22d76b..d790e90e 100644
--- a/nest/protocol.h
+++ b/nest/protocol.h
@@ -37,12 +37,31 @@ struct symbol;
* Routing Protocol
*/
+enum protocol_class {
+ PROTOCOL_NONE,
+ PROTOCOL_BABEL,
+ PROTOCOL_BFD,
+ PROTOCOL_BGP,
+ PROTOCOL_DEVICE,
+ PROTOCOL_DIRECT,
+ PROTOCOL_KERNEL,
+ PROTOCOL_OSPF,
+ PROTOCOL_PIPE,
+ PROTOCOL_RADV,
+ PROTOCOL_RIP,
+ PROTOCOL_RPKI,
+ PROTOCOL_STATIC,
+ PROTOCOL__MAX
+};
+
+extern struct protocol *class_to_protocol[PROTOCOL__MAX];
+
struct protocol {
node n;
char *name;
char *template; /* Template for automatic generation of names */
int name_counter; /* Counter for automatic name generation */
- int attr_class; /* Attribute class known to this protocol */
+ enum protocol_class class; /* Machine readable protocol class */
uint preference; /* Default protocol preference */
uint channel_mask; /* Mask of accepted channel types (NB_*) */
uint proto_size; /* Size of protocol data structure */