summaryrefslogtreecommitdiffstats
path: root/isisd/isis_pdu_counter.h
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-09 13:16:35 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-09 13:16:35 +0000
commite2bbf175a2184bd76f6c54ccf8456babeb1a46fc (patch)
treef0b76550d6e6f500ada964a3a4ee933a45e5a6f1 /isisd/isis_pdu_counter.h
parentInitial commit. (diff)
downloadfrr-e2bbf175a2184bd76f6c54ccf8456babeb1a46fc.tar.xz
frr-e2bbf175a2184bd76f6c54ccf8456babeb1a46fc.zip
Adding upstream version 9.1.upstream/9.1
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'isisd/isis_pdu_counter.h')
-rw-r--r--isisd/isis_pdu_counter.h30
1 files changed, 30 insertions, 0 deletions
diff --git a/isisd/isis_pdu_counter.h b/isisd/isis_pdu_counter.h
new file mode 100644
index 0000000..5c35b4f
--- /dev/null
+++ b/isisd/isis_pdu_counter.h
@@ -0,0 +1,30 @@
+// SPDX-License-Identifier: GPL-2.0-or-later
+/*
+ * IS-IS Routing protocol - isis_pdu_counter.c
+ * Copyright (C) 2018 Christian Franke, for NetDEF Inc.
+ */
+#ifndef ISIS_PDU_COUNTER_H
+#define ISIS_PDU_COUNTER_H
+
+enum pdu_counter_index {
+ L1_LAN_HELLO_INDEX = 0,
+ L2_LAN_HELLO_INDEX,
+ P2P_HELLO_INDEX,
+ L1_LINK_STATE_INDEX,
+ L2_LINK_STATE_INDEX,
+ FS_LINK_STATE_INDEX,
+ L1_COMPLETE_SEQ_NUM_INDEX,
+ L2_COMPLETE_SEQ_NUM_INDEX,
+ L1_PARTIAL_SEQ_NUM_INDEX,
+ L2_PARTIAL_SEQ_NUM_INDEX,
+ PDU_COUNTER_SIZE
+};
+typedef uint64_t pdu_counter_t[PDU_COUNTER_SIZE];
+
+void pdu_counter_print(struct vty *vty, const char *prefix,
+ pdu_counter_t counter);
+void pdu_counter_count(pdu_counter_t counter, uint8_t pdu_type);
+void pdu_counter_count_drop(struct isis_area *area, uint8_t pdu_type);
+uint64_t pdu_counter_get_count(pdu_counter_t counter, uint8_t pdu_type);
+
+#endif