lwip-users
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [lwip-users] Lwip SNMP support: adding LWIP_IPSTACK_MIB2 Compile-Tim


From: address@hidden
Subject: Re: [lwip-users] Lwip SNMP support: adding LWIP_IPSTACK_MIB2 Compile-Time configuration
Date: Tue, 16 Feb 2010 16:40:43 +0100
User-agent: Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.6; de; rv:1.9.1.7) Gecko/20100111 Thunderbird/3.0.1

Kieran Mansley wrote:
I'm still not quite sure why you would ever need

#if defined(LWIP_SNMP) || defined(LWIP_SNMP_MIB2)

as in your previous example.  Surely code in lwIP will either be part of
the SNMP agent protocol (and so controlled by LWIP_SNMP) or be the MIB-2
interface (and so controlled by LWIP_SNMP_MIB2) but not both (which
would require LWIP_SNMP || LWIP_SNMP_MIB2).

I assume it's the case that it doesn't make much sense to have LWIP_SNMP
defined without LWIP_SNMP_MIB2.  If that's right, we should have a
compile time check that this dependency is met as with some of the other
options in src/core/init.c
Yep, the places where SNMP functions for mib2 are called should only need LWIP_SNMP_MIB2 (or whatever name that define has) and check add the check in init.c. Thinking about it, the change is rather trivial: the guards in snmp.h and netif.h would have to be changed from LWIP_SNMP to LWIP_MIB2 and the usages of LWIP_SNMP/snmp_get_sysuptime() in netif.c would have to be fixed and that should be it.

Simon




reply via email to

[Prev in Thread] Current Thread [Next in Thread]