Merge remote-tracking branch 'origin/master' into ieee802154

This commit is contained in:
Gregory Nutt
2017-04-02 17:50:34 -06:00
15 changed files with 77 additions and 22 deletions
+9
View File
@@ -100,10 +100,19 @@ config SIM_WALLTIME
correct for the system timer tick rate. With this definition in the configuration, correct for the system timer tick rate. With this definition in the configuration,
sleep() behavior is more or less normal. sleep() behavior is more or less normal.
config SIM_NETDEV
bool "Simulated Network Device"
default y
depends on NET
---help---
Build in support for a simulated network device using a TAP device on Linux or
WPCAP on Windows.
if HOST_LINUX if HOST_LINUX
choice choice
prompt "Simulation Network Type" prompt "Simulation Network Type"
default SIM_NET_HOST_ROUTE default SIM_NET_HOST_ROUTE
depends on SIM_NETDEV
config SIM_NET_HOST_ROUTE config SIM_NET_HOST_ROUTE
bool "Use local host route" bool "Use local host route"
+5 -3
View File
@@ -119,6 +119,7 @@ ifeq ($(CONFIG_ARCH_ROMGETC),y)
CSRCS += up_romgetc.c CSRCS += up_romgetc.c
endif endif
ifeq ($(CONFIG_SIM_NETDEV),y)
ifeq ($(CONFIG_NET_ETHERNET),y) ifeq ($(CONFIG_NET_ETHERNET),y)
CSRCS += up_netdriver.c CSRCS += up_netdriver.c
HOSTCFLAGS += -DNETDEV_BUFSIZE=$(CONFIG_NET_ETH_MTU) HOSTCFLAGS += -DNETDEV_BUFSIZE=$(CONFIG_NET_ETH_MTU)
@@ -131,11 +132,12 @@ endif
ifeq ($(CONFIG_SIM_NET_HOST_ROUTE),y) ifeq ($(CONFIG_SIM_NET_HOST_ROUTE),y)
HOSTCFLAGS += -DCONFIG_SIM_NET_HOST_ROUTE HOSTCFLAGS += -DCONFIG_SIM_NET_HOST_ROUTE
endif endif
else else # HOSTOS != Cygwin
HOSTSRCS += up_wpcap.c up_netdev.c HOSTSRCS += up_wpcap.c up_netdev.c
DRVLIB = /lib/w32api/libws2_32.a /lib/w32api/libiphlpapi.a DRVLIB = /lib/w32api/libws2_32.a /lib/w32api/libiphlpapi.a
endif endif # HOSTOS != Cygwin
endif endif # CONFIG_NET_ETHERNET
endif # CONFIG_SIM_NETDEV
ifeq ($(CONFIG_SMP),y) ifeq ($(CONFIG_SMP),y)
HOSTCFLAGS += -DCONFIG_SMP=1 -DCONFIG_SMP_NCPUS=$(CONFIG_SMP_NCPUS) HOSTCFLAGS += -DCONFIG_SMP=1 -DCONFIG_SMP_NCPUS=$(CONFIG_SMP_NCPUS)
+1 -1
View File
@@ -142,7 +142,7 @@ void up_idle(void)
} }
#endif #endif
#ifdef CONFIG_NET_ETHERNET #if defined(CONFIG_NET_ETHERNET) && defined(CONFIG_SIM_NETDEV)
/* Run the network if enabled */ /* Run the network if enabled */
netdriver_loop(); netdriver_loop();
+1 -1
View File
@@ -270,7 +270,7 @@ void up_initialize(void)
up_registerblockdevice(); /* Our FAT ramdisk at /dev/ram0 */ up_registerblockdevice(); /* Our FAT ramdisk at /dev/ram0 */
#endif #endif
#ifdef CONFIG_NET_ETHERNET #if defined(CONFIG_NET_ETHERNET) && defined(CONFIG_SIM_NETDEV)
netdriver_init(); /* Our "real" network driver */ netdriver_init(); /* Our "real" network driver */
#endif #endif
+8 -4
View File
@@ -209,7 +209,7 @@ void netdriver_loop(void)
{ {
pkt_input(&g_sim_dev); pkt_input(&g_sim_dev);
} }
#endif #endif /* CONFIG_NET_PKT */
/* We only accept IP packets of the configured type and ARP packets */ /* We only accept IP packets of the configured type and ARP packets */
@@ -253,7 +253,7 @@ void netdriver_loop(void)
} }
} }
else else
#endif #endif /* CONFIG_NET_IPv4 */
#ifdef CONFIG_NET_IPv6 #ifdef CONFIG_NET_IPv6
if (eth->type == HTONS(ETHTYPE_IP6) && is_ours) if (eth->type == HTONS(ETHTYPE_IP6) && is_ours)
{ {
@@ -283,7 +283,7 @@ void netdriver_loop(void)
{ {
neighbor_out(&g_sim_dev); neighbor_out(&g_sim_dev);
} }
#endif #endif /* CONFIG_NET_IPv6 */
/* And send the packet */ /* And send the packet */
@@ -291,7 +291,7 @@ void netdriver_loop(void)
} }
} }
else else
#endif #endif/* CONFIG_NET_IPv6 */
#ifdef CONFIG_NET_ARP #ifdef CONFIG_NET_ARP
if (eth->type == htons(ETHTYPE_ARP)) if (eth->type == htons(ETHTYPE_ARP))
{ {
@@ -307,7 +307,11 @@ void netdriver_loop(void)
netdev_send(g_sim_dev.d_buf, g_sim_dev.d_len); netdev_send(g_sim_dev.d_buf, g_sim_dev.d_len);
} }
} }
else
#endif #endif
{
nwarn("WARNING: Unsupported Ethernet type %u\n", eth->type)
}
} }
} }
+13 -1
View File
@@ -77,6 +77,7 @@ CONFIG_HOST_X86_64=y
CONFIG_SIM_X8664_SYSTEMV=y CONFIG_SIM_X8664_SYSTEMV=y
# CONFIG_SIM_X8664_MICROSOFT is not set # CONFIG_SIM_X8664_MICROSOFT is not set
# CONFIG_SIM_WALLTIME is not set # CONFIG_SIM_WALLTIME is not set
CONFIG_SIM_NETDEV=y
CONFIG_SIM_NET_HOST_ROUTE=y CONFIG_SIM_NET_HOST_ROUTE=y
# CONFIG_SIM_NET_BRIDGE is not set # CONFIG_SIM_NET_BRIDGE is not set
# CONFIG_SIM_FRAMEBUFFER is not set # CONFIG_SIM_FRAMEBUFFER is not set
@@ -203,6 +204,8 @@ CONFIG_MAX_TASKS=64
# #
# CONFIG_PTHREAD_MUTEX_TYPES is not set # CONFIG_PTHREAD_MUTEX_TYPES is not set
CONFIG_PTHREAD_MUTEX_ROBUST=y CONFIG_PTHREAD_MUTEX_ROBUST=y
# CONFIG_PTHREAD_MUTEX_UNSAFE is not set
# CONFIG_PTHREAD_MUTEX_BOTH is not set
CONFIG_NPTHREAD_KEYS=4 CONFIG_NPTHREAD_KEYS=4
# CONFIG_PTHREAD_CLEANUP is not set # CONFIG_PTHREAD_CLEANUP is not set
# CONFIG_CANCELLATION_POINTS is not set # CONFIG_CANCELLATION_POINTS is not set
@@ -368,6 +371,7 @@ CONFIG_SERIAL_CONSOLE=y
# CONFIG_PSEUDOTERM is not set # CONFIG_PSEUDOTERM is not set
# CONFIG_USBDEV is not set # CONFIG_USBDEV is not set
# CONFIG_USBHOST is not set # CONFIG_USBHOST is not set
# CONFIG_USBMISC is not set
# CONFIG_HAVE_USBTRACE is not set # CONFIG_HAVE_USBTRACE is not set
# CONFIG_DRIVERS_WIRELESS is not set # CONFIG_DRIVERS_WIRELESS is not set
# CONFIG_DRIVERS_CONTACTLESS is not set # CONFIG_DRIVERS_CONTACTLESS is not set
@@ -408,10 +412,12 @@ CONFIG_NET_GUARDSIZE=2
CONFIG_NET_ETHERNET=y CONFIG_NET_ETHERNET=y
# CONFIG_NET_LOOPBACK is not set # CONFIG_NET_LOOPBACK is not set
# CONFIG_NET_TUN is not set # CONFIG_NET_TUN is not set
# CONFIG_NET_USRSOCK is not set
# #
# Network Device Operations # Network Device Operations
# #
# CONFIG_NETDEV_IOCTL is not set
# CONFIG_NETDEV_PHY_IOCTL is not set # CONFIG_NETDEV_PHY_IOCTL is not set
# #
@@ -442,6 +448,7 @@ CONFIG_NET_SOCKOPTS=y
# TCP/IP Networking # TCP/IP Networking
# #
CONFIG_NET_TCP=y CONFIG_NET_TCP=y
# CONFIG_NET_TCP_NO_STACK is not set
# CONFIG_NET_TCPURGDATA is not set # CONFIG_NET_TCPURGDATA is not set
CONFIG_NET_TCP_CONNS=40 CONFIG_NET_TCP_CONNS=40
CONFIG_NET_MAX_LISTENPORTS=40 CONFIG_NET_MAX_LISTENPORTS=40
@@ -456,6 +463,7 @@ CONFIG_NET_TCP_RECVDELAY=0
# UDP Networking # UDP Networking
# #
# CONFIG_NET_UDP is not set # CONFIG_NET_UDP is not set
# CONFIG_NET_UDP_NO_STACK is not set
# #
# ICMP Networking Support # ICMP Networking Support
@@ -484,6 +492,10 @@ CONFIG_NET_IOB=y
CONFIG_IOB_NBUFFERS=24 CONFIG_IOB_NBUFFERS=24
CONFIG_IOB_BUFSIZE=196 CONFIG_IOB_BUFSIZE=196
CONFIG_IOB_NCHAINS=8 CONFIG_IOB_NCHAINS=8
#
# User-space networking stack API
#
# CONFIG_NET_ARCH_INCR32 is not set # CONFIG_NET_ARCH_INCR32 is not set
# CONFIG_NET_ARCH_CHKSUM is not set # CONFIG_NET_ARCH_CHKSUM is not set
CONFIG_NET_STATISTICS=y CONFIG_NET_STATISTICS=y
@@ -717,7 +729,6 @@ CONFIG_EXAMPLES_NETTEST_IPADDR=0xc0a80080
CONFIG_EXAMPLES_NETTEST_DRIPADDR=0xc0a80001 CONFIG_EXAMPLES_NETTEST_DRIPADDR=0xc0a80001
CONFIG_EXAMPLES_NETTEST_NETMASK=0xffffff00 CONFIG_EXAMPLES_NETTEST_NETMASK=0xffffff00
CONFIG_EXAMPLES_NETTEST_CLIENTIP=0xc0a8006a CONFIG_EXAMPLES_NETTEST_CLIENTIP=0xc0a8006a
# CONFIG_EXAMPLES_NRF24L01TERM is not set
# CONFIG_EXAMPLES_NSH is not set # CONFIG_EXAMPLES_NSH is not set
# CONFIG_EXAMPLES_NULL is not set # CONFIG_EXAMPLES_NULL is not set
# CONFIG_EXAMPLES_NX is not set # CONFIG_EXAMPLES_NX is not set
@@ -748,6 +759,7 @@ CONFIG_EXAMPLES_NETTEST_CLIENTIP=0xc0a8006a
# CONFIG_EXAMPLES_WATCHDOG is not set # CONFIG_EXAMPLES_WATCHDOG is not set
# CONFIG_EXAMPLES_WEBSERVER is not set # CONFIG_EXAMPLES_WEBSERVER is not set
# CONFIG_EXAMPLES_WGET is not set # CONFIG_EXAMPLES_WGET is not set
# CONFIG_EXAMPLES_XBC_TEST is not set
# #
# File System Utilities # File System Utilities
+13 -1
View File
@@ -77,6 +77,7 @@ CONFIG_HOST_X86_64=y
CONFIG_SIM_X8664_SYSTEMV=y CONFIG_SIM_X8664_SYSTEMV=y
# CONFIG_SIM_X8664_MICROSOFT is not set # CONFIG_SIM_X8664_MICROSOFT is not set
CONFIG_SIM_WALLTIME=y CONFIG_SIM_WALLTIME=y
CONFIG_SIM_NETDEV=y
CONFIG_SIM_NET_HOST_ROUTE=y CONFIG_SIM_NET_HOST_ROUTE=y
# CONFIG_SIM_NET_BRIDGE is not set # CONFIG_SIM_NET_BRIDGE is not set
# CONFIG_SIM_FRAMEBUFFER is not set # CONFIG_SIM_FRAMEBUFFER is not set
@@ -210,6 +211,8 @@ CONFIG_SCHED_WAITPID=y
# #
# CONFIG_PTHREAD_MUTEX_TYPES is not set # CONFIG_PTHREAD_MUTEX_TYPES is not set
CONFIG_PTHREAD_MUTEX_ROBUST=y CONFIG_PTHREAD_MUTEX_ROBUST=y
# CONFIG_PTHREAD_MUTEX_UNSAFE is not set
# CONFIG_PTHREAD_MUTEX_BOTH is not set
CONFIG_NPTHREAD_KEYS=4 CONFIG_NPTHREAD_KEYS=4
# CONFIG_PTHREAD_CLEANUP is not set # CONFIG_PTHREAD_CLEANUP is not set
# CONFIG_CANCELLATION_POINTS is not set # CONFIG_CANCELLATION_POINTS is not set
@@ -380,6 +383,7 @@ CONFIG_SERIAL_CONSOLE=y
# CONFIG_PSEUDOTERM is not set # CONFIG_PSEUDOTERM is not set
# CONFIG_USBDEV is not set # CONFIG_USBDEV is not set
# CONFIG_USBHOST is not set # CONFIG_USBHOST is not set
# CONFIG_USBMISC is not set
# CONFIG_HAVE_USBTRACE is not set # CONFIG_HAVE_USBTRACE is not set
# CONFIG_DRIVERS_WIRELESS is not set # CONFIG_DRIVERS_WIRELESS is not set
# CONFIG_DRIVERS_CONTACTLESS is not set # CONFIG_DRIVERS_CONTACTLESS is not set
@@ -418,10 +422,12 @@ CONFIG_NET_GUARDSIZE=2
# CONFIG_NET_ETHERNET is not set # CONFIG_NET_ETHERNET is not set
# CONFIG_NET_LOOPBACK is not set # CONFIG_NET_LOOPBACK is not set
# CONFIG_NET_TUN is not set # CONFIG_NET_TUN is not set
# CONFIG_NET_USRSOCK is not set
# #
# Network Device Operations # Network Device Operations
# #
# CONFIG_NETDEV_IOCTL is not set
# CONFIG_NETDEV_PHY_IOCTL is not set # CONFIG_NETDEV_PHY_IOCTL is not set
# #
@@ -453,11 +459,13 @@ CONFIG_NET_LOCAL_DGRAM=y
# TCP/IP Networking # TCP/IP Networking
# #
# CONFIG_NET_TCP is not set # CONFIG_NET_TCP is not set
# CONFIG_NET_TCP_NO_STACK is not set
# #
# UDP Networking # UDP Networking
# #
# CONFIG_NET_UDP is not set # CONFIG_NET_UDP is not set
# CONFIG_NET_UDP_NO_STACK is not set
# #
# IGMPv2 Client Support # IGMPv2 Client Support
@@ -472,6 +480,10 @@ CONFIG_NET_LOCAL_DGRAM=y
# Network I/O Buffer Support # Network I/O Buffer Support
# #
# CONFIG_NET_IOB is not set # CONFIG_NET_IOB is not set
#
# User-space networking stack API
#
# CONFIG_NET_ARCH_INCR32 is not set # CONFIG_NET_ARCH_INCR32 is not set
# CONFIG_NET_ARCH_CHKSUM is not set # CONFIG_NET_ARCH_CHKSUM is not set
# CONFIG_NET_STATISTICS is not set # CONFIG_NET_STATISTICS is not set
@@ -715,7 +727,6 @@ CONFIG_EXAMPLES_HELLO_STACKSIZE=2048
# CONFIG_EXAMPLES_MM is not set # CONFIG_EXAMPLES_MM is not set
# CONFIG_EXAMPLES_MODBUS is not set # CONFIG_EXAMPLES_MODBUS is not set
# CONFIG_EXAMPLES_MOUNT is not set # CONFIG_EXAMPLES_MOUNT is not set
# CONFIG_EXAMPLES_NRF24L01TERM is not set
CONFIG_EXAMPLES_NSH=y CONFIG_EXAMPLES_NSH=y
# CONFIG_EXAMPLES_NULL is not set # CONFIG_EXAMPLES_NULL is not set
# CONFIG_EXAMPLES_NX is not set # CONFIG_EXAMPLES_NX is not set
@@ -760,6 +771,7 @@ CONFIG_EXAMPLES_UDGRAM_CLIENT_PRIORITY=100
# CONFIG_EXAMPLES_USTREAM is not set # CONFIG_EXAMPLES_USTREAM is not set
# CONFIG_EXAMPLES_WATCHDOG is not set # CONFIG_EXAMPLES_WATCHDOG is not set
# CONFIG_EXAMPLES_WEBSERVER is not set # CONFIG_EXAMPLES_WEBSERVER is not set
# CONFIG_EXAMPLES_XBC_TEST is not set
# #
# File System Utilities # File System Utilities
+13 -1
View File
@@ -77,6 +77,7 @@ CONFIG_HOST_X86_64=y
CONFIG_SIM_X8664_SYSTEMV=y CONFIG_SIM_X8664_SYSTEMV=y
# CONFIG_SIM_X8664_MICROSOFT is not set # CONFIG_SIM_X8664_MICROSOFT is not set
CONFIG_SIM_WALLTIME=y CONFIG_SIM_WALLTIME=y
CONFIG_SIM_NETDEV=y
CONFIG_SIM_NET_HOST_ROUTE=y CONFIG_SIM_NET_HOST_ROUTE=y
# CONFIG_SIM_NET_BRIDGE is not set # CONFIG_SIM_NET_BRIDGE is not set
# CONFIG_SIM_FRAMEBUFFER is not set # CONFIG_SIM_FRAMEBUFFER is not set
@@ -210,6 +211,8 @@ CONFIG_SCHED_WAITPID=y
# #
# CONFIG_PTHREAD_MUTEX_TYPES is not set # CONFIG_PTHREAD_MUTEX_TYPES is not set
CONFIG_PTHREAD_MUTEX_ROBUST=y CONFIG_PTHREAD_MUTEX_ROBUST=y
# CONFIG_PTHREAD_MUTEX_UNSAFE is not set
# CONFIG_PTHREAD_MUTEX_BOTH is not set
CONFIG_NPTHREAD_KEYS=4 CONFIG_NPTHREAD_KEYS=4
# CONFIG_PTHREAD_CLEANUP is not set # CONFIG_PTHREAD_CLEANUP is not set
# CONFIG_CANCELLATION_POINTS is not set # CONFIG_CANCELLATION_POINTS is not set
@@ -380,6 +383,7 @@ CONFIG_SERIAL_CONSOLE=y
# CONFIG_PSEUDOTERM is not set # CONFIG_PSEUDOTERM is not set
# CONFIG_USBDEV is not set # CONFIG_USBDEV is not set
# CONFIG_USBHOST is not set # CONFIG_USBHOST is not set
# CONFIG_USBMISC is not set
# CONFIG_HAVE_USBTRACE is not set # CONFIG_HAVE_USBTRACE is not set
# CONFIG_DRIVERS_WIRELESS is not set # CONFIG_DRIVERS_WIRELESS is not set
# CONFIG_DRIVERS_CONTACTLESS is not set # CONFIG_DRIVERS_CONTACTLESS is not set
@@ -418,10 +422,12 @@ CONFIG_NET_GUARDSIZE=2
# CONFIG_NET_ETHERNET is not set # CONFIG_NET_ETHERNET is not set
# CONFIG_NET_LOOPBACK is not set # CONFIG_NET_LOOPBACK is not set
# CONFIG_NET_TUN is not set # CONFIG_NET_TUN is not set
# CONFIG_NET_USRSOCK is not set
# #
# Network Device Operations # Network Device Operations
# #
# CONFIG_NETDEV_IOCTL is not set
# CONFIG_NETDEV_PHY_IOCTL is not set # CONFIG_NETDEV_PHY_IOCTL is not set
# #
@@ -453,11 +459,13 @@ CONFIG_NET_LOCAL_STREAM=y
# TCP/IP Networking # TCP/IP Networking
# #
# CONFIG_NET_TCP is not set # CONFIG_NET_TCP is not set
# CONFIG_NET_TCP_NO_STACK is not set
# #
# UDP Networking # UDP Networking
# #
# CONFIG_NET_UDP is not set # CONFIG_NET_UDP is not set
# CONFIG_NET_UDP_NO_STACK is not set
# #
# IGMPv2 Client Support # IGMPv2 Client Support
@@ -472,6 +480,10 @@ CONFIG_NET_LOCAL_STREAM=y
# Network I/O Buffer Support # Network I/O Buffer Support
# #
# CONFIG_NET_IOB is not set # CONFIG_NET_IOB is not set
#
# User-space networking stack API
#
# CONFIG_NET_ARCH_INCR32 is not set # CONFIG_NET_ARCH_INCR32 is not set
# CONFIG_NET_ARCH_CHKSUM is not set # CONFIG_NET_ARCH_CHKSUM is not set
# CONFIG_NET_STATISTICS is not set # CONFIG_NET_STATISTICS is not set
@@ -715,7 +727,6 @@ CONFIG_EXAMPLES_HELLO_STACKSIZE=2048
# CONFIG_EXAMPLES_MM is not set # CONFIG_EXAMPLES_MM is not set
# CONFIG_EXAMPLES_MODBUS is not set # CONFIG_EXAMPLES_MODBUS is not set
# CONFIG_EXAMPLES_MOUNT is not set # CONFIG_EXAMPLES_MOUNT is not set
# CONFIG_EXAMPLES_NRF24L01TERM is not set
CONFIG_EXAMPLES_NSH=y CONFIG_EXAMPLES_NSH=y
# CONFIG_EXAMPLES_NULL is not set # CONFIG_EXAMPLES_NULL is not set
# CONFIG_EXAMPLES_NX is not set # CONFIG_EXAMPLES_NX is not set
@@ -755,6 +766,7 @@ CONFIG_EXAMPLES_USTREAM_ADDR="/dev/fifo"
# CONFIG_EXAMPLES_USTREAM_USE_POLL is not set # CONFIG_EXAMPLES_USTREAM_USE_POLL is not set
# CONFIG_EXAMPLES_WATCHDOG is not set # CONFIG_EXAMPLES_WATCHDOG is not set
# CONFIG_EXAMPLES_WEBSERVER is not set # CONFIG_EXAMPLES_WEBSERVER is not set
# CONFIG_EXAMPLES_XBC_TEST is not set
# #
# File System Utilities # File System Utilities
+6 -6
View File
@@ -158,19 +158,19 @@
# endif # endif
# ifdef CONFIG_NET_SLIP # ifdef CONFIG_NET_SLIP
# define _MIN_SLIP_MTU MIN(_MIN_LO_MTU,CONFIG_NET_6LOWPAN_MTU) # define _MIN_SLIP_MTU MIN(_MIN_LO_MTU,CONFIG_NET_SLIP_MTU)
# define _MAX_SLIP_MTU MAX(_MAX_LO_MTU,CONFIG_NET_6LOWPAN_MTU) # define _MAX_SLIP_MTU MAX(_MAX_LO_MTU,CONFIG_NET_SLIP_MTU)
# else # else
# define _MIN_SLIP_MTU _MIN_LO_MTU # define _MIN_SLIP_MTU _MIN_LO_MTU
# define _MAX_SLIP_MTU _MAX_LO_MTU # define _MAX_SLIP_MTU _MAX_LO_MTU
# endif # endif
# ifdef CONFIG_NET_6LOWPAN # ifdef CONFIG_NET_6LOWPAN
# define _MIN_6LOWPAN_MTU MIN(_MIN_LO_MTU,CONFIG_NET_SLIP_MTU) # define _MIN_6LOWPAN_MTU MIN(_MIN_SLIP_MTU,CONFIG_NET_6LOWPAN_MTU)
# define _MAX_6LOWPAN_MTU MAX(_MAX_LO_MTU,CONFIG_NET_SLIP_MTU) # define _MAX_6LOWPAN_MTU MAX(_MAX_SLIP_MTU,CONFIG_NET_6LOWPAN_MTU)
# else # else
# define _MIN_6LOWPAN_MTU _MIN_LO_MTU # define _MIN_6LOWPAN_MTU _MIN_SLIP_MTU
# define _MAX_6LOWPAN_MTU _MAX_LO_MTU # define _MAX_6LOWPAN_MTU _MAX_SLIP_MTU
# endif # endif
# define MIN_NET_DEV_MTU _MIN_6LOWPAN_MTU # define MIN_NET_DEV_MTU _MIN_6LOWPAN_MTU
+2 -2
View File
@@ -268,8 +268,8 @@ int dns_find_answer(FAR const char *hostname, FAR struct sockaddr *addr,
/* We have a match. Return the resolved host address */ /* We have a match. Return the resolved host address */
#ifdef CONFIG_NET_IPv4 #ifdef CONFIG_NET_IPv4
if (entry->addr.addr.sa_family == AF_INET)
#ifdef CONFIG_NET_IPv6 #ifdef CONFIG_NET_IPv6
if (entry->addr.addr.sa_family == AF_INET)
#endif #endif
{ {
inlen = sizeof(struct sockaddr_in); inlen = sizeof(struct sockaddr_in);
@@ -277,8 +277,8 @@ int dns_find_answer(FAR const char *hostname, FAR struct sockaddr *addr,
#endif #endif
#ifdef CONFIG_NET_IPv6 #ifdef CONFIG_NET_IPv6
else
#ifdef CONFIG_NET_IPv4 #ifdef CONFIG_NET_IPv4
else
#endif #endif
{ {
inlen = sizeof(struct sockaddr_in6); inlen = sizeof(struct sockaddr_in6);
+1
View File
@@ -39,6 +39,7 @@
#include <nuttx/config.h> #include <nuttx/config.h>
#include <string.h>
#include <semaphore.h> #include <semaphore.h>
#include <errno.h> #include <errno.h>
#include <assert.h> #include <assert.h>
+2 -2
View File
@@ -370,7 +370,7 @@ int sixlowpan_queue_frames(FAR struct ieee802154_driver_s *ieee,
/* Add the frame header */ /* Add the frame header */
verify = sixlowpan_framecreate(ieee, iob, ieee->i_panid); verify = sixlowpan_framecreate(ieee, iob, ieee->i_panid);
DEBUGASSERT(vreify == framer_hdrlen); DEBUGASSERT(verify == framer_hdrlen);
UNUSED(verify); UNUSED(verify);
/* Move HC1/HC06/IPv6 header */ /* Move HC1/HC06/IPv6 header */
@@ -436,7 +436,7 @@ int sixlowpan_queue_frames(FAR struct ieee802154_driver_s *ieee,
/* Add the frame header to the prealloated IOB. */ /* Add the frame header to the prealloated IOB. */
verify = sixlowpan_framecreate(ieee, iob, ieee->i_panid); verify = sixlowpan_framecreate(ieee, iob, ieee->i_panid);
DEBUGASSERT(vreify == framer_hdrlen); DEBUGASSERT(verify == framer_hdrlen);
UNUSED(verify); UNUSED(verify);
/* Copy the payload and queue */ /* Copy the payload and queue */
+1
View File
@@ -40,6 +40,7 @@
#include <nuttx/config.h> #include <nuttx/config.h>
#include <semaphore.h> #include <semaphore.h>
#include <assert.h>
#include <errno.h> #include <errno.h>
#include <debug.h> #include <debug.h>
+1
View File
@@ -46,6 +46,7 @@
#if defined(CONFIG_NET) && defined(CONFIG_NET_TCP) #if defined(CONFIG_NET) && defined(CONFIG_NET_TCP)
#include <stdint.h> #include <stdint.h>
#include <assert.h>
#include <debug.h> #include <debug.h>
#include <nuttx/net/netconfig.h> #include <nuttx/net/netconfig.h>
+1
View File
@@ -46,6 +46,7 @@
#if defined(CONFIG_NET) && defined(CONFIG_NET_TCP) #if defined(CONFIG_NET) && defined(CONFIG_NET_TCP)
#include <stdint.h> #include <stdint.h>
#include <assert.h>
#include <debug.h> #include <debug.h>
#include <nuttx/net/netconfig.h> #include <nuttx/net/netconfig.h>