From 261af8dc0709979c32364ad70ca02243cef749b0 Mon Sep 17 00:00:00 2001 From: fbernon Date: Wed, 22 Aug 2007 11:26:01 +0000 Subject: [PATCH] netif.h, netif.c, opt.h: Rename LWIP_NETIF_CALLBACK in LWIP_NETIF_STATUS_CALLBACK to be coherent with new LWIP_NETIF_LINK_CALLBACK option before next release. --- CHANGELOG | 4 ++++ src/core/netif.c | 12 ++++++------ src/include/lwip/netif.h | 8 ++++---- src/include/lwip/opt.h | 6 +++--- 4 files changed, 17 insertions(+), 13 deletions(-) diff --git a/CHANGELOG b/CHANGELOG index 00506b18..bc5cca14 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -19,6 +19,10 @@ HISTORY ++ New features: + 2007-08-22 Frédéric Bernon + * netif.h, netif.c, opt.h: Rename LWIP_NETIF_CALLBACK in LWIP_NETIF_STATUS_CALLBACK + to be coherent with new LWIP_NETIF_LINK_CALLBACK option before next release. + 2007-08-22 Frédéric Bernon * tcpip.h, tcpip.c, ethernetif.c, opt.h: remove options ETHARP_TCPIP_INPUT & ETHARP_TCPIP_ETHINPUT, now, only "ethinput" code is supported, even if the diff --git a/src/core/netif.c b/src/core/netif.c index 6415fe69..9dd30fa0 100644 --- a/src/core/netif.c +++ b/src/core/netif.c @@ -48,11 +48,11 @@ #include "netif/etharp.h" #endif /* LWIP_ARP */ -#if LWIP_NETIF_CALLBACK +#if LWIP_NETIF_STATUS_CALLBACK #define NETIF_STATUS_CALLBACK(n) { if (n->status_callback) (n->status_callback)(n); } #else #define NETIF_STATUS_CALLBACK(n) { /* NOP */ } -#endif /* LWIP_NETIF_LINK_CALLBACK */ +#endif /* LWIP_NETIF_STATUS_CALLBACK */ #if LWIP_NETIF_LINK_CALLBACK #define NETIF_LINK_CALLBACK(n) { if (n->link_callback) (n->link_callback)(n); } @@ -108,9 +108,9 @@ netif_add(struct netif *netif, struct ip_addr *ipaddr, struct ip_addr *netmask, /* netif not under AutoIP control by default */ netif->autoip = NULL; #endif /* LWIP_AUTOIP */ -#if LWIP_NETIF_CALLBACK +#if LWIP_NETIF_STATUS_CALLBACK netif->status_callback = NULL; -#endif /* LWIP_NETIF_CALLBACK */ +#endif /* LWIP_NETIF_STATUS_CALLBACK */ #if LWIP_NETIF_LINK_CALLBACK netif->link_callback = NULL; #endif /* LWIP_NETIF_LINK_CALLBACK */ @@ -425,7 +425,7 @@ void netif_set_down(struct netif *netif) } } -#if LWIP_NETIF_CALLBACK +#if LWIP_NETIF_STATUS_CALLBACK /** * Set callback to be called when interface is brought up/down */ @@ -434,7 +434,7 @@ void netif_set_status_callback( struct netif *netif, void (* status_callback)(st if ( netif ) netif->status_callback = status_callback; } -#endif /* LWIP_NETIF_CALLBACK */ +#endif /* LWIP_NETIF_STATUS_CALLBACK */ #if LWIP_NETIF_LINK_CALLBACK /** diff --git a/src/include/lwip/netif.h b/src/include/lwip/netif.h index 80f2635a..fe48f823 100644 --- a/src/include/lwip/netif.h +++ b/src/include/lwip/netif.h @@ -102,11 +102,11 @@ struct netif { * to send a packet on the interface. This function outputs * the pbuf as-is on the link medium. */ err_t (* linkoutput)(struct netif *netif, struct pbuf *p); -#if LWIP_NETIF_CALLBACK +#if LWIP_NETIF_STATUS_CALLBACK /** This function is called when the netif state is set to up or down */ void (* status_callback)(struct netif *netif); -#endif /* LWIP_NETIF_CALLBACK */ +#endif /* LWIP_NETIF_STATUS_CALLBACK */ #if LWIP_NETIF_LINK_CALLBACK /** This function is called when the netif link is set to up or down */ @@ -218,12 +218,12 @@ void netif_set_gw(struct netif *netif, struct ip_addr *gw); void netif_set_up(struct netif *netif); void netif_set_down(struct netif *netif); u8_t netif_is_up(struct netif *netif); -#if LWIP_NETIF_CALLBACK +#if LWIP_NETIF_STATUS_CALLBACK /* * Set callback to be called when interface is brought up/down */ void netif_set_status_callback( struct netif *netif, void (* status_callback)(struct netif *netif)); -#endif /* LWIP_NETIF_CALLBACK */ +#endif /* LWIP_NETIF_STATUS_CALLBACK */ #if LWIP_NETIF_LINK_CALLBACK /* diff --git a/src/include/lwip/opt.h b/src/include/lwip/opt.h index 4539d49a..3f902514 100644 --- a/src/include/lwip/opt.h +++ b/src/include/lwip/opt.h @@ -693,11 +693,11 @@ #endif /** - * LWIP_NETIF_CALLBACK==1: Support a callback function whenever an interface + * LWIP_NETIF_STATUS_CALLBACK==1: Support a callback function whenever an interface * changes its up/down status (i.e., due to DHCP IP acquistion) */ -#ifndef LWIP_NETIF_CALLBACK -#define LWIP_NETIF_CALLBACK 0 +#ifndef LWIP_NETIF_STATUS_CALLBACK +#define LWIP_NETIF_STATUS_CALLBACK 0 #endif /**