Hi Sam,

I think you'll find this is just a documentation weakness -
in pass_common.c:netsnmp_internal_pass_parse, you can see if the type is
"octet", it's parsed by netsnmp_internal_asc2bin(), which seems to parse
space-separated octets, e.g., "00 e0 ec 00 52 6d".

  Bill


On Mon, Aug 1, 2016 at 7:53 PM, Sam Tannous <stann...@gmail.com> wrote:

> I have a need to implement various MIBs (or parts of MIBs)
> on linux as pass persistent scripts I'm running into more and
> more cases where MIBs define octet strings
> for the syntax of an OID (for example,
> BRIDGE-MIB::dot1dBaseBridgeAddress, this is really a
> MacAddress which is defined as an Octet String of length 6).
>
> While I realize we are limited to having pass (and pass persistent)
> scripts return:
>
>    "(one of the text strings integer, gauge, counter, timeticks,
> ipaddress, objectid,  or  string  )",
>
>
> I'm wondering if we can somehow accommodate
> "binary" data.    So if a script wanted to return an octet string,
> perhaps we could return a hex string representation
> and do the hexstring to binary conversion in ucd-snmp/pass_persist.c.
>
> So for the MAC address above, my script could return the string
> "00e0ec00526d" and this would be converted to the six byte in a buffer.
>
> Thanks,
> Sam Tannous
>
> ------------------------------------------------------------
> ------------------
>
> _______________________________________________
> Net-snmp-coders mailing list
> Net-snmp-coders@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/net-snmp-coders
>
>
------------------------------------------------------------------------------
_______________________________________________
Net-snmp-coders mailing list
Net-snmp-coders@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/net-snmp-coders

Reply via email to