net/ip: print ip addresses using ip4_addrN macro

Signed-off-by: Petro Karashchenko <petro.karashchenko@gmail.com>
This commit is contained in:
Petro Karashchenko 2023-08-18 23:23:01 +03:00 committed by Alan Carvalho de Assis
parent 3bd495c09d
commit 075738cf14
50 changed files with 252 additions and 261 deletions

View File

@ -41,6 +41,7 @@
#include <nuttx/irq.h> #include <nuttx/irq.h>
#include <nuttx/arch.h> #include <nuttx/arch.h>
#include <nuttx/wqueue.h> #include <nuttx/wqueue.h>
#include <nuttx/net/ip.h>
#include <nuttx/net/netdev.h> #include <nuttx/net/netdev.h>
#ifdef CONFIG_NET_PKT #ifdef CONFIG_NET_PKT
@ -1721,11 +1722,9 @@ static int c5471_ifup(struct net_driver_s *dev)
struct c5471_driver_s *priv = (struct c5471_driver_s *)dev->d_private; struct c5471_driver_s *priv = (struct c5471_driver_s *)dev->d_private;
volatile uint32_t clearbits; volatile uint32_t clearbits;
ninfo("Bringing up: %d.%d.%d.%d\n", ninfo("Bringing up: %u.%u.%u.%u\n",
(int)(dev->d_ipaddr & 0xff), ip4_addr1(dev->d_ipaddr), ip4_addr2(dev->d_ipaddr),
(int)((dev->d_ipaddr >> 8) & 0xff), ip4_addr3(dev->d_ipaddr), ip4_addr4(dev->d_ipaddr));
(int)((dev->d_ipaddr >> 16) & 0xff),
(int)(dev->d_ipaddr >> 24));
/* Initialize Ethernet interface */ /* Initialize Ethernet interface */

View File

@ -47,6 +47,7 @@
#include <nuttx/wqueue.h> #include <nuttx/wqueue.h>
#include <nuttx/net/phy.h> #include <nuttx/net/phy.h>
#include <nuttx/net/mii.h> #include <nuttx/net/mii.h>
#include <nuttx/net/ip.h>
#include <nuttx/net/netdev.h> #include <nuttx/net/netdev.h>
#if defined(CONFIG_NET_PKT) #if defined(CONFIG_NET_PKT)
@ -2242,11 +2243,9 @@ static int gd32_ifup(struct net_driver_s *dev)
int ret; int ret;
#ifdef CONFIG_NET_IPv4 #ifdef CONFIG_NET_IPv4
ninfo("Bringing up: %d.%d.%d.%d\n", ninfo("Bringing up: %u.%u.%u.%u\n",
(int)(dev->d_ipaddr & 0xff), ip4_addr1(dev->d_ipaddr), ip4_addr2(dev->d_ipaddr),
(int)((dev->d_ipaddr >> 8) & 0xff), ip4_addr3(dev->d_ipaddr), ip4_addr4(dev->d_ipaddr));
(int)((dev->d_ipaddr >> 16) & 0xff),
(int)(dev->d_ipaddr >> 24));
#endif #endif
/* Configure the Ethernet interface for DMA operation. */ /* Configure the Ethernet interface for DMA operation. */

View File

@ -45,6 +45,7 @@
#include <nuttx/signal.h> #include <nuttx/signal.h>
#include <nuttx/net/mii.h> #include <nuttx/net/mii.h>
#include <nuttx/net/phy.h> #include <nuttx/net/phy.h>
#include <nuttx/net/ip.h>
#include <nuttx/net/netdev.h> #include <nuttx/net/netdev.h>
#ifdef CONFIG_NET_PKT #ifdef CONFIG_NET_PKT
@ -1276,11 +1277,9 @@ static int imx_ifup_action(struct net_driver_s *dev, bool resetphy)
uint32_t regval; uint32_t regval;
int ret; int ret;
ninfo("Bringing up: %d.%d.%d.%d\n", ninfo("Bringing up: %u.%u.%u.%u\n",
(int)(dev->d_ipaddr & 0xff), ip4_addr1(dev->d_ipaddr), ip4_addr2(dev->d_ipaddr),
(int)((dev->d_ipaddr >> 8) & 0xff), ip4_addr3(dev->d_ipaddr), ip4_addr4(dev->d_ipaddr));
(int)((dev->d_ipaddr >> 16) & 0xff),
(int)(dev->d_ipaddr >> 24));
/* Initialize ENET buffers */ /* Initialize ENET buffers */
@ -1422,11 +1421,9 @@ static int imx_ifdown(struct net_driver_s *dev)
(struct imx_driver_s *)dev->d_private; (struct imx_driver_s *)dev->d_private;
irqstate_t flags; irqstate_t flags;
ninfo("Taking down: %d.%d.%d.%d\n", ninfo("Taking down: %u.%u.%u.%u\n",
(int)(dev->d_ipaddr & 0xff), ip4_addr1(dev->d_ipaddr), ip4_addr2(dev->d_ipaddr),
(int)((dev->d_ipaddr >> 8) & 0xff), ip4_addr3(dev->d_ipaddr), ip4_addr4(dev->d_ipaddr));
(int)((dev->d_ipaddr >> 16) & 0xff),
(int)(dev->d_ipaddr >> 24));
/* Flush and disable the Ethernet interrupts at the NVIC */ /* Flush and disable the Ethernet interrupts at the NVIC */

View File

@ -45,6 +45,7 @@
#include <nuttx/signal.h> #include <nuttx/signal.h>
#include <nuttx/net/mii.h> #include <nuttx/net/mii.h>
#include <nuttx/net/phy.h> #include <nuttx/net/phy.h>
#include <nuttx/net/ip.h>
#include <nuttx/net/netdev.h> #include <nuttx/net/netdev.h>
#ifdef CONFIG_NET_PKT #ifdef CONFIG_NET_PKT
@ -1313,11 +1314,9 @@ static int imxrt_ifup_action(struct net_driver_s *dev, bool resetphy)
uint32_t regval; uint32_t regval;
int ret; int ret;
ninfo("Bringing up: %d.%d.%d.%d\n", ninfo("Bringing up: %u.%u.%u.%u\n",
(int)(dev->d_ipaddr & 0xff), ip4_addr1(dev->d_ipaddr), ip4_addr2(dev->d_ipaddr),
(int)((dev->d_ipaddr >> 8) & 0xff), ip4_addr3(dev->d_ipaddr), ip4_addr4(dev->d_ipaddr));
(int)((dev->d_ipaddr >> 16) & 0xff),
(int)(dev->d_ipaddr >> 24));
/* Initialize ENET buffers */ /* Initialize ENET buffers */
@ -1454,11 +1453,9 @@ static int imxrt_ifdown(struct net_driver_s *dev)
(struct imxrt_driver_s *)dev->d_private; (struct imxrt_driver_s *)dev->d_private;
irqstate_t flags; irqstate_t flags;
ninfo("Taking down: %d.%d.%d.%d\n", ninfo("Taking down: %u.%u.%u.%u\n",
(int)(dev->d_ipaddr & 0xff), ip4_addr1(dev->d_ipaddr), ip4_addr2(dev->d_ipaddr),
(int)((dev->d_ipaddr >> 8) & 0xff), ip4_addr3(dev->d_ipaddr), ip4_addr4(dev->d_ipaddr));
(int)((dev->d_ipaddr >> 16) & 0xff),
(int)(dev->d_ipaddr >> 24));
/* Flush and disable the Ethernet interrupts at the NVIC */ /* Flush and disable the Ethernet interrupts at the NVIC */

View File

@ -43,6 +43,7 @@
#include <nuttx/wqueue.h> #include <nuttx/wqueue.h>
#include <nuttx/signal.h> #include <nuttx/signal.h>
#include <nuttx/net/mii.h> #include <nuttx/net/mii.h>
#include <nuttx/net/ip.h>
#include <nuttx/net/netdev.h> #include <nuttx/net/netdev.h>
#ifdef CONFIG_NET_PKT #ifdef CONFIG_NET_PKT
@ -995,11 +996,9 @@ static int kinetis_ifup(struct net_driver_s *dev)
uint32_t regval; uint32_t regval;
int ret; int ret;
ninfo("Bringing up: %d.%d.%d.%d\n", ninfo("Bringing up: %u.%u.%u.%u\n",
(int)(dev->d_ipaddr & 0xff), ip4_addr1(dev->d_ipaddr), ip4_addr2(dev->d_ipaddr),
(int)((dev->d_ipaddr >> 8) & 0xff), ip4_addr3(dev->d_ipaddr), ip4_addr4(dev->d_ipaddr));
(int)((dev->d_ipaddr >> 16) & 0xff),
(int)(dev->d_ipaddr >> 24));
#if defined(PIN_ENET_PHY_EN) #if defined(PIN_ENET_PHY_EN)
kinetis_gpiowrite(PIN_ENET_PHY_EN, true); kinetis_gpiowrite(PIN_ENET_PHY_EN, true);

View File

@ -44,6 +44,7 @@
#include <nuttx/signal.h> #include <nuttx/signal.h>
#include <nuttx/net/mii.h> #include <nuttx/net/mii.h>
#include <nuttx/net/netconfig.h> #include <nuttx/net/netconfig.h>
#include <nuttx/net/ip.h>
#include <nuttx/net/netdev.h> #include <nuttx/net/netdev.h>
#ifdef CONFIG_NET_PKT #ifdef CONFIG_NET_PKT
@ -1454,11 +1455,9 @@ static int lpc17_40_ifup(struct net_driver_s *dev)
uint32_t regval; uint32_t regval;
int ret; int ret;
ninfo("Bringing up: %d.%d.%d.%d\n", ninfo("Bringing up: %u.%u.%u.%u\n",
(int)(dev->d_ipaddr & 0xff), ip4_addr1(dev->d_ipaddr), ip4_addr2(dev->d_ipaddr),
(int)((dev->d_ipaddr >> 8) & 0xff), ip4_addr3(dev->d_ipaddr), ip4_addr4(dev->d_ipaddr));
(int)((dev->d_ipaddr >> 16) & 0xff),
(int)(dev->d_ipaddr >> 24));
/* Reset the Ethernet controller (again) */ /* Reset the Ethernet controller (again) */

View File

@ -42,7 +42,9 @@
#include <nuttx/wdog.h> #include <nuttx/wdog.h>
#include <nuttx/wqueue.h> #include <nuttx/wqueue.h>
#include <nuttx/net/mii.h> #include <nuttx/net/mii.h>
#include <nuttx/net/ip.h>
#include <nuttx/net/netdev.h> #include <nuttx/net/netdev.h>
#if defined(CONFIG_NET_PKT) #if defined(CONFIG_NET_PKT)
# include <nuttx/net/pkt.h> # include <nuttx/net/pkt.h>
#endif #endif
@ -2071,11 +2073,9 @@ static int lpc43_ifup(struct net_driver_s *dev)
int ret; int ret;
#ifdef CONFIG_NET_IPv4 #ifdef CONFIG_NET_IPv4
ninfo("Bringing up: %d.%d.%d.%d\n", ninfo("Bringing up: %u.%u.%u.%u\n",
(int)(dev->d_ipaddr & 0xff), ip4_addr1(dev->d_ipaddr), ip4_addr2(dev->d_ipaddr),
(int)((dev->d_ipaddr >> 8) & 0xff), ip4_addr3(dev->d_ipaddr), ip4_addr4(dev->d_ipaddr));
(int)((dev->d_ipaddr >> 16) & 0xff),
(int)(dev->d_ipaddr >> 24));
#endif #endif
#ifdef CONFIG_NET_IPv6 #ifdef CONFIG_NET_IPv6
ninfo("Bringing up: %04x:%04x:%04x:%04x:%04x:%04x:%04x:%04x\n", ninfo("Bringing up: %04x:%04x:%04x:%04x:%04x:%04x:%04x:%04x\n",

View File

@ -80,6 +80,7 @@
#include <nuttx/wqueue.h> #include <nuttx/wqueue.h>
#include <nuttx/clock.h> #include <nuttx/clock.h>
#include <nuttx/net/mii.h> #include <nuttx/net/mii.h>
#include <nuttx/net/ip.h>
#include <nuttx/net/netdev.h> #include <nuttx/net/netdev.h>
#ifdef CONFIG_NET_PKT #ifdef CONFIG_NET_PKT
@ -1722,11 +1723,9 @@ static int lpc54_eth_ifup(struct net_driver_s *dev)
int i; int i;
#ifdef CONFIG_NET_IPv4 #ifdef CONFIG_NET_IPv4
ninfo("Bringing up: %d.%d.%d.%d\n", ninfo("Bringing up: %u.%u.%u.%u\n",
(int)(dev->d_ipaddr & 0xff), ip4_addr1(dev->d_ipaddr), ip4_addr2(dev->d_ipaddr),
(int)((dev->d_ipaddr >> 8) & 0xff), ip4_addr3(dev->d_ipaddr), ip4_addr4(dev->d_ipaddr));
(int)((dev->d_ipaddr >> 16) & 0xff),
(int)(dev->d_ipaddr >> 24));
#endif #endif
#ifdef CONFIG_NET_IPv6 #ifdef CONFIG_NET_IPv6
ninfo("Bringing up: %04x:%04x:%04x:%04x:%04x:%04x:%04x:%04x\n", ninfo("Bringing up: %04x:%04x:%04x:%04x:%04x:%04x:%04x:%04x\n",

View File

@ -44,6 +44,7 @@
#include <nuttx/signal.h> #include <nuttx/signal.h>
#include <nuttx/net/mii.h> #include <nuttx/net/mii.h>
#include <nuttx/net/phy.h> #include <nuttx/net/phy.h>
#include <nuttx/net/ip.h>
#include <nuttx/net/netdev.h> #include <nuttx/net/netdev.h>
#ifdef CONFIG_NET_PKT #ifdef CONFIG_NET_PKT
@ -1150,9 +1151,9 @@ static int s32k1xx_ifup_action(struct net_driver_s *dev, bool resetphy)
uint32_t regval; uint32_t regval;
int ret; int ret;
ninfo("Bringing up: %d.%d.%d.%d\n", ninfo("Bringing up: %u.%u.%u.%u\n",
(int)(dev->d_ipaddr & 0xff), (int)((dev->d_ipaddr >> 8) & 0xff), ip4_addr1(dev->d_ipaddr), ip4_addr2(dev->d_ipaddr),
(int)((dev->d_ipaddr >> 16) & 0xff), (int)(dev->d_ipaddr >> 24)); ip4_addr3(dev->d_ipaddr), ip4_addr4(dev->d_ipaddr));
/* Initialize ENET buffers */ /* Initialize ENET buffers */
@ -1290,9 +1291,9 @@ static int s32k1xx_ifdown(struct net_driver_s *dev)
(struct s32k1xx_driver_s *)dev->d_private; (struct s32k1xx_driver_s *)dev->d_private;
irqstate_t flags; irqstate_t flags;
ninfo("Taking down: %d.%d.%d.%d\n", ninfo("Taking down: %u.%u.%u.%u\n",
(int)(dev->d_ipaddr & 0xff), (int)((dev->d_ipaddr >> 8) & 0xff), ip4_addr1(dev->d_ipaddr), ip4_addr2(dev->d_ipaddr),
(int)((dev->d_ipaddr >> 16) & 0xff), (int)(dev->d_ipaddr >> 24)); ip4_addr3(dev->d_ipaddr), ip4_addr4(dev->d_ipaddr));
/* Flush and disable the Ethernet interrupts at the NVIC */ /* Flush and disable the Ethernet interrupts at the NVIC */

View File

@ -47,6 +47,7 @@
#include <nuttx/signal.h> #include <nuttx/signal.h>
#include <nuttx/net/mii.h> #include <nuttx/net/mii.h>
#include <nuttx/net/phy.h> #include <nuttx/net/phy.h>
#include <nuttx/net/ip.h>
#include <nuttx/net/netdev.h> #include <nuttx/net/netdev.h>
#ifdef CONFIG_NET_PKT #ifdef CONFIG_NET_PKT
@ -1947,9 +1948,9 @@ static int s32k3xx_ifup_action(struct net_driver_s *dev, bool resetphy)
uint32_t regval; uint32_t regval;
int ret; int ret;
ninfo("Bringing up: %d.%d.%d.%d\n", ninfo("Bringing up: %u.%u.%u.%u\n",
(int)(dev->d_ipaddr & 0xff), (int)((dev->d_ipaddr >> 8) & 0xff), ip4_addr1(dev->d_ipaddr), ip4_addr2(dev->d_ipaddr),
(int)((dev->d_ipaddr >> 16) & 0xff), (int)(dev->d_ipaddr >> 24)); ip4_addr3(dev->d_ipaddr), ip4_addr4(dev->d_ipaddr));
/* Initialize the free buffer list */ /* Initialize the free buffer list */
@ -2059,9 +2060,9 @@ static int s32k3xx_ifdown(struct net_driver_s *dev)
struct s32k3xx_driver_s *priv = (struct s32k3xx_driver_s *)dev->d_private; struct s32k3xx_driver_s *priv = (struct s32k3xx_driver_s *)dev->d_private;
irqstate_t flags; irqstate_t flags;
ninfo("Taking down: %d.%d.%d.%d\n", ninfo("Taking down: %u.%u.%u.%u\n",
(int)(dev->d_ipaddr & 0xff), (int)((dev->d_ipaddr >> 8) & 0xff), ip4_addr1(dev->d_ipaddr), ip4_addr2(dev->d_ipaddr),
(int)((dev->d_ipaddr >> 16) & 0xff), (int)(dev->d_ipaddr >> 24)); ip4_addr3(dev->d_ipaddr), ip4_addr4(dev->d_ipaddr));
/* Flush and disable the Ethernet interrupts at the NVIC */ /* Flush and disable the Ethernet interrupts at the NVIC */

View File

@ -41,6 +41,7 @@
#include <nuttx/kmalloc.h> #include <nuttx/kmalloc.h>
#include <nuttx/wqueue.h> #include <nuttx/wqueue.h>
#include <nuttx/net/mii.h> #include <nuttx/net/mii.h>
#include <nuttx/net/ip.h>
#include <nuttx/net/netdev.h> #include <nuttx/net/netdev.h>
#include <nuttx/net/phy.h> #include <nuttx/net/phy.h>
@ -1676,11 +1677,9 @@ static int sam_ifup(struct net_driver_s *dev)
struct sam_emac_s *priv = (struct sam_emac_s *)dev->d_private; struct sam_emac_s *priv = (struct sam_emac_s *)dev->d_private;
int ret; int ret;
ninfo("Bringing up: %d.%d.%d.%d\n", ninfo("Bringing up: %u.%u.%u.%u\n",
(int)(dev->d_ipaddr & 0xff), ip4_addr1(dev->d_ipaddr), ip4_addr2(dev->d_ipaddr),
(int)((dev->d_ipaddr >> 8) & 0xff), ip4_addr3(dev->d_ipaddr), ip4_addr4(dev->d_ipaddr));
(int)((dev->d_ipaddr >> 16) & 0xff),
(int)(dev->d_ipaddr >> 24));
/* Configure the EMAC interface for normal operation. */ /* Configure the EMAC interface for normal operation. */

View File

@ -69,6 +69,7 @@
#include <nuttx/kmalloc.h> #include <nuttx/kmalloc.h>
#include <nuttx/wqueue.h> #include <nuttx/wqueue.h>
#include <nuttx/net/mii.h> #include <nuttx/net/mii.h>
#include <nuttx/net/ip.h>
#include <nuttx/net/netdev.h> #include <nuttx/net/netdev.h>
#include <nuttx/net/phy.h> #include <nuttx/net/phy.h>
@ -1737,11 +1738,9 @@ static int sam_ifup(struct net_driver_s *dev)
struct sam_emac_s *priv = (struct sam_emac_s *)dev->d_private; struct sam_emac_s *priv = (struct sam_emac_s *)dev->d_private;
int ret; int ret;
ninfo("Bringing up: %d.%d.%d.%d\n", ninfo("Bringing up: %u.%u.%u.%u\n",
(int)(dev->d_ipaddr & 0xff), ip4_addr1(dev->d_ipaddr), ip4_addr2(dev->d_ipaddr),
(int)((dev->d_ipaddr >> 8) & 0xff), ip4_addr3(dev->d_ipaddr), ip4_addr4(dev->d_ipaddr));
(int)((dev->d_ipaddr >> 16) & 0xff),
(int)(dev->d_ipaddr >> 24));
/* Configure the EMAC interface for normal operation. */ /* Configure the EMAC interface for normal operation. */

View File

@ -55,6 +55,7 @@
#include <nuttx/kmalloc.h> #include <nuttx/kmalloc.h>
#include <nuttx/wqueue.h> #include <nuttx/wqueue.h>
#include <nuttx/net/mii.h> #include <nuttx/net/mii.h>
#include <nuttx/net/ip.h>
#include <nuttx/net/netdev.h> #include <nuttx/net/netdev.h>
#include <nuttx/net/phy.h> #include <nuttx/net/phy.h>
@ -2075,11 +2076,9 @@ static int sam_ifup(struct net_driver_s *dev)
int ret; int ret;
#ifdef CONFIG_NET_IPv4 #ifdef CONFIG_NET_IPv4
ninfo("Bringing up: %d.%d.%d.%d\n", ninfo("Bringing up: %u.%u.%u.%u\n",
(int)(dev->d_ipaddr & 0xff), ip4_addr1(dev->d_ipaddr), ip4_addr2(dev->d_ipaddr),
(int)((dev->d_ipaddr >> 8) & 0xff), ip4_addr3(dev->d_ipaddr), ip4_addr4(dev->d_ipaddr));
(int)((dev->d_ipaddr >> 16) & 0xff),
(int)(dev->d_ipaddr >> 24));
#endif #endif
#ifdef CONFIG_NET_IPv6 #ifdef CONFIG_NET_IPv6
ninfo("Bringing up: %04x:%04x:%04x:%04x:%04x:%04x:%04x:%04x\n", ninfo("Bringing up: %04x:%04x:%04x:%04x:%04x:%04x:%04x:%04x\n",

View File

@ -66,6 +66,7 @@
#include <nuttx/kmalloc.h> #include <nuttx/kmalloc.h>
#include <nuttx/wqueue.h> #include <nuttx/wqueue.h>
#include <nuttx/net/gmii.h> #include <nuttx/net/gmii.h>
#include <nuttx/net/ip.h>
#include <nuttx/net/netdev.h> #include <nuttx/net/netdev.h>
#include <nuttx/net/phy.h> #include <nuttx/net/phy.h>
@ -1721,11 +1722,9 @@ static int sam_ifup(struct net_driver_s *dev)
struct sam_gmac_s *priv = (struct sam_gmac_s *)dev->d_private; struct sam_gmac_s *priv = (struct sam_gmac_s *)dev->d_private;
int ret; int ret;
ninfo("Bringing up: %d.%d.%d.%d\n", ninfo("Bringing up: %u.%u.%u.%u\n",
(int)(dev->d_ipaddr & 0xff), ip4_addr1(dev->d_ipaddr), ip4_addr2(dev->d_ipaddr),
(int)((dev->d_ipaddr >> 8) & 0xff), ip4_addr3(dev->d_ipaddr), ip4_addr4(dev->d_ipaddr));
(int)((dev->d_ipaddr >> 16) & 0xff),
(int)(dev->d_ipaddr >> 24));
/* Configure the GMAC interface for normal operation. */ /* Configure the GMAC interface for normal operation. */

View File

@ -65,6 +65,7 @@
#include <nuttx/kmalloc.h> #include <nuttx/kmalloc.h>
#include <nuttx/wqueue.h> #include <nuttx/wqueue.h>
#include <nuttx/net/gmii.h> #include <nuttx/net/gmii.h>
#include <nuttx/net/ip.h>
#include <nuttx/net/netdev.h> #include <nuttx/net/netdev.h>
#include <nuttx/net/phy.h> #include <nuttx/net/phy.h>
@ -1686,9 +1687,9 @@ static int sam_ifup(struct net_driver_s *dev)
struct sam_gmac_s *priv = (struct sam_gmac_s *)dev->d_private; struct sam_gmac_s *priv = (struct sam_gmac_s *)dev->d_private;
int ret; int ret;
ninfo("Bringing up: %d.%d.%d.%d\n", ninfo("Bringing up: %u.%u.%u.%u\n",
(int)(dev->d_ipaddr & 0xff), (int)((dev->d_ipaddr >> 8) & 0xff), ip4_addr1(dev->d_ipaddr), ip4_addr2(dev->d_ipaddr),
(int)((dev->d_ipaddr >> 16) & 0xff), (int)(dev->d_ipaddr >> 24)); ip4_addr3(dev->d_ipaddr), ip4_addr4(dev->d_ipaddr));
/* Configure the GMAC interface for normal operation. */ /* Configure the GMAC interface for normal operation. */

View File

@ -48,6 +48,7 @@
#include <nuttx/kmalloc.h> #include <nuttx/kmalloc.h>
#include <nuttx/wqueue.h> #include <nuttx/wqueue.h>
#include <nuttx/net/mii.h> #include <nuttx/net/mii.h>
#include <nuttx/net/ip.h>
#include <nuttx/net/netdev.h> #include <nuttx/net/netdev.h>
#include <nuttx/net/phy.h> #include <nuttx/net/phy.h>
@ -2523,11 +2524,9 @@ static int sam_ifup(struct net_driver_s *dev)
int ret; int ret;
#ifdef CONFIG_NET_IPv4 #ifdef CONFIG_NET_IPv4
ninfo("Bringing up: %d.%d.%d.%d\n", ninfo("Bringing up: %u.%u.%u.%u\n",
(int)(dev->d_ipaddr & 0xff), ip4_addr1(dev->d_ipaddr), ip4_addr2(dev->d_ipaddr),
(int)((dev->d_ipaddr >> 8) & 0xff), ip4_addr3(dev->d_ipaddr), ip4_addr4(dev->d_ipaddr));
(int)((dev->d_ipaddr >> 16) & 0xff),
(int)(dev->d_ipaddr >> 24));
#endif #endif
#ifdef CONFIG_NET_IPv6 #ifdef CONFIG_NET_IPv6
ninfo("Bringing up: %04x:%04x:%04x:%04x:%04x:%04x:%04x:%04x\n", ninfo("Bringing up: %04x:%04x:%04x:%04x:%04x:%04x:%04x:%04x\n",

View File

@ -44,6 +44,7 @@
#include <nuttx/wqueue.h> #include <nuttx/wqueue.h>
#include <nuttx/net/phy.h> #include <nuttx/net/phy.h>
#include <nuttx/net/mii.h> #include <nuttx/net/mii.h>
#include <nuttx/net/ip.h>
#include <nuttx/net/netdev.h> #include <nuttx/net/netdev.h>
#if defined(CONFIG_NET_PKT) #if defined(CONFIG_NET_PKT)
@ -2221,11 +2222,9 @@ static int stm32_ifup(struct net_driver_s *dev)
int ret; int ret;
#ifdef CONFIG_NET_IPv4 #ifdef CONFIG_NET_IPv4
ninfo("Bringing up: %d.%d.%d.%d\n", ninfo("Bringing up: %u.%u.%u.%u\n",
(int)(dev->d_ipaddr & 0xff), ip4_addr1(dev->d_ipaddr), ip4_addr2(dev->d_ipaddr),
(int)((dev->d_ipaddr >> 8) & 0xff), ip4_addr3(dev->d_ipaddr), ip4_addr4(dev->d_ipaddr));
(int)((dev->d_ipaddr >> 16) & 0xff),
(int)(dev->d_ipaddr >> 24));
#endif #endif
#ifdef CONFIG_NET_IPv6 #ifdef CONFIG_NET_IPv6
ninfo("Bringing up: %04x:%04x:%04x:%04x:%04x:%04x:%04x:%04x\n", ninfo("Bringing up: %04x:%04x:%04x:%04x:%04x:%04x:%04x:%04x\n",

View File

@ -43,6 +43,7 @@
#include <nuttx/wqueue.h> #include <nuttx/wqueue.h>
#include <nuttx/signal.h> #include <nuttx/signal.h>
#include <nuttx/net/mii.h> #include <nuttx/net/mii.h>
#include <nuttx/net/ip.h>
#include <nuttx/net/netdev.h> #include <nuttx/net/netdev.h>
#include <nuttx/crc64.h> #include <nuttx/crc64.h>
@ -2311,11 +2312,9 @@ static int stm32_ifup(struct net_driver_s *dev)
int ret; int ret;
#ifdef CONFIG_NET_IPv4 #ifdef CONFIG_NET_IPv4
ninfo("Bringing up: %d.%d.%d.%d\n", ninfo("Bringing up: %u.%u.%u.%u\n",
(int)(dev->d_ipaddr & 0xff), ip4_addr1(dev->d_ipaddr), ip4_addr2(dev->d_ipaddr),
(int)((dev->d_ipaddr >> 8) & 0xff), ip4_addr3(dev->d_ipaddr), ip4_addr4(dev->d_ipaddr));
(int)((dev->d_ipaddr >> 16) & 0xff),
(int)(dev->d_ipaddr >> 24));
#endif #endif
#ifdef CONFIG_NET_IPv6 #ifdef CONFIG_NET_IPv6
ninfo("Bringing up: %04x:%04x:%04x:%04x:%04x:%04x:%04x:%04x\n", ninfo("Bringing up: %04x:%04x:%04x:%04x:%04x:%04x:%04x:%04x\n",

View File

@ -44,6 +44,7 @@
#include <nuttx/wqueue.h> #include <nuttx/wqueue.h>
#include <nuttx/signal.h> #include <nuttx/signal.h>
#include <nuttx/net/mii.h> #include <nuttx/net/mii.h>
#include <nuttx/net/ip.h>
#include <nuttx/net/netdev.h> #include <nuttx/net/netdev.h>
#include <nuttx/crc64.h> #include <nuttx/crc64.h>
@ -2424,9 +2425,9 @@ static int stm32_ifup(struct net_driver_s *dev)
int ret; int ret;
#ifdef CONFIG_NET_IPv4 #ifdef CONFIG_NET_IPv4
ninfo("Bringing up: %d.%d.%d.%d\n", ninfo("Bringing up: %u.%u.%u.%u\n",
(int)(dev->d_ipaddr & 0xff), (int)((dev->d_ipaddr >> 8) & 0xff), ip4_addr1(dev->d_ipaddr), ip4_addr2(dev->d_ipaddr),
(int)((dev->d_ipaddr >> 16) & 0xff), (int)(dev->d_ipaddr >> 24)); ip4_addr3(dev->d_ipaddr), ip4_addr4(dev->d_ipaddr));
#endif #endif
#ifdef CONFIG_NET_IPv6 #ifdef CONFIG_NET_IPv6
ninfo("Bringing up: %04x:%04x:%04x:%04x:%04x:%04x:%04x:%04x\n", ninfo("Bringing up: %04x:%04x:%04x:%04x:%04x:%04x:%04x:%04x\n",

View File

@ -40,14 +40,15 @@
#include <nuttx/wdog.h> #include <nuttx/wdog.h>
#include <nuttx/irq.h> #include <nuttx/irq.h>
#include <nuttx/wqueue.h> #include <nuttx/wqueue.h>
#include <nuttx/net/ip.h>
#include <arch/board/board.h>
#include <nuttx/net/netdev.h> #include <nuttx/net/netdev.h>
#ifdef CONFIG_NET_PKT #ifdef CONFIG_NET_PKT
# include <nuttx/net/pkt.h> # include <nuttx/net/pkt.h>
#endif #endif
#include <arch/board/board.h>
#include "chip.h" #include "chip.h"
#include "arm_internal.h" #include "arm_internal.h"
#include "tiva_gpio.h" #include "tiva_gpio.h"
@ -1131,11 +1132,9 @@ static int tiva_ifup(struct net_driver_s *dev)
uint16_t phyreg; uint16_t phyreg;
#endif #endif
ninfo("Bringing up: %d.%d.%d.%d\n", ninfo("Bringing up: %u.%u.%u.%u\n",
(int)(dev->d_ipaddr & 0xff), ip4_addr1(dev->d_ipaddr), ip4_addr2(dev->d_ipaddr),
(int)((dev->d_ipaddr >> 8) & 0xff), ip4_addr3(dev->d_ipaddr), ip4_addr4(dev->d_ipaddr));
(int)((dev->d_ipaddr >> 16) & 0xff),
(int)(dev->d_ipaddr >> 24));
/* Enable and reset the Ethernet controller */ /* Enable and reset the Ethernet controller */
@ -1285,11 +1284,9 @@ static int tiva_ifdown(struct net_driver_s *dev)
irqstate_t flags; irqstate_t flags;
uint32_t regval; uint32_t regval;
ninfo("Taking down: %d.%d.%d.%d\n", ninfo("Taking down: %u.%u.%u.%u\n",
(int)(dev->d_ipaddr & 0xff), ip4_addr1(dev->d_ipaddr), ip4_addr2(dev->d_ipaddr),
(int)((dev->d_ipaddr >> 8) & 0xff), ip4_addr3(dev->d_ipaddr), ip4_addr4(dev->d_ipaddr));
(int)((dev->d_ipaddr >> 16) & 0xff),
(int)(dev->d_ipaddr >> 24));
/* Cancel the TX timeout timers */ /* Cancel the TX timeout timers */

View File

@ -42,6 +42,7 @@
#include <nuttx/wdog.h> #include <nuttx/wdog.h>
#include <nuttx/wqueue.h> #include <nuttx/wqueue.h>
#include <nuttx/net/mii.h> #include <nuttx/net/mii.h>
#include <nuttx/net/ip.h>
#include <nuttx/net/netdev.h> #include <nuttx/net/netdev.h>
#ifdef CONFIG_TIVA_PHY_INTERRUPTS #ifdef CONFIG_TIVA_PHY_INTERRUPTS
@ -2196,11 +2197,9 @@ static int tiva_ifup(struct net_driver_s *dev)
int ret; int ret;
#ifdef CONFIG_NET_IPv4 #ifdef CONFIG_NET_IPv4
ninfo("Bringing up: %d.%d.%d.%d\n", ninfo("Bringing up: %u.%u.%u.%u\n",
(int)(dev->d_ipaddr & 0xff), ip4_addr1(dev->d_ipaddr), ip4_addr2(dev->d_ipaddr),
(int)((dev->d_ipaddr >> 8) & 0xff), ip4_addr3(dev->d_ipaddr), ip4_addr4(dev->d_ipaddr));
(int)((dev->d_ipaddr >> 16) & 0xff),
(int)(dev->d_ipaddr >> 24));
#endif #endif
#ifdef CONFIG_NET_IPv6 #ifdef CONFIG_NET_IPv6
ninfo("Bringing up: %04x:%04x:%04x:%04x:%04x:%04x:%04x:%04x\n", ninfo("Bringing up: %04x:%04x:%04x:%04x:%04x:%04x:%04x:%04x\n",

View File

@ -38,6 +38,7 @@
#include <nuttx/arch.h> #include <nuttx/arch.h>
#include <nuttx/irq.h> #include <nuttx/irq.h>
#include <nuttx/wdog.h> #include <nuttx/wdog.h>
#include <nuttx/net/ip.h>
#include <nuttx/net/netdev.h> #include <nuttx/net/netdev.h>
#ifdef CONFIG_NET_PKT #ifdef CONFIG_NET_PKT
@ -435,9 +436,9 @@ static int emac_ifup(struct net_driver_s *dev)
FAR struct emac_driver_s *priv = FAR struct emac_driver_s *priv =
(FAR struct emac_driver_s *)dev->d_private; (FAR struct emac_driver_s *)dev->d_private;
ninfo("Bringing up: %d.%d.%d.%d\n", ninfo("Bringing up: %u.%u.%u.%u\n",
dev->d_ipaddr & 0xff, (dev->d_ipaddr >> 8) & 0xff, ip4_addr1(dev->d_ipaddr), ip4_addr2(dev->d_ipaddr),
(dev->d_ipaddr >> 16) & 0xff, dev->d_ipaddr >> 24); ip4_addr3(dev->d_ipaddr), ip4_addr4(dev->d_ipaddr));
/* Initialize PHYs, Ethernet interface, and setup up Ethernet interrupts */ /* Initialize PHYs, Ethernet interface, and setup up Ethernet interrupts */

View File

@ -43,6 +43,7 @@
#include <nuttx/wqueue.h> #include <nuttx/wqueue.h>
#include <nuttx/net/mii.h> #include <nuttx/net/mii.h>
#include <nuttx/net/netconfig.h> #include <nuttx/net/netconfig.h>
#include <nuttx/net/ip.h>
#include <nuttx/net/netdev.h> #include <nuttx/net/netdev.h>
#ifdef CONFIG_NET_PKT #ifdef CONFIG_NET_PKT
@ -1904,11 +1905,9 @@ static int pic32mx_ifup(struct net_driver_s *dev)
uint32_t regval; uint32_t regval;
int ret; int ret;
ninfo("Bringing up: %d.%d.%d.%d\n", ninfo("Bringing up: %u.%u.%u.%u\n",
(int)(dev->d_ipaddr & 0xff), ip4_addr1(dev->d_ipaddr), ip4_addr2(dev->d_ipaddr),
(int)((dev->d_ipaddr >> 8) & 0xff), ip4_addr3(dev->d_ipaddr), ip4_addr4(dev->d_ipaddr));
(int)((dev->d_ipaddr >> 16) & 0xff),
(int)(dev->d_ipaddr >> 24));
/* Reset the Ethernet controller (again) */ /* Reset the Ethernet controller (again) */

View File

@ -41,6 +41,7 @@
#include <nuttx/wqueue.h> #include <nuttx/wqueue.h>
#include <nuttx/net/mii.h> #include <nuttx/net/mii.h>
#include <nuttx/net/netconfig.h> #include <nuttx/net/netconfig.h>
#include <nuttx/net/ip.h>
#include <nuttx/net/netdev.h> #include <nuttx/net/netdev.h>
#ifdef CONFIG_NET_PKT #ifdef CONFIG_NET_PKT
@ -2041,11 +2042,9 @@ static int pic32mz_ifup(struct net_driver_s *dev)
uint32_t regval; uint32_t regval;
int ret; int ret;
ninfo("Bringing up: %d.%d.%d.%d\n", ninfo("Bringing up: %u.%u.%u.%u\n",
(uint8_t)((dev->d_ipaddr >> 0) & 0xff), ip4_addr1(dev->d_ipaddr), ip4_addr2(dev->d_ipaddr),
(uint8_t)((dev->d_ipaddr >> 8) & 0xff), ip4_addr3(dev->d_ipaddr), ip4_addr4(dev->d_ipaddr));
(uint8_t)((dev->d_ipaddr >> 16) & 0xff),
(uint8_t)((dev->d_ipaddr >> 24) & 0xff));
/* Reset the Ethernet controller (again) */ /* Reset the Ethernet controller (again) */

View File

@ -39,6 +39,7 @@
#include <nuttx/irq.h> #include <nuttx/irq.h>
#include <nuttx/wdog.h> #include <nuttx/wdog.h>
#include <nuttx/wqueue.h> #include <nuttx/wqueue.h>
#include <nuttx/net/ip.h>
#include <nuttx/net/netdev.h> #include <nuttx/net/netdev.h>
#include <arch/board/board.h> #include <arch/board/board.h>
@ -671,9 +672,9 @@ static int misoc_net_ifup(struct net_driver_s *dev)
(struct misoc_net_driver_s *)dev->d_private; (struct misoc_net_driver_s *)dev->d_private;
#ifdef CONFIG_NET_IPv4 #ifdef CONFIG_NET_IPv4
ninfo("Bringing up: %d.%d.%d.%d\n", ninfo("Bringing up: %u.%u.%u.%u\n",
dev->d_ipaddr & 0xff, (dev->d_ipaddr >> 8) & 0xff, ip4_addr1(dev->d_ipaddr), ip4_addr2(dev->d_ipaddr),
(dev->d_ipaddr >> 16) & 0xff, dev->d_ipaddr >> 24); ip4_addr3(dev->d_ipaddr), ip4_addr4(dev->d_ipaddr));
#endif #endif
#ifdef CONFIG_NET_IPv6 #ifdef CONFIG_NET_IPv6
ninfo("Bringing up: %04x:%04x:%04x:%04x:%04x:%04x:%04x:%04x\n", ninfo("Bringing up: %04x:%04x:%04x:%04x:%04x:%04x:%04x:%04x\n",

View File

@ -43,6 +43,7 @@
#include <nuttx/wqueue.h> #include <nuttx/wqueue.h>
#include <nuttx/net/phy.h> #include <nuttx/net/phy.h>
#include <nuttx/net/mii.h> #include <nuttx/net/mii.h>
#include <nuttx/net/ip.h>
#include <nuttx/net/netdev.h> #include <nuttx/net/netdev.h>
#if defined(CONFIG_ARCH_PHY_INTERRUPT) #if defined(CONFIG_ARCH_PHY_INTERRUPT)
@ -2041,11 +2042,9 @@ static int rx65n_ifup(struct net_driver_s *dev)
int ret; int ret;
#ifdef CONFIG_NET_IPv4 #ifdef CONFIG_NET_IPv4
ninfo("Bringing up: %d.%d.%d.%d\n", ninfo("Bringing up: %u.%u.%u.%u\n",
(int)(dev->d_ipaddr & 0xff), ip4_addr1(dev->d_ipaddr), ip4_addr2(dev->d_ipaddr),
(int)((dev->d_ipaddr >> 8) & 0xff), ip4_addr3(dev->d_ipaddr), ip4_addr4(dev->d_ipaddr));
(int)((dev->d_ipaddr >> 16) & 0xff),
(int)(dev->d_ipaddr >> 24));
#endif #endif
#ifdef CONFIG_NET_IPv6 #ifdef CONFIG_NET_IPv6
ninfo("Bringing up: %04x:%04x:%04x:%04x:%04x:%04x:%04x:%04x\n", ninfo("Bringing up: %04x:%04x:%04x:%04x:%04x:%04x:%04x:%04x\n",

View File

@ -38,7 +38,9 @@
#include <nuttx/queue.h> #include <nuttx/queue.h>
#include <nuttx/wdog.h> #include <nuttx/wdog.h>
#include <nuttx/wqueue.h> #include <nuttx/wqueue.h>
#include <nuttx/net/ip.h>
#include <nuttx/net/netdev.h> #include <nuttx/net/netdev.h>
#if defined(CONFIG_NET_PKT) #if defined(CONFIG_NET_PKT)
# include <nuttx/net/pkt.h> # include <nuttx/net/pkt.h>
#endif #endif
@ -797,9 +799,9 @@ static int wlan_ifup(struct net_driver_s *dev)
struct wlan_priv_s *priv = (struct wlan_priv_s *)dev->d_private; struct wlan_priv_s *priv = (struct wlan_priv_s *)dev->d_private;
#ifdef CONFIG_NET_IPv4 #ifdef CONFIG_NET_IPv4
ninfo("Bringing up: %d.%d.%d.%d\n", ninfo("Bringing up: %u.%u.%u.%u\n",
(uint8_t)(dev->d_ipaddr), (uint8_t)(dev->d_ipaddr >> 8), ip4_addr1(dev->d_ipaddr), ip4_addr2(dev->d_ipaddr),
(uint8_t)(dev->d_ipaddr >> 16), (uint8_t)(dev->d_ipaddr >> 24)); ip4_addr3(dev->d_ipaddr), ip4_addr4(dev->d_ipaddr));
#endif #endif
#ifdef CONFIG_NET_IPv6 #ifdef CONFIG_NET_IPv6
ninfo("Bringing up: %04x:%04x:%04x:%04x:%04x:%04x:%04x:%04x\n", ninfo("Bringing up: %04x:%04x:%04x:%04x:%04x:%04x:%04x:%04x\n",

View File

@ -39,6 +39,7 @@
#include <nuttx/wqueue.h> #include <nuttx/wqueue.h>
#include <nuttx/signal.h> #include <nuttx/signal.h>
#include <nuttx/net/mii.h> #include <nuttx/net/mii.h>
#include <nuttx/net/ip.h>
#include <nuttx/net/netdev.h> #include <nuttx/net/netdev.h>
#include <nuttx/net/ioctl.h> #include <nuttx/net/ioctl.h>
@ -794,13 +795,11 @@ static int litex_ifup(struct net_driver_s *dev)
struct litex_emac_s *priv = (struct litex_emac_s *)dev->d_private; struct litex_emac_s *priv = (struct litex_emac_s *)dev->d_private;
int ret; int ret;
#ifdef CONFIG_NET_IPv4 #ifdef CONFIG_NET_IPv4
ninfo("Bringing up: %d.%d.%d.%d\n", ninfo("Bringing up: %u.%u.%u.%u\n",
(int)(dev->d_ipaddr & 0xff), ip4_addr1(dev->d_ipaddr), ip4_addr2(dev->d_ipaddr),
(int)((dev->d_ipaddr >> 8) & 0xff), ip4_addr3(dev->d_ipaddr), ip4_addr4(dev->d_ipaddr));
(int)((dev->d_ipaddr >> 16) & 0xff), #endif
(int)(dev->d_ipaddr >> 24));
#endif
/* Configure the EMAC interface for normal operation. */ /* Configure the EMAC interface for normal operation. */

View File

@ -43,6 +43,7 @@
#include <nuttx/signal.h> #include <nuttx/signal.h>
#include <nuttx/net/mii.h> #include <nuttx/net/mii.h>
#include <nuttx/net/gmii.h> #include <nuttx/net/gmii.h>
#include <nuttx/net/ip.h>
#include <nuttx/net/netdev.h> #include <nuttx/net/netdev.h>
#ifdef CONFIG_NET_PKT #ifdef CONFIG_NET_PKT
@ -1463,9 +1464,9 @@ static int mpfs_ifup(struct net_driver_s *dev)
int ret; int ret;
#ifdef CONFIG_NET_IPv4 #ifdef CONFIG_NET_IPv4
ninfo("Bringing up: %d.%d.%d.%d\n", ninfo("Bringing up: %u.%u.%u.%u\n",
(int)(dev->d_ipaddr & 0xff), (int)((dev->d_ipaddr >> 8) & 0xff), ip4_addr1(dev->d_ipaddr), ip4_addr2(dev->d_ipaddr),
(int)((dev->d_ipaddr >> 16) & 0xff), (int)(dev->d_ipaddr >> 24)); ip4_addr3(dev->d_ipaddr), ip4_addr4(dev->d_ipaddr));
#endif #endif
#ifdef CONFIG_NET_IPv6 #ifdef CONFIG_NET_IPv6
ninfo("Bringing up: %04x:%04x:%04x:%04x:%04x:%04x:%04x:%04x\n", ninfo("Bringing up: %04x:%04x:%04x:%04x:%04x:%04x:%04x:%04x\n",

View File

@ -40,7 +40,9 @@
#include <nuttx/kmalloc.h> #include <nuttx/kmalloc.h>
#include <nuttx/wdog.h> #include <nuttx/wdog.h>
#include <nuttx/wqueue.h> #include <nuttx/wqueue.h>
#include <nuttx/net/ip.h>
#include <nuttx/net/netdev.h> #include <nuttx/net/netdev.h>
#if defined(CONFIG_NET_PKT) #if defined(CONFIG_NET_PKT)
# include <nuttx/net/pkt.h> # include <nuttx/net/pkt.h>
#endif #endif
@ -1139,9 +1141,9 @@ static int wlan_ifup(struct net_driver_s *dev)
struct wlan_priv_s *priv = (struct wlan_priv_s *)dev->d_private; struct wlan_priv_s *priv = (struct wlan_priv_s *)dev->d_private;
#ifdef CONFIG_NET_IPv4 #ifdef CONFIG_NET_IPv4
ninfo("Bringing up: %d.%d.%d.%d\n", ninfo("Bringing up: %u.%u.%u.%u\n",
dev->d_ipaddr & 0xff, (dev->d_ipaddr >> 8) & 0xff, ip4_addr1(dev->d_ipaddr), ip4_addr2(dev->d_ipaddr),
(dev->d_ipaddr >> 16) & 0xff, dev->d_ipaddr >> 24); ip4_addr3(dev->d_ipaddr), ip4_addr4(dev->d_ipaddr));
#endif #endif
#ifdef CONFIG_NET_IPv6 #ifdef CONFIG_NET_IPv6
ninfo("Bringing up: %04x:%04x:%04x:%04x:%04x:%04x:%04x:%04x\n", ninfo("Bringing up: %04x:%04x:%04x:%04x:%04x:%04x:%04x:%04x\n",

View File

@ -40,7 +40,9 @@
#include <nuttx/kmalloc.h> #include <nuttx/kmalloc.h>
#include <nuttx/wdog.h> #include <nuttx/wdog.h>
#include <nuttx/wqueue.h> #include <nuttx/wqueue.h>
#include <nuttx/net/ip.h>
#include <nuttx/net/netdev.h> #include <nuttx/net/netdev.h>
#if defined(CONFIG_NET_PKT) #if defined(CONFIG_NET_PKT)
# include <nuttx/net/pkt.h> # include <nuttx/net/pkt.h>
#endif #endif
@ -795,9 +797,9 @@ static int wlan_ifup(struct net_driver_s *dev)
struct wlan_priv_s *priv = (struct wlan_priv_s *)dev->d_private; struct wlan_priv_s *priv = (struct wlan_priv_s *)dev->d_private;
#ifdef CONFIG_NET_IPv4 #ifdef CONFIG_NET_IPv4
ninfo("Bringing up: %d.%d.%d.%d\n", ninfo("Bringing up: %u.%u.%u.%u\n",
(uint8_t)(dev->d_ipaddr), (uint8_t)(dev->d_ipaddr >> 8), ip4_addr1(dev->d_ipaddr), ip4_addr2(dev->d_ipaddr),
(uint8_t)(dev->d_ipaddr >> 16), (uint8_t)(dev->d_ipaddr >> 24)); ip4_addr3(dev->d_ipaddr), ip4_addr4(dev->d_ipaddr));
#endif #endif
#ifdef CONFIG_NET_IPv6 #ifdef CONFIG_NET_IPv6
ninfo("Bringing up: %04x:%04x:%04x:%04x:%04x:%04x:%04x:%04x\n", ninfo("Bringing up: %04x:%04x:%04x:%04x:%04x:%04x:%04x:%04x\n",

View File

@ -46,6 +46,7 @@
#include <nuttx/wdog.h> #include <nuttx/wdog.h>
#include <nuttx/wqueue.h> #include <nuttx/wqueue.h>
#include <nuttx/net/mii.h> #include <nuttx/net/mii.h>
#include <nuttx/net/ip.h>
#include <nuttx/net/netdev.h> #include <nuttx/net/netdev.h>
#ifdef CONFIG_NET_PKT #ifdef CONFIG_NET_PKT
@ -1928,9 +1929,9 @@ static int ez80emac_ifup(FAR struct net_driver_s *dev)
dev->d_mac.ether.ether_addr_octet[3], dev->d_mac.ether.ether_addr_octet[3],
dev->d_mac.ether.ether_addr_octet[4], dev->d_mac.ether.ether_addr_octet[4],
dev->d_mac.ether.ether_addr_octet[5]); dev->d_mac.ether.ether_addr_octet[5]);
ninfo(" IP %d.%d.%d.%d\n", ninfo(" IP %u.%u.%u.%u\n",
dev->d_ipaddr >> 24, (dev->d_ipaddr >> 16) & 0xff, ip4_addr1(dev->d_ipaddr), ip4_addr2(dev->d_ipaddr),
(dev->d_ipaddr >> 8) & 0xff, dev->d_ipaddr & 0xff); ip4_addr3(dev->d_ipaddr), ip4_addr4(dev->d_ipaddr));
/* Bring up the interface -- Must be down right now */ /* Bring up the interface -- Must be down right now */

View File

@ -52,6 +52,7 @@
#include <nuttx/irq.h> #include <nuttx/irq.h>
#include <nuttx/wdog.h> #include <nuttx/wdog.h>
#include <nuttx/wqueue.h> #include <nuttx/wqueue.h>
#include <nuttx/net/ip.h>
#include <nuttx/net/netdev.h> #include <nuttx/net/netdev.h>
#ifdef CONFIG_NET_PKT #ifdef CONFIG_NET_PKT
@ -1355,11 +1356,9 @@ static int dm9x_ifup(FAR struct net_driver_s *dev)
uint8_t netstatus; uint8_t netstatus;
int i; int i;
ninfo("Bringing up: %d.%d.%d.%d\n", ninfo("Bringing up: %u.%u.%u.%u\n",
(int)(dev->d_ipaddr & 0xff), ip4_addr1(dev->d_ipaddr), ip4_addr2(dev->d_ipaddr),
(int)((dev->d_ipaddr >> 8) & 0xff), ip4_addr3(dev->d_ipaddr), ip4_addr4(dev->d_ipaddr));
(int)((dev->d_ipaddr >> 16) & 0xff),
(int)(dev->d_ipaddr >> 24));
/* Initialize DM90x0 chip */ /* Initialize DM90x0 chip */

View File

@ -50,6 +50,7 @@
#include <nuttx/clock.h> #include <nuttx/clock.h>
#include <nuttx/net/enc28j60.h> #include <nuttx/net/enc28j60.h>
#include <nuttx/net/net.h> #include <nuttx/net/net.h>
#include <nuttx/net/ip.h>
#include <nuttx/net/netdev.h> #include <nuttx/net/netdev.h>
#ifdef CONFIG_NET_PKT #ifdef CONFIG_NET_PKT
@ -1897,11 +1898,9 @@ static int enc_ifup(struct net_driver_s *dev)
FAR struct enc_driver_s *priv = (FAR struct enc_driver_s *)dev->d_private; FAR struct enc_driver_s *priv = (FAR struct enc_driver_s *)dev->d_private;
int ret; int ret;
ninfo("Bringing up: %d.%d.%d.%d\n", ninfo("Bringing up: %u.%u.%u.%u\n",
(int)(dev->d_ipaddr & 0xff), ip4_addr1(dev->d_ipaddr), ip4_addr2(dev->d_ipaddr),
(int)((dev->d_ipaddr >> 8) & 0xff), ip4_addr3(dev->d_ipaddr), ip4_addr4(dev->d_ipaddr));
(int)((dev->d_ipaddr >> 16) & 0xff),
(int)(dev->d_ipaddr >> 24));
/* Lock the SPI bus so that we have exclusive access */ /* Lock the SPI bus so that we have exclusive access */
@ -1966,11 +1965,9 @@ static int enc_ifdown(struct net_driver_s *dev)
irqstate_t flags; irqstate_t flags;
int ret; int ret;
ninfo("Taking down: %d.%d.%d.%d\n", ninfo("Taking down: %u.%u.%u.%u\n",
(int)(dev->d_ipaddr & 0xff), ip4_addr1(dev->d_ipaddr), ip4_addr2(dev->d_ipaddr),
(int)((dev->d_ipaddr >> 8) & 0xff), ip4_addr3(dev->d_ipaddr), ip4_addr4(dev->d_ipaddr));
(int)((dev->d_ipaddr >> 16) & 0xff),
(int)(dev->d_ipaddr >> 24));
/* Lock the SPI bus so that we have exclusive access */ /* Lock the SPI bus so that we have exclusive access */

View File

@ -50,6 +50,7 @@
#include <nuttx/wqueue.h> #include <nuttx/wqueue.h>
#include <nuttx/clock.h> #include <nuttx/clock.h>
#include <nuttx/net/net.h> #include <nuttx/net/net.h>
#include <nuttx/net/ip.h>
#include <nuttx/net/netdev.h> #include <nuttx/net/netdev.h>
#include <nuttx/net/encx24j600.h> #include <nuttx/net/encx24j600.h>
@ -2042,9 +2043,9 @@ static int enc_ifup(struct net_driver_s *dev)
FAR struct enc_driver_s *priv = (FAR struct enc_driver_s *)dev->d_private; FAR struct enc_driver_s *priv = (FAR struct enc_driver_s *)dev->d_private;
int ret; int ret;
ninfo("Bringing up: %d.%d.%d.%d\n", ninfo("Bringing up: %u.%u.%u.%u\n",
(int)(dev->d_ipaddr & 0xff), (int)((dev->d_ipaddr >> 8) & 0xff), ip4_addr1(dev->d_ipaddr), ip4_addr2(dev->d_ipaddr),
(int)((dev->d_ipaddr >> 16) & 0xff), (int)(dev->d_ipaddr >> 24)); ip4_addr3(dev->d_ipaddr), ip4_addr4(dev->d_ipaddr));
/* Lock the SPI bus so that we have exclusive access */ /* Lock the SPI bus so that we have exclusive access */
@ -2110,9 +2111,9 @@ static int enc_ifdown(struct net_driver_s *dev)
irqstate_t flags; irqstate_t flags;
int ret; int ret;
ninfo("Taking down: %d.%d.%d.%d\n", ninfo("Taking down: %u.%u.%u.%u\n",
(int)(dev->d_ipaddr & 0xff), (int)((dev->d_ipaddr >> 8) & 0xff), ip4_addr1(dev->d_ipaddr), ip4_addr2(dev->d_ipaddr),
(int)((dev->d_ipaddr >> 16) & 0xff), (int)(dev->d_ipaddr >> 24)); ip4_addr3(dev->d_ipaddr), ip4_addr4(dev->d_ipaddr));
/* Lock the SPI bus so that we have exclusive access */ /* Lock the SPI bus so that we have exclusive access */

View File

@ -42,6 +42,7 @@
#include <nuttx/kmalloc.h> #include <nuttx/kmalloc.h>
#include <nuttx/wdog.h> #include <nuttx/wdog.h>
#include <nuttx/wqueue.h> #include <nuttx/wqueue.h>
#include <nuttx/net/ip.h>
#include <nuttx/net/netdev.h> #include <nuttx/net/netdev.h>
#include <nuttx/net/ftmac100.h> #include <nuttx/net/ftmac100.h>
@ -1037,9 +1038,9 @@ static int ftmac100_ifup(struct net_driver_s *dev)
(FAR struct ftmac100_driver_s *)dev->d_private; (FAR struct ftmac100_driver_s *)dev->d_private;
#ifdef CONFIG_NET_IPv4 #ifdef CONFIG_NET_IPv4
ninfo("Bringing up: %d.%d.%d.%d\n", ninfo("Bringing up: %u.%u.%u.%u\n",
(int)(dev->d_ipaddr & 0xff), (int)((dev->d_ipaddr >> 8) & 0xff), ip4_addr1(dev->d_ipaddr), ip4_addr2(dev->d_ipaddr),
(int)((dev->d_ipaddr >> 16) & 0xff), (int)(dev->d_ipaddr >> 24)); ip4_addr3(dev->d_ipaddr), ip4_addr4(dev->d_ipaddr));
#endif #endif
#ifdef CONFIG_NET_IPv6 #ifdef CONFIG_NET_IPv6
ninfo("Bringing up: %04x:%04x:%04x:%04x:%04x:%04x:%04x:%04x\n", ninfo("Bringing up: %04x:%04x:%04x:%04x:%04x:%04x:%04x:%04x\n",

View File

@ -33,9 +33,13 @@
#include <nuttx/kmalloc.h> #include <nuttx/kmalloc.h>
#include <nuttx/wqueue.h> #include <nuttx/wqueue.h>
#include <nuttx/net/lan91c111.h> #include <nuttx/net/ip.h>
#include <nuttx/net/netdev.h> #include <nuttx/net/netdev.h>
#include <nuttx/net/pkt.h> #include <nuttx/net/lan91c111.h>
#ifdef CONFIG_NET_PKT
# include <nuttx/net/pkt.h>
#endif
#include "lan91c111.h" #include "lan91c111.h"
@ -934,9 +938,9 @@ static int lan91c111_ifup(FAR struct net_driver_s *dev)
FAR struct lan91c111_driver_s *priv = dev->d_private; FAR struct lan91c111_driver_s *priv = dev->d_private;
#ifdef CONFIG_NET_IPv4 #ifdef CONFIG_NET_IPv4
ninfo("Bringing up: %d.%d.%d.%d\n", ninfo("Bringing up: %u.%u.%u.%u\n",
(int)(dev->d_ipaddr & 0xff), (int)((dev->d_ipaddr >> 8) & 0xff), ip4_addr1(dev->d_ipaddr), ip4_addr2(dev->d_ipaddr),
(int)((dev->d_ipaddr >> 16) & 0xff), (int)(dev->d_ipaddr >> 24)); ip4_addr3(dev->d_ipaddr), ip4_addr4(dev->d_ipaddr));
#endif #endif
#ifdef CONFIG_NET_IPv6 #ifdef CONFIG_NET_IPv6
ninfo("Bringing up: %04x:%04x:%04x:%04x:%04x:%04x:%04x:%04x\n", ninfo("Bringing up: %04x:%04x:%04x:%04x:%04x:%04x:%04x:%04x\n",

View File

@ -39,8 +39,8 @@
#include <nuttx/irq.h> #include <nuttx/irq.h>
#include <nuttx/wqueue.h> #include <nuttx/wqueue.h>
#include <nuttx/net/netconfig.h> #include <nuttx/net/netconfig.h>
#include <nuttx/net/netdev.h>
#include <nuttx/net/ip.h> #include <nuttx/net/ip.h>
#include <nuttx/net/netdev.h>
#include <nuttx/net/loopback.h> #include <nuttx/net/loopback.h>
#ifdef CONFIG_NET_PKT #ifdef CONFIG_NET_PKT
@ -124,9 +124,9 @@ static int lo_ifup(FAR struct net_driver_s *dev)
FAR struct lo_driver_s *priv = (FAR struct lo_driver_s *)dev->d_private; FAR struct lo_driver_s *priv = (FAR struct lo_driver_s *)dev->d_private;
#ifdef CONFIG_NET_IPv4 #ifdef CONFIG_NET_IPv4
ninfo("Bringing up: %d.%d.%d.%d\n", ninfo("Bringing up: %u.%u.%u.%u\n",
(int)(dev->d_ipaddr & 0xff), (int)((dev->d_ipaddr >> 8) & 0xff), ip4_addr1(dev->d_ipaddr), ip4_addr2(dev->d_ipaddr),
(int)((dev->d_ipaddr >> 16) & 0xff), (int)(dev->d_ipaddr >> 24)); ip4_addr3(dev->d_ipaddr), ip4_addr4(dev->d_ipaddr));
#endif #endif
#ifdef CONFIG_NET_IPv6 #ifdef CONFIG_NET_IPv6
ninfo("Bringing up: %04x:%04x:%04x:%04x:%04x:%04x:%04x:%04x\n", ninfo("Bringing up: %04x:%04x:%04x:%04x:%04x:%04x:%04x:%04x\n",

View File

@ -35,6 +35,7 @@
#include <nuttx/wqueue.h> #include <nuttx/wqueue.h>
#include <nuttx/net/dns.h> #include <nuttx/net/dns.h>
#include <nuttx/net/ip.h>
#include <nuttx/net/netdev.h> #include <nuttx/net/netdev.h>
#include <nuttx/net/pkt.h> #include <nuttx/net/pkt.h>
#include <nuttx/net/rpmsg.h> #include <nuttx/net/rpmsg.h>
@ -659,9 +660,9 @@ static int net_rpmsg_drv_ifup(FAR struct net_driver_s *dev)
int ret; int ret;
#ifdef CONFIG_NET_IPv4 #ifdef CONFIG_NET_IPv4
ninfo("Bringing up: %d.%d.%d.%d\n", ninfo("Bringing up: %u.%u.%u.%u\n",
(int)(dev->d_ipaddr & 0xff), (int)((dev->d_ipaddr >> 8) & 0xff), ip4_addr1(dev->d_ipaddr), ip4_addr2(dev->d_ipaddr),
(int)((dev->d_ipaddr >> 16) & 0xff), (int)(dev->d_ipaddr >> 24)); ip4_addr3(dev->d_ipaddr), ip4_addr4(dev->d_ipaddr));
#endif #endif
#ifdef CONFIG_NET_IPv6 #ifdef CONFIG_NET_IPv6
ninfo("Bringing up: %04x:%04x:%04x:%04x:%04x:%04x:%04x:%04x\n", ninfo("Bringing up: %04x:%04x:%04x:%04x:%04x:%04x:%04x:%04x\n",

View File

@ -38,6 +38,7 @@
#include <nuttx/irq.h> #include <nuttx/irq.h>
#include <nuttx/wdog.h> #include <nuttx/wdog.h>
#include <nuttx/wqueue.h> #include <nuttx/wqueue.h>
#include <nuttx/net/ip.h>
#include <nuttx/net/netdev.h> #include <nuttx/net/netdev.h>
#ifdef CONFIG_NET_PKT #ifdef CONFIG_NET_PKT
@ -636,11 +637,9 @@ static int skel_ifup(FAR struct net_driver_s *dev)
(FAR struct skel_driver_s *)dev->d_private; (FAR struct skel_driver_s *)dev->d_private;
#ifdef CONFIG_NET_IPv4 #ifdef CONFIG_NET_IPv4
ninfo("Bringing up: %d.%d.%d.%d\n", ninfo("Bringing up: %u.%u.%u.%u\n",
(int)dev->d_ipaddr & 0xff, ip4_addr1(dev->d_ipaddr), ip4_addr2(dev->d_ipaddr),
(int)(dev->d_ipaddr >> 8) & 0xff, ip4_addr3(dev->d_ipaddr), ip4_addr4(dev->d_ipaddr));
(int)(dev->d_ipaddr >> 16) & 0xff,
(int)dev->d_ipaddr >> 24);
#endif #endif
#ifdef CONFIG_NET_IPv6 #ifdef CONFIG_NET_IPv6
ninfo("Bringing up: %04x:%04x:%04x:%04x:%04x:%04x:%04x:%04x\n", ninfo("Bringing up: %04x:%04x:%04x:%04x:%04x:%04x:%04x:%04x\n",

View File

@ -43,6 +43,7 @@
#include <nuttx/signal.h> #include <nuttx/signal.h>
#include <nuttx/wdog.h> #include <nuttx/wdog.h>
#include <nuttx/wqueue.h> #include <nuttx/wqueue.h>
#include <nuttx/net/ip.h>
#include <nuttx/net/netdev.h> #include <nuttx/net/netdev.h>
#ifdef CONFIG_NET_SLIP #ifdef CONFIG_NET_SLIP
@ -821,11 +822,9 @@ static int slip_ifup(FAR struct net_driver_s *dev)
FAR struct slip_driver_s *self = FAR struct slip_driver_s *self =
(FAR struct slip_driver_s *)dev->d_private; (FAR struct slip_driver_s *)dev->d_private;
ninfo("Bringing up: %d.%d.%d.%d\n", ninfo("Bringing up: %u.%u.%u.%u\n",
(int)dev->d_ipaddr & 0xff, ip4_addr1(dev->d_ipaddr), ip4_addr2(dev->d_ipaddr),
(int)(dev->d_ipaddr >> 8) & 0xff, ip4_addr3(dev->d_ipaddr), ip4_addr4(dev->d_ipaddr));
(int)(dev->d_ipaddr >> 16) & 0xff,
(int)dev->d_ipaddr >> 24);
/* Enable POLLIN and POLLOUT events on the TTY */ /* Enable POLLIN and POLLOUT events on the TTY */

View File

@ -63,6 +63,7 @@
#include <nuttx/wqueue.h> #include <nuttx/wqueue.h>
#include <nuttx/mm/iob.h> #include <nuttx/mm/iob.h>
#include <nuttx/net/net.h> #include <nuttx/net/net.h>
#include <nuttx/net/ip.h>
#include <nuttx/net/netdev.h> #include <nuttx/net/netdev.h>
#include <nuttx/net/ethernet.h> #include <nuttx/net/ethernet.h>
#include <nuttx/net/tun.h> #include <nuttx/net/tun.h>
@ -651,11 +652,9 @@ static int tun_ifup(FAR struct net_driver_s *dev)
FAR struct tun_device_s *priv = (FAR struct tun_device_s *)dev->d_private; FAR struct tun_device_s *priv = (FAR struct tun_device_s *)dev->d_private;
#ifdef CONFIG_NET_IPv4 #ifdef CONFIG_NET_IPv4
ninfo("Bringing up: %d.%d.%d.%d\n", ninfo("Bringing up: %u.%u.%u.%u\n",
(int)(dev->d_ipaddr & 0xff), ip4_addr1(dev->d_ipaddr), ip4_addr2(dev->d_ipaddr),
(int)((dev->d_ipaddr >> 8) & 0xff), ip4_addr3(dev->d_ipaddr), ip4_addr4(dev->d_ipaddr));
(int)((dev->d_ipaddr >> 16) & 0xff),
(int)(dev->d_ipaddr >> 24));
#endif #endif
#ifdef CONFIG_NET_IPv6 #ifdef CONFIG_NET_IPv6
ninfo("Bringing up: %04x:%04x:%04x:%04x:%04x:%04x:%04x:%04x\n", ninfo("Bringing up: %04x:%04x:%04x:%04x:%04x:%04x:%04x:%04x\n",

View File

@ -43,9 +43,10 @@
#include <nuttx/irq.h> #include <nuttx/irq.h>
#include <nuttx/wdog.h> #include <nuttx/wdog.h>
#include <nuttx/wqueue.h> #include <nuttx/wqueue.h>
#include <nuttx/signal.h>
#include <nuttx/net/ip.h>
#include <nuttx/net/netdev.h> #include <nuttx/net/netdev.h>
#include <nuttx/net/w5500.h> #include <nuttx/net/w5500.h>
#include <nuttx/signal.h>
#ifdef CONFIG_NET_PKT #ifdef CONFIG_NET_PKT
# include <nuttx/net/pkt.h> # include <nuttx/net/pkt.h>
@ -1747,11 +1748,9 @@ static int w5500_ifup(FAR struct net_driver_s *dev)
int ret; int ret;
#ifdef CONFIG_NET_IPv4 #ifdef CONFIG_NET_IPv4
ninfo("Bringing up: %d.%d.%d.%d\n", ninfo("Bringing up: %u.%u.%u.%u\n",
(int)dev->d_ipaddr & 0xff, ip4_addr1(dev->d_ipaddr), ip4_addr2(dev->d_ipaddr),
(int)(dev->d_ipaddr >> 8) & 0xff, ip4_addr3(dev->d_ipaddr), ip4_addr4(dev->d_ipaddr));
(int)(dev->d_ipaddr >> 16) & 0xff,
(int)dev->d_ipaddr >> 24);
#endif #endif
#ifdef CONFIG_NET_IPv6 #ifdef CONFIG_NET_IPv6
ninfo("Bringing up: %04x:%04x:%04x:%04x:%04x:%04x:%04x:%04x\n", ninfo("Bringing up: %04x:%04x:%04x:%04x:%04x:%04x:%04x:%04x\n",

View File

@ -44,6 +44,7 @@
#include <nuttx/irq.h> #include <nuttx/irq.h>
#include <nuttx/wqueue.h> #include <nuttx/wqueue.h>
#include <nuttx/semaphore.h> #include <nuttx/semaphore.h>
#include <nuttx/net/ip.h>
#include <nuttx/net/netdev.h> #include <nuttx/net/netdev.h>
#include <nuttx/usb/usbdev.h> #include <nuttx/usb/usbdev.h>
#include <nuttx/usb/cdc.h> #include <nuttx/usb/cdc.h>
@ -585,11 +586,9 @@ static int cdcecm_ifup(FAR struct net_driver_s *dev)
(FAR struct cdcecm_driver_s *)dev->d_private; (FAR struct cdcecm_driver_s *)dev->d_private;
#ifdef CONFIG_NET_IPv4 #ifdef CONFIG_NET_IPv4
ninfo("Bringing up: %d.%d.%d.%d\n", ninfo("Bringing up: %u.%u.%u.%u\n",
(int)(dev->d_ipaddr & 0xff), ip4_addr1(dev->d_ipaddr), ip4_addr2(dev->d_ipaddr),
(int)((dev->d_ipaddr >> 8) & 0xff), ip4_addr3(dev->d_ipaddr), ip4_addr4(dev->d_ipaddr));
(int)((dev->d_ipaddr >> 16) & 0xff),
(int)(dev->d_ipaddr >> 24));
#endif #endif
#ifdef CONFIG_NET_IPv6 #ifdef CONFIG_NET_IPv6
ninfo("Bringing up: %04x:%04x:%04x:%04x:%04x:%04x:%04x:%04x\n", ninfo("Bringing up: %04x:%04x:%04x:%04x:%04x:%04x:%04x:%04x\n",

View File

@ -44,6 +44,7 @@
#include <nuttx/fs/fs.h> #include <nuttx/fs/fs.h>
#include <nuttx/wqueue.h> #include <nuttx/wqueue.h>
#include <nuttx/signal.h> #include <nuttx/signal.h>
#include <nuttx/net/ip.h>
#include <nuttx/net/netdev.h> #include <nuttx/net/netdev.h>
#include <nuttx/usb/cdc.h> #include <nuttx/usb/cdc.h>
@ -2310,9 +2311,9 @@ static int cdcmbim_ifup(struct net_driver_s *dev)
int ret; int ret;
#ifdef CONFIG_NET_IPv4 #ifdef CONFIG_NET_IPv4
ninfo("Bringing up: %d.%d.%d.%d\n", ninfo("Bringing up: %u.%u.%u.%u\n",
(int)(dev->d_ipaddr & 0xff), (int)((dev->d_ipaddr >> 8) & 0xff), ip4_addr1(dev->d_ipaddr), ip4_addr2(dev->d_ipaddr),
(int)((dev->d_ipaddr >> 16) & 0xff), (int)(dev->d_ipaddr >> 24)); ip4_addr3(dev->d_ipaddr), ip4_addr4(dev->d_ipaddr));
#endif #endif
#ifdef CONFIG_NET_IPv6 #ifdef CONFIG_NET_IPv6
ninfo("Bringing up: %04x:%04x:%04x:%04x:%04x:%04x:%04x:%04x\n", ninfo("Bringing up: %04x:%04x:%04x:%04x:%04x:%04x:%04x:%04x\n",

View File

@ -29,6 +29,7 @@
#include <nuttx/compiler.h> #include <nuttx/compiler.h>
#include <nuttx/kmalloc.h> #include <nuttx/kmalloc.h>
#include <nuttx/net/ip.h>
#include <nuttx/net/netdev_lowerhalf.h> #include <nuttx/net/netdev_lowerhalf.h>
#include <nuttx/virtio/virtio.h> #include <nuttx/virtio/virtio.h>
@ -232,11 +233,9 @@ static int virtio_net_ifup(FAR struct netdev_lowerhalf_s *dev)
FAR struct virtio_net_priv_s *priv = (FAR struct virtio_net_priv_s *)dev; FAR struct virtio_net_priv_s *priv = (FAR struct virtio_net_priv_s *)dev;
#ifdef CONFIG_NET_IPv4 #ifdef CONFIG_NET_IPv4
vrtinfo("Bringing up: %d.%d.%d.%d\n", vrtinfo("Bringing up: %u.%u.%u.%u\n",
(int)dev->netdev.d_ipaddr & 0xff, ip4_addr1(dev->netdev.d_ipaddr), ip4_addr2(dev->netdev.d_ipaddr),
(int)(dev->netdev.d_ipaddr >> 8) & 0xff, ip4_addr3(dev->netdev.d_ipaddr), ip4_addr4(dev->netdev.d_ipaddr));
(int)(dev->netdev.d_ipaddr >> 16) & 0xff,
(int)dev->netdev.d_ipaddr >> 24);
#endif #endif
#ifdef CONFIG_NET_IPv6 #ifdef CONFIG_NET_IPv6
vrtinfo("Bringing up: %04x:%04x:%04x:%04x:%04x:%04x:%04x:%04x\n", vrtinfo("Bringing up: %04x:%04x:%04x:%04x:%04x:%04x:%04x:%04x\n",

View File

@ -314,17 +314,17 @@ extern "C"
#ifdef CONFIG_ENDIAN_BIG #ifdef CONFIG_ENDIAN_BIG
/* Big-endian byte order: 11223344 */ /* Big-endian byte order: 11223344 */
# define ip4_addr1(ipaddr) (((ipaddr) >> 24) & 0xff) # define ip4_addr1(ipaddr) ((uint8_t)(((ipaddr) >> 24) & 0xff))
# define ip4_addr2(ipaddr) (((ipaddr) >> 16) & 0xff) # define ip4_addr2(ipaddr) ((uint8_t)(((ipaddr) >> 16) & 0xff))
# define ip4_addr3(ipaddr) (((ipaddr) >> 8) & 0xff) # define ip4_addr3(ipaddr) ((uint8_t)(((ipaddr) >> 8) & 0xff))
# define ip4_addr4(ipaddr) ((ipaddr) & 0xff) # define ip4_addr4(ipaddr) ((uint8_t)((ipaddr) & 0xff))
#else #else
/* Little endian byte order: 44223311 */ /* Little endian byte order: 44223311 */
# define ip4_addr1(ipaddr) ((ipaddr) & 0xff) # define ip4_addr1(ipaddr) ((uint8_t)((ipaddr) & 0xff))
# define ip4_addr2(ipaddr) (((ipaddr) >> 8) & 0xff) # define ip4_addr2(ipaddr) ((uint8_t)(((ipaddr) >> 8) & 0xff))
# define ip4_addr3(ipaddr) (((ipaddr) >> 16) & 0xff) # define ip4_addr3(ipaddr) ((uint8_t)(((ipaddr) >> 16) & 0xff))
# define ip4_addr4(ipaddr) (((ipaddr) >> 24) & 0xff) # define ip4_addr4(ipaddr) ((uint8_t)(((ipaddr) >> 24) & 0xff))
#endif #endif
/**************************************************************************** /****************************************************************************
@ -470,14 +470,18 @@ extern "C"
#ifdef CONFIG_NET_IPv4 #ifdef CONFIG_NET_IPv4
# define net_ipv4addr_copy(dest, src) \ # define net_ipv4addr_copy(dest, src) \
do { \ do \
(dest) = (in_addr_t)(src); \ { \
} while (0) (dest) = (in_addr_t)(src); \
} \
while (0)
# define net_ipv4addr_hdrcopy(dest, src) \ # define net_ipv4addr_hdrcopy(dest, src) \
do { \ do \
((FAR uint16_t *)(dest))[0] = ((FAR uint16_t *)(src))[0]; \ { \
((FAR uint16_t *)(dest))[1] = ((FAR uint16_t *)(src))[1]; \ ((FAR uint16_t *)(dest))[0] = ((FAR uint16_t *)(src))[0]; \
} while (0) ((FAR uint16_t *)(dest))[1] = ((FAR uint16_t *)(src))[1]; \
} \
while (0)
#endif #endif
#ifdef CONFIG_NET_IPv6 #ifdef CONFIG_NET_IPv6
@ -605,8 +609,8 @@ bool net_ipv6addr_maskcmp(const net_ipv6addr_t addr1,
****************************************************************************/ ****************************************************************************/
#define net_ipv4addr_broadcast(addr, mask) \ #define net_ipv4addr_broadcast(addr, mask) \
(((in_addr_t)(addr) & ~(in_addr_t)(mask)) == \ (((in_addr_t)(addr) & ~(in_addr_t)(mask)) == \
((in_addr_t)(0xffffffff) & ~(in_addr_t)(mask))) ((in_addr_t)(0xffffffff) & ~(in_addr_t)(mask)))
/**************************************************************************** /****************************************************************************
* Name: net_ipv6addr_prefixcmp * Name: net_ipv6addr_prefixcmp

View File

@ -102,7 +102,7 @@ in_addr_t inet_addr(FAR const char *cp)
{ {
if ((a < 0x100) && (b < 0x1000000)) if ((a < 0x100) && (b < 0x1000000))
{ {
result = (((uint32_t) a) << 24) | b; result = (((uint32_t)a) << 24) | b;
} }
break; break;
} }
@ -111,7 +111,7 @@ in_addr_t inet_addr(FAR const char *cp)
{ {
if ((a < 0x100) && (b < 0x100) && (c < 0x10000)) if ((a < 0x100) && (b < 0x100) && (c < 0x10000))
{ {
result = (((uint32_t) a) << 24) | (((uint32_t) b) << 16) | c; result = (((uint32_t)a) << 24) | (((uint32_t)b) << 16) | c;
} }
break; break;
} }
@ -120,8 +120,8 @@ in_addr_t inet_addr(FAR const char *cp)
{ {
if ((a < 0x100) && (b < 0x100) && (c < 0x100) && (d < 0x100)) if ((a < 0x100) && (b < 0x100) && (c < 0x100) && (d < 0x100))
{ {
result = (((uint32_t) a) << 24) | (((uint32_t) b) << 16) | result = (((uint32_t)a) << 24) | (((uint32_t)b) << 16) |
(((uint32_t) c) << 8) | d; (((uint32_t)c) << 8) | d;
} }
break; break;
} }

View File

@ -59,6 +59,7 @@
#include <nuttx/lib/lib.h> #include <nuttx/lib/lib.h>
#include <nuttx/net/net.h> #include <nuttx/net/net.h>
#include <nuttx/net/ip.h>
#include <nuttx/net/dns.h> #include <nuttx/net/dns.h>
#include "netdb/lib_dns.h" #include "netdb/lib_dns.h"
@ -502,11 +503,11 @@ static int dns_recv_response(int sd, FAR union dns_addr_u *addr, int naddr,
nameptr += 10 + 4; nameptr += 10 + 4;
ninfo("IPv4 address: %d.%d.%d.%d\n", ninfo("IPv4 address: %u.%u.%u.%u\n",
(int)((ans->u.ipv4.s_addr) & 0xff), ip4_addr1(ans->u.ipv4.s_addr),
(int)((ans->u.ipv4.s_addr >> 8) & 0xff), ip4_addr2(ans->u.ipv4.s_addr),
(int)((ans->u.ipv4.s_addr >> 16) & 0xff), ip4_addr3(ans->u.ipv4.s_addr),
(int)((ans->u.ipv4.s_addr >> 24) & 0xff)); ip4_addr4(ans->u.ipv4.s_addr));
inaddr = &addr[naddr_read].ipv4; inaddr = &addr[naddr_read].ipv4;
inaddr->sin_family = AF_INET; inaddr->sin_family = AF_INET;

View File

@ -73,12 +73,12 @@ void arp_dump(FAR struct arp_hdr_s *arp)
arp->ah_hwtype, arp->ah_protocol); arp->ah_hwtype, arp->ah_protocol);
ninfo(" HW len: %02x Proto len: %02x Operation: %04x\n", ninfo(" HW len: %02x Proto len: %02x Operation: %04x\n",
arp->ah_hwlen, arp->ah_protolen, arp->ah_opcode); arp->ah_hwlen, arp->ah_protolen, arp->ah_opcode);
ninfo(" Sender MAC: %02x:%02x:%02x:%02x:%02x:%02x IP: %d.%d.%d.%d\n", ninfo(" Sender MAC: %02x:%02x:%02x:%02x:%02x:%02x IP: %u.%u.%u.%u\n",
arp->ah_shwaddr[0], arp->ah_shwaddr[1], arp->ah_shwaddr[2], arp->ah_shwaddr[0], arp->ah_shwaddr[1], arp->ah_shwaddr[2],
arp->ah_shwaddr[3], arp->ah_shwaddr[4], arp->ah_shwaddr[5], arp->ah_shwaddr[3], arp->ah_shwaddr[4], arp->ah_shwaddr[5],
arp->ah_sipaddr[0] & 0xff, arp->ah_sipaddr[0] >> 8, arp->ah_sipaddr[0] & 0xff, arp->ah_sipaddr[0] >> 8,
arp->ah_sipaddr[1] & 0xff, arp->ah_sipaddr[1] >> 8); arp->ah_sipaddr[1] & 0xff, arp->ah_sipaddr[1] >> 8);
ninfo(" Dest MAC: %02x:%02x:%02x:%02x:%02x:%02x IP: %d.%d.%d.%d\n", ninfo(" Dest MAC: %02x:%02x:%02x:%02x:%02x:%02x IP: %u.%u.%u.%u\n",
arp->ah_dhwaddr[0], arp->ah_dhwaddr[1], arp->ah_dhwaddr[2], arp->ah_dhwaddr[0], arp->ah_dhwaddr[1], arp->ah_dhwaddr[2],
arp->ah_dhwaddr[3], arp->ah_dhwaddr[4], arp->ah_dhwaddr[5], arp->ah_dhwaddr[3], arp->ah_dhwaddr[4], arp->ah_dhwaddr[5],
arp->ah_dipaddr[0] & 0xff, arp->ah_dipaddr[0] >> 8, arp->ah_dipaddr[0] & 0xff, arp->ah_dipaddr[0] >> 8,