Enterprise-specific SNMP Notifications Won't Send

I have been working first with my own application and then with the example nasnmpv3 application, and I have been unable to send notifications with a generic type of SNMP_TRAP_ENTERPRISESPECIFIC. Other trap types such as SNMP_TRAP_WARMSTART or SNMP_TRAP_LINKUP work just fine and are sent with versions 1, 2c, and 3, and the data shows up in my network packet sniffer. On the other hand, enterprise specific traps sent with the naSnmpSendNotification function return with a value of 0 (no error) and yet no packets show up on the network packet sniffer and are also not received by the PC. What’s odd to me is that the example application doesn’t work, which would point me to something wrong with the BSP (I’ve made a couple of minor modifications, I think mostly in dialog.c) or in the SNMP library. Has anyone run into anything like this? Any suggestions would be appreciated, or confirmation that enterprise-specific notifications or nasnmpv3 sample program are working in v7.3.

Platform: Net+OS 7.3
ifindex: 0 (set up with a static IPv4 address)

Thanks,
Josiah

Hello

There is a defect in the snmpv3 example application that will keep enterprise traps from being sent out, as follows:
IN file cli.c in function sendTrap, look for the following comment:

/* variable 1 is integer 0x1010 at 1.3.6.1.4.1.6000.1.3.1 */
The line beginning with variables[0].value_length =
This is currently assigned sizeof(oid1value). I believe that gives a value of 10. value_length given that the value is an integer should have a value of 4. Thus change sizeof(oid1value) to sizeof(int).

A patch is available at the digi web site that corrects this issue.

Unfortunately, down in the bowels of the snmp engine, when the error is found, by the time it perculates back to the application, the error is lost and the application gets an indication that the trap was sent, when in fact it was not.

Anyway, changing the value_length assignment should facilitate sending enterprise traps out.

I tried making that change but it didn’t seem to help. I also found an SNMP patch for v7.3 but it didn’t seem to help either, though I didn’t try much.

What I did find in my application is that when the trap was included in the MIB file, the attached function was created in the _var.c file. If I directly call that function (in this case, called tfnotifycurrentthreshold_trap), a trap is successfully sent. naSnmpSendNotifications still doesn’t work for me for enterprise-specific traps.

While a trap is sent when I call tfnotifycurrentthreshold_trap, there is no documentation as to how to bind variables to the trap. By reading the function it seems obvious that the loop would bind as many variables as is necessary, but there are no details on the prototype for tfFillTrapVars. Is there any documentation on how to customize these trap functions?