snmpget prints extra 0's for IPv6 address
Hi,
Pls help me in this issue.
I am using
snmpwalk -v 3 -u ntf-302 -l au...for a MIB table which contains IPv6 address.
In Subagent:
For testing purpose I have hardcoded the value as
inet_pton(AF_INET6, "ffff:ffff:ffff::",Ipv6Address);
in _get() function I am accessing this address as
memcpy((*V6Addr_val_ptr_ptr),
Ipv6Address,16);
I have hardcoded 16 as the size of Ipv6Address[16] and even wherever i use memset.
But my snmpwalk command prints the address along with 24 bytes of 0s
SNMPv2-SMI::enterprises.182.3.1.1.15.1.1.2.50 = Hex-STRING: FF FF 00 00 00 00 00 00 00 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00
is there a place where I am making some blunder...??
I guess I have briefed my prob...if the info is not sufficient i can give more...!
|