Re: MAC Address As Index
Krishna Chaitanya <[email protected]>
| Newsgroups | gmane.network.net-snmp.devel |
|---|---|
| Message-ID | <CABPxzYKe=0aFzDSYG9q95PZPwjGo=BGOk64KrS=Lc3-GBOdTuw@mail.gmail.com> |
On Mon, Aug 26, 2019 at 9:22 PM Bill Fenner <[email protected]> wrote: > > On Tue, Aug 20, 2019 at 8:45 AM Krishna Chaitanya <[email protected]> wrote: >> >> Hi, >> >> When using MAC Address as an index ( I am using MacAddress type from >> SNMPv2-TC.) the output is incorrect because the length of the string >> is prefixed as mac address is defined as OCTET STR there is an extra >> byte and the last byte of mac address is interpreted as next OID. >> >> snmpwalk: >> HistValue."wlp8s0f0".'....B.'.hist_2.2.19 >> snmpwalk -OX >> HistValue["wlp8s0f0"][STRING: 06:00:90:e6:42:99][hist_2][2].19 >> >> In the above examples last but one OID 2 is hist_2. Is there a way to >> disable prefixing of length? > > > The prefixing of length is done by the agent. Are you asking about a MIB module that you implemented? Try changing your object definition from ASN_OCTET_STR to ASN_PRIV_IMPLIED_OCTET_STR. Yes, I am using my own MIB and changing to ASN_PRIV_IMPLIED_OCTET_STR in the subagent worked. Thanks, Bill.