[AGENT++] How to add trap severity in V2c

Frank Fock fock at agentpp.com
Sat Jan 23 10:52:58 CET 2010


Hi Rajesh,

SNMP does not define a "trap severity".
Therefore, SNMP++ does not provide any
means for adding it.
You can however, define your own in a
MIB module. Then you add it as any other
VB.

Regards,
Frank

On 22.01.2010 16:39, Rajesh Bansal wrote:
> Hi Friends,
>
> I am sending trap by using following code .
> CAn you tell me how to add severity level in trap send by agentpp.
>
> FOllowing is my code.
>   NotificationOriginator no;
>
> no.add_v2_trap_destination(dest, "v2trap", "v2trap", "public");
> Oidx o1(oid_string);
>          Oidx noti(oid_not_string);
>          SnmpInt32 s1=value;
>          Vbx* v1 = new Vbx[2];
>          v1[0].set_oid(o1);
>          v1[0].set_value(s1);
>          sprintf(oid_string,"%s.%d.2.0",defaultOidNo,sys_no);
>          v1[1].set_oid(oid_string);
>          v1[1].set_value(IpAddress(ip));
>          //v1[1] = Vbx(o1,s1);
>
>          mibr->notify("",noti,v1,2);
>
> Plese help me .
>
> Best Regards,
> Rajesh Bansal
> _______________________________________________
> AGENTPP mailing list
> AGENTPP at agentpp.org
> http://lists.agentpp.org/mailman/listinfo/agentpp

-- 
AGENT++
http://www.agentpp.com
http://www.snmp4j.com
http://www.mibexplorer.com
http://www.mibdesigner.com




More information about the AGENTPP mailing list