NSH changes to work with the network local loopback device

This commit is contained in:
Gregory Nutt
2015-08-24 13:59:52 -06:00
parent 73fc8b501e
commit ce3a2dc0d4
3 changed files with 27 additions and 2 deletions

View File

@@ -515,6 +515,12 @@ static int ifconfig_callback(FAR struct net_driver_s *dev, void *arg)
break;
# endif
# if defined(CONFIG_NET_LOOPBACK)
case NET_LL_LOOPBACK:
nsh_output(vtbl, "%s\tLink encap:Local Loopback\n", dev->d_ifname);
break;
# endif
# if defined(CONFIG_NET_SLIP)
case NET_LL_SLIP:
nsh_output(vtbl, "%s\tLink encap:SLIP", dev->d_ifname);
@@ -543,6 +549,9 @@ static int ifconfig_callback(FAR struct net_driver_s *dev, void *arg)
nsh_output(vtbl, "%s\tLink encap:Ethernet HWaddr %s at %s\n",
dev->d_ifname, ether_ntoa(&dev->d_mac), status);
#elif defined(CONFIG_NET_LOOPBACK)
nsh_output(vtbl, "%s\tLink encap:Local Loopback\n", dev->d_ifname);
#elif defined(CONFIG_NET_SLIP)
nsh_output(vtbl, "%s\tLink encap:SLIP at %s\n", dev->d_ifname, status);