Re: Payload for Traps
"Dave Shield" <[email protected]>
| Newsgroups | gmane.network.net-snmp.user |
|---|---|
| Message-ID | <[email protected]> |
On 06/11/06, Srivastava, Namburi (IE10) <[email protected]> wrote: > snmp_varlist_add_variable(&var_list, > myTrapPayLoad_oid, > OID_LENGTH(myTrapPayLoad_oid), > ASN_INTEGER, > (u_char *)&id, sizeof(id)); > In the above function call, the argument id contains the value. > But now, I have to add payloads of size more than 30-40 bytes. Presumably a string value, rather than an integer? > How can I do that... ??? Exactly the same way: snmp_varlist_add_variable(&var_list, {oid_buf}, OID_LENGTH({oid_buf}), ASN_{TYPE}, (char *)&{value}, sizeof({value})); (Or possibly "strlen({value})" if it's a printable, null-terminated string). Dave ------------------------------------------------------------------------- Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642 _______________________________________________ Net-snmp-users mailing list [email protected] Please see the following page to unsubscribe or change other options: https://lists.sourceforge.net/lists/listinfo/net-snmp-users