Dave Shield wrote:
> On 24/05/07, Varun Chandramohan <[EMAIL PROTECTED]> wrote:
>> So when i was implementing this, i could not figure out which
>> data type to be used for this.
>
> The data type to use should be the one specified in the MIB file.
>
>> ASN_IPADDRESS seem to support only ipv4
>
> ASN_IPADDRESS is used for MIb objects of type 'IpAddress'
>
>> and for ipv6 i might have to use ASN_OCTET_STR.
>
> The MIB object tunnelIfLocalInetAddress is of type 'InetAddress'
> which is a Textual Convention, built on top of the ASN type OCTET STRING
>
> So for this MIB oibject, you should set the value to be of type
> ASN_OCTET_STR - *regardless* of whether this value represents
> an IPv4 or IPv6 address.
>
code:
case 9:
ret_int = tunnel->localinetaddr;
*var_len = 16;
vp->type = ASN_OCTET_STR;
return (u_char *) & ret_int;
WIll this be good to go??? so my output will be in hex even for ipv4?
> Dave
-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
Net-snmp-coders mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/net-snmp-coders