summaryrefslogtreecommitdiff
path: root/sysdep/unix
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 /sysdep/unix
parentc3becfe1934da2dc2c0881a71eac8a26f810791f (diff)
Protocol: Introducing an enum protocol_class
This supersedes the EAP_* constants.
Diffstat (limited to 'sysdep/unix')
-rw-r--r--sysdep/unix/krt.c3
-rw-r--r--sysdep/unix/krt.h4
2 files changed, 4 insertions, 3 deletions
diff --git a/sysdep/unix/krt.c b/sysdep/unix/krt.c
index b4fb1967..ae51927e 100644
--- a/sysdep/unix/krt.c
+++ b/sysdep/unix/krt.c
@@ -232,6 +232,7 @@ kif_copy_config(struct proto_config *dest, struct proto_config *src)
struct protocol proto_unix_iface = {
.name = "Device",
.template = "device%d",
+ .class = PROTOCOL_DEVICE,
.proto_size = sizeof(struct kif_proto),
.config_size = sizeof(struct kif_config),
.preconfig = kif_preconfig,
@@ -1235,7 +1236,7 @@ krt_get_attr(eattr *a, byte *buf, int buflen)
struct protocol proto_unix_kernel = {
.name = "Kernel",
.template = "kernel%d",
- .attr_class = EAP_KRT,
+ .class = PROTOCOL_KERNEL,
.preference = DEF_PREF_INHERITED,
.channel_mask = NB_IP | MAYBE_IP6_SADR | MAYBE_MPLS,
.proto_size = sizeof(struct krt_proto),
diff --git a/sysdep/unix/krt.h b/sysdep/unix/krt.h
index b627882d..ff27bcf5 100644
--- a/sysdep/unix/krt.h
+++ b/sysdep/unix/krt.h
@@ -30,8 +30,8 @@ struct kif_proto;
#define KRT_DEFAULT_ECMP_LIMIT 16
-#define EA_KRT_SOURCE EA_CODE(EAP_KRT, 0)
-#define EA_KRT_METRIC EA_CODE(EAP_KRT, 1)
+#define EA_KRT_SOURCE EA_CODE(PROTOCOL_KERNEL, 0)
+#define EA_KRT_METRIC EA_CODE(PROTOCOL_KERNEL, 1)
/* Whenever we recognize our own routes, we allow learing of foreign routes */