On 18/10/06, Patai Tamás <[EMAIL PROTECTED]> wrote: > Receive traps (for example with snmpd) then process the trap (by modifying > snmptrapd) and get the variables of the MIB from the trap and store them for > further processing.
You should be able to do this by registering a "traphandle" (in the snmptrapd.conf file) - either for specific traps or for "all" traps. This would be a simple program (or script) that would be invoked whenever a relevant trap is received - and would be passed the varbind payload list on standard input. You could then process this as you saw fit. There's no real need to touch the C code at all. > To do this I guess I have to convert the MIB I want to receive as a trap to > a C file. > I tried to do this (mib2c) but the resulting .c and .h file did not > contain all the variables of that MIB The mib2c.notify.conf is actually intended for use in an agent, and is designed for *generating* the trap, rather than processing it. > Can anyone help how to do this. I tried to get the neccessary information > from the faq and readme files but cannot start. Have a look at snmptrapd.conf(5) - in particular the section on "traphandle" Dave ------------------------------------------------------------------------- Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642 _______________________________________________ Net-snmp-coders mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/net-snmp-coders
