Dave,
The code is here:
char *
get_netSnmpHostAddress(void *data_context, size_t * ret_len)
{
my_data_info *datainfo = data_context;
*ret_len = sizeof(in_addr_t); /* XXX: make sure it's 4 */
return (char *) &datainfo->theaddr;
}
int
set_netSnmpHostAddress(void *data_context, char *val, size_t val_len)
{
my_data_info *datainfo = data_context;
memcpy(&datainfo->theaddr, val, val_len);
return SNMP_ERR_NOERROR;
}
It works with mbrowse. Don't know if there is anything missing in it?
Thanks,
-Zimmer
On Wed, Apr 27, 2011 at 5:54 PM, Dave Shield <d.t.shi...@liverpool.ac.uk>wrote:
> On 27 April 2011 16:05, Zimmer Hu <zih...@gmail.com> wrote:
> >> snmpset -v 2c -c private localhost netSnmpHostAddress.\"coconut\" =
> 7F000101
> > Error in packet.
> > Reason: wrongValue (The set value is illegal or unsupported in some way)
>
> What does the code that handles this MIB object look like?
> In particular, the code for processing SET requests.
>
> Dave
>
------------------------------------------------------------------------------
WhatsUp Gold - Download Free Network Management Software
The most intuitive, comprehensive, and cost-effective network
management toolset available today. Delivers lowest initial
acquisition cost and overall TCO of any competing solution.
http://p.sf.net/sfu/whatsupgold-sd
_______________________________________________
Net-snmp-coders mailing list
Net-snmp-coders@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/net-snmp-coders