If an object contain 1 byte string, it will be BIT STRING.
if an object contains more than 1 and less than 65535 bytes, OCTET STRING
On Tue, Jun 6, 2017 at 10:24 AM, Madhusudhana R <madhusudhan...@in.abb.com>
wrote:
> Hi Bill,
>
>
>
> Thanks for the answer. It exactly answered my question.
>
>
>
> One more query: I need to know how the values for BITSTRING and
> OCTETSTRING looks like.
>
> Please provide some examples as I am not getting right info on internet.
>
>
>
> Thanks in advance.
>
>
>
> Regards,
>
> Madhu
>
>
>
> *From:* Bill Fenner [mailto:fen...@gmail.com]
> *Sent:* Monday, June 05, 2017 9:54 PM
> *To:* Madhusudhana R <madhusudhan...@in.abb.com>
> *Cc:* net-snmp-coders@lists.sourceforge.net
> *Subject:* Re: Support for heterogeneous trap types
>
>
>
> On Mon, Jun 5, 2017 at 10:55 AM, Madhusudhana R <madhusudhan...@in.abb.com>
> wrote:
>
> Hi Coders,
>
>
>
> My query is, does net-snmp support heterogeneous trap types?
>
> More precisely, is it possible to send traps with different data types
> like integer signed/unsigned/32bit/64bit , strings etc. during same
> execution
>
>
>
> Use case:
>
> For our convenience, we are reading the traps from a file which is
> converted to trap commands. Here I have defined say 12 traps for different
> data types.
>
> When trap values of different types are used to send, traps are not
> received on manager end.
>
> But trap values of same types are working fine.
>
>
>
> Please let me know whether heterogeneous trap types are allowed in SNMP
> architecture or not.
>
>
>
> Yes. Here's an example:
>
>
>
> sending:
>
> snmptrap -v 2c -c trappy localhost:9162 42 IF-MIB::linkUp ifIndex.42 i 42
> ifDescr.42 s 'My Awesome Interface' enterprises.6316.1.42 c 99
> enterprises.6316.2.42 3 4242 enterprises.6316.3.42 C 1234567890
>
>
>
> snmptrapd output:
>
> 2017-06-05 09:21:44 localhost.localdomain [UDP:
> [127.0.0.1]:56631->[127.0.0.1]:9162]:
>
> DISMAN-EVENT-MIB::sysUpTimeInstance = Timeticks: (42) 0:00:00.42
> SNMPv2-MIB::snmpTrapOID.0 = OID: IF-MIB::linkUp IF-MIB::ifIndex.42 =
> INTEGER: 42 IF-MIB::ifDescr.42 = STRING: My Awesome Interface
> SNMPv2-SMI::enterprises.6316.1.42 = Counter32: 99
> SNMPv2-SMI::enterprises.6316.2.42 = 4242 SNMPv2-SMI::enterprises.6316.3.42
> = Counter64: 1234567890
>
>
>
> This single trap PDU contains INTEGER, String, Counter32, Integer32, and
> Counter64 types in one trap. I believe that is what you mean when you say
> "trap values of different types".
>
>
>
> Bill
>
>
>
> ------------------------------------------------------------
> ------------------
> Check out the vibrant tech community on one of the world's most
> engaging tech sites, Slashdot.org! http://sdm.link/slashdot
> _______________________________________________
> Net-snmp-coders mailing list
> Net-snmp-coders@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/net-snmp-coders
>
>
--
Thanks,
Pranesh
------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Net-snmp-coders mailing list
Net-snmp-coders@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/net-snmp-coders