[AGENT++] Capturing Outgoing SNMP Traffic / PDU Responses for Logging

Jochen Katz katz at agentpp.com
Thu May 21 21:29:24 CEST 2009


Hi,

> One of our secondary requirements is to log all incoming and outgoing
> traffic at any agent. One proposed solution was to use Ethereal /
> Wireshark but unfortunately this was not accepted by the customer.

if you're using Linux, you could use the LD_PRELOAD mechanism to catch
the recvfrom() and sendto() library functions. This way you would not
have to modify snmp++/agent++.

> I have managed to implement code inside our agents that use exposed
> AGENT++ functionality to capture incoming requests. Thus we are able to
> log SNMP GET and SNMP GET BULK. And we can log outgoing SNMP TRAP too.

Ok, your customer seems to want high level logging. So you will have to
use subclasses of Snmpx and overwrite send() and report() functions.
Additional reports are sent from within snmp++ v3MP::send_report()
function (which is private...), so you will have to modify snmp++.

Regards,
  Jochen



More information about the AGENTPP mailing list