Re: Opaque types
Leo Cacciari <[email protected]>
| Newsgroups | gmane.network.net-snmp.user |
|---|---|
| Message-ID | <[email protected]> |
Il 05/24/2011 07:07 PM, Fulko Hew ha scritto: > On Tue, May 24, 2011 at 10:56 AM, Leo Cacciari <[email protected]> wrote: >> Il 05/24/2011 04:32 PM, Fulko Hew ha scritto: >>> On Tue, May 24, 2011 at 9:55 AM, Leo Cacciari <[email protected]> wrote: >>>> Hi, >>>> I'm writing a SNMP (sub)agent which would allow access to some >>>> application data. Data types handled by the application, and that should >>>> somehow be exposed to the SNMP world by the agent, includes the >>>> 'standard' SNMP types (e.g. 32 bits integers or [display]strings), some >>>> sub-types of those (e.g. 16 bits integers) and other types that are more >>>> difficult to map directly on SNMP types, although there is (obviously) >>>> no problem in mapping them to ASN.1 (that's the reason to have ASN.1, >>>> after all..). >>>> >>>> [...snip...] >>> Perhaps you should give us descriptions/examples of these 'other' types you have >>> before anyone passes on opinions. >> For instance, using ASN.1 syntax: >> >> Int32Sequence ::= SEQUENCE OF INTEGER >> >> or >> >> MyComposedType ::= SEQUENCE { >> status INTEGER, >> address IpAddress, >> name >> DisplayString >> } > Disclaimer: I am not an expert. > But, in my opinion I'd be building tables to contain this data with > the appropriate indexes, > or adding columns to existing tables, especially in the case of the > latter, rather than to > 'bundle' it into a single item. The problem is that the example is only an example. The data types will be user-defined and SNMP export should be a (almost) automatic task.... > float > As for the 'sequence of integer', it is possible that this could be > replaced by BITS? Sure, but then I'd have to code the length somehow. And again, the example is just that. There will be float sequences, bolean sequences, even string sequences... Thus, beside the length of the sequence I'll have to code the type of the sequence elements and even the length of each element.... > Otherwise, again, I'd look to see how these integers relate to one > another, what their > 'real' function was, and they relate to other things that might > already be in a table somewhere. > In my history, I've never had to exchange a 'sequence of integers' > that wasn't better > expressed by a different design. Again, the design is not (completely) of my resort... -- Leo Cacciari Aliae nationes servitutem pati possunt populi romani est propria libertas ------------------------------------------------------------------------------ vRanger cuts backup time in half-while increasing security. With the market-leading solution for virtual backup and recovery, you get blazing-fast, flexible, and affordable data protection. Download your free trial now. http://p.sf.net/sfu/quest-d2dcopy1 _______________________________________________ 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