summaryrefslogtreecommitdiff
path: root/lib/srv6.h
diff options
context:
space:
mode:
authorDonatas Abraitis <donatas@opensourcerouting.org>2022-11-14 16:13:39 +0200
committerGitHub <noreply@github.com>2022-11-14 16:13:39 +0200
commit84f784fafa34b4fe4021d9a17fbffe5bc2fff32e (patch)
tree4d893c0f1c3765ab3b082dc45c44c36ef3e7f402 /lib/srv6.h
parentedb904e81cdbd9c5b869f2e029d50fa13d69f7b5 (diff)
parent439d4c9b03f37522376e2466c67540f63d40891b (diff)
Merge pull request #12219 from cscarpitta/feature/srv6-usid-behavior-support
bgpd, zebra: Add support for SRv6 uSID Behaviors
Diffstat (limited to 'lib/srv6.h')
-rw-r--r--lib/srv6.h20
1 files changed, 20 insertions, 0 deletions
diff --git a/lib/srv6.h b/lib/srv6.h
index 18d5bdebc2..acfb0631cc 100644
--- a/lib/srv6.h
+++ b/lib/srv6.h
@@ -92,6 +92,9 @@ struct srv6_locator {
bool status_up;
struct list *chunks;
+ uint8_t flags;
+#define SRV6_LOCATOR_USID (1 << 0) /* The SRv6 Locator is a uSID Locator */
+
QOBJ_FIELDS;
};
DECLARE_QOBJ_TYPE(srv6_locator);
@@ -116,6 +119,23 @@ struct srv6_locator_chunk {
uint8_t proto;
uint16_t instance;
uint32_t session_id;
+
+ uint8_t flags;
+};
+
+/*
+ * SRv6 Endpoint Behavior codepoints, as defined by IANA in
+ * https://www.iana.org/assignments/segment-routing/segment-routing.xhtml
+ */
+enum srv6_endpoint_behavior_codepoint {
+ SRV6_ENDPOINT_BEHAVIOR_RESERVED = 0x0000,
+ SRV6_ENDPOINT_BEHAVIOR_END_DT6 = 0x0012,
+ SRV6_ENDPOINT_BEHAVIOR_END_DT4 = 0x0013,
+ SRV6_ENDPOINT_BEHAVIOR_END_DT46 = 0x0014,
+ SRV6_ENDPOINT_BEHAVIOR_END_DT6_USID = 0x003E,
+ SRV6_ENDPOINT_BEHAVIOR_END_DT4_USID = 0x003F,
+ SRV6_ENDPOINT_BEHAVIOR_END_DT46_USID = 0x0040,
+ SRV6_ENDPOINT_BEHAVIOR_OPAQUE = 0xFFFF,
};
struct nexthop_srv6 {