diff --git a/configs/sim/README.txt b/configs/sim/README.txt index e3712b11f9..7fa886b5bd 100644 --- a/configs/sim/README.txt +++ b/configs/sim/README.txt @@ -807,6 +807,12 @@ pashello Configures to use apps/examples/pashello. +sixlowpan + + This configuration was intended only for unit-level testing of the + 6loWPAN stack. It enables networking with 6loWPAN support and uses + only a IEEE802.15.4 MAC loopback network device to supported testing. + touchscreen This configuration uses the simple touchscreen test at diff --git a/configs/sim/sixlowpan/Make.defs b/configs/sim/sixlowpan/Make.defs new file mode 100644 index 0000000000..f2a7938575 --- /dev/null +++ b/configs/sim/sixlowpan/Make.defs @@ -0,0 +1,128 @@ +############################################################################ +# configs/sim/sixlowpan/Make.defs +# +# Copyright (C) 2017 Gregory Nutt. All rights reserved. +# Author: Gregory Nutt +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions +# are met: +# +# 1. Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# 2. Redistributions in binary form must reproduce the above copyright +# notice, this list of conditions and the following disclaimer in +# the documentation and/or other materials provided with the +# distribution. +# 3. Neither the name NuttX nor the names of its contributors may be +# used to endorse or promote products derived from this software +# without specific prior written permission. +# +# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS +# FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE +# COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, +# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, +# BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS +# OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED +# AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN +# ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE +# POSSIBILITY OF SUCH DAMAGE. +# +############################################################################ + +include ${TOPDIR}/.config +include ${TOPDIR}/tools/Config.mk + +HOSTOS = ${shell uname -o 2>/dev/null || echo "Other"} + +ifeq ($(CONFIG_DEBUG_SYMBOLS),y) + ARCHOPTIMIZATION = -g +endif + +ifneq ($(CONFIG_DEBUG_NOOPT),y) + ARCHOPTIMIZATION += -O2 +endif + +ARCHCPUFLAGS = -fno-builtin +ARCHCPUFLAGSXX = -fno-builtin -fno-exceptions -fcheck-new -fno-rtti +ARCHPICFLAGS = -fpic +ARCHWARNINGS = -Wall -Wstrict-prototypes -Wshadow -Wundef +ARCHWARNINGSXX = -Wall -Wshadow -Wundef +ARCHDEFINES = +ARCHINCLUDES = -I. -isystem $(TOPDIR)/include +ARCHINCLUDESXX = -I. -isystem $(TOPDIR)/include -isystem $(TOPDIR)/include/cxx +ARCHSCRIPT = + +ifeq ($(CONFIG_SIM_M32),y) + ARCHCPUFLAGS += -m32 + ARCHCPUFLAGSXX += -m32 +endif + +CROSSDEV = +CC = $(CROSSDEV)gcc +CXX = $(CROSSDEV)g++ +CPP = $(CROSSDEV)gcc -E +LD = $(CROSSDEV)ld +AR = $(CROSSDEV)ar rcs +NM = $(CROSSDEV)nm +OBJCOPY = $(CROSSDEV)objcopy +OBJDUMP = $(CROSSDEV)objdump + +CFLAGS = $(ARCHWARNINGS) $(ARCHOPTIMIZATION) \ + $(ARCHCPUFLAGS) $(ARCHINCLUDES) $(ARCHDEFINES) $(EXTRADEFINES) -pipe +CXXFLAGS = $(ARCHWARNINGSXX) $(ARCHOPTIMIZATION) \ + $(ARCHCPUFLAGSXX) $(ARCHINCLUDESXX) $(ARCHDEFINES) $(EXTRADEFINES) -pipe +CPPFLAGS = $(ARCHINCLUDES) $(ARCHDEFINES) $(EXTRADEFINES) +AFLAGS = $(CFLAGS) -D__ASSEMBLY__ + + +# ELF module definitions + +CELFFLAGS = $(CFLAGS) +CXXELFFLAGS = $(CXXFLAGS) + +LDELFFLAGS = -r -e main +ifeq ($(WINTOOL),y) + LDELFFLAGS += -T "${shell cygpath -w $(TOPDIR)/configs/$(CONFIG_ARCH_BOARD)/scripts/gnu-elf.ld}" +else + LDELFFLAGS += -T $(TOPDIR)/configs/$(CONFIG_ARCH_BOARD)/scripts/gnu-elf.ld +endif + + +ASMEXT = .S +OBJEXT = .o +LIBEXT = .a + +ifeq ($(HOSTOS),Cygwin) + EXEEXT = .exe +else + EXEEXT = +endif + +LDLINKFLAGS = $(ARCHSCRIPT) # Link flags used with $(LD) +CCLINKFLAGS = $(ARCHSCRIPT) # Link flags used with $(CC) +LDFLAGS = $(ARCHSCRIPT) # For backward compatibility, same as CCLINKFLAGS + +ifeq ($(CONFIG_DEBUG_SYMBOLS),y) + LDLINKFLAGS += -g + CCLINKFLAGS += -g + LDFLAGS += -g +endif + +ifeq ($(CONFIG_SIM_M32),y) + LDLINKFLAGS += -melf_i386 + CCLINKFLAGS += -m32 + LDFLAGS += -m32 +endif + + +MKDEP = $(TOPDIR)/tools/mkdeps$(HOSTEXEEXT) + +HOSTCC = gcc +HOSTINCLUDES = -I. +HOSTCFLAGS = $(ARCHWARNINGS) $(ARCHOPTIMIZATION) \ + $(ARCHCPUFLAGS) $(HOSTINCLUDES) $(ARCHDEFINES) $(EXTRADEFINES) -pipe +HOSTLDFLAGS = diff --git a/configs/sim/sixlowpan/defconfig b/configs/sim/sixlowpan/defconfig new file mode 100644 index 0000000000..adf330024f --- /dev/null +++ b/configs/sim/sixlowpan/defconfig @@ -0,0 +1,1175 @@ +# +# Automatically generated file; DO NOT EDIT. +# Nuttx/ Configuration +# + +# +# Build Setup +# +CONFIG_EXPERIMENTAL=y +# CONFIG_DEFAULT_SMALL is not set +# CONFIG_HOST_LINUX is not set +# CONFIG_HOST_OSX is not set +CONFIG_HOST_WINDOWS=y +# CONFIG_HOST_OTHER is not set +CONFIG_TOOLCHAIN_WINDOWS=y +# CONFIG_WINDOWS_NATIVE is not set +CONFIG_WINDOWS_CYGWIN=y +# CONFIG_WINDOWS_UBUNTU is not set +# CONFIG_WINDOWS_MSYS is not set +# CONFIG_WINDOWS_OTHER is not set + +# +# Build Configuration +# +# CONFIG_APPS_DIR="../apps" +CONFIG_BUILD_FLAT=y +# CONFIG_BUILD_2PASS is not set + +# +# Binary Output Formats +# +# CONFIG_RRLOAD_BINARY is not set +# CONFIG_INTELHEX_BINARY is not set +# CONFIG_MOTOROLA_SREC is not set +CONFIG_RAW_BINARY=y +# CONFIG_UBOOT_UIMAGE is not set + +# +# Customize Header Files +# +# CONFIG_ARCH_STDINT_H is not set +# CONFIG_ARCH_STDBOOL_H is not set +# CONFIG_ARCH_MATH_H is not set +# CONFIG_ARCH_FLOAT_H is not set +# CONFIG_ARCH_STDARG_H is not set +# CONFIG_ARCH_DEBUG_H is not set + +# +# Debug Options +# +CONFIG_DEBUG_ALERT=y +# CONFIG_DEBUG_FEATURES is not set +# CONFIG_ARCH_HAVE_STACKCHECK is not set +# CONFIG_ARCH_HAVE_HEAPCHECK is not set +CONFIG_DEBUG_SYMBOLS=y +# CONFIG_ARCH_HAVE_CUSTOMOPT is not set +CONFIG_DEBUG_NOOPT=y +# CONFIG_DEBUG_FULLOPT is not set + +# +# System Type +# +# CONFIG_ARCH_ARM is not set +# CONFIG_ARCH_AVR is not set +# CONFIG_ARCH_HC is not set +# CONFIG_ARCH_MIPS is not set +# CONFIG_ARCH_MISOC is not set +# CONFIG_ARCH_RENESAS is not set +# CONFIG_ARCH_RISCV is not set +CONFIG_ARCH_SIM=y +# CONFIG_ARCH_X86 is not set +# CONFIG_ARCH_XTENSA is not set +# CONFIG_ARCH_Z16 is not set +# CONFIG_ARCH_Z80 is not set +CONFIG_ARCH="sim" + +# +# Simulation Configuration Options +# +CONFIG_HOST_X86_64=y +# CONFIG_HOST_X86 is not set +# CONFIG_SIM_M32 is not set +# CONFIG_SIM_CYGWIN_DECORATED is not set +# CONFIG_SIM_X8664_SYSTEMV is not set +CONFIG_SIM_X8664_MICROSOFT=y +# CONFIG_SIM_WALLTIME is not set +# CONFIG_SIM_NETDEV is not set +# CONFIG_SIM_FRAMEBUFFER is not set +# CONFIG_SIM_SPIFLASH is not set +# CONFIG_SIM_QSPIFLASH is not set + +# +# Architecture Options +# +# CONFIG_ARCH_NOINTC is not set +# CONFIG_ARCH_VECNOTIRQ is not set +# CONFIG_ARCH_DMA is not set +# CONFIG_ARCH_HAVE_IRQPRIO is not set +# CONFIG_ARCH_L2CACHE is not set +# CONFIG_ARCH_HAVE_COHERENT_DCACHE is not set +# CONFIG_ARCH_HAVE_ADDRENV is not set +# CONFIG_ARCH_NEED_ADDRENV_MAPPING is not set +CONFIG_ARCH_HAVE_MULTICPU=y +# CONFIG_ARCH_HAVE_VFORK is not set +# CONFIG_ARCH_HAVE_MMU is not set +# CONFIG_ARCH_HAVE_MPU is not set +# CONFIG_ARCH_NAND_HWECC is not set +# CONFIG_ARCH_HAVE_EXTCLK is not set +CONFIG_ARCH_HAVE_POWEROFF=y +# CONFIG_ARCH_HAVE_RESET is not set +CONFIG_ARCH_STACKDUMP=y +# CONFIG_ENDIAN_BIG is not set +# CONFIG_ARCH_IDLE_CUSTOM is not set +# CONFIG_ARCH_HAVE_RAMFUNCS is not set +# CONFIG_ARCH_HAVE_RAMVECTORS is not set +# CONFIG_ARCH_MINIMAL_VECTORTABLE is not set + +# +# Board Settings +# +CONFIG_BOARD_LOOPSPERMSEC=51262 +# CONFIG_ARCH_CALIBRATION is not set + +# +# Interrupt options +# +# CONFIG_ARCH_HAVE_INTERRUPTSTACK is not set +# CONFIG_ARCH_HAVE_HIPRI_INTERRUPT is not set + +# +# Boot options +# +# CONFIG_BOOT_RUNFROMEXTSRAM is not set +CONFIG_BOOT_RUNFROMFLASH=y +# CONFIG_BOOT_RUNFROMISRAM is not set +# CONFIG_BOOT_RUNFROMSDRAM is not set +# CONFIG_BOOT_COPYTORAM is not set + +# +# Boot Memory Configuration +# +CONFIG_RAM_START=0x20400000 +CONFIG_RAM_SIZE=393216 +# CONFIG_ARCH_HAVE_SDRAM is not set + +# +# Board Selection +# +CONFIG_ARCH_BOARD_SIM=y +# CONFIG_ARCH_BOARD_CUSTOM is not set +CONFIG_ARCH_BOARD="sim" + +# +# Common Board Options +# + +# +# Board-Specific Options +# +# CONFIG_BOARD_CRASHDUMP is not set +CONFIG_LIB_BOARDCTL=y +CONFIG_BOARDCTL_POWEROFF=y +# CONFIG_BOARDCTL_UNIQUEID is not set +# CONFIG_BOARDCTL_TSCTEST is not set +# CONFIG_BOARDCTL_GRAPHICS is not set +# CONFIG_BOARDCTL_IOCTL is not set + +# +# RTOS Features +# +CONFIG_DISABLE_OS_API=y +# CONFIG_DISABLE_POSIX_TIMERS is not set +# CONFIG_DISABLE_PTHREAD is not set +# CONFIG_DISABLE_SIGNALS is not set +# CONFIG_DISABLE_MQUEUE is not set +# CONFIG_DISABLE_ENVIRON is not set + +# +# Clocks and Timers +# +CONFIG_ARCH_HAVE_TICKLESS=y +# CONFIG_SCHED_TICKLESS is not set +CONFIG_USEC_PER_TICK=10000 +# CONFIG_SYSTEM_TIME64 is not set +# CONFIG_CLOCK_MONOTONIC is not set +# CONFIG_ARCH_HAVE_TIMEKEEPING is not set +# CONFIG_JULIAN_TIME is not set +CONFIG_START_YEAR=2014 +CONFIG_START_MONTH=3 +CONFIG_START_DAY=10 +CONFIG_MAX_WDOGPARMS=2 +CONFIG_PREALLOC_WDOGS=32 +CONFIG_WDOG_INTRESERVE=4 +CONFIG_PREALLOC_TIMERS=4 + +# +# Tasks and Scheduling +# +# CONFIG_SPINLOCK is not set +# CONFIG_SMP is not set +# CONFIG_INIT_NONE is not set +CONFIG_INIT_ENTRYPOINT=y +# CONFIG_INIT_FILEPATH is not set +CONFIG_USER_ENTRYPOINT="nsh_main" +CONFIG_RR_INTERVAL=200 +# CONFIG_SCHED_SPORADIC is not set +CONFIG_TASK_NAME_SIZE=31 +CONFIG_MAX_TASKS=16 +# CONFIG_SCHED_HAVE_PARENT is not set +CONFIG_SCHED_WAITPID=y + +# +# Pthread Options +# +# CONFIG_PTHREAD_MUTEX_TYPES is not set +CONFIG_PTHREAD_MUTEX_ROBUST=y +# CONFIG_PTHREAD_MUTEX_UNSAFE is not set +# CONFIG_PTHREAD_MUTEX_BOTH is not set +CONFIG_NPTHREAD_KEYS=4 +# CONFIG_PTHREAD_CLEANUP is not set +# CONFIG_CANCELLATION_POINTS is not set + +# +# Performance Monitoring +# +# CONFIG_SCHED_CPULOAD is not set +# CONFIG_SCHED_INSTRUMENTATION is not set + +# +# Files and I/O +# +CONFIG_DEV_CONSOLE=y +# CONFIG_FDCLONE_DISABLE is not set +# CONFIG_FDCLONE_STDIO is not set +CONFIG_SDCLONE_DISABLE=y +CONFIG_NFILE_DESCRIPTORS=8 +CONFIG_NFILE_STREAMS=8 +CONFIG_NAME_MAX=32 +# CONFIG_PRIORITY_INHERITANCE is not set + +# +# RTOS hooks +# +# CONFIG_BOARD_INITIALIZE is not set +# CONFIG_SCHED_STARTHOOK is not set +# CONFIG_SCHED_ATEXIT is not set +# CONFIG_SCHED_ONEXIT is not set +# CONFIG_SIG_EVTHREAD is not set + +# +# Signal Numbers +# +CONFIG_SIG_SIGUSR1=1 +CONFIG_SIG_SIGUSR2=2 +CONFIG_SIG_SIGALARM=3 +CONFIG_SIG_SIGCONDTIMEDOUT=16 +CONFIG_SIG_SIGWORK=17 + +# +# POSIX Message Queue Options +# +CONFIG_PREALLOC_MQ_MSGS=4 +CONFIG_MQ_MAXMSGSIZE=32 +# CONFIG_MODULE is not set + +# +# Work queue support +# +CONFIG_SCHED_WORKQUEUE=y +CONFIG_SCHED_HPWORK=y +CONFIG_SCHED_HPWORKPRIORITY=224 +CONFIG_SCHED_HPWORKPERIOD=50000 +CONFIG_SCHED_HPWORKSTACKSIZE=4096 +# CONFIG_SCHED_LPWORK is not set + +# +# Stack and heap information +# +CONFIG_IDLETHREAD_STACKSIZE=4096 +CONFIG_USERMAIN_STACKSIZE=8192 +CONFIG_PTHREAD_STACK_MIN=256 +CONFIG_PTHREAD_STACK_DEFAULT=4096 +# CONFIG_LIB_SYSCALL is not set + +# +# Device Drivers +# +CONFIG_DISABLE_POLL=y +CONFIG_DEV_NULL=y +# CONFIG_DEV_ZERO is not set +# CONFIG_DEV_URANDOM is not set +# CONFIG_DEV_LOOP is not set + +# +# Buffering +# +# CONFIG_DRVR_WRITEBUFFER is not set +# CONFIG_DRVR_READAHEAD is not set +# CONFIG_RAMDISK is not set +# CONFIG_CAN is not set +# CONFIG_ARCH_HAVE_PWM_PULSECOUNT is not set +# CONFIG_ARCH_HAVE_PWM_MULTICHAN is not set +# CONFIG_PWM is not set +# CONFIG_ARCH_HAVE_I2CRESET is not set +CONFIG_I2C=y +# CONFIG_I2C_SLAVE is not set +# CONFIG_I2C_POLLED is not set +# CONFIG_I2C_TRACE is not set +CONFIG_I2C_DRIVER=y +# CONFIG_ARCH_HAVE_SPI_CRCGENERATION is not set +# CONFIG_ARCH_HAVE_SPI_CS_CONTROL is not set +# CONFIG_ARCH_HAVE_SPI_BITORDER is not set +CONFIG_SPI=y +# CONFIG_SPI_SLAVE is not set +CONFIG_SPI_EXCHANGE=y +# CONFIG_SPI_CMDDATA is not set +# CONFIG_SPI_CALLBACK is not set +# CONFIG_SPI_HWFEATURES is not set +# CONFIG_SPI_CS_DELAY_CONTROL is not set +# CONFIG_SPI_DRIVER is not set +# CONFIG_SPI_BITBANG is not set +# CONFIG_I2S is not set + +# +# Timer Driver Support +# +# CONFIG_TIMER is not set +# CONFIG_ONESHOT is not set +# CONFIG_RTC is not set +# CONFIG_WATCHDOG is not set +# CONFIG_TIMERS_CS2100CP is not set +# CONFIG_ANALOG is not set +# CONFIG_AUDIO_DEVICES is not set +# CONFIG_VIDEO_DEVICES is not set +# CONFIG_BCH is not set +# CONFIG_INPUT is not set + +# +# IO Expander/GPIO Support +# +# CONFIG_IOEXPANDER is not set +# CONFIG_DEV_GPIO is not set + +# +# LCD Driver Support +# +# CONFIG_LCD is not set +# CONFIG_SLCD is not set + +# +# LED Support +# +# CONFIG_RGBLED is not set +# CONFIG_PCA9635PW is not set +# CONFIG_NCP5623C is not set +CONFIG_MMCSD=y +CONFIG_MMCSD_NSLOTS=1 +# CONFIG_MMCSD_READONLY is not set +CONFIG_MMCSD_MULTIBLOCK_DISABLE=y +# CONFIG_MMCSD_MMCSUPPORT is not set +CONFIG_MMCSD_HAVECARDDETECT=y +# CONFIG_MMCSD_SPI is not set +# CONFIG_ARCH_HAVE_SDIO is not set +# CONFIG_SDIO_DMA is not set +# CONFIG_ARCH_HAVE_SDIOWAIT_WRCOMPLETE is not set +# CONFIG_MODEM is not set +CONFIG_MTD=y + +# +# MTD Configuration +# +# CONFIG_MTD_PARTITION is not set +# CONFIG_MTD_SECT512 is not set +# CONFIG_MTD_BYTE_WRITE is not set +# CONFIG_MTD_PROGMEM is not set +CONFIG_MTD_CONFIG=y +# CONFIG_MTD_CONFIG_RAM_CONSOLIDATE is not set +CONFIG_MTD_CONFIG_ERASEDVALUE=0xff + +# +# MTD Device Drivers +# +# CONFIG_MTD_NAND is not set +# CONFIG_RAMMTD is not set +# CONFIG_FILEMTD is not set +CONFIG_MTD_AT24XX=y +# CONFIG_AT24XX_MULTI is not set +CONFIG_AT24XX_SIZE=2 +CONFIG_AT24XX_ADDR=0x57 +CONFIG_AT24XX_EXTENDED=y +CONFIG_AT24XX_EXTSIZE=160 +CONFIG_AT24XX_FREQUENCY=100000 +CONFIG_MTD_AT25=y +CONFIG_AT25_SPIMODE=0 +CONFIG_AT25_SPIFREQUENCY=20000000 +# CONFIG_MTD_AT45DB is not set +# CONFIG_MTD_IS25XP is not set +# CONFIG_MTD_M25P is not set +# CONFIG_MTD_MX25L is not set +# CONFIG_MTD_S25FL1 is not set +# CONFIG_MTD_N25QXXX is not set +# CONFIG_MTD_SMART is not set +# CONFIG_MTD_RAMTRON is not set +# CONFIG_MTD_SST25 is not set +# CONFIG_MTD_SST25XX is not set +# CONFIG_MTD_SST26 is not set +# CONFIG_MTD_SST39FV is not set +# CONFIG_MTD_W25 is not set +# CONFIG_EEPROM is not set +CONFIG_NETDEVICES=y + +# +# General Ethernet MAC Driver Options +# +# CONFIG_NETDEV_LOOPBACK is not set +CONFIG_NETDEV_TELNET=y +CONFIG_TELNET_RXBUFFER_SIZE=256 +CONFIG_TELNET_TXBUFFER_SIZE=256 +CONFIG_NETDEV_MULTINIC=y +CONFIG_ARCH_HAVE_NETDEV_STATISTICS=y +CONFIG_NETDEV_STATISTICS=y +# CONFIG_NETDEV_LATEINIT is not set + +# +# External Ethernet MAC Device Support +# +# CONFIG_NET_DM90x0 is not set +# CONFIG_NET_CS89x0 is not set +# CONFIG_ENC28J60 is not set +# CONFIG_ENCX24J600 is not set +# CONFIG_NET_SLIP is not set +# CONFIG_NET_FTMAC100 is not set +# CONFIG_PIPES is not set +# CONFIG_PM is not set +# CONFIG_POWER is not set +# CONFIG_SENSORS is not set +CONFIG_SERIAL=y +# CONFIG_DEV_LOWCONSOLE is not set +# CONFIG_SERIAL_REMOVABLE is not set +CONFIG_SERIAL_CONSOLE=y +# CONFIG_16550_UART is not set +# CONFIG_UART_SERIALDRIVER is not set +# CONFIG_UART0_SERIALDRIVER is not set +# CONFIG_UART1_SERIALDRIVER is not set +# CONFIG_UART2_SERIALDRIVER is not set +# CONFIG_UART3_SERIALDRIVER is not set +# CONFIG_UART4_SERIALDRIVER is not set +# CONFIG_UART5_SERIALDRIVER is not set +# CONFIG_UART6_SERIALDRIVER is not set +# CONFIG_UART7_SERIALDRIVER is not set +# CONFIG_UART8_SERIALDRIVER is not set +# CONFIG_SCI0_SERIALDRIVER is not set +# CONFIG_SCI1_SERIALDRIVER is not set +# CONFIG_USART0_SERIALDRIVER is not set +# CONFIG_USART1_SERIALDRIVER is not set +# CONFIG_USART2_SERIALDRIVER is not set +# CONFIG_USART3_SERIALDRIVER is not set +# CONFIG_USART4_SERIALDRIVER is not set +# CONFIG_USART5_SERIALDRIVER is not set +# CONFIG_USART6_SERIALDRIVER is not set +# CONFIG_USART7_SERIALDRIVER is not set +# CONFIG_USART8_SERIALDRIVER is not set +# CONFIG_OTHER_UART_SERIALDRIVER is not set +# CONFIG_MCU_SERIAL is not set +CONFIG_STANDARD_SERIAL=y +# CONFIG_SERIAL_IFLOWCONTROL is not set +# CONFIG_SERIAL_OFLOWCONTROL is not set +# CONFIG_SERIAL_DMA is not set +# CONFIG_ARCH_HAVE_SERIAL_TERMIOS is not set +# CONFIG_PSEUDOTERM is not set +# CONFIG_USBDEV is not set +# CONFIG_USBHOST is not set +# CONFIG_USBMISC is not set +# CONFIG_HAVE_USBTRACE is not set +# CONFIG_DRIVERS_WIRELESS is not set +# CONFIG_DRIVERS_CONTACTLESS is not set + +# +# System Logging +# +# CONFIG_ARCH_SYSLOG is not set +# CONFIG_RAMLOG is not set +# CONFIG_SYSLOG_INTBUFFER is not set +# CONFIG_SYSLOG_TIMESTAMP is not set +CONFIG_SYSLOG_SERIAL_CONSOLE=y +# CONFIG_SYSLOG_CHAR is not set +CONFIG_SYSLOG_CONSOLE=y +# CONFIG_SYSLOG_NONE is not set +# CONFIG_SYSLOG_FILE is not set +# CONFIG_SYSLOG_CHARDEV is not set + +# +# Networking Support +# +CONFIG_ARCH_HAVE_NET=y +# CONFIG_ARCH_HAVE_PHY is not set +CONFIG_NET=y +# CONFIG_NET_PROMISCUOUS is not set + +# +# Driver buffer configuration +# +CONFIG_NET_GUARDSIZE=2 + +# +# Data link support +# +# CONFIG_NET_MULTILINK is not set +# CONFIG_NET_USER_DEVFMT is not set +# CONFIG_NET_ETHERNET is not set +CONFIG_NET_6LOWPAN=y +# CONFIG_NET_LOOPBACK is not set +# CONFIG_NET_TUN is not set +# CONFIG_NET_USRSOCK is not set + +# +# Network Device Operations +# +CONFIG_NETDEV_IOCTL=y +CONFIG_NETDEV_PHY_IOCTL=y + +# +# Internet Protocol Selection +# +# CONFIG_NET_IPv4 is not set +CONFIG_NET_IPv6=y +CONFIG_NET_IPv6_NCONF_ENTRIES=8 +CONFIG_NET_6LOWPAN_FRAG=y +CONFIG_NET_6LOWPAN_FRAMELEN=127 +# CONFIG_NET_6LOWPAN_COMPRESSION_IPv6 is not set +# CONFIG_NET_6LOWPAN_COMPRESSION_HC1 is not set +CONFIG_NET_6LOWPAN_COMPRESSION_HC06=y +CONFIG_NET_6LOWPAN_COMPRESSION_THRESHOLD=63 +CONFIG_NET_6LOWPAN_MAXADDRCONTEXT=1 +CONFIG_NET_6LOWPAN_MAXADDRCONTEXT_PREFIX_0_0=0xaa +CONFIG_NET_6LOWPAN_MAXADDRCONTEXT_PREFIX_0_1=0xaa +# CONFIG_NET_6LOWPAN_MAXADDRCONTEXT_PREINIT_1 is not set +CONFIG_NET_6LOWPAN_RIMEADDR_SIZE=2 +CONFIG_NET_6LOWPAN_MAXAGE=20 +CONFIG_NET_6LOWPAN_MAX_MACTRANSMITS=4 +CONFIG_NET_6LOWPAN_MAXPAYLOAD=102 +CONFIG_NET_6LOWPAN_MTU=1294 +CONFIG_NET_6LOWPAN_TCP_RECVWNDO=102 + +# +# Socket Support +# +CONFIG_NSOCKET_DESCRIPTORS=8 +CONFIG_NET_NACTIVESOCKETS=16 +CONFIG_NET_SOCKOPTS=y +# CONFIG_NET_SOLINGER is not set + +# +# Raw Socket Support +# +# CONFIG_NET_PKT is not set + +# +# Unix Domain Socket Support +# +# CONFIG_NET_LOCAL is not set + +# +# TCP/IP Networking +# +CONFIG_NET_TCP=y +# CONFIG_NET_TCP_NO_STACK is not set +# CONFIG_NET_TCPURGDATA is not set +# CONFIG_NET_TCP_REASSEMBLY is not set +CONFIG_NET_TCP_CONNS=8 +CONFIG_NET_MAX_LISTENPORTS=20 +CONFIG_NET_TCP_READAHEAD=y +CONFIG_NET_TCP_WRITE_BUFFERS=y +CONFIG_NET_TCP_NWRBCHAINS=8 +CONFIG_NET_TCP_RECVDELAY=0 +CONFIG_NET_TCPBACKLOG=y +# CONFIG_NET_SENDFILE is not set + +# +# UDP Networking +# +CONFIG_NET_UDP=y +# CONFIG_NET_UDP_NO_STACK is not set +# CONFIG_NET_UDP_CHECKSUMS is not set +CONFIG_NET_UDP_CONNS=8 +CONFIG_NET_BROADCAST=y +# CONFIG_NET_RXAVAIL is not set +CONFIG_NET_UDP_READAHEAD=y + +# +# ICMPv6 Networking Support +# +# CONFIG_NET_ICMPv6 is not set + +# +# IGMPv2 Client Support +# +# CONFIG_NET_IGMP is not set + +# +# ARP Configuration +# + +# +# Network I/O Buffer Support +# +CONFIG_NET_IOB=y +CONFIG_IOB_NBUFFERS=36 +CONFIG_IOB_BUFSIZE=196 +CONFIG_IOB_NCHAINS=8 +CONFIG_IOB_THROTTLE=8 + +# +# User-space networking stack API +# +# CONFIG_NET_ARCH_INCR32 is not set +# CONFIG_NET_ARCH_CHKSUM is not set +CONFIG_NET_STATISTICS=y + +# +# Routing Table Configuration +# +# CONFIG_NET_ROUTE is not set +CONFIG_NET_HOSTNAME="SAMV71-XULT" + +# +# Crypto API +# +# CONFIG_CRYPTO is not set + +# +# File Systems +# + +# +# File system configuration +# +# CONFIG_DISABLE_MOUNTPOINT is not set +# CONFIG_FS_AUTOMOUNTER is not set +# CONFIG_DISABLE_PSEUDOFS_OPERATIONS is not set +# CONFIG_PSEUDOFS_SOFTLINKS is not set +CONFIG_FS_READABLE=y +CONFIG_FS_WRITABLE=y +# CONFIG_FS_NAMED_SEMAPHORES is not set +CONFIG_FS_MQUEUE_MPATH="/var/mqueue" +# CONFIG_FS_RAMMAP is not set +CONFIG_FS_FAT=y +CONFIG_FAT_LCNAMES=y +CONFIG_FAT_LFN=y +CONFIG_FAT_MAXFNAME=32 +# CONFIG_FS_FATTIME is not set +# CONFIG_FAT_FORCE_INDIRECT is not set +# CONFIG_FAT_DMAMEMORY is not set +# CONFIG_FAT_DIRECT_RETRY is not set +# CONFIG_FS_NXFFS is not set +# CONFIG_FS_ROMFS is not set +# CONFIG_FS_TMPFS is not set +# CONFIG_FS_SMARTFS is not set +# CONFIG_FS_BINFS is not set +CONFIG_FS_PROCFS=y +# CONFIG_FS_PROCFS_REGISTER is not set + +# +# Exclude individual procfs entries +# +# CONFIG_FS_PROCFS_EXCLUDE_PROCESS is not set +# CONFIG_FS_PROCFS_EXCLUDE_UPTIME is not set +# CONFIG_FS_PROCFS_EXCLUDE_MOUNTS is not set +# CONFIG_FS_PROCFS_EXCLUDE_NET is not set +# CONFIG_FS_PROCFS_EXCLUDE_MTD is not set +# CONFIG_FS_UNIONFS is not set +# CONFIG_FS_HOSTFS is not set + +# +# Graphics Support +# +# CONFIG_NX is not set + +# +# Memory Management +# +# CONFIG_MM_SMALL is not set +CONFIG_MM_REGIONS=1 +# CONFIG_ARCH_HAVE_HEAP2 is not set +# CONFIG_GRAN is not set + +# +# Audio Support +# +# CONFIG_AUDIO is not set + +# +# Wireless Support +# +CONFIG_WIRELESS=y +CONFIG_WIRELESS_IEEE802154=y +CONFIG_IEEE802154_LOOPBACK=y +CONFIG_IEEE802154_LOOPBACK_HPWORK=y + +# +# Binary Loader +# +# CONFIG_BINFMT_DISABLE is not set +# CONFIG_BINFMT_EXEPATH is not set +# CONFIG_NXFLAT is not set +# CONFIG_ELF is not set +CONFIG_BUILTIN=y +# CONFIG_PIC is not set +# CONFIG_SYMTAB_ORDEREDBYNAME is not set + +# +# Library Routines +# + +# +# Standard C Library Options +# + +# +# Standard C I/O +# +# CONFIG_STDIO_DISABLE_BUFFERING is not set +CONFIG_STDIO_BUFFER_SIZE=64 +CONFIG_STDIO_LINEBUFFER=y +CONFIG_NUNGET_CHARS=2 +# CONFIG_NOPRINTF_FIELDWIDTH is not set +# CONFIG_LIBC_FLOATINGPOINT is not set +CONFIG_LIBC_LONG_LONG=y +# CONFIG_LIBC_SCANSET is not set +# CONFIG_EOL_IS_CR is not set +# CONFIG_EOL_IS_LF is not set +# CONFIG_EOL_IS_BOTH_CRLF is not set +CONFIG_EOL_IS_EITHER_CRLF=y +# CONFIG_MEMCPY_VIK is not set +# CONFIG_LIBM is not set + +# +# Architecture-Specific Support +# +CONFIG_ARCH_LOWPUTC=y +# CONFIG_ARCH_ROMGETC is not set +# CONFIG_LIBC_ARCH_MEMCPY is not set +# CONFIG_LIBC_ARCH_MEMCMP is not set +# CONFIG_LIBC_ARCH_MEMMOVE is not set +# CONFIG_LIBC_ARCH_MEMSET is not set +# CONFIG_LIBC_ARCH_STRCHR is not set +# CONFIG_LIBC_ARCH_STRCMP is not set +# CONFIG_LIBC_ARCH_STRCPY is not set +# CONFIG_LIBC_ARCH_STRNCPY is not set +# CONFIG_LIBC_ARCH_STRLEN is not set +# CONFIG_LIBC_ARCH_STRNLEN is not set +# CONFIG_LIBC_ARCH_ELF is not set + +# +# stdlib Options +# +CONFIG_LIB_RAND_ORDER=1 +CONFIG_LIB_HOMEDIR="/" +CONFIG_LIBC_TMPDIR="/tmp" +CONFIG_LIBC_MAX_TMPFILE=32 + +# +# Program Execution Options +# +# CONFIG_LIBC_EXECFUNCS is not set +CONFIG_POSIX_SPAWN_PROXY_STACKSIZE=2048 +CONFIG_TASK_SPAWN_DEFAULT_STACKSIZE=4096 + +# +# errno Decode Support +# +# CONFIG_LIBC_STRERROR is not set +# CONFIG_LIBC_PERROR_STDOUT is not set + +# +# memcpy/memset Options +# +# CONFIG_MEMSET_OPTSPEED is not set +# CONFIG_LIBC_DLLFCN is not set +# CONFIG_LIBC_MODLIB is not set +# CONFIG_LIBC_WCHAR is not set +# CONFIG_LIBC_LOCALE is not set + +# +# Time/Time Zone Support +# +# CONFIG_LIBC_LOCALTIME is not set +# CONFIG_TIME_EXTENDED is not set +CONFIG_ARCH_HAVE_TLS=y + +# +# Thread Local Storage (TLS) +# +# CONFIG_TLS is not set + +# +# Network-Related Options +# +# CONFIG_LIBC_IPv4_ADDRCONV is not set +CONFIG_LIBC_NETDB=y + +# +# NETDB Support +# +# CONFIG_NETDB_HOSTFILE is not set +CONFIG_NETDB_DNSCLIENT=y +CONFIG_NETDB_DNSCLIENT_ENTRIES=8 +CONFIG_NETDB_DNSCLIENT_NAMESIZE=32 +CONFIG_NETDB_DNSCLIENT_LIFESEC=3600 +CONFIG_NETDB_DNSCLIENT_MAXRESPONSE=96 +# CONFIG_NETDB_RESOLVCONF is not set +# CONFIG_NETDB_DNSSERVER_NOADDR is not set +CONFIG_NETDB_DNSSERVER_IPv6=y +CONFIG_NETDB_DNSSERVER_IPv6ADDR_1=0xfc00 +CONFIG_NETDB_DNSSERVER_IPv6ADDR_2=0x0000 +CONFIG_NETDB_DNSSERVER_IPv6ADDR_3=0x0000 +CONFIG_NETDB_DNSSERVER_IPv6ADDR_4=0x0000 +CONFIG_NETDB_DNSSERVER_IPv6ADDR_5=0x0000 +CONFIG_NETDB_DNSSERVER_IPv6ADDR_6=0x0000 +CONFIG_NETDB_DNSSERVER_IPv6ADDR_7=0x0000 +CONFIG_NETDB_DNSSERVER_IPv6ADDR_8=0x0001 +# CONFIG_LIBC_IOCTL_VARIADIC is not set +CONFIG_LIB_SENDFILE_BUFSIZE=512 + +# +# Non-standard Library Support +# +# CONFIG_LIB_CRC64_FAST is not set +# CONFIG_LIB_KBDCODEC is not set +# CONFIG_LIB_SLCDCODEC is not set +# CONFIG_LIB_HEX2BIN is not set + +# +# Basic CXX Support +# +# CONFIG_C99_BOOL8 is not set +# CONFIG_HAVE_CXX is not set + +# +# Application Configuration +# + +# +# Built-In Applications +# +CONFIG_BUILTIN_PROXY_STACKSIZE=2048 + +# +# CAN Utilities +# + +# +# Examples +# +# CONFIG_EXAMPLES_CCTYPE is not set +# CONFIG_EXAMPLES_CHAT is not set +# CONFIG_EXAMPLES_CONFIGDATA is not set +# CONFIG_EXAMPLES_DHCPD is not set +# CONFIG_EXAMPLES_DISCOVER is not set +# CONFIG_EXAMPLES_ELF is not set +# CONFIG_EXAMPLES_FSTEST is not set +# CONFIG_EXAMPLES_FTPC is not set +# CONFIG_EXAMPLES_FTPD is not set +# CONFIG_EXAMPLES_HELLO is not set +# CONFIG_EXAMPLES_HIDKBD is not set +# CONFIG_EXAMPLES_IGMP is not set +# CONFIG_EXAMPLES_JSON is not set +# CONFIG_EXAMPLES_KEYPADTEST is not set +# CONFIG_EXAMPLES_MEDIA is not set +# CONFIG_EXAMPLES_MM is not set +# CONFIG_EXAMPLES_MODBUS is not set +# CONFIG_EXAMPLES_MOUNT is not set +CONFIG_EXAMPLES_NETTEST=y +CONFIG_EXAMPLES_NETTEST_STACKSIZE=4096 +CONFIG_EXAMPLES_NETTEST_PRIORITY=100 +CONFIG_EXAMPLES_NETTEST_LOOPBACK=y +CONFIG_EXAMPLES_NETTEST_SERVER_STACKSIZE=4096 +CONFIG_EXAMPLES_NETTEST_SERVER_PRIORITY=100 +# CONFIG_EXAMPLES_NETTEST_PERFORMANCE is not set +CONFIG_EXAMPLES_NETTEST_IPv6=y + +# +# Target IPv6 address +# +# +# Client IPv6 address +# +CONFIG_EXAMPLES_NETTEST_CLIENTIPv6ADDR_1=0xfe80 +CONFIG_EXAMPLES_NETTEST_CLIENTIPv6ADDR_2=0x0000 +CONFIG_EXAMPLES_NETTEST_CLIENTIPv6ADDR_3=0x0000 +CONFIG_EXAMPLES_NETTEST_CLIENTIPv6ADDR_4=0x0000 +CONFIG_EXAMPLES_NETTEST_CLIENTIPv6ADDR_5=0x1234 +CONFIG_EXAMPLES_NETTEST_CLIENTIPv6ADDR_6=0x0000 +CONFIG_EXAMPLES_NETTEST_CLIENTIPv6ADDR_7=0x0000 +CONFIG_EXAMPLES_NETTEST_CLIENTIPv6ADDR_8=0x0000 +CONFIG_EXAMPLES_NSH=y +# CONFIG_EXAMPLES_NULL is not set +# CONFIG_EXAMPLES_NX is not set +# CONFIG_EXAMPLES_NXFFS is not set +# CONFIG_EXAMPLES_NXHELLO is not set +# CONFIG_EXAMPLES_NXIMAGE is not set +# CONFIG_EXAMPLES_NXLINES is not set +# CONFIG_EXAMPLES_NXTERM is not set +# CONFIG_EXAMPLES_NXTEXT is not set +# CONFIG_EXAMPLES_OSTEST is not set +# CONFIG_EXAMPLES_PCA9635 is not set +# CONFIG_EXAMPLES_POSIXSPAWN is not set +# CONFIG_EXAMPLES_PPPD is not set +# CONFIG_EXAMPLES_RFID_READUID is not set +# CONFIG_EXAMPLES_RGBLED is not set +# CONFIG_EXAMPLES_SENDMAIL is not set +# CONFIG_EXAMPLES_SERIALBLASTER is not set +# CONFIG_EXAMPLES_SERIALRX is not set +# CONFIG_EXAMPLES_SERLOOP is not set +# CONFIG_EXAMPLES_SLCD is not set +# CONFIG_EXAMPLES_SMART is not set +# CONFIG_EXAMPLES_SMART_TEST is not set +# CONFIG_EXAMPLES_SMP is not set +# CONFIG_EXAMPLES_STAT is not set +# CONFIG_EXAMPLES_TCPECHO is not set +# CONFIG_EXAMPLES_TELNETD is not set +# CONFIG_EXAMPLES_TIFF is not set +# CONFIG_EXAMPLES_TOUCHSCREEN is not set +# CONFIG_EXAMPLES_UDP is not set +# CONFIG_EXAMPLES_UDPBLASTER is not set +# CONFIG_EXAMPLES_USBSERIAL is not set +# CONFIG_EXAMPLES_WATCHDOG is not set +# CONFIG_EXAMPLES_WEBSERVER is not set +# CONFIG_EXAMPLES_XBC_TEST is not set + +# +# File System Utilities +# +# CONFIG_FSUTILS_FLASH_ERASEALL is not set +# CONFIG_FSUTILS_INIFILE is not set +# CONFIG_FSUTILS_PASSWD is not set + +# +# GPS Utilities +# +# CONFIG_GPSUTILS_MINMEA_LIB is not set + +# +# Graphics Support +# +# CONFIG_TIFF is not set +# CONFIG_GRAPHICS_TRAVELER is not set + +# +# Interpreters +# +# CONFIG_INTERPRETERS_BAS is not set +# CONFIG_INTERPRETERS_FICL is not set +# CONFIG_INTERPRETERS_MICROPYTHON is not set +# CONFIG_INTERPRETERS_MINIBASIC is not set +# CONFIG_INTERPRETERS_PCODE is not set + +# +# FreeModBus +# +# CONFIG_MODBUS is not set + +# +# Network Utilities +# +# CONFIG_NETUTILS_CODECS is not set +# CONFIG_NETUTILS_DISCOVER is not set +# CONFIG_NETUTILS_ESP8266 is not set +# CONFIG_NETUTILS_FTPC is not set +# CONFIG_NETUTILS_JSON is not set +CONFIG_NETUTILS_NETLIB=y +# CONFIG_NETUTILS_NTPCLIENT is not set +# CONFIG_NETUTILS_PPPD is not set +# CONFIG_NETUTILS_SMTP is not set +# CONFIG_NETUTILS_TELNETD is not set +# CONFIG_NETUTILS_TFTPC is not set +# CONFIG_NETUTILS_WEBCLIENT is not set +# CONFIG_NETUTILS_WEBSERVER is not set +# CONFIG_NETUTILS_XMLRPC is not set + +# +# NSH Library +# +CONFIG_NSH_LIBRARY=y +# CONFIG_NSH_MOTD is not set + +# +# Command Line Configuration +# +CONFIG_NSH_READLINE=y +# CONFIG_NSH_CLE is not set +CONFIG_NSH_LINELEN=64 +# CONFIG_NSH_DISABLE_SEMICOLON is not set +CONFIG_NSH_CMDPARMS=y +CONFIG_NSH_MAXARGUMENTS=6 +CONFIG_NSH_ARGCAT=y +CONFIG_NSH_NESTDEPTH=3 +# CONFIG_NSH_DISABLEBG is not set +CONFIG_NSH_BUILTIN_APPS=y + +# +# Disable Individual commands +# +# CONFIG_NSH_DISABLE_ADDROUTE is not set +# CONFIG_NSH_DISABLE_BASENAME is not set +# CONFIG_NSH_DISABLE_CAT is not set +# CONFIG_NSH_DISABLE_CD is not set +# CONFIG_NSH_DISABLE_CP is not set +# CONFIG_NSH_DISABLE_CMP is not set +CONFIG_NSH_DISABLE_DATE=y +# CONFIG_NSH_DISABLE_DD is not set +# CONFIG_NSH_DISABLE_DF is not set +# CONFIG_NSH_DISABLE_DELROUTE is not set +# CONFIG_NSH_DISABLE_DIRNAME is not set +# CONFIG_NSH_DISABLE_ECHO is not set +# CONFIG_NSH_DISABLE_EXEC is not set +# CONFIG_NSH_DISABLE_EXIT is not set +# CONFIG_NSH_DISABLE_FREE is not set +# CONFIG_NSH_DISABLE_GET is not set +# CONFIG_NSH_DISABLE_HELP is not set +# CONFIG_NSH_DISABLE_HEXDUMP is not set +# CONFIG_NSH_DISABLE_IFCONFIG is not set +# CONFIG_NSH_DISABLE_IFUPDOWN is not set +# CONFIG_NSH_DISABLE_KILL is not set +# CONFIG_NSH_DISABLE_LOSETUP is not set +CONFIG_NSH_DISABLE_LOSMART=y +# CONFIG_NSH_DISABLE_LS is not set +# CONFIG_NSH_DISABLE_MB is not set +# CONFIG_NSH_DISABLE_MKDIR is not set +# CONFIG_NSH_DISABLE_MKFATFS is not set +# CONFIG_NSH_DISABLE_MKRD is not set +# CONFIG_NSH_DISABLE_MH is not set +# CONFIG_NSH_DISABLE_MOUNT is not set +# CONFIG_NSH_DISABLE_MV is not set +# CONFIG_NSH_DISABLE_MW is not set +# CONFIG_NSH_DISABLE_NSLOOKUP is not set +# CONFIG_NSH_DISABLE_POWEROFF is not set +CONFIG_NSH_DISABLE_PRINTF=y +# CONFIG_NSH_DISABLE_PS is not set +# CONFIG_NSH_DISABLE_PUT is not set +# CONFIG_NSH_DISABLE_PWD is not set +# CONFIG_NSH_DISABLE_RM is not set +# CONFIG_NSH_DISABLE_RMDIR is not set +# CONFIG_NSH_DISABLE_SET is not set +# CONFIG_NSH_DISABLE_SH is not set +CONFIG_NSH_DISABLE_SHUTDOWN=y +# CONFIG_NSH_DISABLE_SLEEP is not set +# CONFIG_NSH_DISABLE_TIME is not set +# CONFIG_NSH_DISABLE_TEST is not set +# CONFIG_NSH_DISABLE_UMOUNT is not set +# CONFIG_NSH_DISABLE_UNAME is not set +# CONFIG_NSH_DISABLE_UNSET is not set +# CONFIG_NSH_DISABLE_USLEEP is not set +# CONFIG_NSH_DISABLE_WGET is not set +# CONFIG_NSH_DISABLE_XD is not set +CONFIG_NSH_MMCSDMINOR=0 +CONFIG_NSH_MMCSDSLOTNO=0 + +# +# Configure Command Options +# +# CONFIG_NSH_CMDOPT_DF_H is not set +# CONFIG_NSH_CMDOPT_DD_STATS is not set +CONFIG_NSH_CODECS_BUFSIZE=128 +CONFIG_NSH_CMDOPT_HEXDUMP=y +CONFIG_NSH_PROC_MOUNTPOINT="/proc" +CONFIG_NSH_FILEIOSIZE=512 + +# +# Scripting Support +# +# CONFIG_NSH_DISABLESCRIPT is not set +# CONFIG_NSH_DISABLE_ITEF is not set +# CONFIG_NSH_DISABLE_LOOPS is not set + +# +# Console Configuration +# +CONFIG_NSH_CONSOLE=y +# CONFIG_NSH_ALTCONDEV is not set +CONFIG_NSH_ARCHINIT=y + +# +# Networking Configuration +# +CONFIG_NSH_NETINIT=y +# CONFIG_NSH_NETINIT_THREAD is not set + +# +# IP Address Configuration +# + +# +# Target IPv6 address +# +CONFIG_NSH_IPv6ADDR_1=0xfe80 +CONFIG_NSH_IPv6ADDR_2=0x0000 +CONFIG_NSH_IPv6ADDR_3=0x0000 +CONFIG_NSH_IPv6ADDR_4=0x0000 +CONFIG_NSH_IPv6ADDR_5=0xabcd +CONFIG_NSH_IPv6ADDR_6=0x0000 +CONFIG_NSH_IPv6ADDR_7=0x0000 +CONFIG_NSH_IPv6ADDR_8=0x0000 + +# +# Router IPv6 address +# +CONFIG_NSH_DRIPv6ADDR_1=0xfe80 +CONFIG_NSH_DRIPv6ADDR_2=0x0000 +CONFIG_NSH_DRIPv6ADDR_3=0x0000 +CONFIG_NSH_DRIPv6ADDR_4=0x0000 +CONFIG_NSH_DRIPv6ADDR_5=0x1234 +CONFIG_NSH_DRIPv6ADDR_6=0x0000 +CONFIG_NSH_DRIPv6ADDR_7=0x0000 +CONFIG_NSH_DRIPv6ADDR_8=0x0000 + +# +# IPv6 Network mask +# +CONFIG_NSH_IPv6NETMASK_1=0xffff +CONFIG_NSH_IPv6NETMASK_2=0xffff +CONFIG_NSH_IPv6NETMASK_3=0xffff +CONFIG_NSH_IPv6NETMASK_4=0xffff +CONFIG_NSH_IPv6NETMASK_5=0x0000 +CONFIG_NSH_IPv6NETMASK_6=0x0000 +CONFIG_NSH_IPv6NETMASK_7=0x0000 +CONFIG_NSH_IPv6NETMASK_8=0x0000 +# CONFIG_NSH_DNS is not set +CONFIG_NSH_NOMAC=y +CONFIG_NSH_SWMAC=y +CONFIG_NSH_MACADDR=0xabcd +CONFIG_NSH_MAX_ROUNDTRIP=20 +# CONFIG_NSH_LOGIN is not set +# CONFIG_NSH_CONSOLE_LOGIN is not set + +# +# NxWidgets/NxWM +# + +# +# Platform-specific Support +# +# CONFIG_PLATFORM_CONFIGDATA is not set + +# +# System Libraries and NSH Add-Ons +# +# CONFIG_SYSTEM_CLE is not set +# CONFIG_SYSTEM_CUTERM is not set +# CONFIG_SYSTEM_FLASH_ERASEALL is not set +# CONFIG_SYSTEM_FREE is not set +# CONFIG_SYSTEM_HEX2BIN is not set +# CONFIG_SYSTEM_HEXED is not set +CONFIG_SYSTEM_I2CTOOL=y +CONFIG_I2CTOOL_MINBUS=0 +CONFIG_I2CTOOL_MAXBUS=0 +CONFIG_I2CTOOL_MINADDR=0x03 +CONFIG_I2CTOOL_MAXADDR=0x77 +CONFIG_I2CTOOL_MAXREGADDR=0xff +CONFIG_I2CTOOL_DEFFREQ=400000 +# CONFIG_SYSTEM_INSTALL is not set +# CONFIG_SYSTEM_MDIO is not set +# CONFIG_SYSTEM_NETDB is not set +# CONFIG_SYSTEM_RAMTEST is not set +CONFIG_READLINE_HAVE_EXTMATCH=y +CONFIG_SYSTEM_READLINE=y +CONFIG_READLINE_ECHO=y +# CONFIG_READLINE_TABCOMPLETION is not set +# CONFIG_READLINE_CMD_HISTORY is not set +# CONFIG_SYSTEM_SUDOKU is not set +# CONFIG_SYSTEM_SYSTEM is not set +# CONFIG_SYSTEM_TEE is not set +# CONFIG_SYSTEM_UBLOXMODEM is not set +# CONFIG_SYSTEM_VI is not set +# CONFIG_SYSTEM_ZMODEM is not set diff --git a/configs/sim/sixlowpan/setenv.sh b/configs/sim/sixlowpan/setenv.sh new file mode 100644 index 0000000000..65065ccc9b --- /dev/null +++ b/configs/sim/sixlowpan/setenv.sh @@ -0,0 +1,45 @@ +#!/bin/bash +# sim/sixlowpan/setenv.sh +# +# Copyright (C) 2017 Gregory Nutt. All rights reserved. +# Author: Gregory Nutt +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions +# are met: +# +# 1. Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# 2. Redistributions in binary form must reproduce the above copyright +# notice, this list of conditions and the following disclaimer in +# the documentation and/or other materials provided with the +# distribution. +# 3. Neither the name NuttX nor the names of its contributors may be +# used to endorse or promote products derived from this software +# without specific prior written permission. +# +# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS +# FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE +# COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, +# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, +# BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS +# OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED +# AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN +# ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE +# POSSIBILITY OF SUCH DAMAGE. +# + +if [ "$(basename $0)" = "setenv.sh" ] ; then + echo "You must source this script, not run it!" 1>&2 + exit 1 +fi + +if [ -z ${PATH_ORIG} ]; then export PATH_ORIG=${PATH}; fi + +#export NUTTX_BIN= +#export PATH=${NUTTX_BIN}:/sbin:/usr/sbin:${PATH_ORIG} + +echo "PATH : ${PATH}" diff --git a/configs/sim/src/sim_boot.c b/configs/sim/src/sim_boot.c index 826ca47f90..6e0be20777 100644 --- a/configs/sim/src/sim_boot.c +++ b/configs/sim/src/sim_boot.c @@ -42,22 +42,6 @@ #include "sim.h" -/**************************************************************************** - * Pre-processor Definitions - ****************************************************************************/ - -/**************************************************************************** - * Private Types - ****************************************************************************/ - -/**************************************************************************** - * Private Data - ****************************************************************************/ - -/**************************************************************************** - * Private Functions - ****************************************************************************/ - /**************************************************************************** * Public Functions ****************************************************************************/ diff --git a/configs/sim/src/sim_bringup.c b/configs/sim/src/sim_bringup.c index 8f0d85c078..8dd0f75bdd 100644 --- a/configs/sim/src/sim_bringup.c +++ b/configs/sim/src/sim_bringup.c @@ -47,6 +47,7 @@ #include #include #include +#include #include "up_internal.h" #include "sim.h" @@ -139,5 +140,15 @@ int sim_bringup(void) } #endif +#ifdef CONFIG_IEEE802154_LOOPBACK + /* Initialize and register the IEEE802.15.4 MAC network loop device */ + + ret = ieee8021514_loopback(); + if (ret < 0) + { + _err("ERROR: ieee8021514_loopback() failed: %d\n", ret); + } +#endif + return OK; } diff --git a/include/nuttx/net/ip.h b/include/nuttx/net/ip.h index c7b606078b..84df352074 100644 --- a/include/nuttx/net/ip.h +++ b/include/nuttx/net/ip.h @@ -547,7 +547,7 @@ bool net_ipv6addr_maskcmp(const net_ipv6addr_t addr1, #define net_is_addr_loopback(a) \ ((a)[0] == 0 && (a)[1] == 0 && (a)[2] == 0 && (a)[3] == 0 && \ - (a)[4] == 0 && (a)[5] == 0 && (a)[6] == 0 && (a)[7] == 0x0001) + (a)[4] == 0 && (a)[5] == 0 && (a)[6] == 0 && (a)[7] == HTONS(0x0001)) /**************************************************************************** * Name: net_is_addr_unspecified @@ -569,7 +569,7 @@ bool net_ipv6addr_maskcmp(const net_ipv6addr_t addr1, * ****************************************************************************/ -#define net_is_addr_mcast(a) (((a)[0] & 0xff00) == 0xff00) +#define net_is_addr_mcast(a) (((a)[0] & HTONS(0xff00)) == HTONS(0xff00)) /**************************************************************************** * Name: net_is_addr_linklocal_allnodes_mcast @@ -580,8 +580,8 @@ bool net_ipv6addr_maskcmp(const net_ipv6addr_t addr1, ****************************************************************************/ #define net_is_addr_linklocal_allnodes_mcast(a) \ - ((a)[0] == 0xff02 && (a)[1] == 0 && (a)[2] == 0 && (a)[3] == 0 && \ - (a)[4] == 0 && (a)[5] == 0 && (a)[6] == 0 && (a)[7] == 0x0001) + ((a)[0] == HTONS(0xff02) && (a)[1] == 0 && (a)[2] == 0 && (a)[3] == 0 && \ + (a)[4] == 0 && (a)[5] == 0 && (a)[6] == 0 && (a)[7] == HTONS(0x0001)) /**************************************************************************** * Name: net_is_addr_linklocal_allrouters_mcast @@ -592,8 +592,8 @@ bool net_ipv6addr_maskcmp(const net_ipv6addr_t addr1, ****************************************************************************/ #define net_is_addr_linklocal_allrouters_mcast(a) \ - ((a)[0] == 0xff02 && (a)[1] == 0 && (a)[2] == 0 && (a)[3] == 0 && \ - (a)[4] == 0 && (a)[5] == 0 && (a)[6] == 0 && (a)[7] == 0x0002) + ((a)[0] == HTONS(0xff02) && (a)[1] == 0 && (a)[2] == 0 && (a)[3] == 0 && \ + (a)[4] == 0 && (a)[5] == 0 && (a)[6] == 0 && (a)[7] == HTOS(0x0002)) /**************************************************************************** * Name: net_is_addr_linklocal @@ -603,7 +603,7 @@ bool net_ipv6addr_maskcmp(const net_ipv6addr_t addr1, * ****************************************************************************/ -#define net_is_addr_linklocal(a) ((a)[0] == 0xfe80) +#define net_is_addr_linklocal(a) ((a)[0] == HTONS(0xfe80)) /**************************************************************************** * Name: net_ipaddr_mask diff --git a/include/nuttx/wireless/ieee802154/ieee802154_loopback.h b/include/nuttx/wireless/ieee802154/ieee802154_loopback.h new file mode 100644 index 0000000000..d1952df24f --- /dev/null +++ b/include/nuttx/wireless/ieee802154/ieee802154_loopback.h @@ -0,0 +1,73 @@ +/**************************************************************************** + * include/nuttx/net/ieee802154.h + * + * Copyright (C) 2016 Gregory Nutt. All rights reserved. + * Author: Gregory Nutt + * + * Includes some definitions that a compatible with the LGPL GNU C Library + * header file of the same name. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in + * the documentation and/or other materials provided with the + * distribution. + * 3. Neither the name NuttX nor the names of its contributors may be + * used to endorse or promote products derived from this software + * without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS + * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE + * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, + * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS + * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED + * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN + * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + * + ****************************************************************************/ + +#ifndef __INCLUDE_NUTTX_WIRELESS_IEEE802154_IEEE802154_LOOPBACK_H +#define __INCLUDE_NUTTX_WIRELESS_IEEE802154_IEEE802154_LOOPBACK_H + +/**************************************************************************** + * Included Files + ****************************************************************************/ + +#include + +#ifdef CONFIG_IEEE802154_LOOPBACK + +/**************************************************************************** + * Public Function Prototypes + ****************************************************************************/ + +/**************************************************************************** + * Function: ieee8021514_loopback + * + * Description: + * Initialize and register the Ieee802.15.4 MAC loopback network driver. + * + * Parameters: + * None + * + * Returned Value: + * OK on success; Negated errno on failure. + * + * Assumptions: + * + ****************************************************************************/ + +int ieee8021514_loopback(void); + +#endif /* CONFIG_IEEE802154_LOOPBACK */ +#endif /* __INCLUDE_NUTTX_WIRELESS_IEEE802154_IEEE802154_LOOPBACK_H */ diff --git a/net/devif/devif_poll.c b/net/devif/devif_poll.c index 4a5d325d43..235c58bcf2 100644 --- a/net/devif/devif_poll.c +++ b/net/devif/devif_poll.c @@ -45,6 +45,7 @@ #include #include #include +#include #include "devif/devif.h" #include "arp/arp.h" @@ -55,6 +56,21 @@ #include "icmp/icmp.h" #include "icmpv6/icmpv6.h" #include "igmp/igmp.h" +#include "sixlowpan/sixlowpan.h" + +/**************************************************************************** + * Private Types + ****************************************************************************/ + +enum devif_packet_type +{ + DEVIF_PKT = 0, + DEVIF_ICMP, + DEVIF_IGMP, + DEVIF_TCP, + DEVIF_UDP, + DEVIF_ICMP6 +}; /**************************************************************************** * Public Data @@ -68,6 +84,78 @@ systime_t g_polltime; * Private Functions ****************************************************************************/ +/**************************************************************************** + * Function: devif_packet_conversion + * + * Description: + * Generic output conversion hook. Only needed for IEEE802.15.4 for now + * is a point where support for other conversions may be provided. + * + * TCP output comes through three different mechansims. Either from: + * + * 1. TCP socket output. For the case of TCP output to an + * IEEE802.15.4, the TCP output is caught in the socket + * send()/sendto() logic and and redirected to 6loWPAN logic. + * 2. TCP output from the TCP state machine. That will occur + * during TCP packet processing by the TCP state meachine. + * 3. TCP output resulting from TX or timer polling + * + * Cases 2 is handled here. Logic here detected if (1) an attempt + * to return with d_len > 0 and (2) that the device is an + * IEEE802.15.4 MAC network driver. Under those conditions, 6loWPAN + * logic will be called to create the IEEE80215.4 frames. + * + * Assumptions: + * The network is locked. + * + ****************************************************************************/ + +#ifdef CONFIG_NET_6LOWPAN +static void devif_packet_conversion(FAR struct net_driver_s *dev, + enum devif_packet_type pkttype) +{ +#ifdef CONFIG_NET_MULTILINK + /* Handle the case where multiple link layer protocols are supported */ + + if (dev->d_len > 0 && dev->d_lltype == NET_LL_IEEE802154) +#else + if (dev->d_len > 0) +#endif + { + if (pkttype == DEVIF_TCP) + { + FAR struct ipv6_hdr_s *ipv6 = (FAR struct ipv6_hdr_s *)dev->d_buf; + + /* This packet came from a response to TCP polling and is directed + * to an IEEE802.15.4 device using 6loWPAN. Verify that the outgoing + * packet is IPv6 with TCP protocol. + */ + + if (ipv6->vtc == IPv6_VERSION && ipv6->proto == IP_PROTO_TCP) + { + /* Let 6loWPAN convert IPv6 TCP output into IEEE802.15.4 frames. */ + + sixlowpan_tcp_send(dev); + } + else + { + nerr("ERROR: IPv6 version or protocol error. Packet dropped\n"); + nerr(" IP version: %02x proocol: %u\n", + ipv6->vtc, ipv6->proto); + } + } + else + { + nerr("ERROR: Non-TCP packet dropped. Packet type: %u\n", pkttype); + } + + dev->d_len = 0; + } +} +#else +# define devif_packet_conversion(dev,pkttype) +#endif /* CONFIG_NET_6LOWPAN */ + /**************************************************************************** * Function: devif_poll_pkt_connections * @@ -95,6 +183,10 @@ static int devif_poll_pkt_connections(FAR struct net_driver_s *dev, pkt_poll(dev, pkt_conn); + /* Perform any necessary conversions on outgoing packets */ + + devif_packet_conversion(dev, DEVIF_PKT); + /* Call back into the driver */ bstop = callback(dev); @@ -120,6 +212,10 @@ static inline int devif_poll_icmp(FAR struct net_driver_s *dev, icmp_poll(dev); + /* Perform any necessary conversions on outgoing packets */ + + devif_packet_conversion(dev, DEVIF_ICMP); + /* Call back into the driver */ return callback(dev); @@ -142,6 +238,10 @@ static inline int devif_poll_icmpv6(FAR struct net_driver_s *dev, icmpv6_poll(dev); + /* Perform any necessary conversions on outgoing packets */ + + devif_packet_conversion(dev, DEVIF_ICMP6); + /* Call back into the driver */ return callback(dev); @@ -168,6 +268,10 @@ static inline int devif_poll_igmp(FAR struct net_driver_s *dev, igmp_poll(dev); + /* Perform any necessary conversions on outgoing packets */ + + devif_packet_conversion(dev, DEVIF_IGMP); + /* Call back into the driver */ return callback(dev); @@ -201,6 +305,10 @@ static int devif_poll_udp_connections(FAR struct net_driver_s *dev, udp_poll(dev, conn); + /* Perform any necessary conversions on outgoing packets */ + + devif_packet_conversion(dev, DEVIF_UDP); + /* Call back into the driver */ bstop = callback(dev); @@ -237,6 +345,10 @@ static inline int devif_poll_tcp_connections(FAR struct net_driver_s *dev, tcp_poll(dev, conn); + /* Perform any necessary conversions on outgoing packets */ + + devif_packet_conversion(dev, DEVIF_TCP); + /* Call back into the driver */ bstop = callback(dev); @@ -277,6 +389,10 @@ static inline int devif_poll_tcp_timer(FAR struct net_driver_s *dev, tcp_timer(dev, conn, hsec); + /* Perform any necessary conversions on outgoing packets */ + + devif_packet_conversion(dev, DEVIF_TCP); + /* Call back into the driver */ bstop = callback(dev); diff --git a/net/devif/ipv6_input.c b/net/devif/ipv6_input.c index d55b0739ad..24be107a47 100644 --- a/net/devif/ipv6_input.c +++ b/net/devif/ipv6_input.c @@ -261,24 +261,29 @@ int ipv6_input(FAR struct net_driver_s *dev) tcp_ipv6_input(dev); #ifdef CONFIG_NET_6LOWPAN - /* TCP output comes through two different mechansims. Either from: + /* TCP output comes through three different mechansims. Either from: * * 1. TCP socket output. For the case of TCP output to an * IEEE802.15.4, the TCP output is caught in the socket * send()/sendto() logic and and redirected to 6loWPAN logic. - * 2. TCP output from the TCP state machine. That will pass - * here and can be detected if d_len > 0. It will be redirected - * to 6loWPAN logic here. + * 2. TCP output from the TCP state machine. That will occur + * during TCP packet processing by the TCP state meachine. + * 3. TCP output resulting from TX or timer polling + * + * Cases 2 is handled here. Logic here detected if (1) an attempt + * to return with d_len > 0 and (2) that the device is an + * IEEE802.15.4 MAC network driver. Under those conditions, 6loWPAN + * logic will be called to create the IEEE80215.4 frames. */ #ifdef CONFIG_NET_MULTILINK - /* Handle the case where multiple link layer protocols are supported */ + /* Handle the case where multiple link layer protocols are supported */ - if (dev->d_len > 0 && dev->d_lltype == CONFIG_NET_6LOWPAN) + if (dev->d_len > 0 && dev->d_lltype == CONFIG_NET_6LOWPAN) #else - if (dev->d_len > 0) + if (dev->d_len > 0) #endif - { + { /* Let 6loWPAN handle the TCP output */ sixlowpan_tcp_send(dev); @@ -286,7 +291,7 @@ int ipv6_input(FAR struct net_driver_s *dev) /* Drop the packet in the d_buf */ goto drop; - } + } #endif /* CONFIG_NET_6LOWPAN */ break; #endif /* NET_TCP_HAVE_STACK */ diff --git a/net/procfs/netdev_statistics.c b/net/procfs/netdev_statistics.c index 80154c91fa..d7673507b7 100644 --- a/net/procfs/netdev_statistics.c +++ b/net/procfs/netdev_statistics.c @@ -1,7 +1,7 @@ /**************************************************************************** * net/procfs/netdev_statistics.c * - * Copyright (C) 2015 Gregory Nutt. All rights reserved. + * Copyright (C) 2015, 2017 Gregory Nutt. All rights reserved. * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without @@ -47,6 +47,7 @@ #include #include +#include #include "netdev/netdev.h" #include "utils/utils.h" @@ -106,6 +107,9 @@ static const linegen_t g_linegen[] = static int netprocfs_linklayer(FAR struct netprocfs_file_s *netfile) { FAR struct net_driver_s *dev; +#ifdef CONFIG_NET_6LOWPAN + FAR struct ieee802154_driver_s *ieee; +#endif FAR const char *status; int len = 0; @@ -142,6 +146,30 @@ static int netprocfs_linklayer(FAR struct netprocfs_file_s *netfile) break; #endif +#ifdef CONFIG_NET_6LOWPAN + case NET_LL_IEEE802154: + { + ieee = (FAR struct ieee802154_driver_s *)dev; + +#if CONFIG_NET_6LOWPAN_RIMEADDR_SIZE == 2 + len += snprintf(&netfile->line[len], NET_LINELEN - len, + "%s\tLink encap:6loWPAN HWaddr %02x:%02x", + dev->d_ifname, + ieee->i_nodeaddr.u8[0], ieee->i_nodeaddr.u8[1]); +#else /* CONFIG_NET_6LOWPAN_RIMEADDR_SIZE == 8 */ + len += snprintf(&netfile->line[len], NET_LINELEN - len, + "%s\tLink encap:6loWPAN HWaddr " + "%02x:%02x:%02x:%02x:%02x:%02x:%02x:%02x", + dev->d_ifname, + ieee->i_nodeaddr.u8[0], ieee->i_nodeaddr.u8[1], + ieee->i_nodeaddr.u8[2], ieee->i_nodeaddr.u8[3], + ieee->i_nodeaddr.u8[4], ieee->i_nodeaddr.u8[5], + ieee->i_nodeaddr.u8[6], ieee->i_nodeaddr.u8[7]); +#endif + } + break; +#endif + #ifdef CONFIG_NET_LOOPBACK case NET_LL_LOOPBACK: len += snprintf(&netfile->line[len], NET_LINELEN - len, @@ -184,6 +212,26 @@ static int netprocfs_linklayer(FAR struct netprocfs_file_s *netfile) "%s\tLink encap:Ethernet HWaddr %s at %s\n", dev->d_ifname, ether_ntoa(&dev->d_mac), status); +#elif defined(CONFIG_NET_6LOWPAN) + ieee = (FAR struct ieee802154_driver_s *)dev; + +#if CONFIG_NET_6LOWPAN_RIMEADDR_SIZE == 2 + len += snprintf(&netfile->line[len], NET_LINELEN - len, + "%s\tLink encap:6loWPAN HWaddr %02x:%02x at %s", + dev->d_ifname, + ieee->i_nodeaddr.u8[0], ieee->i_nodeaddr.u8[1], + status); +#else /* CONFIG_NET_6LOWPAN_RIMEADDR_SIZE == 8 */ + len += snprintf(&netfile->line[len], NET_LINELEN - len, + "%s\tLink encap:6loWPAN HWaddr " + "%02x:%02x:%02x:%02x:%02x:%02x:%02x:%02x at %s", + dev->d_ifname, + ieee->i_nodeaddr.u8[0], ieee->i_nodeaddr.u8[1], + ieee->i_nodeaddr.u8[2], ieee->i_nodeaddr.u8[3], + ieee->i_nodeaddr.u8[4], ieee->i_nodeaddr.u8[5], + ieee->i_nodeaddr.u8[6], ieee->i_nodeaddr.u8[7], + status); +#endif #elif defined(CONFIG_NET_LOOPBACK) len += snprintf(&netfile->line[len], NET_LINELEN - len, "%s\tLink encap:Local Loopback at %s\n", diff --git a/net/sixlowpan/sixlowpan.h b/net/sixlowpan/sixlowpan.h index c9f54154b5..05ce9496c9 100644 --- a/net/sixlowpan/sixlowpan.h +++ b/net/sixlowpan/sixlowpan.h @@ -110,15 +110,20 @@ ssize_t psock_6lowpan_tcp_send(FAR struct socket *psock, FAR const void *buf, * Function: sixlowpan_tcp_send * * Description: - * TCP output comes through two different mechansims. Either from: + * TCP output comes through three different mechansims. Either from: * * 1. TCP socket output. For the case of TCP output to an * IEEE802.15.4, the TCP output is caught in the socket * send()/sendto() logic and and redirected to psock_6lowpan_tcp_send(). * 2. TCP output from the TCP state machine. That will occur - * during TCP packet processing by the TCP state meachine. It - * is detected there when ipv6_tcp_input() returns with d_len > 0. This - * will be redirected here. + * during TCP packet processing by the TCP state meachine. + * 3. TCP output resulting from TX or timer polling + * + * Cases 2 and 3 will be handled here. Logic in ipv6_tcp_input(), + * devif_poll(), and devif_timer() detect if (1) an attempt to return with + * d_len > 0 and (2) that the device is an IEEE802.15.4 MAC network + * driver. Under those conditions, this function will be called to create + * the IEEE80215.4 frames. * * Parameters: * dev - An instance of nework device state structure diff --git a/net/sixlowpan/sixlowpan_hc06.c b/net/sixlowpan/sixlowpan_hc06.c index 270c6f6885..5caee4b838 100644 --- a/net/sixlowpan/sixlowpan_hc06.c +++ b/net/sixlowpan/sixlowpan_hc06.c @@ -455,7 +455,8 @@ void sixlowpan_compresshdr_hc06(FAR struct ieee802154_driver_s *ieee, uint8_t iphc1; uint8_t tmp; - ninfodumpbuffer("IPv6 before compression", ipv6, sizeof(ipv6_hdr_s)); + ninfodumpbuffer("IPv6 before compression", (FAR const uint8_t *)ipv6, + sizeof(struct ipv6_hdr_s)); g_hc06ptr = g_rimeptr + 2; diff --git a/net/sixlowpan/sixlowpan_input.c b/net/sixlowpan/sixlowpan_input.c index b89af933d8..5ee8b49017 100644 --- a/net/sixlowpan/sixlowpan_input.c +++ b/net/sixlowpan/sixlowpan_input.c @@ -470,7 +470,8 @@ copypayload: } #endif /* CONFIG_NET_6LOWPAN_FRAG */ - ninfodumpbuffer("IPv6 header", IPv6BUF(ieee->i_dev), IPv6_HDRLEN) + ninfodumpbuffer("IPv6 header", (FAR const uint8_t *)IPv6BUF(&ieee->i_dev), + IPv6_HDRLEN); return OK; } diff --git a/net/sixlowpan/sixlowpan_internal.h b/net/sixlowpan/sixlowpan_internal.h index c6a83480d9..4e8fc75d77 100644 --- a/net/sixlowpan/sixlowpan_internal.h +++ b/net/sixlowpan/sixlowpan_internal.h @@ -243,7 +243,8 @@ */ #define SIXLOWPAN_IS_IID_16BIT_COMPRESSABLE(a) \ - ((((a)[4]) == 0x0000) && (((a)[5]) == 0x00ff) && (((a)[6]) == 0xfe00)) + ((((a)[4]) == 0x0000) && (((a)[5]) == HTONS(0x00ff)) && \ + (((a)[6]) == 0xfe00)) /* Check whether the 9-bit group-id of the compressed multicast address is * known. It is true if the 9-bit group is the all nodes or all routers @@ -265,27 +266,27 @@ #define SIXLOWPAN_IS_MCASTADDR_COMPRESSABLE(a) \ ((a)[1] == 0 && (a)[2] == 0 && (a)[3] == 0 && \ (a)[4] == 0 && (a)[5] == 0 && (a)[6] == 0 && \ - ((a)[7] == 0x0001 || (a)[7] == 0x0002)) + ((a)[7] == HTONS(0x0001) || (a)[7] == HTONS(0x0002))) /* FFXX:0000:0000:0000:0000:00XX:XXXX:XXXX */ #define SIXLOWPAN_IS_MCASTADDR_COMPRESSABLE48(a) \ ((a)[1] == 0 && (a)[2] == 0 && (a)[3] == 0 && \ - (a)[4] == 0 && (((a)[5] & 0xff00) == 0)) + (a)[4] == 0 && (((a)[5] & HTONS(0xff00)) == 0)) /* FFXX:0000:0000:0000:0000:0000:00XX:XXXX */ #define SIXLOWPAN_IS_MCASTADDR_COMPRESSABLE32(a) \ ((a)[1] == 0 && (a)[2] == 0 && (a)[3] == 0 && \ - (a)[4] == 0 && (a)[5] == 0 && ((a)[6] & 0xff00) == 0) + (a)[4] == 0 && (a)[5] == 0 && ((a)[6] & HTONS(0xff00)) == 0) /* FF02:0000:0000:0000:0000:0000:0000:00XX */ #define SIXLOWPAN_IS_MCASTADDR_COMPRESSABLE8(a) \ - ((((a)[0] & 0x00ff) == 0x0002) && \ + ((((a)[0] & HTONS(0x00ff)) == HTONS(0x0002)) && \ (a)[1] == 0 && (a)[2] == 0 && (a)[3] == 0 && \ (a)[4] == 0 && (a)[5] == 0 && (a)[6] == 0 && \ - (((a)[7] & 0xff00) == 0x0000)) + (((a)[7] & HTONS(0xff00)) == 0x0000)) /* General helper macros ****************************************************/ diff --git a/net/sixlowpan/sixlowpan_tcpsend.c b/net/sixlowpan/sixlowpan_tcpsend.c index 2b0ce15cb3..7beceee5c5 100644 --- a/net/sixlowpan/sixlowpan_tcpsend.c +++ b/net/sixlowpan/sixlowpan_tcpsend.c @@ -155,6 +155,8 @@ ssize_t psock_6lowpan_tcp_send(FAR struct socket *psock, FAR const void *buf, uint16_t iplen; int ret; + ninfo("buflen %lu\n", (unsigned long)buflen); + DEBUGASSERT(psock != NULL && psock->s_crefs > 0); DEBUGASSERT(psock->s_type == SOCK_STREAM); @@ -249,7 +251,8 @@ ssize_t psock_6lowpan_tcp_send(FAR struct socket *psock, FAR const void *buf, net_ipv6addr_hdrcopy(ipv6tcp.ipv6.srcipaddr, conn->u.ipv6.laddr); net_ipv6addr_hdrcopy(ipv6tcp.ipv6.destipaddr, conn->u.ipv6.raddr); - ninfo("IPv6 length: %d\n", ((int)ipv6->len[0] << 8) + ipv6->len[1]); + ninfo("IPv6 length: %d\n", + ((int)ipv6tcp.ipv6.len[0] << 8) + ipv6tcp.ipv6.len[1]); #ifdef CONFIG_NET_STATISTICS g_netstats.ipv6.sent++; @@ -289,7 +292,7 @@ ssize_t psock_6lowpan_tcp_send(FAR struct socket *psock, FAR const void *buf, ipv6tcp.tcp.tcpchksum = 0; ipv6tcp.tcp.tcpchksum = ~sixlowpan_tcp_chksum(&ipv6tcp, buf, buflen); - ninfo("Outgoing TCP packet length: %d bytes\n", iplen + IOPv6_HDRLEN); + ninfo("Outgoing TCP packet length: %d bytes\n", iplen + IPv6_HDRLEN); #ifdef CONFIG_NET_STATISTICS g_netstats.tcp.sent++; @@ -332,15 +335,20 @@ ssize_t psock_6lowpan_tcp_send(FAR struct socket *psock, FAR const void *buf, * Function: sixlowpan_tcp_send * * Description: - * TCP output comes through two different mechansims. Either from: + * TCP output comes through three different mechansims. Either from: * * 1. TCP socket output. For the case of TCP output to an * IEEE802.15.4, the TCP output is caught in the socket * send()/sendto() logic and and redirected to psock_6lowpan_tcp_send(). * 2. TCP output from the TCP state machine. That will occur - * during TCP packet processing by the TCP state meachine. It - * is detected there when ipv6_tcp_input() returns with d_len > 0. This - * will be redirected here. + * during TCP packet processing by the TCP state meachine. + * 3. TCP output resulting from TX or timer polling + * + * Cases 2 and 3 will be handled here. Logic in ipv6_tcp_input(), + * devif_poll(), and devif_timer() detect if (1) an attempt to return with + * d_len > 0 and (2) that the device is an IEEE802.15.4 MAC network + * driver. Under those conditions, this function will be called to create + * the IEEE80215.4 frames. * * Parameters: * dev - An instance of nework device state structure @@ -359,6 +367,8 @@ void sixlowpan_tcp_send(FAR struct net_driver_s *dev) /* Double check */ + ninfo("d_len %u\n", dev->d_len); + if (dev != NULL && dev->d_len > 0) { FAR struct ipv6_hdr_s *ipv6hdr; @@ -383,10 +393,10 @@ void sixlowpan_tcp_send(FAR struct net_driver_s *dev) size_t hdrlen; hdrlen = IPv6_HDRLEN + TCP_HDRLEN; - if (hdrlen < dev->d_len) + if (hdrlen > dev->d_len) { nwarn("WARNING: Packet to small: Have %u need >%u\n", - dev->d_len, hdrlen); + dev->d_len, hdrlen); } else { diff --git a/net/sixlowpan/sixlowpan_udpsend.c b/net/sixlowpan/sixlowpan_udpsend.c index 61fbe3b237..53c7ead6ce 100644 --- a/net/sixlowpan/sixlowpan_udpsend.c +++ b/net/sixlowpan/sixlowpan_udpsend.c @@ -263,7 +263,8 @@ ssize_t psock_6lowpan_udp_sendto(FAR struct socket *psock, net_ipv6addr_hdrcopy(ipv6udp.ipv6.srcipaddr, to6->sin6_addr.in6_u.u6_addr16); net_ipv6addr_hdrcopy(ipv6udp.ipv6.destipaddr, conn->u.ipv6.raddr); - ninfo("IPv6 length: %d\n", ((int)ipv6->len[0] << 8) + ipv6->len[1]); + ninfo("IPv6 length: %d\n", + ((int)ipv6udp.ipv6.len[0] << 8) + ipv6udp.ipv6.len[1]); #ifdef CONFIG_NET_STATISTICS g_netstats.ipv6.sent++; diff --git a/net/sixlowpan/sixlowpan_utils.c b/net/sixlowpan/sixlowpan_utils.c index fae33fe207..7dd4e9e35c 100644 --- a/net/sixlowpan/sixlowpan_utils.c +++ b/net/sixlowpan/sixlowpan_utils.c @@ -116,7 +116,7 @@ void sixlowpan_ipfromrime(FAR const struct rimeaddr_s *rime, net_ipv6addr_t ipaddr) { memset(ipaddr, 0, sizeof(net_ipv6addr_t)); - ipaddr[0] = 0xfe80; + ipaddr[0] = HTONS(0xfe80); /* We consider only links with IEEE EUI-64 identifier or IEEE 48-bit MAC * addresses. NOTE: that CONFIG_NET_6LOWPAN_RIMEADDR_SIZE may be 2 or @@ -128,7 +128,7 @@ void sixlowpan_ipfromrime(FAR const struct rimeaddr_s *rime, */ memcpy(&ipaddr[4], rime, CONFIG_NET_6LOWPAN_RIMEADDR_SIZE); - ipaddr[4] ^= 0x0200; + ipaddr[4] ^= HTONS(0x0200); } /**************************************************************************** @@ -174,10 +174,10 @@ bool sixlowpan_ismacbased(const net_ipv6addr_t ipaddr, FAR const uint8_t *rimeptr = rime->u8; #if CONFIG_NET_6LOWPAN_RIMEADDR_SIZE == 2 - return ((ipaddr[4] == (GETINT16(rimeptr, 0) ^ 0x0200)) && + return ((ipaddr[4] == htons((GETINT16(rimeptr, 0) ^ 0x0200))) && ipaddr[5] == 0 && ipaddr[6] == 0 && ipaddr[7] == 0); #else /* CONFIG_NET_6LOWPAN_RIMEADDR_SIZE == 8 */ - return ((ipaddr[4] == (GETINT16(rimeptr, 0) ^ 0x0200)) && + return ((ipaddr[4] == htons((GETINT16(rimeptr, 0) ^ 0x0200))) && ipaddr[5] == GETINT16(rimeptr, 2) && ipaddr[6] == GETINT16(rimeptr, 4) && ipaddr[7] == GETINT16(rimeptr, 6)); diff --git a/net/tcp/tcp_finddev.c b/net/tcp/tcp_finddev.c index ef6ae8f0d2..e3cf0b3288 100644 --- a/net/tcp/tcp_finddev.c +++ b/net/tcp/tcp_finddev.c @@ -250,7 +250,6 @@ int tcp_local_ipv6_device(FAR struct tcp_conn_s *conn) #else return tcp_find_ipv6_device(conn, NULL); #endif - } #endif /* CONFIG_NET_IPv6 */ diff --git a/wireless/ieee802154/Kconfig b/wireless/ieee802154/Kconfig index 7cc144f54a..90d20d07d6 100644 --- a/wireless/ieee802154/Kconfig +++ b/wireless/ieee802154/Kconfig @@ -45,29 +45,6 @@ config IEEE802154_LOOPBACK ---help--- Add support for the IEEE802154 6loWPAN Loopback test device. -if IEEE802154_LOOPBACK - -choice - prompt "Work queue" - default IEEE802154_LOOPBACK_LPWORK if SCHED_LPWORK - default IEEE802154_LOOPBACK_HPWORK if !SCHED_LPWORK && SCHED_HPWORK - depends on SCHED_WORKQUEUE - ---help--- - Work queue support is required to use the loopback driver. If the - low priority work queue is available, then it should be used by the - loopback driver. - -config IEEE802154_LOOPBACK_HPWORK - bool "High priority" - depends on SCHED_HPWORK - -config IEEE802154_LOOPBACK_LPWORK - bool "Low priority" - depends on SCHED_LPWORK - -endchoice # Work queue -endif # IEEE802154_LOOPBACK - config IEEE802154_LOOPBACK bool "IEEE802154 6loWPAN Loopback" default n @@ -99,4 +76,4 @@ config IEEE802154_LOOPBACK_LPWORK endchoice # Work queue endif # IEEE802154_LOOPBACK -endif # IEEE802154 +endif # WIRELESS_IEEE802154 diff --git a/wireless/ieee802154/mac802154_loopback.c b/wireless/ieee802154/mac802154_loopback.c index 5bbd6f5beb..1f8dc4e8c3 100644 --- a/wireless/ieee802154/mac802154_loopback.c +++ b/wireless/ieee802154/mac802154_loopback.c @@ -53,11 +53,8 @@ #include #include #include -#include - -#ifndef CONFIG_NET_LOOPBACK -# include -#endif +#include +#include #ifdef CONFIG_IEEE802154_LOOPBACK @@ -110,14 +107,6 @@ struct lo_driver_s static struct lo_driver_s g_loopback; static uint8_t g_iobuffer[CONFIG_NET_6LOWPAN_MTU + CONFIG_NET_GUARDSIZE]; -#ifndef CONFIG_NET_LOOPBACK -static const net_ipv6addr_t g_lo_ipv6addr = -{ - HTONS(0), HTONS(0), HTONS(0), HTONS(0), - HTONS(0), HTONS(0), HTONS(0), HTONS(1) -}; -#endif - /**************************************************************************** * Private Function Prototypes ****************************************************************************/ @@ -173,6 +162,22 @@ static int lo_txpoll(FAR struct net_driver_s *dev) FAR struct iob_s *iob; int ret; + if (dev->d_len > 0 || priv->lo_ieee.i_framelist != NULL) + { + ninfo("d_len: %u i_framelist: %p\n", + dev->d_len, priv->lo_ieee.i_framelist); + + /* The only two valid settings are: + * + * 1. Nothing to send: + * dev->d_len == 0 && priv->lo_ieee.i_framelist == NULL + * 2. Outgoing packet has been converted to IEEE802.15.4 frames: + * dev->d_len == 0 && priv->lo_ieee.i_framelist != NULL + */ + + DEBUGASSERT(dev->d_len == 0 && priv->lo_ieee.i_framelist != NULL); + } + /* Remove the queued IOBs from driver structure */ head = priv->lo_ieee.i_framelist; @@ -309,6 +314,11 @@ static void lo_poll_expiry(int argc, wdparm_t arg, ...) { FAR struct lo_driver_s *priv = (FAR struct lo_driver_s *)arg; + if (!work_available(&priv->lo_work)) + { + nwarn("WARNING: lo_work NOT available\n"); + } + /* Schedule to perform the interrupt processing on the worker thread. */ work_queue(LPBKWORK, &priv->lo_work, lo_poll_work, priv, 0); @@ -335,14 +345,22 @@ static int lo_ifup(FAR struct net_driver_s *dev) { FAR struct lo_driver_s *priv = (FAR struct lo_driver_s *)dev->d_private; -#if CONFIG_NET_6LOWPAN_RIMEADDR_SIZE == 2 - ninfo("Bringing up: Rime %02x:%02x PANID=%04x\n", - dev->d_ipv6addr[0], dev->d_ipv6addr[1], priv->lo_ieee.i_panid); -#elif CONFIG_NET_6LOWPAN_RIMEADDR_SIZE == 8 - ninfo("Bringing up: Rime %02x:%02x:%02x:%02x:%02x:%02x:%02x:%02x PANID=%04x\n", + ninfo("Bringing up: IPv6 %04x:%04x:%04x:%04x:%04x:%04x:%04x:%04x\n", dev->d_ipv6addr[0], dev->d_ipv6addr[1], dev->d_ipv6addr[2], dev->d_ipv6addr[3], dev->d_ipv6addr[4], dev->d_ipv6addr[5], - dev->d_ipv6addr[6], dev->d_ipv6addr[7], priv->lo_ieee.i_panid); + dev->d_ipv6addr[6], dev->d_ipv6addr[7]); + +#if CONFIG_NET_6LOWPAN_RIMEADDR_SIZE == 2 + ninfo(" Node: %02x:%02x PANID=%04x\n", + priv->lo_ieee.i_nodeaddr.u8[0], priv->lo_ieee.i_nodeaddr.u8[1], + priv->lo_ieee.i_panid); +#else /* CONFIG_NET_6LOWPAN_RIMEADDR_SIZE == 8 */ + ninfo(" Node: %02x:%02x:%02x:%02x:%02x:%02x:%02x:%02x PANID=%04x\n", + priv->lo_ieee.i_nodeaddr.u8[0], priv->lo_ieee.i_nodeaddr.u8[1], + priv->lo_ieee.i_nodeaddr.u8[2], priv->lo_ieee.i_nodeaddr.u8[3], + priv->lo_ieee.i_nodeaddr.u8[4], priv->lo_ieee.i_nodeaddr.u8[5], + priv->lo_ieee.i_nodeaddr.u8[6], priv->lo_ieee.i_nodeaddr.u8[7], + priv->lo_ieee.i_panid); #endif /* Set and activate a timer process */ @@ -374,6 +392,8 @@ static int lo_ifdown(FAR struct net_driver_s *dev) { FAR struct lo_driver_s *priv = (FAR struct lo_driver_s *)dev->d_private; + ninfo("IP up: %u\n", priv->lo_bifup); + /* Cancel the TX poll timer and TX timeout timers */ wd_cancel(priv->lo_polldog); @@ -405,6 +425,8 @@ static void lo_txavail_work(FAR void *arg) { FAR struct lo_driver_s *priv = (FAR struct lo_driver_s *)arg; + ninfo("IP up: %u\n", priv->lo_bifup); + /* Ignore the notification if the interface is not yet up */ net_lock(); @@ -446,6 +468,8 @@ static int lo_txavail(FAR struct net_driver_s *dev) { FAR struct lo_driver_s *priv = (FAR struct lo_driver_s *)dev->d_private; + ninfo("Available: %u\n", work_available(&priv->lo_work)); + /* Is our single work structure available? It may not be if there are * pending interrupt actions and we will have to ignore the Tx * availability action. @@ -482,6 +506,14 @@ static int lo_txavail(FAR struct net_driver_s *dev) #if defined(CONFIG_NET_IGMP) || defined(CONFIG_NET_ICMPv6) static int lo_addmac(FAR struct net_driver_s *dev, FAR const uint8_t *mac) { +#if CONFIG_NET_6LOWPAN_RIMEADDR_SIZE == 2 + ninfo("MAC: %02x:%02x\n", + mac[0], mac[1]); +#else /* CONFIG_NET_6LOWPAN_RIMEADDR_SIZE == 8 */ + ninfo("MAC: %02x:%02x:%02x:%02x:%02x:%02x:%02x:%02x\n", + mac[0], mac[1], mac[2], mac[3], mac[4], mac[5], mac[6], mac[7]); +#endif + /* There is no multicast support in the loopback driver */ return OK; @@ -509,6 +541,14 @@ static int lo_addmac(FAR struct net_driver_s *dev, FAR const uint8_t *mac) #ifdef CONFIG_NET_IGMP static int lo_rmmac(FAR struct net_driver_s *dev, FAR const uint8_t *mac) { +#if CONFIG_NET_6LOWPAN_RIMEADDR_SIZE == 2 + ninfo("MAC: %02x:%02x\n", + mac[0], mac[1]); +#else /* CONFIG_NET_6LOWPAN_RIMEADDR_SIZE == 8 */ + ninfo("MAC: %02x:%02x:%02x:%02x:%02x:%02x:%02x:%02x\n", + mac[0], mac[1], mac[2], mac[3], mac[4], mac[5], mac[6], mac[7]); +#endif + /* There is no multicast support in the loopback driver */ return OK; @@ -520,14 +560,13 @@ static int lo_rmmac(FAR struct net_driver_s *dev, FAR const uint8_t *mac) ****************************************************************************/ /**************************************************************************** - * Function: localhost_initialize + * Function: ieee8021514_loopback * * Description: - * Initialize the Ethernet controller and driver + * Initialize and register the Ieee802.15.4 MAC loopback network driver. * * Parameters: - * intf - In the case where there are multiple EMACs, this value - * identifies which EMAC is to be initialized. + * None * * Returned Value: * OK on success; Negated errno on failure. @@ -536,11 +575,13 @@ static int lo_rmmac(FAR struct net_driver_s *dev, FAR const uint8_t *mac) * ****************************************************************************/ -int localhost_initialize(void) +int ieee8021514_loopback(void) { FAR struct lo_driver_s *priv; FAR struct net_driver_s *dev; + ninfo("Initializing\n"); + /* Get the interface structure associated with this interface number. */ priv = &g_loopback; @@ -570,12 +611,6 @@ int localhost_initialize(void) (void)netdev_register(&priv->lo_ieee.i_dev, NET_LL_IEEE802154); - /* Set the local loopback IP address */ - - net_ipv6addr_copy(dev->d_ipv6addr, g_lo_ipv6addr); - net_ipv6addr_copy(dev->d_ipv6draddr, g_lo_ipv6addr); - net_ipv6addr_copy(dev->d_ipv6netmask, g_ipv6_alloneaddr); - /* Put the network in the UP state */ dev->d_flags = IFF_UP;