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


_______________________________________________
lwip-users mailing list
lwip-users@nongnu.org
http://lists.nongnu.org/mailman/listinfo/lwip-users

Reply via email to