Fix compile issues with configs/sim/nettest
This commit is contained in:
parent
e21f6b0982
commit
6d7891c4de
|
@ -166,6 +166,8 @@ static int sim_txpoll(struct net_driver_s *dev)
|
|||
|
||||
void netdriver_loop(void)
|
||||
{
|
||||
struct eth_hdr_s *eth;
|
||||
|
||||
/* netdev_read will return 0 on a timeout event and >0 on a data received event */
|
||||
|
||||
g_sim_dev.d_len = netdev_read((unsigned char*)g_sim_dev.d_buf, CONFIG_NET_ETH_MTU);
|
||||
|
@ -182,8 +184,9 @@ void netdriver_loop(void)
|
|||
* MAC address
|
||||
*/
|
||||
|
||||
eth = BUF;
|
||||
if (g_sim_dev.d_len > ETH_HDRLEN &&
|
||||
up_comparemac(BUF->ether_dhost, &g_sim_dev.d_mac) == 0)
|
||||
up_comparemac(eth->dest, &g_sim_dev.d_mac) == 0)
|
||||
{
|
||||
#ifdef CONFIG_NET_PKT
|
||||
/* When packet sockets are enabled, feed the frame into the packet
|
||||
|
@ -196,7 +199,7 @@ void netdriver_loop(void)
|
|||
/* We only accept IP packets of the configured type and ARP packets */
|
||||
|
||||
#ifdef CONFIG_NET_IPv4
|
||||
if (BUF->type == HTONS(ETHTYPE_IP))
|
||||
if (eth->type == HTONS(ETHTYPE_IP))
|
||||
{
|
||||
nllvdbg("IPv4 frame\n");
|
||||
|
||||
|
@ -237,7 +240,7 @@ void netdriver_loop(void)
|
|||
else
|
||||
#endif
|
||||
#ifdef CONFIG_NET_IPv6
|
||||
if (BUF->type == HTONS(ETHTYPE_IP6))
|
||||
if (eth->type == HTONS(ETHTYPE_IP6))
|
||||
{
|
||||
nllvdbg("Iv6 frame\n");
|
||||
|
||||
|
@ -275,7 +278,7 @@ void netdriver_loop(void)
|
|||
else
|
||||
#endif
|
||||
#ifdef CONFIG_NET_ARP
|
||||
if (BUF->ether_type == htons(ETHTYPE_ARP))
|
||||
if (eth->type == htons(ETHTYPE_ARP))
|
||||
{
|
||||
arp_arpin(&g_sim_dev);
|
||||
|
||||
|
|
|
@ -17,6 +17,7 @@ CONFIG_HOST_LINUX=y
|
|||
# Build Configuration
|
||||
#
|
||||
# CONFIG_APPS_DIR="../apps"
|
||||
CONFIG_BUILD_FLAT=y
|
||||
# CONFIG_BUILD_2PASS is not set
|
||||
|
||||
#
|
||||
|
@ -41,8 +42,8 @@ CONFIG_HOST_LINUX=y
|
|||
# Debug Options
|
||||
#
|
||||
# CONFIG_DEBUG is not set
|
||||
# CONFIG_ARCH_HAVE_STACKCHECK is not set
|
||||
# CONFIG_ARCH_HAVE_HEAPCHECK is not set
|
||||
# CONFIG_ARCH_HAVE_STACKCHECK is not set
|
||||
# CONFIG_DEBUG_SYMBOLS is not set
|
||||
# CONFIG_ARCH_HAVE_CUSTOMOPT is not set
|
||||
# CONFIG_DEBUG_NOOPT is not set
|
||||
|
@ -67,8 +68,12 @@ 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_WALLTIME is not set
|
||||
# CONFIG_SIM_FRAMEBUFFER is not set
|
||||
# CONFIG_SIM_SPIFLASH is not set
|
||||
|
||||
#
|
||||
# Architecture Options
|
||||
|
@ -77,9 +82,13 @@ CONFIG_ARCH="sim"
|
|||
# CONFIG_ARCH_VECNOTIRQ is not set
|
||||
# CONFIG_ARCH_DMA is not set
|
||||
# CONFIG_ARCH_HAVE_IRQPRIO is not set
|
||||
# CONFIG_ARCH_ADDRENV 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_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_STACKDUMP is not set
|
||||
|
@ -144,6 +153,8 @@ CONFIG_DISABLE_OS_API=y
|
|||
#
|
||||
# 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
|
||||
|
@ -159,6 +170,9 @@ CONFIG_PREALLOC_TIMERS=8
|
|||
#
|
||||
# Tasks and Scheduling
|
||||
#
|
||||
# CONFIG_INIT_NONE is not set
|
||||
CONFIG_INIT_ENTRYPOINT=y
|
||||
# CONFIG_INIT_FILEPATH is not set
|
||||
CONFIG_USER_ENTRYPOINT="nettest_main"
|
||||
CONFIG_RR_INTERVAL=0
|
||||
CONFIG_TASK_NAME_SIZE=31
|
||||
|
@ -212,6 +226,13 @@ CONFIG_SIG_SIGCONDTIMEDOUT=16
|
|||
CONFIG_PREALLOC_MQ_MSGS=32
|
||||
CONFIG_MQ_MAXMSGSIZE=32
|
||||
|
||||
#
|
||||
# Work Queue Support
|
||||
#
|
||||
# CONFIG_SCHED_WORKQUEUE is not set
|
||||
# CONFIG_SCHED_HPWORK is not set
|
||||
# CONFIG_SCHED_LPWORK is not set
|
||||
|
||||
#
|
||||
# Stack and heap information
|
||||
#
|
||||
|
@ -219,6 +240,7 @@ CONFIG_IDLETHREAD_STACKSIZE=4096
|
|||
CONFIG_USERMAIN_STACKSIZE=4096
|
||||
CONFIG_PTHREAD_STACK_MIN=256
|
||||
CONFIG_PTHREAD_STACK_DEFAULT=8192
|
||||
# CONFIG_LIB_SYSCALL is not set
|
||||
|
||||
#
|
||||
# Device Drivers
|
||||
|
@ -252,6 +274,7 @@ CONFIG_DEV_NULL=y
|
|||
# CONFIG_LCD is not set
|
||||
# CONFIG_MMCSD is not set
|
||||
# CONFIG_MTD is not set
|
||||
# CONFIG_EEPROM is not set
|
||||
# CONFIG_NETDEVICES is not set
|
||||
# CONFIG_NET_SLIP is not set
|
||||
# CONFIG_PIPES is not set
|
||||
|
@ -283,6 +306,7 @@ CONFIG_SERIAL=y
|
|||
# CONFIG_ARCH_HAVE_USART6 is not set
|
||||
# CONFIG_ARCH_HAVE_USART7 is not set
|
||||
# CONFIG_ARCH_HAVE_USART8 is not set
|
||||
# CONFIG_ARCH_HAVE_OTHER_UART is not set
|
||||
|
||||
#
|
||||
# USART Configuration
|
||||
|
@ -291,6 +315,7 @@ CONFIG_SERIAL=y
|
|||
# CONFIG_STANDARD_SERIAL is not set
|
||||
# CONFIG_SERIAL_IFLOWCONTROL is not set
|
||||
# CONFIG_SERIAL_OFLOWCONTROL is not set
|
||||
# CONFIG_ARCH_HAVE_SERIAL_TERMIOS is not set
|
||||
# CONFIG_USBDEV is not set
|
||||
# CONFIG_USBHOST is not set
|
||||
# CONFIG_WIRELESS is not set
|
||||
|
@ -311,13 +336,33 @@ CONFIG_ARCH_HAVE_NET=y
|
|||
# CONFIG_ARCH_HAVE_PHY is not set
|
||||
CONFIG_NET=y
|
||||
# CONFIG_NET_NOINTS is not set
|
||||
CONFIG_NET_IPv4=y
|
||||
# CONFIG_NET_MULTIBUFFER is not set
|
||||
# CONFIG_NET_PROMISCUOUS is not set
|
||||
CONFIG_NET_ETH_MTU=562
|
||||
|
||||
#
|
||||
# Driver buffer configuration
|
||||
#
|
||||
# CONFIG_NET_MULTIBUFFER is not set
|
||||
CONFIG_NET_ETH_MTU=590
|
||||
CONFIG_NET_ETH_TCP_RECVWNDO=536
|
||||
CONFIG_NET_GUARDSIZE=2
|
||||
|
||||
#
|
||||
# Data link support
|
||||
#
|
||||
# CONFIG_NET_MULTILINK is not set
|
||||
CONFIG_NET_ETHERNET=y
|
||||
|
||||
#
|
||||
# Network Device Operations
|
||||
#
|
||||
# CONFIG_NETDEV_PHY_IOCTL is not set
|
||||
|
||||
#
|
||||
# Internet Protocol Selection
|
||||
#
|
||||
CONFIG_NET_IPv4=y
|
||||
# CONFIG_NET_IPv6 is not set
|
||||
|
||||
#
|
||||
# Socket Support
|
||||
#
|
||||
|
@ -326,16 +371,16 @@ CONFIG_NET_NACTIVESOCKETS=16
|
|||
CONFIG_NET_SOCKOPTS=y
|
||||
# CONFIG_NET_SOLINGER is not set
|
||||
|
||||
#
|
||||
# Network Device Operations
|
||||
#
|
||||
# CONFIG_NETDEV_PHY_IOCTL 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
|
||||
#
|
||||
|
@ -374,6 +419,7 @@ CONFIG_NET_ARP=y
|
|||
CONFIG_NET_ARPTAB_SIZE=16
|
||||
CONFIG_NET_ARP_MAXAGE=120
|
||||
# CONFIG_NET_ARP_IPIN is not set
|
||||
# CONFIG_NET_ARP_SEND is not set
|
||||
|
||||
#
|
||||
# Network I/O Buffer Support
|
||||
|
@ -390,7 +436,6 @@ CONFIG_NET_STATISTICS=y
|
|||
# Routing Table Configuration
|
||||
#
|
||||
# CONFIG_NET_ROUTE is not set
|
||||
CONFIG_NET_ETHERNET=y
|
||||
|
||||
#
|
||||
# Crypto API
|
||||
|
@ -405,9 +450,12 @@ CONFIG_NET_ETHERNET=y
|
|||
# File system configuration
|
||||
#
|
||||
# CONFIG_DISABLE_MOUNTPOINT is not set
|
||||
# CONFIG_FS_AUTOMOUNTER is not set
|
||||
# CONFIG_DISABLE_PSEUDOFS_OPERATIONS 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 is not set
|
||||
|
@ -423,8 +471,8 @@ CONFIG_FS_FAT=y
|
|||
#
|
||||
# System Logging
|
||||
#
|
||||
|
||||
# CONFIG_SYSLOG is not set
|
||||
# CONFIG_SYSLOG_TIMESTAMP is not set
|
||||
|
||||
#
|
||||
# Graphics Support
|
||||
|
@ -445,7 +493,7 @@ CONFIG_MM_REGIONS=1
|
|||
# CONFIG_AUDIO is not set
|
||||
|
||||
#
|
||||
# Binary Formats
|
||||
# Binary Loader
|
||||
#
|
||||
# CONFIG_BINFMT_DISABLE is not set
|
||||
# CONFIG_BINFMT_EXEPATH is not set
|
||||
|
@ -469,6 +517,7 @@ CONFIG_LIB_HOMEDIR="/"
|
|||
# CONFIG_LIBM is not set
|
||||
# CONFIG_NOPRINTF_FIELDWIDTH is not set
|
||||
# CONFIG_LIBC_FLOATINGPOINT is not set
|
||||
# CONFIG_LIBC_IOCTL_VARIADIC is not set
|
||||
CONFIG_LIB_RAND_ORDER=1
|
||||
# CONFIG_EOL_IS_CR is not set
|
||||
# CONFIG_EOL_IS_LF is not set
|
||||
|
@ -479,7 +528,10 @@ CONFIG_POSIX_SPAWN_PROXY_STACKSIZE=1024
|
|||
CONFIG_TASK_SPAWN_DEFAULT_STACKSIZE=2048
|
||||
# CONFIG_LIBC_STRERROR is not set
|
||||
# CONFIG_LIBC_PERROR_STDOUT is not set
|
||||
CONFIG_LIBC_TMPDIR="/tmp"
|
||||
CONFIG_LIBC_MAX_TMPFILE=32
|
||||
CONFIG_ARCH_LOWPUTC=y
|
||||
# CONFIG_LIBC_LOCALTIME is not set
|
||||
CONFIG_LIB_SENDFILE_BUFSIZE=512
|
||||
# CONFIG_ARCH_ROMGETC is not set
|
||||
# CONFIG_ARCH_OPTIMIZED_FUNCTIONS is not set
|
||||
|
@ -487,7 +539,6 @@ CONFIG_LIB_SENDFILE_BUFSIZE=512
|
|||
#
|
||||
# Non-standard Library Support
|
||||
#
|
||||
# CONFIG_SCHED_WORKQUEUE is not set
|
||||
# CONFIG_LIB_KBDCODEC is not set
|
||||
# CONFIG_LIB_SLCDCODEC is not set
|
||||
|
||||
|
@ -529,6 +580,11 @@ CONFIG_EXAMPLES_NETTEST=y
|
|||
# CONFIG_EXAMPLES_NETTEST_SERVER is not set
|
||||
# CONFIG_EXAMPLES_NETTEST_PERFORMANCE is not set
|
||||
# CONFIG_EXAMPLES_NETTEST_NOMAC is not set
|
||||
CONFIG_EXAMPLES_NETTEST_IPv4=y
|
||||
|
||||
#
|
||||
# IPv4 addresses
|
||||
#
|
||||
CONFIG_EXAMPLES_NETTEST_IPADDR=0xc0a80080
|
||||
CONFIG_EXAMPLES_NETTEST_DRIPADDR=0xc0a80001
|
||||
CONFIG_EXAMPLES_NETTEST_NETMASK=0xffffff00
|
||||
|
@ -562,7 +618,6 @@ CONFIG_EXAMPLES_NETTEST_CLIENTIP=0xc0a8006a
|
|||
# CONFIG_EXAMPLES_THTTPD is not set
|
||||
# CONFIG_EXAMPLES_TIFF is not set
|
||||
# CONFIG_EXAMPLES_TOUCHSCREEN is not set
|
||||
# CONFIG_EXAMPLES_UDP is not set
|
||||
# CONFIG_EXAMPLES_WEBSERVER is not set
|
||||
# CONFIG_EXAMPLES_USBSERIAL is not set
|
||||
# CONFIG_EXAMPLES_USBTERM is not set
|
||||
|
@ -573,12 +628,15 @@ CONFIG_EXAMPLES_NETTEST_CLIENTIP=0xc0a8006a
|
|||
# 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_PCODE is not set
|
||||
# CONFIG_INTERPRETERS_MICROPYTHON is not set
|
||||
|
||||
#
|
||||
# Network Utilities
|
||||
|
@ -634,6 +692,11 @@ CONFIG_NETUTILS_NETLIB=y
|
|||
#
|
||||
# CONFIG_SYSTEM_CLE is not set
|
||||
|
||||
#
|
||||
# CU Minimal Terminal
|
||||
#
|
||||
# CONFIG_SYSTEM_CUTERM is not set
|
||||
|
||||
#
|
||||
# FLASH Program Installation
|
||||
#
|
||||
|
@ -660,7 +723,6 @@ CONFIG_NETUTILS_NETLIB=y
|
|||
#
|
||||
# NxPlayer media player library / command Line
|
||||
#
|
||||
# CONFIG_SYSTEM_NXPLAYER is not set
|
||||
|
||||
#
|
||||
# RAM test
|
||||
|
@ -695,11 +757,20 @@ CONFIG_NETUTILS_NETLIB=y
|
|||
#
|
||||
# CONFIG_SYSTEM_SDCARD is not set
|
||||
|
||||
#
|
||||
# Sudoku
|
||||
#
|
||||
# CONFIG_SYSTEM_SUDOKU is not set
|
||||
|
||||
#
|
||||
# Sysinfo
|
||||
#
|
||||
# CONFIG_SYSTEM_SYSINFO is not set
|
||||
|
||||
#
|
||||
# Temperature
|
||||
#
|
||||
|
||||
#
|
||||
# VI Work-Alike Editor
|
||||
#
|
||||
|
|
|
@ -48,6 +48,7 @@
|
|||
#include <stdbool.h>
|
||||
#include <string.h>
|
||||
#include <errno.h>
|
||||
#include <assert.h>
|
||||
#include <debug.h>
|
||||
|
||||
#include <arch/irq.h>
|
||||
|
|
Loading…
Reference in New Issue