mirror of
https://github.com/lwip-tcpip/lwip.git
synced 2024-08-23 14:46:01 +00:00
Changed debug statements to use the tidier ip4_addrN() macros.
This commit is contained in:
parent
afc3bc6b65
commit
d7699ca81d
|
@ -489,17 +489,17 @@ ip_debug_print(struct pbuf *p)
|
||||||
IPH_PROTO(iphdr),
|
IPH_PROTO(iphdr),
|
||||||
ntohs(IPH_CHKSUM(iphdr))));
|
ntohs(IPH_CHKSUM(iphdr))));
|
||||||
LWIP_DEBUGF(IP_DEBUG, ("+-------------------------------+\n"));
|
LWIP_DEBUGF(IP_DEBUG, ("+-------------------------------+\n"));
|
||||||
LWIP_DEBUGF(IP_DEBUG, ("| %3ld | %3ld | %3ld | %3ld | (src)\n",
|
LWIP_DEBUGF(IP_DEBUG, ("| %3u | %3u | %3u | %3u | (src)\n",
|
||||||
ntohl(iphdr->src.addr) >> 24 & 0xff,
|
ip4_addr1(&iphdr->src),
|
||||||
ntohl(iphdr->src.addr) >> 16 & 0xff,
|
ip4_addr2(&iphdr->src),
|
||||||
ntohl(iphdr->src.addr) >> 8 & 0xff,
|
ip4_addr3(&iphdr->src),
|
||||||
ntohl(iphdr->src.addr) & 0xff));
|
ip4_addr4(&iphdr->src)));
|
||||||
LWIP_DEBUGF(IP_DEBUG, ("+-------------------------------+\n"));
|
LWIP_DEBUGF(IP_DEBUG, ("+-------------------------------+\n"));
|
||||||
LWIP_DEBUGF(IP_DEBUG, ("| %3ld | %3ld | %3ld | %3ld | (dest)\n",
|
LWIP_DEBUGF(IP_DEBUG, ("| %3u | %3u | %3u | %3u | (dest)\n",
|
||||||
ntohl(iphdr->dest.addr) >> 24 & 0xff,
|
ip4_addr1(&iphdr->dest),
|
||||||
ntohl(iphdr->dest.addr) >> 16 & 0xff,
|
ip4_addr2(&iphdr->dest),
|
||||||
ntohl(iphdr->dest.addr) >> 8 & 0xff,
|
ip4_addr3(&iphdr->dest),
|
||||||
ntohl(iphdr->dest.addr) & 0xff));
|
ip4_addr4(&iphdr->dest)));
|
||||||
LWIP_DEBUGF(IP_DEBUG, ("+-------------------------------+\n"));
|
LWIP_DEBUGF(IP_DEBUG, ("+-------------------------------+\n"));
|
||||||
}
|
}
|
||||||
#endif /* IP_DEBUG */
|
#endif /* IP_DEBUG */
|
||||||
|
|
|
@ -207,10 +207,10 @@ netif_set_ipaddr(struct netif *netif, struct ip_addr *ipaddr)
|
||||||
#endif
|
#endif
|
||||||
LWIP_DEBUGF(NETIF_DEBUG | DBG_TRACE | DBG_STATE | 3, ("netif: IP address of interface %c%c set to %u.%u.%u.%u\n",
|
LWIP_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],
|
netif->name[0], netif->name[1],
|
||||||
(unsigned int)(ntohl(netif->ip_addr.addr) >> 24 & 0xff),
|
ip4_addr1(&netif->ip_addr),
|
||||||
(unsigned int)(ntohl(netif->ip_addr.addr) >> 16 & 0xff),
|
ip4_addr2(&netif->ip_addr),
|
||||||
(unsigned int)(ntohl(netif->ip_addr.addr) >> 8 & 0xff),
|
ip4_addr3(&netif->ip_addr),
|
||||||
(unsigned int)(ntohl(netif->ip_addr.addr) & 0xff)));
|
ip4_addr4(&netif->ip_addr)));
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
|
@ -218,11 +218,11 @@ netif_set_gw(struct netif *netif, struct ip_addr *gw)
|
||||||
{
|
{
|
||||||
ip_addr_set(&(netif->gw), gw);
|
ip_addr_set(&(netif->gw), gw);
|
||||||
LWIP_DEBUGF(NETIF_DEBUG | DBG_TRACE | DBG_STATE | 3, ("netif: GW address of interface %c%c set to %u.%u.%u.%u\n",
|
LWIP_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],
|
netif->name[0], netif->name[1],
|
||||||
(unsigned int)(ntohl(netif->gw.addr) >> 24 & 0xff),
|
ip4_addr1(&netif->gw),
|
||||||
(unsigned int)(ntohl(netif->gw.addr) >> 16 & 0xff),
|
ip4_addr2(&netif->gw),
|
||||||
(unsigned int)(ntohl(netif->gw.addr) >> 8 & 0xff),
|
ip4_addr3(&netif->gw),
|
||||||
(unsigned int)(ntohl(netif->gw.addr) & 0xff)));
|
ip4_addr4(&netif->gw)));
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
|
@ -230,11 +230,11 @@ netif_set_netmask(struct netif *netif, struct ip_addr *netmask)
|
||||||
{
|
{
|
||||||
ip_addr_set(&(netif->netmask), netmask);
|
ip_addr_set(&(netif->netmask), netmask);
|
||||||
LWIP_DEBUGF(NETIF_DEBUG | DBG_TRACE | DBG_STATE | 3, ("netif: netmask of interface %c%c set to %u.%u.%u.%u\n",
|
LWIP_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],
|
netif->name[0], netif->name[1],
|
||||||
(unsigned int)(ntohl(netif->netmask.addr) >> 24 & 0xff),
|
ip4_addr1(&netif->netmask),
|
||||||
(unsigned int)(ntohl(netif->netmask.addr) >> 16 & 0xff),
|
ip4_addr2(&netif->netmask),
|
||||||
(unsigned int)(ntohl(netif->netmask.addr) >> 8 & 0xff),
|
ip4_addr3(&netif->netmask),
|
||||||
(unsigned int)(ntohl(netif->netmask.addr) & 0xff)));
|
ip4_addr4(&netif->netmask)));
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
|
|
Loading…
Reference in New Issue
Block a user