iopclan.blogg.se

Snmp trap receiver software
Snmp trap receiver software








The requets-id may be a value incremented each time a notification in sent. When you send an INFORMV2 to an IP address, you specify a unique request-id to identify the request (parameter to SNMP_trap_send()). In order to handle responses to INFORMV2 notifications, I've slightly modified the RTCS source code to add support for a user provided handler called each time a response is received. NOTE : for debug, the traps can be displayed by running the SNMPB software on a system without the need to configure it to receive traps : just run SNMPB Within this code I added a demo function SNMP_send_trap_demo() to send several kind of traps for testing. you can send INFORMV2 traps in addition to TRAPV1 and TRAPV2 you can add as many additional bindings (data) you need you can specify the request-id (usefull for resending message) is a low level one so your can specify the target IP directly (needed to implement V2 inform traps) Instead of calling functions in traps.c, you call SNMP_trap_send() instead. You can put this code in your application or move it to the BSP tree (as you want). size (that is easy to fix if needed), I wrote.a new code as replacement for traps.c. To fix these problems, except the ASN1_BKWRITE. It would probably be better to define these macros as functions. The code is duplicated leading to excessive code size (text section). macros are made of several lines of code, and I'm not sure that the compiler can optimize the code size if these macros are used many times in the code. some inconsistencies between signed / unsignes types and ASN1 macros used user specific trap V2 messages seem to have some wrong data : message type not recognized by SNMPB tool (SNMP Browser, a nice software for everyone working with SNMP)

snmp trap receiver software

code is too big because it is made of several functions that where copied and modified from other functions a more generic and unique function can be used instead (except maybe for linkup/linkdown that contain some additonal code)

snmp trap receiver software

I used the SNMP trap code in MQX34 and MQX37 to send some V1/V2 traps and found the following problems :in rtcs/source/snmp/traps.c :










Snmp trap receiver software