summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorwumu.zsl <wumu.zsl@alibaba-inc.com>2025-01-20 13:48:38 +0000
committerwumu.zsl <wumu.zsl@alibaba-inc.com>2025-01-22 15:00:24 +0000
commitc4f9964aec03e1b076904452f124c50fbfa940f8 (patch)
treef6214a7af1e6cea1fee8698d82d1aeeabcb21bfb /lib
parent32705fe7206438fb9cd23c0a866992fcc13788e0 (diff)
bfdd: add bfdname in bfd_key
sbfd will use bfdname for key hash, We introduced a bfd-name for every sbfd session, normal BFD sessions can leave it as NULL. A unique bfd-name can be used to identify a sbfd session quickly. This is quite useful in our Srv6 deployment for path protection case. For example, if use the sbfd session to protect the SRv6 path A-B-D, we would assign the name 'path-a-b-d' or 'a-b-d' to the session. Signed-off-by: wumu.zsl <wumu.zsl@alibaba-inc.com>
Diffstat (limited to 'lib')
-rw-r--r--lib/bfd.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/lib/bfd.h b/lib/bfd.h
index 99790f96a5..07d4c9781d 100644
--- a/lib/bfd.h
+++ b/lib/bfd.h
@@ -26,6 +26,8 @@ extern "C" {
#define BFD_PROFILE_NAME_LEN 64
+#define BFD_NAME_SIZE 255
+
const char *bfd_get_status_str(int status);
extern void bfd_client_sendmsg(struct zclient *zclient, int command,
@@ -409,6 +411,8 @@ struct bfd_session_arg {
uint32_t min_tx;
/** Detection multiplier. */
uint32_t detection_multiplier;
+ /* bfd session name*/
+ char bfd_name[BFD_NAME_SIZE + 1];
};
/**