Skip to content

Commit bcc6dab

Browse files
bfd: Added bfd session detection time in show and json
Signed-off-by: Sougata <sougatahitcs@gmail.com>
1 parent b1cd000 commit bcc6dab

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

bfdd/bfdd_vty.c

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -219,6 +219,9 @@ static void _display_peer(struct vty *vty, struct bfd_session *bs)
219219
if (bs->xmt_TO_actual > 0)
220220
vty_out(vty, "\t\t\tTransmission interval (actual with jitter): %" PRIu64 "ms\n",
221221
bs->xmt_TO_actual / 1000);
222+
if (bs->detect_TO > 0)
223+
vty_out(vty, "\t\t\tDetection timeout: %" PRIu64 "ms\n",
224+
bs->detect_TO / 1000);
222225
if (bs->timers.required_min_echo_rx != 0)
223226
vty_out(vty, "\t\t\tEcho receive interval: %ums\n",
224227
bs->timers.required_min_echo_rx / 1000);
@@ -341,6 +344,9 @@ static struct json_object *__display_peer_json(struct bfd_session *bs)
341344
bs->timers.required_min_rx / 1000);
342345
json_object_int_add(jo, "transmit-interval",
343346
bs->timers.desired_min_tx / 1000);
347+
if (bs->detect_TO > 0)
348+
json_object_int_add(jo, "detection-timeout",
349+
bs->detect_TO / 1000);
344350
json_object_int_add(jo, "echo-receive-interval",
345351
bs->timers.required_min_echo_rx / 1000);
346352
if (bs->bfd_mode == BFD_MODE_TYPE_SBFD_INIT || bs->bfd_mode == BFD_MODE_TYPE_SBFD_ECHO) {

0 commit comments

Comments
 (0)