mirror of
https://git.savannah.nongnu.org/git/lwip.git
synced 2026-05-16 05:06:54 +08:00
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:
@@ -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 */
|
||||
|
||||
@@ -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__
|
||||
|
||||
|
||||
@@ -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()
|
||||
|
||||
Reference in New Issue
Block a user