From 40f10b69f777087a8e8e50a8bf955910a1850cba Mon Sep 17 00:00:00 2001 From: likewise Date: Fri, 11 Apr 2003 14:02:48 +0000 Subject: [PATCH] All debug messages now show actual config _after_ setting netif config. --- src/core/netif.c | 28 ++++++++++++++-------------- 1 file changed, 14 insertions(+), 14 deletions(-) diff --git a/src/core/netif.c b/src/core/netif.c index 0378d106..c1374504 100644 --- a/src/core/netif.c +++ b/src/core/netif.c @@ -211,8 +211,8 @@ netif_set_ipaddr(struct netif *netif, struct ip_addr *ipaddr) } #endif ip_addr_set(&(netif->ip_addr), ipaddr); - DEBUGF(NETIF_DEBUG | DBG_TRACE | DBG_STATE, ("netif: new IP address of interface %c%c%u is %u.%u.%u.%u\n", - netif->name[0], netif->name[1], netif->num, + DEBUGF(NETIF_DEBUG | DBG_TRACE | DBG_STATE | 3, ("netif: IP address of interface %c%c set to %u.%u.%u.%u\n", + netif->name[0], netif->name[1], (u8_t)(ntohl(netif->ip_addr.addr) >> 24 & 0xff), (u8_t)(ntohl(netif->ip_addr.addr) >> 16 & 0xff), (u8_t)(ntohl(netif->ip_addr.addr) >> 8 & 0xff), @@ -222,25 +222,25 @@ netif_set_ipaddr(struct netif *netif, struct ip_addr *ipaddr) void netif_set_gw(struct netif *netif, struct ip_addr *gw) { - DEBUGF(NETIF_DEBUG | DBG_TRACE | DBG_STATE, ("netif: setting GW address of interface %c%c%u to %u.%u.%u.%u\n", - netif->name[0], netif->name[1], netif->num, - (u8_t)(ntohl(gw->addr) >> 24 & 0xff), - (u8_t)(ntohl(gw->addr) >> 16 & 0xff), - (u8_t)(ntohl(gw->addr) >> 8 & 0xff), - (u8_t)(ntohl(gw->addr) & 0xff))); ip_addr_set(&(netif->gw), gw); + DEBUGF(NETIF_DEBUG | DBG_TRACE | DBG_STATE | 3, ("netif: GW address of interface %c%c set to %u.%u.%u.%u\n", + netif->name[0], netif->name[1], + (u8_t)(ntohl(netif->gw.addr) >> 24 & 0xff), + (u8_t)(ntohl(netif->gw.addr) >> 16 & 0xff), + (u8_t)(ntohl(netif->gw.addr) >> 8 & 0xff), + (u8_t)(ntohl(netif->gw.addr) & 0xff))); } /*-----------------------------------------------------------------------------------*/ void netif_set_netmask(struct netif *netif, struct ip_addr *netmask) { - DEBUGF(NETIF_DEBUG | DBG_TRACE | DBG_STATE, ("netif: setting netmask of interface %c%c%u to %u.%u.%u.%u\n", - netif->name[0], netif->name[1], netif->num, - (u8_t)(ntohl(netmask->addr) >> 24 & 0xff), - (u8_t)(ntohl(netmask->addr) >> 16 & 0xff), - (u8_t)(ntohl(netmask->addr) >> 8 & 0xff), - (u8_t)(ntohl(netmask->addr) & 0xff))); ip_addr_set(&(netif->netmask), netmask); + DEBUGF(NETIF_DEBUG | DBG_TRACE | DBG_STATE | 3, ("netif: netmask of interface %c%c set to %u.%u.%u.%u\n", + netif->name[0], netif->name[1], + (u8_t)(ntohl(netif->netmask.addr) >> 24 & 0xff), + (u8_t)(ntohl(netif->netmask.addr) >> 16 & 0xff), + (u8_t)(ntohl(netif->netmask.addr) >> 8 & 0xff), + (u8_t)(ntohl(netif->netmask.addr) & 0xff))); } /*-----------------------------------------------------------------------------------*/ void