SNMP functions are now unconditionally called and defined empty if LWIP_SNMP == 0

This removes a lot of #if #endif cluttering the source code.
This commit is contained in:
likewise
2003-02-10 13:47:47 +00:00
parent 32fbec2e48
commit c68ee2b2ed
7 changed files with 46 additions and 86 deletions

View File

@@ -114,8 +114,6 @@ PACK_STRUCT_END
#define IPH_PROTO_SET(hdr, proto) (hdr)->_ttl_proto = (HTONS((proto) | (IPH_TTL(hdr) << 8)))
#define IPH_CHKSUM_SET(hdr, chksum) (hdr)->_chksum = (chksum)
#if IP_DEBUG
void ip_debug_print(struct pbuf *p);
#endif /* IP_DEBUG */

View File

@@ -29,6 +29,8 @@
* Author: Adam Dunkels <adam@sics.se>
*
*/
#error this is the original lwIP debug.h file. do not include
#ifndef __LWIP_DEBUG_H__
#define __LWIP_DEBUG_H__

View File

@@ -106,6 +106,24 @@ void snmp_inc_udpoutdatagrams(void);
/* define everything to be empty */
#else
/* network interface */
#define snmp_add_ifinoctets()
#define snmp_inc_ifinucastpkts()
#define snmp_inc_ifinnucastpkts()
#define snmp_inc_ifindiscards()
#define snmp_add_ifoutoctets()
#define snmp_inc_ifoutucastpkts()
#define snmp_inc_ifoutnucastpkts()
#define snmp_inc_ifoutdiscards()
/* IP */
#define snmp_inc_ipinreceives()
#define snmp_inc_ipindelivers()
#define snmp_inc_ipindiscards()
#define snmp_inc_ipoutdiscards()
#define snmp_inc_ipoutrequests()
#define snmp_inc_ipunknownprotos()
// ICMP
#define snmp_inc_icmpinmsgs()
#define snmp_inc_icmpinerrors()
@@ -133,7 +151,6 @@ void snmp_inc_udpoutdatagrams(void);
#define snmp_inc_icmpouttimestampreps()
#define snmp_inc_icmpoutaddrmasks()
#define snmp_inc_icmpoutaddrmaskreps()
// TCP
#define snmp_inc_tcpactiveopens()
#define snmp_inc_tcppassiveopens()