summaryrefslogtreecommitdiffstats
path: root/lib/smux.h
diff options
context:
space:
mode:
authorPat Ruddy <pat@voltanet.io>2020-10-12 17:45:56 +0200
committerPat Ruddy <pat@voltanet.io>2021-02-02 10:37:10 +0100
commit8902dba6423409fa95f42a5753c0613dea2ea89b (patch)
treede7346815dd2e8275b727c45b2bd6cbbda3ef041 /lib/smux.h
parentbgpd: add mplsL3VpnVrfPerfTable support (diff)
downloadfrr-8902dba6423409fa95f42a5753c0613dea2ea89b.tar.xz
frr-8902dba6423409fa95f42a5753c0613dea2ea89b.zip
lib: add IANA defines and IPv6 macro
Add defines for IANA SNMP routing protocol values Add macro for returning an IPv6 address to the SNMP agent. Signed-off-by: Pat Ruddy <pat@voltanet.io>
Diffstat (limited to 'lib/smux.h')
-rw-r--r--lib/smux.h20
1 files changed, 20 insertions, 0 deletions
diff --git a/lib/smux.h b/lib/smux.h
index 66a45a0e7..6c80f3146 100644
--- a/lib/smux.h
+++ b/lib/smux.h
@@ -44,6 +44,24 @@ extern "C" {
#define IN_ADDR_SIZE sizeof(struct in_addr)
+/* IANAipRouteProtocol */
+#define IANAIPROUTEPROTOCOLOTHER 1
+#define IANAIPROUTEPROTOCOLLOCAL 2
+#define IANAIPROUTEPROTOCOLNETMGMT 3
+#define IANAIPROUTEPROTOCOLICMP 4
+#define IANAIPROUTEPROTOCOLEGP 5
+#define IANAIPROUTEPROTOCOLGGP 6
+#define IANAIPROUTEPROTOCOLHELLO 7
+#define IANAIPROUTEPROTOCOLRIP 8
+#define IANAIPROUTEPROTOCOLISIS 9
+#define IANAIPROUTEPROTOCOLESIS 10
+#define IANAIPROUTEPROTOCOLCISCOIGRP 11
+#define IANAIPROUTEPROTOCOLBBNSPFIGP 12
+#define IANAIPROUTEPROTOCOLOSPF 13
+#define IANAIPROUTEPROTOCOLBGP 14
+#define IANAIPROUTEPROTOCOLIDPR 15
+#define IANAIPROUTEPROTOCOLCISCOEIGRP 16
+#define IANAIPROUTEPROTOCOLDVMRP 17
#undef REGISTER_MIB
#define REGISTER_MIB(descr, var, vartype, theoid) \
smux_register_mib(descr, (struct variable *)var, \
@@ -69,6 +87,8 @@ struct trap_object {
(*var_len = sizeof(struct in_addr), snmp_in_addr_val = V, \
(uint8_t *)&snmp_in_addr_val)
+#define SNMP_IP6ADDRESS(V) (*var_len = sizeof(struct in6_addr), (uint8_t *)&V)
+
extern void smux_init(struct thread_master *tm);
extern void smux_register_mib(const char *, struct variable *, size_t, int,
oid[], size_t);