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.

This commit is contained in:
fbernon 2007-08-22 11:26:01 +00:00
parent 2f344268ff
commit 261af8dc07
4 changed files with 17 additions and 13 deletions

View File

@ -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

View File

@ -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
/**

View File

@ -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
/*

View File

@ -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
/**