mirror of
https://github.com/apache/nuttx.git
synced 2026-05-29 04:19:37 +08:00
net/ip: print ip addresses using ip4_addrN macro
Signed-off-by: Petro Karashchenko <petro.karashchenko@gmail.com>
This commit is contained in:
committed by
Alan Carvalho de Assis
parent
3bd495c09d
commit
075738cf14
+7
-10
@@ -50,6 +50,7 @@
|
||||
#include <nuttx/clock.h>
|
||||
#include <nuttx/net/enc28j60.h>
|
||||
#include <nuttx/net/net.h>
|
||||
#include <nuttx/net/ip.h>
|
||||
#include <nuttx/net/netdev.h>
|
||||
|
||||
#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;
|
||||
int ret;
|
||||
|
||||
ninfo("Bringing up: %d.%d.%d.%d\n",
|
||||
(int)(dev->d_ipaddr & 0xff),
|
||||
(int)((dev->d_ipaddr >> 8) & 0xff),
|
||||
(int)((dev->d_ipaddr >> 16) & 0xff),
|
||||
(int)(dev->d_ipaddr >> 24));
|
||||
ninfo("Bringing up: %u.%u.%u.%u\n",
|
||||
ip4_addr1(dev->d_ipaddr), ip4_addr2(dev->d_ipaddr),
|
||||
ip4_addr3(dev->d_ipaddr), ip4_addr4(dev->d_ipaddr));
|
||||
|
||||
/* 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;
|
||||
int ret;
|
||||
|
||||
ninfo("Taking down: %d.%d.%d.%d\n",
|
||||
(int)(dev->d_ipaddr & 0xff),
|
||||
(int)((dev->d_ipaddr >> 8) & 0xff),
|
||||
(int)((dev->d_ipaddr >> 16) & 0xff),
|
||||
(int)(dev->d_ipaddr >> 24));
|
||||
ninfo("Taking down: %u.%u.%u.%u\n",
|
||||
ip4_addr1(dev->d_ipaddr), ip4_addr2(dev->d_ipaddr),
|
||||
ip4_addr3(dev->d_ipaddr), ip4_addr4(dev->d_ipaddr));
|
||||
|
||||
/* Lock the SPI bus so that we have exclusive access */
|
||||
|
||||
|
||||
Reference in New Issue
Block a user