Hello..

 

I want to send a snmptrap

snmptrap format  is like this..

 

Figure 279: SNMP Version 1 (SNMPv1) Trap-PDU Format

 

 

 

I just want to send a basic snmptrap(v1)

 

In net-snmp..  to send trap, process like this..

 

1. make personal Trap-MIB

2. transform Trap-MIB to c source by mib-2c

3. the source file format is like below

 

ex)

 

static oid snmptrap_oid[] = {1,3,6,1,6,3,1,1,4,1,0};

 

int send_nodedown_trap(void)

{

 

netsnmp_variable_list  *   var_list = NULL

 

oid   nodedown_oid[] = { 1,3,6,1,4,1,1000,99,12,1,0,2};

 

snmp_varlist_add_variable(&var_list,

                                                    OID_LENGTH(snmptrap_oid),

                                                    ASN_OBJECT_ID,

                                                    nodedown_oid, sizeof(nodedown_oid));

 

 

.......

}

 

but i want to make a basic SNMPTrap using net-snmp library

 

Use upper example, can i make a basic SNMPTrap include information of figure 279

 

please help me..

 

 

 



------------------------------------------------------------------------------
Start uncovering the many advantages of virtual appliances
and start using them to simplify application deployment and
accelerate your shift to cloud computing.
http://p.sf.net/sfu/novell-sfdev2dev
_______________________________________________
Net-snmp-coders mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/net-snmp-coders

Reply via email to