summaryrefslogtreecommitdiff
path: root/lib/smux.c
diff options
context:
space:
mode:
authorVincent Bernat <bernat@luffy.cx>2012-05-25 11:17:01 +0200
committerVincent Bernat <bernat@luffy.cx>2012-06-25 19:03:23 +0200
commitb7c0d0651cd64f644d02ef5e4d1b82febe7e57d8 (patch)
tree5480eff7b8581e1168d23657da0f30e23100d7bc /lib/smux.c
parentb8cf46b715b2c21db5dce8118c70b4dd9b5255a3 (diff)
agentx: handle SNMP traps
smux_trap() signature has been changed to provide appropriate level information to send SNMPv2 notifications. This includes the addition of the enterprise OID to use (from which is derived the SNMP trap OID) and the MIB registry to locate the appropriate function for variable bindings provided by the trap. The SMUX implementation has been updated but ignore the provided enterprise OID. Instead, it still uses the SMUX peer OID to keep compatibility with previous versions of Quagga. The SMUX implementation also ignores the provided MIB registry since it uses smux_get() function to grab the appropriate values. This is not possible with the AgentX implementation since there is no such function provided by NetSNMP.
Diffstat (limited to 'lib/smux.c')
-rw-r--r--lib/smux.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/lib/smux.c b/lib/smux.c
index 38c7018e..07466400 100644
--- a/lib/smux.c
+++ b/lib/smux.c
@@ -968,8 +968,15 @@ smux_open (int sock)
return send (sock, buf, (ptr - buf), 0);
}
+/* `ename` is ignored. Instead of using the provided enterprise OID,
+ the SMUX peer is used. This keep compatibility with the previous
+ versions of Quagga.
+
+ All other fields are used as they are intended. */
int
-smux_trap (const oid *name, size_t namelen,
+smux_trap (struct variable *vp, size_t vp_len,
+ const oid *ename, size_t enamelen,
+ const oid *name, size_t namelen,
const oid *iname, size_t inamelen,
const struct trap_object *trapobj, size_t trapobjlen,
u_char sptrap)