summaryrefslogtreecommitdiff
path: root/lib/smux.h
AgeCommit message (Collapse)Author
2012-06-25snmp: let handlers accept OID from a lesser prefixVincent Bernat
Most table handlers do not expect to be given an OID whose prefix is outside what they can handle. This is not a problem with the SMUX implementation since it always correct the OID such that the prefix matches. However, this is not the case for the AgentX implementation. A new function, smux_header_table() is used to do this normalization.
2012-06-25agentx: handle SNMP trapsVincent Bernat
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.
2012-06-25smux: drop findVar element from trap object structVincent Bernat
This element was not unused.
2012-06-25smux: remove `tick` argument from smux_trap()Vincent Bernat
smux_trap() contains an argument whose use appears to be to set sysUpTime.0/timestamp field in SNMP trap. However, this value is not used in smux_trap(). Moreover, it is expected that this field is the value of sysUpTime.0 when the trap was sent and not any other time related to the trap. To avoid any confusion, we remove this field from the signature of the function.
2012-06-25smux: isolate SMUX implementation from SNMP implementationVincent Bernat
lib/snmp.c gets OID related helper functions that can be used with another SNMP interface. smux.h is cleaned of SMUX specific bits to only expose functions that may be used by an alternative implementation. We also do not redefine functions already present in NetSNMP. Just use the appropriate headers.
2009-06-18[cleanup] Use const in smux interfaceStephen Hemminger
smux_trap and oid_copy should allow read-only source.
2009-06-02[smux] 64-bit fix for lib/smux.h SNMP_INTEGER() macroChris Caputo
Macro SNMP_INTEGER() prepares data which is eventually processed by asn_build_int(). SNMP_INTEGER() was using "int32_t" whereas asn_build_int() uses "long". On 32-bit systems these are the same, both 4 bytes, but on x86 64-bit systems "long" is 8 bytes. asn_build_int()'s reaction to an improperly sized value is to return a NULL pointer. Quagga's smux.c would eventually get this NULL pointer and use it in calculations to determine how much data to send over the smux connection, resulting in garbage being sent to the SNMP agent. Corrected SNMP_INTEGER() to use "long". Tested on 32-bit and 64-bit x86 Linux 2.6.27.10 systems running Quagga 0.99.11 with bgpd smux.
2005-09-292005-09-29 Alain Ritoux <alain.ritoux@6wind.com>vincent
* lib/smux.[ch]: allow to retreive global OID (identified by <0 namelen). * ospf_ism.c: generate SNMP traps on Interface state change * ospf_nsm.c: generate SNMP traps on Neighbour state change * ospf_snmp.[ch]: support for SNMP traps for interface and neighbours.
2005-05-062005-05-06 Paul Jakma <paul@dishone.st>paul
* (general) extern and static'ification of functions in code and header. Cleanup any definitions with unspecified arguments. Add casts for callback assignments where the callback is defined, typically, as passing void *, but the function being assigned has some other pointer type defined as its argument, as gcc complains about casts from void * to X* via function arguments. Fix some old K&R style function argument definitions. Add noreturn gcc attribute to some functions, as appropriate. Add unused gcc attribute to some functions (eg ones meant to help while debugging) Add guard defines to headers which were missing them. * command.c: (install_node) add const qualifier, still doesnt shut up the warning though, because of the double pointer. (cmp_node) ditto * keychain.c: (key_str2time) Add GET_LONG_RANGE() macro, derived fromn vty.h ones to fix some of the (long) < 0 warnings. * thread.c: (various) use thread_empty (cpu_record_hash_key) should cast to uintptr_t, a stdint.h type * vty.h: Add VTY_GET_IPV4_ADDRESS and VTY_GET_IPV4_PREFIX so they removed from ospfd/ospf_vty.h * zebra.h: Move definition of ZEBRA_PORT to here, to remove dependence of lib on zebra/zserv.h
2004-10-13Make initializing smux connection configurable - "smux peer OID" commandhasso
initializes connection, and "no smux peer" command terminates it. Fixes bugzilla #47 and #112.
2004-10-112004-10-11 Paul Jakma <paul@dishone.st>paul
* if.h: mtu's should be unsigned. * routemap.{c,h}: const char updates * smux.{c,h}: ditto
2003-06-192003-06-19 Paul Jakma <paul@dishone.st>paul
* Fix lib/smux.c's reliance on daemons exporting struct thread_master *master.
2002-12-13Initial revisionpaul