mirror of
https://github.com/apache/nuttx.git
synced 2026-06-07 17:33:08 +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
@@ -44,6 +44,7 @@
|
||||
#include <nuttx/irq.h>
|
||||
#include <nuttx/wqueue.h>
|
||||
#include <nuttx/semaphore.h>
|
||||
#include <nuttx/net/ip.h>
|
||||
#include <nuttx/net/netdev.h>
|
||||
#include <nuttx/usb/usbdev.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;
|
||||
|
||||
#ifdef CONFIG_NET_IPv4
|
||||
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));
|
||||
#endif
|
||||
#ifdef CONFIG_NET_IPv6
|
||||
ninfo("Bringing up: %04x:%04x:%04x:%04x:%04x:%04x:%04x:%04x\n",
|
||||
|
||||
Reference in New Issue
Block a user