# Using SNMP Notifications with files generated by smidump

**URL:** <https://forums.digi.com/t/using-snmp-notifications-with-files-generated-by-smidump/5571>\
**Category:** NET+OS\
**Created:** [July 26, 2007, 11:58am UTC](https://forums.digi.com/t/using-snmp-notifications-with-files-generated-by-smidump/5571 "2007-07-26T11:58:12Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![martinz](https://avatars.discourse-cdn.com/v4/letter/m/a6a055/32.png) [@martinz](https://forums.digi.com/u/martinz)\
**Post date:** [July 26, 2007, 11:58am UTC](https://forums.digi.com/t/using-snmp-notifications-with-files-generated-by-smidump/5571/1 "2007-07-26T11:58:12Z")

</div>

My MIB- file includes notifications like f. ex.  
externalAlarmTrap NOTIFICATION-TYPE  
OBJECTS {group1chA, group1chB, group2chA, group2chB}  
STATUS current  
DESCRIPTION  
“External alarm notification”  
::= {traps 4}

This is SNMPv2c. TM\_SNMP\_VERSION is set to 2 in file trsystem.h.  
When using the smidump, some functions is generated in the \*\_var.c files used to send the notifications.

For the trap shown here is generated a function  
int tfexternalalarmtrap\_trap(struct externalalarmtrap \*entry)

The structure format is defined in file \*\_local.h as

struct externalalarmtrap {  
int trap\_id;  
unsigned long group1cha;  
int index0\_0;  
unsigned long group1chb;  
int index1\_0;  
unsigned long group2cha;  
int index2\_0;  
unsigned long group2chb;  
int index3\_0;  
};

I am not quite sure what these elements means.  
The four variables are my variables for the trap.  
What is the trap\_id?  
What are the four index\*\_0?

Is it normal that when compiling the program, a lot of warnings from unused variables is generated in the files used to send the notifications in file \*\_var.c?

The send traps/notifications using smidump is not covered by any example from DIGI and the SNMP manual from Treck has not documented the functions used to send traps/notifications. I cannot get any help there.
