summaryrefslogtreecommitdiff
path: root/FreeRTOS/Demo/uIP_Demo_Rowley_ARM7
diff options
context:
space:
mode:
Diffstat (limited to 'FreeRTOS/Demo/uIP_Demo_Rowley_ARM7')
-rw-r--r--FreeRTOS/Demo/uIP_Demo_Rowley_ARM7/FreeRTOSConfig.h118
-rw-r--r--FreeRTOS/Demo/uIP_Demo_Rowley_ARM7/Philips_LPC210X_Startup.s213
-rw-r--r--FreeRTOS/Demo/uIP_Demo_Rowley_ARM7/ReadMe.txt5
-rw-r--r--FreeRTOS/Demo/uIP_Demo_Rowley_ARM7/flash_placement.xml29
-rw-r--r--FreeRTOS/Demo/uIP_Demo_Rowley_ARM7/lpc210x.h321
-rw-r--r--FreeRTOS/Demo/uIP_Demo_Rowley_ARM7/main.c321
-rw-r--r--FreeRTOS/Demo/uIP_Demo_Rowley_ARM7/rtosdemo.hzp56
-rw-r--r--FreeRTOS/Demo/uIP_Demo_Rowley_ARM7/rtosdemo.hzs51
-rw-r--r--FreeRTOS/Demo/uIP_Demo_Rowley_ARM7/uip/Makefile74
-rw-r--r--FreeRTOS/Demo/uIP_Demo_Rowley_ARM7/uip/cgi.c211
-rw-r--r--FreeRTOS/Demo/uIP_Demo_Rowley_ARM7/uip/cgi.h57
-rw-r--r--FreeRTOS/Demo/uIP_Demo_Rowley_ARM7/uip/crt0.asm66
-rw-r--r--FreeRTOS/Demo/uIP_Demo_Rowley_ARM7/uip/cs8900a.c546
-rw-r--r--FreeRTOS/Demo/uIP_Demo_Rowley_ARM7/uip/cs8900a.h10
-rw-r--r--FreeRTOS/Demo/uIP_Demo_Rowley_ARM7/uip/fs.c155
-rw-r--r--FreeRTOS/Demo/uIP_Demo_Rowley_ARM7/uip/fs.h80
-rw-r--r--FreeRTOS/Demo/uIP_Demo_Rowley_ARM7/uip/fs/404.html1
-rw-r--r--FreeRTOS/Demo/uIP_Demo_Rowley_ARM7/uip/fs/about.html18
-rw-r--r--FreeRTOS/Demo/uIP_Demo_Rowley_ARM7/uip/fs/cgi/files28
-rw-r--r--FreeRTOS/Demo/uIP_Demo_Rowley_ARM7/uip/fs/cgi/stats4
-rw-r--r--FreeRTOS/Demo/uIP_Demo_Rowley_ARM7/uip/fs/cgi/tcp4
-rw-r--r--FreeRTOS/Demo/uIP_Demo_Rowley_ARM7/uip/fs/control.html14
-rw-r--r--FreeRTOS/Demo/uIP_Demo_Rowley_ARM7/uip/fs/files_footer.plain3
-rw-r--r--FreeRTOS/Demo/uIP_Demo_Rowley_ARM7/uip/fs/files_header.html4
-rw-r--r--FreeRTOS/Demo/uIP_Demo_Rowley_ARM7/uip/fs/img/bg.pngbin1084 -> 0 bytes
-rw-r--r--FreeRTOS/Demo/uIP_Demo_Rowley_ARM7/uip/fs/index.html14
-rw-r--r--FreeRTOS/Demo/uIP_Demo_Rowley_ARM7/uip/fs/stats_footer.plain3
-rw-r--r--FreeRTOS/Demo/uIP_Demo_Rowley_ARM7/uip/fs/stats_header.html30
-rw-r--r--FreeRTOS/Demo/uIP_Demo_Rowley_ARM7/uip/fs/tcp_footer.plain5
-rw-r--r--FreeRTOS/Demo/uIP_Demo_Rowley_ARM7/uip/fs/tcp_header.html6
-rw-r--r--FreeRTOS/Demo/uIP_Demo_Rowley_ARM7/uip/fsdata.c619
-rw-r--r--FreeRTOS/Demo/uIP_Demo_Rowley_ARM7/uip/fsdata.h64
-rw-r--r--FreeRTOS/Demo/uIP_Demo_Rowley_ARM7/uip/httpd.c373
-rw-r--r--FreeRTOS/Demo/uIP_Demo_Rowley_ARM7/uip/httpd.h77
-rw-r--r--FreeRTOS/Demo/uIP_Demo_Rowley_ARM7/uip/main_led67
-rw-r--r--FreeRTOS/Demo/uIP_Demo_Rowley_ARM7/uip/makefsdata93
-rw-r--r--FreeRTOS/Demo/uIP_Demo_Rowley_ARM7/uip/memb.c152
-rw-r--r--FreeRTOS/Demo/uIP_Demo_Rowley_ARM7/uip/memb.h43
-rw-r--r--FreeRTOS/Demo/uIP_Demo_Rowley_ARM7/uip/slipdev.c202
-rw-r--r--FreeRTOS/Demo/uIP_Demo_Rowley_ARM7/uip/slipdev.h88
-rw-r--r--FreeRTOS/Demo/uIP_Demo_Rowley_ARM7/uip/tapdev.c171
-rw-r--r--FreeRTOS/Demo/uIP_Demo_Rowley_ARM7/uip/tapdev.h42
-rw-r--r--FreeRTOS/Demo/uIP_Demo_Rowley_ARM7/uip/telnetd-shell.c181
-rw-r--r--FreeRTOS/Demo/uIP_Demo_Rowley_ARM7/uip/telnetd.c392
-rw-r--r--FreeRTOS/Demo/uIP_Demo_Rowley_ARM7/uip/telnetd.h114
-rw-r--r--FreeRTOS/Demo/uIP_Demo_Rowley_ARM7/uip/uIP_Task.c201
-rw-r--r--FreeRTOS/Demo/uIP_Demo_Rowley_ARM7/uip/uip.c1509
-rw-r--r--FreeRTOS/Demo/uIP_Demo_Rowley_ARM7/uip/uip.h1060
-rw-r--r--FreeRTOS/Demo/uIP_Demo_Rowley_ARM7/uip/uip_arch.c146
-rw-r--r--FreeRTOS/Demo/uIP_Demo_Rowley_ARM7/uip/uip_arch.h130
-rw-r--r--FreeRTOS/Demo/uIP_Demo_Rowley_ARM7/uip/uip_arp.c427
-rw-r--r--FreeRTOS/Demo/uIP_Demo_Rowley_ARM7/uip/uip_arp.h201
-rw-r--r--FreeRTOS/Demo/uIP_Demo_Rowley_ARM7/uip/uipopt.h602
53 files changed, 5 insertions, 9396 deletions
diff --git a/FreeRTOS/Demo/uIP_Demo_Rowley_ARM7/FreeRTOSConfig.h b/FreeRTOS/Demo/uIP_Demo_Rowley_ARM7/FreeRTOSConfig.h
deleted file mode 100644
index 13c0232cc..000000000
--- a/FreeRTOS/Demo/uIP_Demo_Rowley_ARM7/FreeRTOSConfig.h
+++ /dev/null
@@ -1,118 +0,0 @@
-/*
- FreeRTOS V9.0.0rc2 - Copyright (C) 2016 Real Time Engineers Ltd.
- All rights reserved
-
- VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.
-
- This file is part of the FreeRTOS distribution.
-
- FreeRTOS is free software; you can redistribute it and/or modify it under
- the terms of the GNU General Public License (version 2) as published by the
- Free Software Foundation >>>> AND MODIFIED BY <<<< the FreeRTOS exception.
-
- ***************************************************************************
- >>! NOTE: The modification to the GPL is included to allow you to !<<
- >>! distribute a combined work that includes FreeRTOS without being !<<
- >>! obliged to provide the source code for proprietary components !<<
- >>! outside of the FreeRTOS kernel. !<<
- ***************************************************************************
-
- FreeRTOS is distributed in the hope that it will be useful, but WITHOUT ANY
- WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
- FOR A PARTICULAR PURPOSE. Full license text is available on the following
- link: http://www.freertos.org/a00114.html
-
- ***************************************************************************
- * *
- * FreeRTOS provides completely free yet professionally developed, *
- * robust, strictly quality controlled, supported, and cross *
- * platform software that is more than just the market leader, it *
- * is the industry's de facto standard. *
- * *
- * Help yourself get started quickly while simultaneously helping *
- * to support the FreeRTOS project by purchasing a FreeRTOS *
- * tutorial book, reference manual, or both: *
- * http://www.FreeRTOS.org/Documentation *
- * *
- ***************************************************************************
-
- http://www.FreeRTOS.org/FAQHelp.html - Having a problem? Start by reading
- the FAQ page "My application does not run, what could be wrong?". Have you
- defined configASSERT()?
-
- http://www.FreeRTOS.org/support - In return for receiving this top quality
- embedded software for free we request you assist our global community by
- participating in the support forum.
-
- http://www.FreeRTOS.org/training - Investing in training allows your team to
- be as productive as possible as early as possible. Now you can receive
- FreeRTOS training directly from Richard Barry, CEO of Real Time Engineers
- Ltd, and the world's leading authority on the world's leading RTOS.
-
- http://www.FreeRTOS.org/plus - A selection of FreeRTOS ecosystem products,
- including FreeRTOS+Trace - an indispensable productivity tool, a DOS
- compatible FAT file system, and our tiny thread aware UDP/IP stack.
-
- http://www.FreeRTOS.org/labs - Where new FreeRTOS products go to incubate.
- Come and try FreeRTOS+TCP, our new open source TCP/IP stack for FreeRTOS.
-
- http://www.OpenRTOS.com - Real Time Engineers ltd. license FreeRTOS to High
- Integrity Systems ltd. to sell under the OpenRTOS brand. Low cost OpenRTOS
- licenses offer ticketed support, indemnification and commercial middleware.
-
- http://www.SafeRTOS.com - High Integrity Systems also provide a safety
- engineered and independently SIL3 certified version for use in safety and
- mission critical applications that require provable dependability.
-
- 1 tab == 4 spaces!
-*/
-
-#ifndef FREERTOS_CONFIG_H
-#define FREERTOS_CONFIG_H
-
-#include <lpc210x.h>
-#define vPortYieldProcessor swi_handler
-
-
-/*-----------------------------------------------------------
- * Application specific definitions.
- *
- * These definitions should be adjusted for your particular hardware and
- * application requirements.
- *
- * THESE PARAMETERS ARE DESCRIBED WITHIN THE 'CONFIGURATION' SECTION OF THE
- * FreeRTOS API DOCUMENTATION AVAILABLE ON THE FreeRTOS.org WEB SITE.
- *
- * See http://www.freertos.org/a00110.html.
- *----------------------------------------------------------*/
-
-#define configUSE_PREEMPTION 1
-#define configUSE_IDLE_HOOK 0
-#define configUSE_TICK_HOOK 0
-#define configCPU_CLOCK_HZ ( ( unsigned long ) 58982400 ) /* =14.7456MHz xtal multiplied by 4 using the PLL. */
-#define configTICK_RATE_HZ ( ( TickType_t ) 1000 )
-#define configMAX_PRIORITIES ( 5 )
-#define configMINIMAL_STACK_SIZE ( ( unsigned short ) 128 )
-#define configTOTAL_HEAP_SIZE ( ( size_t ) ( 10 * 1024 ) )
-#define configMAX_TASK_NAME_LEN ( 16 )
-#define configUSE_TRACE_FACILITY 1
-#define configUSE_16_BIT_TICKS 0
-#define configIDLE_SHOULD_YIELD 1
-
-/* Co-routine definitions. */
-#define configUSE_CO_ROUTINES 0
-#define configMAX_CO_ROUTINE_PRIORITIES ( 2 )
-
-/* Set the following definitions to 1 to include the API function, or zero
-to exclude the API function. */
-
-#define INCLUDE_vTaskPrioritySet 1
-#define INCLUDE_uxTaskPriorityGet 1
-#define INCLUDE_vTaskDelete 1
-#define INCLUDE_vTaskCleanUpResources 0
-#define INCLUDE_vTaskSuspend 1
-#define INCLUDE_vTaskDelayUntil 1
-#define INCLUDE_vTaskDelay 1
-
-
-#endif /* FREERTOS_CONFIG_H */
diff --git a/FreeRTOS/Demo/uIP_Demo_Rowley_ARM7/Philips_LPC210X_Startup.s b/FreeRTOS/Demo/uIP_Demo_Rowley_ARM7/Philips_LPC210X_Startup.s
deleted file mode 100644
index 47debb720..000000000
--- a/FreeRTOS/Demo/uIP_Demo_Rowley_ARM7/Philips_LPC210X_Startup.s
+++ /dev/null
@@ -1,213 +0,0 @@
-/*****************************************************************************
- * Copyright (c) 2001, 2002 Rowley Associates Limited. *
- * *
- * This file may be distributed under the terms of the License Agreement *
- * provided with this software. *
- * *
- * THIS FILE IS PROVIDED AS IS WITH NO WARRANTY OF ANY KIND, INCLUDING THE *
- * WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. *
- *****************************************************************************/
-
-/*****************************************************************************
- * Preprocessor Definitions
- * ------------------------
- *
- * VECTORED_IRQ_INTERRUPTS
- *
- * Enable vectored IRQ interrupts. If defined, the PC register will be loaded
- * with the contents of the VICVectAddr register on an IRQ exception.
- *
- * USE_PLL
- *
- * If defined, connect PLL as processor clock source. If undefined, the
- * oscillator clock will be used.
- *
- * PLLCFG_VAL
- *
- * Override the default PLL configuration (multiplier = 5, divider = 2)
- * by defining PLLCFG_VAL.
- *
- * USE_MAM
- *
- * If defined then the memory accelerator module (MAM) will be enabled.
- *
- * MAMCR_VAL & MAMTIM_VAL
- *
- * Override the default MAM configuration (fully enabled, 3 fetch cycles)
- * by defining MAMCR_VAL and MAMTIM_VAL.
- *
- * VPBDIV_VAL
- *
- * If defined then this value will be used to configure the VPB divider.
- *
- * SRAM_EXCEPTIONS
- *
- * If defined, enable copying and re-mapping of interrupt vectors from User
- * FLASH to SRAM. If undefined, interrupt vectors will be mapped in User
- * FLASH.
- *
- *****************************************************************************/
-
-#ifndef PLLCFG_VAL
-#define PLLCFG_VAL 0x24
-#endif
-
-#ifndef MAMCR_VAL
-#define MAMCR_VAL 2
-#endif
-
-#ifndef MAMTIM_VAL
-#define MAMTIM_VAL 3
-#endif
-
-#define MAMCR_OFFS 0x000
-#define MAMTIM_OFFS 0x004
-
-#define PLLCON_OFFS 0x080
-#define PLLCFG_OFFS 0x084
-#define PLLSTAT_OFFS 0x088
-#define PLLFEED_OFFS 0x08C
-
-#define VPBDIV_OFFS 0x100
-
- .section .vectors, "ax"
- .code 32
- .align 0
-
-/*****************************************************************************
- * Exception Vectors *
- *****************************************************************************/
-_vectors:
- ldr pc, [pc, #reset_handler_address - . - 8] /* reset */
- ldr pc, [pc, #undef_handler_address - . - 8] /* undefined instruction */
- ldr pc, [pc, #swi_handler_address - . - 8] /* swi handler */
- ldr pc, [pc, #pabort_handler_address - . - 8] /* abort prefetch */
- ldr pc, [pc, #dabort_handler_address - . - 8] /* abort data */
-#ifdef VECTORED_IRQ_INTERRUPTS
- .word 0xB9205F84 /* boot loader checksum */
- ldr pc, [pc, #-0xFF0] /* irq handler */
-#else
- .word 0xB8A06F60 /* boot loader checksum */
- ldr pc, [pc, #irq_handler_address - . - 8] /* irq handler */
-#endif
- ldr pc, [pc, #fiq_handler_address - . - 8] /* fiq handler */
-
-reset_handler_address:
- .word reset_handler
-undef_handler_address:
- .word undef_handler
-swi_handler_address:
- .word swi_handler
-pabort_handler_address:
- .word pabort_handler
-dabort_handler_address:
- .word dabort_handler
-irq_handler_address:
- .word irq_handler
-fiq_handler_address:
- .word fiq_handler
-
- .section .init, "ax"
- .code 32
- .align 0
-
-/******************************************************************************
- * *
- * Default exception handlers *
- * *
- ******************************************************************************/
-
-reset_handler:
-#if defined(USE_PLL) || defined(USE_MAM) || defined(VPBDIV_VAL)
- ldr r0, =0xE01FC000
-#endif
-#if defined(USE_PLL)
- /* Configure PLL Multiplier/Divider */
- ldr r1, =PLLCFG_VAL
- str r1, [r0, #PLLCFG_OFFS]
- /* Enable PLL */
- mov r1, #0x1
- str r1, [r0, #PLLCON_OFFS]
- mov r1, #0xAA
- str r1, [r0, #PLLFEED_OFFS]
- mov r1, #0x55
- str r1, [r0, #PLLFEED_OFFS]
- /* Wait for PLL to lock */
-pll_lock_loop:
- ldr r1, [r0, #PLLSTAT_OFFS]
- tst r1, #0x400
- beq pll_lock_loop
- /* PLL Locked, connect PLL as clock source */
- mov r1, #0x3
- str r1, [r0, #PLLCON_OFFS]
- mov r1, #0xAA
- str r1, [r0, #PLLFEED_OFFS]
- mov r1, #0x55
- str r1, [r0, #PLLFEED_OFFS]
-#endif
-
-#if defined(USE_MAM)
- mov r1, #0
- str r1, [r0, #MAMCR_OFFS]
- ldr r1, =MAMTIM_VAL
- str r1, [r0, #MAMTIM_OFFS]
- ldr r1, =MAMCR_VAL
- str r1, [r0, #MAMCR_OFFS]
-#endif
-
-#if defined(VPBDIV_VAL)
- ldr r1, =VPBDIV_VAL
- str r1, [r0, #VPBDIV_OFFS]
-#endif
-
-#if defined(SRAM_EXCEPTIONS)
- /* Copy exception vectors into SRAM */
- mov r8, #0x40000000
- ldr r9, =_vectors
- ldmia r9!, {r0-r7}
- stmia r8!, {r0-r7}
- ldmia r9!, {r0-r6}
- stmia r8!, {r0-r6}
-
- /* Re-map interrupt vectors from SRAM */
- ldr r0, MEMMAP
- mov r1, #2 /* User RAM Mode. Interrupt vectors are re-mapped from SRAM */
- str r1, [r0]
-#endif /* SRAM_EXCEPTIONS */
-
- b _start
-
-#ifdef SRAM_EXCEPTIONS
-MEMMAP:
- .word 0xE01FC040
-#endif
-
-/******************************************************************************
- * *
- * Default exception handlers *
- * These are declared weak symbols so they can be redefined in user code. *
- * *
- ******************************************************************************/
-
-undef_handler:
- b undef_handler
-
-swi_handler:
- b swi_handler
-
-pabort_handler:
- b pabort_handler
-
-dabort_handler:
- b dabort_handler
-
-irq_handler:
- b irq_handler
-
-fiq_handler:
- b fiq_handler
-
- .weak undef_handler, swi_handler, pabort_handler, dabort_handler, irq_handler, fiq_handler
-
-
-
diff --git a/FreeRTOS/Demo/uIP_Demo_Rowley_ARM7/ReadMe.txt b/FreeRTOS/Demo/uIP_Demo_Rowley_ARM7/ReadMe.txt
new file mode 100644
index 000000000..add564283
--- /dev/null
+++ b/FreeRTOS/Demo/uIP_Demo_Rowley_ARM7/ReadMe.txt
@@ -0,0 +1,5 @@
+If you need the demo that used to be in this directory then download FreeRTOS V8.2.3
+from http://sourceforge.net/projects/freertos/files/FreeRTOS/
+
+FreeRTOS now uses its own TCP/IP stack: http://www.FreeRTOS.org/TCP
+
diff --git a/FreeRTOS/Demo/uIP_Demo_Rowley_ARM7/flash_placement.xml b/FreeRTOS/Demo/uIP_Demo_Rowley_ARM7/flash_placement.xml
deleted file mode 100644
index 449adf2e4..000000000
--- a/FreeRTOS/Demo/uIP_Demo_Rowley_ARM7/flash_placement.xml
+++ /dev/null
@@ -1,29 +0,0 @@
-<!DOCTYPE Linker_Placement_File>
-<Root name="Flash Section Placement" >
- <MemorySegment name="External SRAM;SRAM;SDRAM;DRAM" >
- <ProgramSection alignment="4" load="No" name=".data_run" />
- <ProgramSection alignment="4" load="No" inputsections="*(.bss .bss.* .gnu.linkonce.b.*) *(COMMON)" name=".bss" />
- <ProgramSection alignment="4" size="0x0" load="No" name=".heap" />
- <ProgramSection alignment="4" size="0x0" load="No" name=".stack" />
- <ProgramSection alignment="4" size="0x200" load="No" name=".stack_irq" />
- <ProgramSection alignment="4" size="0x0" load="No" name=".stack_fiq" />
- <ProgramSection alignment="4" size="0x200" load="No" name=".stack_svc" />
- <ProgramSection alignment="4" size="0x0" load="No" name=".stack_abt" />
- <ProgramSection alignment="4" size="0x0" load="No" name=".stack_und" />
- </MemorySegment>
- <MemorySegment name="Internal SRAM;SRAM;SDRAM;DRAM" >
- <ProgramSection size="0x3C" load="No" name=".vectors_ram" />
- <ProgramSection alignment="4" load="No" name=".fast_run" />
- </MemorySegment>
- <MemorySegment name="FLASH" >
- <ProgramSection load="Yes" inputsections="*(.vectors .vectors.*)" name=".vectors" />
- <ProgramSection alignment="4" load="Yes" inputsections="*(.init .init.*)" name=".init" />
- <ProgramSection alignment="4" load="No" name=".text_load" />
- <ProgramSection alignment="4" load="Yes" inputsections="*(.text .text.* .glue_7t .glue_7 .gnu.linkonce.t.*)" name=".text" />
- <ProgramSection alignment="4" load="Yes" inputsections="KEEP (*(SORT(.dtors.*))) KEEP (*(.dtors))" name=".dtors" />
- <ProgramSection alignment="4" load="Yes" inputsections="KEEP (*(SORT(.ctors.*))) KEEP (*(.ctors))" name=".ctors" />
- <ProgramSection alignment="4" load="Yes" inputsections="*(.rodata .rodata.* .gnu.linkonce.r.*)" name=".rodata" />
- <ProgramSection alignment="4" load="Yes" runin=".fast_run" inputsections="*(.fast .fast.*)" name=".fast" />
- <ProgramSection alignment="4" load="Yes" runin=".data_run" inputsections="*(.data .data.* .gnu.linkonce.d.*)" name=".data" />
- </MemorySegment>
-</Root>
diff --git a/FreeRTOS/Demo/uIP_Demo_Rowley_ARM7/lpc210x.h b/FreeRTOS/Demo/uIP_Demo_Rowley_ARM7/lpc210x.h
deleted file mode 100644
index 3f1e3042d..000000000
--- a/FreeRTOS/Demo/uIP_Demo_Rowley_ARM7/lpc210x.h
+++ /dev/null
@@ -1,321 +0,0 @@
-#ifndef lpc210x_h
-#define lpc210x_h
-/*******************************************************************************
-lpc210x.h - Register defs for Philips LPC210X: LPC2104, LPC2105 and LPC2106
-
-
-THE SOFTWARE IS DELIVERED "AS IS" WITHOUT WARRANTY OR CONDITION OF ANY KIND,
-EITHER EXPRESS, IMPLIED OR STATUTORY. THIS INCLUDES WITHOUT LIMITATION ANY
-WARRANTY OR CONDITION WITH RESPECT TO MERCHANTABILITY OR FITNESS FOR ANY
-PARTICULAR PURPOSE, OR AGAINST THE INFRINGEMENTS OF INTELLECTUAL PROPERTY RIGHTS
-OF OTHERS.
-
-This file may be freely used for commercial and non-commercial applications,
-including being redistributed with any tools.
-
-If you find a problem with the file, please report it so that it can be fixed.
-
-Created by Sten Larsson (sten_larsson at yahoo com)
-
-Edited by Richard Barry.
-*******************************************************************************/
-
-#define REG8 (volatile unsigned char*)
-#define REG16 (volatile unsigned short*)
-#define REG32 (volatile unsigned int*)
-
-
-/*##############################################################################
-## MISC
-##############################################################################*/
-
- /* Constants for data to put in IRQ/FIQ Exception Vectors */
-#define VECTDATA_IRQ 0xE51FFFF0 /* LDR PC,[PC,#-0xFF0] */
-#define VECTDATA_FIQ /* __TODO */
-
-
-/*##############################################################################
-## VECTORED INTERRUPT CONTROLLER
-##############################################################################*/
-
-#define VICIRQStatus (*(REG32 (0xFFFFF000)))
-#define VICFIQStatus (*(REG32 (0xFFFFF004)))
-#define VICRawIntr (*(REG32 (0xFFFFF008)))
-#define VICIntSelect (*(REG32 (0xFFFFF00C)))
-#define VICIntEnable (*(REG32 (0xFFFFF010)))
-#define VICIntEnClear (*(REG32 (0xFFFFF014)))
-#define VICSoftInt (*(REG32 (0xFFFFF018)))
-#define VICSoftIntClear (*(REG32 (0xFFFFF01C)))
-#define VICProtection (*(REG32 (0xFFFFF020)))
-#define VICVectAddr (*(REG32 (0xFFFFF030)))
-#define VICDefVectAddr (*(REG32 (0xFFFFF034)))
-
-#define VICVectAddr0 (*(REG32 (0xFFFFF100)))
-#define VICVectAddr1 (*(REG32 (0xFFFFF104)))
-#define VICVectAddr2 (*(REG32 (0xFFFFF108)))
-#define VICVectAddr3 (*(REG32 (0xFFFFF10C)))
-#define VICVectAddr4 (*(REG32 (0xFFFFF110)))
-#define VICVectAddr5 (*(REG32 (0xFFFFF114)))
-#define VICVectAddr6 (*(REG32 (0xFFFFF118)))
-#define VICVectAddr7 (*(REG32 (0xFFFFF11C)))
-#define VICVectAddr8 (*(REG32 (0xFFFFF120)))
-#define VICVectAddr9 (*(REG32 (0xFFFFF124)))
-#define VICVectAddr10 (*(REG32 (0xFFFFF128)))
-#define VICVectAddr11 (*(REG32 (0xFFFFF12C)))
-#define VICVectAddr12 (*(REG32 (0xFFFFF130)))
-#define VICVectAddr13 (*(REG32 (0xFFFFF134)))
-#define VICVectAddr14 (*(REG32 (0xFFFFF138)))
-#define VICVectAddr15 (*(REG32 (0xFFFFF13C)))
-
-#define VICVectCntl0 (*(REG32 (0xFFFFF200)))
-#define VICVectCntl1 (*(REG32 (0xFFFFF204)))
-#define VICVectCntl2 (*(REG32 (0xFFFFF208)))
-#define VICVectCntl3 (*(REG32 (0xFFFFF20C)))
-#define VICVectCntl4 (*(REG32 (0xFFFFF210)))
-#define VICVectCntl5 (*(REG32 (0xFFFFF214)))
-#define VICVectCntl6 (*(REG32 (0xFFFFF218)))
-#define VICVectCntl7 (*(REG32 (0xFFFFF21C)))
-#define VICVectCntl8 (*(REG32 (0xFFFFF220)))
-#define VICVectCntl9 (*(REG32 (0xFFFFF224)))
-#define VICVectCntl10 (*(REG32 (0xFFFFF228)))
-#define VICVectCntl11 (*(REG32 (0xFFFFF22C)))
-#define VICVectCntl12 (*(REG32 (0xFFFFF230)))
-#define VICVectCntl13 (*(REG32 (0xFFFFF234)))
-#define VICVectCntl14 (*(REG32 (0xFFFFF238)))
-#define VICVectCntl15 (*(REG32 (0xFFFFF23C)))
-
-#define VICITCR (*(REG32 (0xFFFFF300)))
-#define VICITIP1 (*(REG32 (0xFFFFF304)))
-#define VICITIP2 (*(REG32 (0xFFFFF308)))
-#define VICITOP1 (*(REG32 (0xFFFFF30C)))
-#define VICITOP2 (*(REG32 (0xFFFFF310)))
-#define VICPeriphID0 (*(REG32 (0xFFFFFFE0)))
-#define VICPeriphID1 (*(REG32 (0xFFFFFFE4)))
-#define VICPeriphID2 (*(REG32 (0xFFFFFFE8)))
-#define VICPeriphID3 (*(REG32 (0xFFFFFFEC)))
-
-#define VICIntEnClr VICIntEnClear
-#define VICSoftIntClr VICSoftIntClear
-
-
-/*##############################################################################
-## PCB - Pin Connect Block
-##############################################################################*/
-
-#define PCB_PINSEL0 (*(REG32 (0xE002C000)))
-#define PCB_PINSEL1 (*(REG32 (0xE002C004)))
-
-
-/*##############################################################################
-## GPIO - General Purpose I/O
-##############################################################################*/
-
-#define GPIO_IOPIN (*(REG32 (0xE0028000))) /* ALTERNATE NAME GPIO = GPIO0 */
-#define GPIO_IOSET (*(REG32 (0xE0028004)))
-#define GPIO_IODIR (*(REG32 (0xE0028008)))
-#define GPIO_IOCLR (*(REG32 (0xE002800C)))
-
-#define GPIO0_IOPIN (*(REG32 (0xE0028000))) /* ALTERNATE NAME GPIO = GPIO0 */
-#define GPIO0_IOSET (*(REG32 (0xE0028004)))
-#define GPIO0_IODIR (*(REG32 (0xE0028008)))
-#define GPIO0_IOCLR (*(REG32 (0xE002800C)))
-
-
-/*##############################################################################
-## UART0 / UART1
-##############################################################################*/
-
-/* ---- UART 0 --------------------------------------------- */
-#define UART0_RBR (*(REG32 (0xE000C000)))
-#define UART0_THR (*(REG32 (0xE000C000)))
-#define UART0_IER (*(REG32 (0xE000C004)))
-#define UART0_IIR (*(REG32 (0xE000C008)))
-#define UART0_FCR (*(REG32 (0xE000C008)))
-#define UART0_LCR (*(REG32 (0xE000C00C)))
-#define UART0_LSR (*(REG32 (0xE000C014)))
-#define UART0_SCR (*(REG32 (0xE000C01C)))
-#define UART0_DLL (*(REG32 (0xE000C000)))
-#define UART0_DLM (*(REG32 (0xE000C004)))
-
-/* ---- UART 1 --------------------------------------------- */
-#define UART1_RBR (*(REG32 (0xE0010000)))
-#define UART1_THR (*(REG32 (0xE0010000)))
-#define UART1_IER (*(REG32 (0xE0010004)))
-#define UART1_IIR (*(REG32 (0xE0010008)))
-#define UART1_FCR (*(REG32 (0xE0010008)))
-#define UART1_LCR (*(REG32 (0xE001000C)))
-#define UART1_LSR (*(REG32 (0xE0010014)))
-#define UART1_SCR (*(REG32 (0xE001001C)))
-#define UART1_DLL (*(REG32 (0xE0010000)))
-#define UART1_DLM (*(REG32 (0xE0010004)))
-#define UART1_MCR (*(REG32 (0xE0010010)))
-#define UART1_MSR (*(REG32 (0xE0010018)))
-
-
-/*##############################################################################
-## I2C
-##############################################################################*/
-
-#define I2C_I2CONSET (*(REG32 (0xE001C000)))
-#define I2C_I2STAT (*(REG32 (0xE001C004)))
-#define I2C_I2DAT (*(REG32 (0xE001C008)))
-#define I2C_I2ADR (*(REG32 (0xE001C00C)))
-#define I2C_I2SCLH (*(REG32 (0xE001C010)))
-#define I2C_I2SCLL (*(REG32 (0xE001C014)))
-#define I2C_I2CONCLR (*(REG32 (0xE001C018)))
-
-
-/*##############################################################################
-## SPI - Serial Peripheral Interface
-##############################################################################*/
-
-#define SPI_SPCR (*(REG32 (0xE0020000)))
-#define SPI_SPSR (*(REG32 (0xE0020004)))
-#define SPI_SPDR (*(REG32 (0xE0020008)))
-#define SPI_SPCCR (*(REG32 (0xE002000C)))
-#define SPI_SPTCR (*(REG32 (0xE0020010)))
-#define SPI_SPTSR (*(REG32 (0xE0020014)))
-#define SPI_SPTOR (*(REG32 (0xE0020018)))
-#define SPI_SPINT (*(REG32 (0xE002001C)))
-
-
-/*##############################################################################
-## Timer 0 and Timer 1
-##############################################################################*/
-
-/* ---- Timer 0 -------------------------------------------- */
-#define T0_IR (*(REG32 (0xE0004000)))
-#define T0_TCR (*(REG32 (0xE0004004)))
-#define T0_TC (*(REG32 (0xE0004008)))
-#define T0_PR (*(REG32 (0xE000400C)))
-#define T0_PC (*(REG32 (0xE0004010)))
-#define T0_MCR (*(REG32 (0xE0004014)))
-#define T0_MR0 (*(REG32 (0xE0004018)))
-#define T0_MR1 (*(REG32 (0xE000401C)))
-#define T0_MR2 (*(REG32 (0xE0004020)))
-#define T0_MR3 (*(REG32 (0xE0004024)))
-#define T0_CCR (*(REG32 (0xE0004028)))
-#define T0_CR0 (*(REG32 (0xE000402C)))
-#define T0_CR1 (*(REG32 (0xE0004030)))
-#define T0_CR2 (*(REG32 (0xE0004034)))
-#define T0_CR3 (*(REG32 (0xE0004038)))
-#define T0_EMR (*(REG32 (0xE000403C)))
-
-/* ---- Timer 1 -------------------------------------------- */
-#define T1_IR (*(REG32 (0xE0008000)))
-#define T1_TCR (*(REG32 (0xE0008004)))
-#define T1_TC (*(REG32 (0xE0008008)))
-#define T1_PR (*(REG32 (0xE000800C)))
-#define T1_PC (*(REG32 (0xE0008010)))
-#define T1_MCR (*(REG32 (0xE0008014)))
-#define T1_MR0 (*(REG32 (0xE0008018)))
-#define T1_MR1 (*(REG32 (0xE000801C)))
-#define T1_MR2 (*(REG32 (0xE0008020)))
-#define T1_MR3 (*(REG32 (0xE0008024)))
-#define T1_CCR (*(REG32 (0xE0008028)))
-#define T1_CR0 (*(REG32 (0xE000802C)))
-#define T1_CR1 (*(REG32 (0xE0008030)))
-#define T1_CR2 (*(REG32 (0xE0008034)))
-#define T1_CR3 (*(REG32 (0xE0008038)))
-#define T1_EMR (*(REG32 (0xE000803C)))
-
-
-/*##############################################################################
-## PWM
-##############################################################################*/
-
-#define PWM_IR (*(REG32 (0xE0014000)))
-#define PWM_TCR (*(REG32 (0xE0014004)))
-#define PWM_TC (*(REG32 (0xE0014008)))
-#define PWM_PR (*(REG32 (0xE001400C)))
-#define PWM_PC (*(REG32 (0xE0014010)))
-#define PWM_MCR (*(REG32 (0xE0014014)))
-#define PWM_MR0 (*(REG32 (0xE0014018)))
-#define PWM_MR1 (*(REG32 (0xE001401C)))
-#define PWM_MR2 (*(REG32 (0xE0014020)))
-#define PWM_MR3 (*(REG32 (0xE0014024)))
-#define PWM_MR4 (*(REG32 (0xE0014040)))
-#define PWM_MR5 (*(REG32 (0xE0014044)))
-#define PWM_MR6 (*(REG32 (0xE0014048)))
-#define PWM_EMR (*(REG32 (0xE001403C)))
-#define PWM_PCR (*(REG32 (0xE001404C)))
-#define PWM_LER (*(REG32 (0xE0014050)))
-#define PWM_CCR (*(REG32 (0xE0014028)))
-#define PWM_CR0 (*(REG32 (0xE001402C)))
-#define PWM_CR1 (*(REG32 (0xE0014030)))
-#define PWM_CR2 (*(REG32 (0xE0014034)))
-#define PWM_CR3 (*(REG32 (0xE0014038)))
-
-/*##############################################################################
-## RTC
-##############################################################################*/
-
-/* ---- RTC: Miscellaneous Register Group ------------------ */
-#define RTC_ILR (*(REG32 (0xE0024000)))
-#define RTC_CTC (*(REG32 (0xE0024004)))
-#define RTC_CCR (*(REG32 (0xE0024008)))
-#define RTC_CIIR (*(REG32 (0xE002400C)))
-#define RTC_AMR (*(REG32 (0xE0024010)))
-#define RTC_CTIME0 (*(REG32 (0xE0024014)))
-#define RTC_CTIME1 (*(REG32 (0xE0024018)))
-#define RTC_CTIME2 (*(REG32 (0xE002401C)))
-
-/* ---- RTC: Timer Control Group --------------------------- */
-#define RTC_SEC (*(REG32 (0xE0024020)))
-#define RTC_MIN (*(REG32 (0xE0024024)))
-#define RTC_HOUR (*(REG32 (0xE0024028)))
-#define RTC_DOM (*(REG32 (0xE002402C)))
-#define RTC_DOW (*(REG32 (0xE0024030)))
-#define RTC_DOY (*(REG32 (0xE0024034)))
-#define RTC_MONTH (*(REG32 (0xE0024038)))
-#define RTC_YEAR (*(REG32 (0xE002403C)))
-
-/* ---- RTC: Alarm Control Group --------------------------- */
-#define RTC_ALSEC (*(REG32 (0xE0024060)))
-#define RTC_ALMIN (*(REG32 (0xE0024064)))
-#define RTC_ALHOUR (*(REG32 (0xE0024068)))
-#define RTC_ALDOM (*(REG32 (0xE002406C)))
-#define RTC_ALDOW (*(REG32 (0xE0024070)))
-#define RTC_ALDOY (*(REG32 (0xE0024074)))
-#define RTC_ALMON (*(REG32 (0xE0024078)))
-#define RTC_ALYEAR (*(REG32 (0xE002407C)))
-
-/* ---- RTC: Reference Clock Divider Group ----------------- */
-#define RTC_PREINT (*(REG32 (0xE0024080)))
-#define RTC_PREFRAC (*(REG32 (0xE0024084)))
-
-
-/*##############################################################################
-## WD - Watchdog
-##############################################################################*/
-
-#define WD_WDMOD (*(REG32 (0xE0000000)))
-#define WD_WDTC (*(REG32 (0xE0000004)))
-#define WD_WDFEED (*(REG32 (0xE0000008)))
-#define WD_WDTV (*(REG32 (0xE000000C)))
-
-
-/*##############################################################################
-## System Control Block
-##############################################################################*/
-
-#define SCB_EXTINT (*(REG32 (0xE01FC140)))
-#define SCB_EXTWAKE (*(REG32 (0xE01FC144)))
-#define SCB_MEMMAP (*(REG32 (0xE01FC040)))
-#define SCB_PLLCON (*(REG32 (0xE01FC080)))
-#define SCB_PLLCFG (*(REG32 (0xE01FC084)))
-#define SCB_PLLSTAT (*(REG32 (0xE01FC088)))
-#define SCB_PLLFEED (*(REG32 (0xE01FC08C)))
-#define SCB_PCON (*(REG32 (0xE01FC0C0)))
-#define SCB_PCONP (*(REG32 (0xE01FC0C4)))
-#define SCB_VPBDIV (*(REG32 (0xE01FC100)))
-
-/*##############################################################################
-## Memory Accelerator Module (MAM)
-##############################################################################*/
-
-#define MAM_TIM (*(REG32 (0xE01FC004)))
-#define MAM_CR (*(REG32 (0xE01FC000)))
-
-#endif /* lpc210x_h */
-
diff --git a/FreeRTOS/Demo/uIP_Demo_Rowley_ARM7/main.c b/FreeRTOS/Demo/uIP_Demo_Rowley_ARM7/main.c
deleted file mode 100644
index 62e3a7785..000000000
--- a/FreeRTOS/Demo/uIP_Demo_Rowley_ARM7/main.c
+++ /dev/null
@@ -1,321 +0,0 @@
-/*
- FreeRTOS V9.0.0rc2 - Copyright (C) 2016 Real Time Engineers Ltd.
- All rights reserved
-
- VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.
-
- This file is part of the FreeRTOS distribution.
-
- FreeRTOS is free software; you can redistribute it and/or modify it under
- the terms of the GNU General Public License (version 2) as published by the
- Free Software Foundation >>>> AND MODIFIED BY <<<< the FreeRTOS exception.
-
- ***************************************************************************
- >>! NOTE: The modification to the GPL is included to allow you to !<<
- >>! distribute a combined work that includes FreeRTOS without being !<<
- >>! obliged to provide the source code for proprietary components !<<
- >>! outside of the FreeRTOS kernel. !<<
- ***************************************************************************
-
- FreeRTOS is distributed in the hope that it will be useful, but WITHOUT ANY
- WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
- FOR A PARTICULAR PURPOSE. Full license text is available on the following
- link: http://www.freertos.org/a00114.html
-
- ***************************************************************************
- * *
- * FreeRTOS provides completely free yet professionally developed, *
- * robust, strictly quality controlled, supported, and cross *
- * platform software that is more than just the market leader, it *
- * is the industry's de facto standard. *
- * *
- * Help yourself get started quickly while simultaneously helping *
- * to support the FreeRTOS project by purchasing a FreeRTOS *
- * tutorial book, reference manual, or both: *
- * http://www.FreeRTOS.org/Documentation *
- * *
- ***************************************************************************
-
- http://www.FreeRTOS.org/FAQHelp.html - Having a problem? Start by reading
- the FAQ page "My application does not run, what could be wrong?". Have you
- defined configASSERT()?
-
- http://www.FreeRTOS.org/support - In return for receiving this top quality
- embedded software for free we request you assist our global community by
- participating in the support forum.
-
- http://www.FreeRTOS.org/training - Investing in training allows your team to
- be as productive as possible as early as possible. Now you can receive
- FreeRTOS training directly from Richard Barry, CEO of Real Time Engineers
- Ltd, and the world's leading authority on the world's leading RTOS.
-
- http://www.FreeRTOS.org/plus - A selection of FreeRTOS ecosystem products,
- including FreeRTOS+Trace - an indispensable productivity tool, a DOS
- compatible FAT file system, and our tiny thread aware UDP/IP stack.
-
- http://www.FreeRTOS.org/labs - Where new FreeRTOS products go to incubate.
- Come and try FreeRTOS+TCP, our new open source TCP/IP stack for FreeRTOS.
-
- http://www.OpenRTOS.com - Real Time Engineers ltd. license FreeRTOS to High
- Integrity Systems ltd. to sell under the OpenRTOS brand. Low cost OpenRTOS
- licenses offer ticketed support, indemnification and commercial middleware.
-
- http://www.SafeRTOS.com - High Integrity Systems also provide a safety
- engineered and independently SIL3 certified version for use in safety and
- mission critical applications that require provable dependability.
-
- 1 tab == 4 spaces!
-*/
-
-/*
- NOTE : Tasks run in system mode and the scheduler runs in Supervisor mode.
- The processor MUST be in supervisor mode when vTaskStartScheduler is
- called. The demo applications included in the FreeRTOS.org download switch
- to supervisor mode prior to main being called. If you are not using one of
- these demo application projects then ensure Supervisor mode is used.
-*/
-
-
-/*
- * Creates all the application tasks, then starts the scheduler.
- *
- * A task is created called "uIP". This executes the uIP stack and small
- * WEB server sample. All the other tasks are from the set of standard
- * demo tasks. The WEB documentation provides more details of the standard
- * demo application tasks.
- *
- * Main.c also creates a task called "Check". This only executes every three
- * seconds but has the highest priority so is guaranteed to get processor time.
- * Its main function is to check that all the other tasks are still operational.
- * Each standard demo task maintains a unique count that is incremented each
- * time the task successfully completes its function. Should any error occur
- * within such a task the count is permanently halted. The check task inspects
- * the count of each task to ensure it has changed since the last time the
- * check task executed. If all the count variables have changed all the tasks
- * are still executing error free, and the check task toggles the yellow LED.
- * Should any task contain an error at any time the LED toggle rate will change
- * from 3 seconds to 500ms.
- *
- */
-
-
-/* Standard includes. */
-#include <stdlib.h>
-#include <string.h>
-
-/* Scheduler includes. */
-#include "FreeRTOS.h"
-#include "task.h"
-
-/* Demo application includes. */
-#include "PollQ.h"
-#include "dynamic.h"
-#include "semtest.h"
-
-/*-----------------------------------------------------------*/
-
-/* Constants to setup the PLL. */
-#define mainPLL_MUL_4 ( ( unsigned char ) 0x0003 )
-#define mainPLL_DIV_1 ( ( unsigned char ) 0x0000 )
-#define mainPLL_ENABLE ( ( unsigned char ) 0x0001 )
-#define mainPLL_CONNECT ( ( unsigned char ) 0x0003 )
-#define mainPLL_FEED_BYTE1 ( ( unsigned char ) 0xaa )
-#define mainPLL_FEED_BYTE2 ( ( unsigned char ) 0x55 )
-#define mainPLL_LOCK ( ( unsigned long ) 0x0400 )
-
-/* Constants to setup the MAM. */
-#define mainMAM_TIM_3 ( ( unsigned char ) 0x03 )
-#define mainMAM_MODE_FULL ( ( unsigned char ) 0x02 )
-
-/* Constants to setup the peripheral bus. */
-#define mainBUS_CLK_FULL ( ( unsigned char ) 0x01 )
-
-/* Priorities/stacks for the demo application tasks. */
-#define mainQUEUE_POLL_PRIORITY ( tskIDLE_PRIORITY + 2 )
-#define mainCHECK_TASK_PRIORITY ( tskIDLE_PRIORITY + 4 )
-#define mainSEM_TEST_PRIORITY ( tskIDLE_PRIORITY + 1 )
-#define mainUIP_PRIORITY ( tskIDLE_PRIORITY + 3 )
-#define mainUIP_TASK_STACK_SIZE ( 150 )
-
-/* The rate at which the on board LED will toggle when there is/is not an
-error. */
-#define mainNO_ERROR_FLASH_PERIOD ( ( TickType_t ) 3000 / portTICK_PERIOD_MS )
-#define mainERROR_FLASH_PERIOD ( ( TickType_t ) 500 / portTICK_PERIOD_MS )
-#define mainON_BOARD_LED_BIT ( ( unsigned long ) 0x80 )
-#define mainYELLOW_LED ( 1 << 11 )
-
-/*-----------------------------------------------------------*/
-
-/*
- * This is the uIP task which is defined within the uip.c file. This has not
- * been placed into a header file in order to minimise the changes to the uip
- * code.
- */
-extern void ( vuIP_TASK ) ( void *pvParameters );
-
-/*
- * The Yellow LED is under the control of the Check task. All the other LED's
- * are under the control of the uIP task.
- */
-void prvToggleOnBoardLED( void );
-
-/*
- * Checks that all the demo application tasks are still executing without error
- * - as described at the top of the file.
- */
-static long prvCheckOtherTasksAreStillRunning( void );
-
-/*
- * The task that executes at the highest priority and calls
- * prvCheckOtherTasksAreStillRunning(). See the description at the top
- * of the file.
- */
-static void vErrorChecks( void *pvParameters );
-
-/*
- * Configure the processor for use with the Olimex demo board. This includes
- * setup for the I/O, system clock, and access timings.
- */
-static void prvSetupHardware( void );
-
-/*-----------------------------------------------------------*/
-
-/*
- * Starts all the other tasks, then starts the scheduler.
- */
-int main( void )
-{
- /* Configure the processor. */
- prvSetupHardware();
-
- /* Start the task that handles the TCP/IP functionality. */
- xTaskCreate( vuIP_TASK, "uIP", mainUIP_TASK_STACK_SIZE, NULL, mainUIP_PRIORITY, NULL );
-
- /* Start the demo/test application tasks. These are created in addition
- to the TCP/IP task for demonstration and test purposes. */
- vStartPolledQueueTasks( mainQUEUE_POLL_PRIORITY );
- vStartDynamicPriorityTasks();
- vStartSemaphoreTasks( mainSEM_TEST_PRIORITY );
-
- /* Start the check task - which is defined in this file. */
- xTaskCreate( vErrorChecks, "Check", configMINIMAL_STACK_SIZE, NULL, mainCHECK_TASK_PRIORITY, NULL );
-
- /* Now all the tasks have been started - start the scheduler.
-
- NOTE : Tasks run in system mode and the scheduler runs in Supervisor mode.
- The processor MUST be in supervisor mode when vTaskStartScheduler is
- called. The demo applications included in the FreeRTOS.org download switch
- to supervisor mode prior to main being called. If you are not using one of
- these demo application projects then ensure Supervisor mode is used here. */
- vTaskStartScheduler();
-
- /* Should never reach here! */
- return 0;
-}
-/*-----------------------------------------------------------*/
-
-static void vErrorChecks( void *pvParameters )
-{
-TickType_t xDelayPeriod = mainNO_ERROR_FLASH_PERIOD;
-
- /* Cycle for ever, delaying then checking all the other tasks are still
- operating without error. If an error is detected then the delay period
- is decreased from mainNO_ERROR_FLASH_PERIOD to mainERROR_FLASH_PERIOD so
- the on board LED flash rate will increase. */
- for( ;; )
- {
- /* Delay until it is time to execute again. */
- vTaskDelay( xDelayPeriod );
-
- /* Check all the standard demo application tasks are executing without
- error. */
- if( prvCheckOtherTasksAreStillRunning() != pdPASS )
- {
- /* An error has been detected in one of the tasks - flash faster. */
- xDelayPeriod = mainERROR_FLASH_PERIOD;
- }
-
- prvToggleOnBoardLED();
- }
-}
-/*-----------------------------------------------------------*/
-
-static void prvSetupHardware( void )
-{
- #ifdef RUN_FROM_RAM
- /* Remap the interrupt vectors to RAM if we are are running from RAM. */
- SCB_MEMMAP = 2;
- #endif
-
- /* Setup the PLL to multiply the XTAL input by 4. */
- SCB_PLLCFG = ( mainPLL_MUL_4 | mainPLL_DIV_1 );
-
- /* Activate the PLL by turning it on then feeding the correct sequence of
- bytes. */
- SCB_PLLCON = mainPLL_ENABLE;
- SCB_PLLFEED = mainPLL_FEED_BYTE1;
- SCB_PLLFEED = mainPLL_FEED_BYTE2;
-
- /* Wait for the PLL to lock... */
- while( !( SCB_PLLSTAT & mainPLL_LOCK ) );
-
- /* ...before connecting it using the feed sequence again. */
- SCB_PLLCON = mainPLL_CONNECT;
- SCB_PLLFEED = mainPLL_FEED_BYTE1;
- SCB_PLLFEED = mainPLL_FEED_BYTE2;
-
- /* Setup and turn on the MAM. Three cycle access is used due to the fast
- PLL used. It is possible faster overall performance could be obtained by
- tuning the MAM and PLL settings. */
- MAM_TIM = mainMAM_TIM_3;
- MAM_CR = mainMAM_MODE_FULL;
-
- /* Setup the peripheral bus to be the same as the PLL output. */
- SCB_VPBDIV = mainBUS_CLK_FULL;
-}
-/*-----------------------------------------------------------*/
-
-void prvToggleOnBoardLED( void )
-{
-unsigned long ulState;
-
- ulState = GPIO0_IOPIN;
- if( ulState & mainYELLOW_LED )
- {
- GPIO_IOCLR = mainYELLOW_LED;
- }
- else
- {
- GPIO_IOSET = mainYELLOW_LED;
- }
-}
-/*-----------------------------------------------------------*/
-
-static long prvCheckOtherTasksAreStillRunning( void )
-{
-long lReturn = ( long ) pdPASS;
-
- /* Check all the demo tasks (other than the flash tasks) to ensure
- that they are all still running, and that none of them have detected
- an error. */
-
- if( xArePollingQueuesStillRunning() != pdTRUE )
- {
- lReturn = ( long ) pdFAIL;
- }
-
- if( xAreDynamicPriorityTasksStillRunning() != pdTRUE )
- {
- lReturn = ( long ) pdFAIL;
- }
-
- if( xAreSemaphoreTasksStillRunning() != pdTRUE )
- {
- lReturn = ( long ) pdFAIL;
- }
-
- return lReturn;
-}
-
-
-
diff --git a/FreeRTOS/Demo/uIP_Demo_Rowley_ARM7/rtosdemo.hzp b/FreeRTOS/Demo/uIP_Demo_Rowley_ARM7/rtosdemo.hzp
deleted file mode 100644
index e5d235ed2..000000000
--- a/FreeRTOS/Demo/uIP_Demo_Rowley_ARM7/rtosdemo.hzp
+++ /dev/null
@@ -1,56 +0,0 @@
-<!DOCTYPE CrossStudio_Project_File>
-<solution version="1" Name="rtosdemo" >
- <project Name="rtosdemo" >
- <configuration arm_target_loader_parameter="14745600" Target="LPC2124" property_groups_file_path="$(StudioDir)/targets/Philips_LPC210X/propertyGroups.xml" oscillator_frequency="14.7456MHz" linker_memory_map_file="$(StudioDir)/targets/Philips_LPC210X/Philips_LPC2124_MemoryMap.xml" gcc_entry_point="_start" c_preprocessor_definitions="THUMB_INTERWORK;SUPERVISOR_START;VECTORED_IRQ_INTERRUPTS;GCC_ARM7" c_user_include_directories="../../Source/include;../../Demo/uIP_Demo_Rowley_ARM7;../../Demo/Common/Include;uip;." project_directory="" link_include_startup_code="No" project_type="Executable" c_additional_options="" Name="Common" />
- <configuration target_reset_script="SRAMReset()" Name="RAM" />
- <configuration arm_target_flash_loader_file_path="$(StudioDir)/targets/Philips_LPC210X/Release/Loader.exe" target_reset_script="FLASHReset()" Name="Flash" />
- <folder Name="uIP Source" >
- <configuration filter="c;cpp;cxx;cc;h;s;asm;inc" Name="Common" />
- <file file_name="uip/cgi.c" Name="cgi.c" />
- <file file_name="uip/cs8900a.c" Name="cs8900a.c" />
- <file file_name="uip/fs.c" Name="fs.c" />
- <file file_name="uip/httpd.c" Name="httpd.c" />
- <file file_name="uip/uip.c" Name="uip.c" />
- <file file_name="uip/uip_arch.c" Name="uip_arch.c" />
- <file file_name="uip/uip_arp.c" Name="uip_arp.c" />
- <file file_name="uip/uIP_Task.c" Name="uIP_Task.c" >
- <configuration c_preprocessor_definitions="GCC_ARM7" Name="Common" />
- </file>
- </folder>
- <folder Name="System Files" >
- <configuration filter="" Name="Common" />
- <file file_name="$(StudioDir)/source/crt0.s" Name="crt0.s" />
- <file file_name="$(StudioDir)/targets/Philips_LPC210X/Philips_LPC210X_Target.js" Name="Philips_LPC210X_Target.js" >
- <configuration Name="Common" file_type="Reset Script" />
- </file>
- <file file_name="flash_placement.xml" Name="flash_placement.xml" />
- <file file_name="Philips_LPC210X_Startup.s" Name="Philips_LPC210X_Startup.s" />
- </folder>
- <folder Name="FreeRTOS Source" >
- <configuration filter="" Name="Common" />
- <file file_name="../../Source/tasks.c" Name="tasks.c" />
- <file file_name="../../Source/queue.c" Name="queue.c" />
- <file file_name="../../Source/list.c" Name="list.c" />
- <file file_name="../../Source/portable/MemMang/heap_2.c" Name="heap_2.c" />
- <file file_name="../../Source/portable/GCC/ARM7_LPC2000/port.c" Name="port.c" />
- <file file_name="../../Source/portable/GCC/ARM7_LPC2000/portISR.c" Name="portISR.c" >
- <configuration arm_instruction_set="ARM" Name="THUMB Flash Debug" />
- </file>
- </folder>
- <folder Name="Demo App Source" >
- <configuration filter="" Name="Common" />
- <file file_name="../Common/Minimal/dynamic.c" Name="dynamic.c" />
- <file file_name="../Common/Minimal/semtest.c" Name="semtest.c" />
- <file file_name="main.c" Name="main.c" />
- <file file_name="../Common/Minimal/PollQ.c" Name="PollQ.c" />
- </folder>
- <configuration c_preprocessor_definitions="" c_user_include_directories="" Name="Debug" />
- <configuration arm_target_loader_parameter="14745600" oscillator_frequency="14.7456MHz" Name="THUMB Flash Debug" linker_output_format="hex" />
- </project>
- <configuration inherited_configurations="THUMB;Flash;Debug" Name="THUMB Flash Debug" />
- <configuration arm_library_instruction_set="THUMB" c_preprocessor_definitions="__THUMB" arm_instruction_set="THUMB" hidden="Yes" Name="THUMB" />
- <configuration c_preprocessor_definitions="__FLASH_BUILD" hidden="Yes" Name="Flash" />
- <configuration c_preprocessor_definitions="DEBUG" link_include_startup_code="No" gcc_optimization_level="None" build_debug_information="Yes" Name="Debug" />
- <configuration c_preprocessor_definitions="NDEBUG" link_include_startup_code="No" gcc_optimization_level="Level 1" build_debug_information="No" Name="Release" />
- <configuration c_preprocessor_definitions="" c_additional_options="-fomit-frame-pointer" Name="Common" />
-</solution>
diff --git a/FreeRTOS/Demo/uIP_Demo_Rowley_ARM7/rtosdemo.hzs b/FreeRTOS/Demo/uIP_Demo_Rowley_ARM7/rtosdemo.hzs
deleted file mode 100644
index 768dbc3fd..000000000
--- a/FreeRTOS/Demo/uIP_Demo_Rowley_ARM7/rtosdemo.hzs
+++ /dev/null
@@ -1,51 +0,0 @@
-<!DOCTYPE CrossStudio_for_ARM_Session_File>
-<session>
- <Bookmarks/>
- <Breakpoints/>
- <ExecutionCountWindow/>
- <Memory1>
- <MemoryWindow autoEvaluate="0" addressText="" numColumns="8" sizeText="128" dataSize="1" radix="16" addressSpace="" />
- </Memory1>
- <Memory2>
- <MemoryWindow autoEvaluate="0" addressText="0xE01FC040" numColumns="8" sizeText="4" dataSize="4" radix="16" addressSpace="" />
- </Memory2>
- <Memory3>
- <MemoryWindow autoEvaluate="0" addressText="0xE01FC080" numColumns="8" sizeText="12" dataSize="4" radix="16" addressSpace="" />
- </Memory3>
- <Memory4>
- <MemoryWindow autoEvaluate="0" addressText="" numColumns="8" sizeText="" dataSize="1" radix="16" addressSpace="" />
- </Memory4>
- <Project>
- <ProjectSessionItem path="rtosdemo" name="unnamed" />
- </Project>
- <Register1>
- <RegisterWindow openNodes="" binaryNodes="" unsignedNodes="" visibleGroups="CPU - Current Mode" decimalNodes="" octalNodes="" asciiNodes="" />
- </Register1>
- <Register2>
- <RegisterWindow openNodes="" binaryNodes="" unsignedNodes="" visibleGroups="" decimalNodes="" octalNodes="" asciiNodes="" />
- </Register2>
- <Register3>
- <RegisterWindow openNodes="" binaryNodes="" unsignedNodes="" visibleGroups="" decimalNodes="" octalNodes="" asciiNodes="" />
- </Register3>
- <Register4>
- <RegisterWindow openNodes="" binaryNodes="" unsignedNodes="" visibleGroups="" decimalNodes="" octalNodes="" asciiNodes="" />
- </Register4>
- <TargetWindow programAction="" uploadFileType="" programLoadAddress="" programSize="" uploadFileName="" uploadMemoryInterface="" programFileName="" uploadStartAddress="" programFileType="" uploadSize="" programMemoryInterface="" />
- <TraceWindow>
- <Trace enabled="Yes" />
- </TraceWindow>
- <Watch1>
- <Watches active="1" update="Never" />
- </Watch1>
- <Watch2>
- <Watches active="0" update="Never" />
- </Watch2>
- <Watch3>
- <Watches active="0" update="Never" />
- </Watch3>
- <Watch4>
- <Watches active="0" update="Never" />
- </Watch4>
- <Files/>
- <ARMCrossStudioWindow activeProject="rtosdemo" autoConnectTarget="/USB CrossConnect for ARM" debugSearchFileMap="" fileDialogInitialDirectory="C:\E\Dev\_FreeRTOS\Demo\uIP_Demo_Rowley_ARM7" fileDialogDefaultFilter="*" autoConnectCapabilities="0" debugSearchPath="" buildConfiguration="THUMB Flash Debug" />
-</session>
diff --git a/FreeRTOS/Demo/uIP_Demo_Rowley_ARM7/uip/Makefile b/FreeRTOS/Demo/uIP_Demo_Rowley_ARM7/uip/Makefile
deleted file mode 100644
index 61d3a06aa..000000000
--- a/FreeRTOS/Demo/uIP_Demo_Rowley_ARM7/uip/Makefile
+++ /dev/null
@@ -1,74 +0,0 @@
-# Copyright (c) 2001, Adam Dunkels.
-# All rights reserved.
-#
-# 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. All advertising materials mentioning features or use of this software
-# must display the following acknowledgement:
-# This product includes software developed by Adam Dunkels.
-# 4. The name of the author may not be used to endorse or promote
-# products derived from this software without specific prior
-# written permission.
-#
-# THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``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 AUTHOR 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.
-#
-# This file is part of the uIP TCP/IP stack.
-#
-# $Id: Makefile,v 1.8.2.2 2003/10/04 22:54:17 adam Exp $
-#
-
-CC=gcc
-CFLAGS=-Wall -g -I../uip -I. -I../apps/httpd -I../apps/resolv -I../apps/webclient -I../apps/smtp -I../apps/telnet -fpack-struct
-
-%.o:
- $(CC) $(CFLAGS) -c $(<:.o=.c)
-
-
-uip: uip.o uip_arch.o tapdev.o httpd.o main.o fs.o uip_arp.o cgi.o
-
-tapdev.o: tapdev.c uipopt.h
-main.o: main.c ../uip/uip.h uipopt.h ../apps/httpd/httpd.h \
- tapdev.h
-uip_arch.o: uip_arch.c ../uip/uip_arch.h ../uip/uip.h uipopt.h \
- ../apps/httpd/httpd.h
-uip.o: ../uip/uip.c ../uip/uip.h uipopt.h ../apps/httpd/httpd.h
-
-uip_arp.o: ../uip/uip_arp.c ../uip/uip_arp.h ../uip/uip.h uipopt.h \
- ../apps/httpd/httpd.h
- $(CC) -o uip_arp.o $(CFLAGS) -fpack-struct -c ../uip/uip_arp.c
-
-
-cgi.o: ../apps/httpd/cgi.c ../uip/uip.h uipopt.h ../apps/smtp/smtp.h \
- ../apps/httpd/cgi.h ../apps/httpd/httpd.h ../apps/httpd/fs.h
-fs.o: ../apps/httpd/fs.c ../uip/uip.h uipopt.h ../apps/smtp/smtp.h \
- ../apps/httpd/httpd.h ../apps/httpd/fs.h ../apps/httpd/fsdata.h \
- ../apps/httpd/fsdata.c
-fsdata.o: ../apps/httpd/fsdata.c
-httpd.o: ../apps/httpd/httpd.c ../uip/uip.h uipopt.h \
- ../apps/smtp/smtp.h ../apps/httpd/httpd.h ../apps/httpd/fs.h \
- ../apps/httpd/fsdata.h ../apps/httpd/cgi.h
-
-clean:
- rm -f *.o *~ *core uip
-
-
-
-
-
-
diff --git a/FreeRTOS/Demo/uIP_Demo_Rowley_ARM7/uip/cgi.c b/FreeRTOS/Demo/uIP_Demo_Rowley_ARM7/uip/cgi.c
deleted file mode 100644
index 06574a156..000000000
--- a/FreeRTOS/Demo/uIP_Demo_Rowley_ARM7/uip/cgi.c
+++ /dev/null
@@ -1,211 +0,0 @@
-/**
- * \addtogroup httpd
- * @{
- */
-
-/**
- * \file
- * HTTP server script language C functions file.
- * \author Adam Dunkels <adam@dunkels.com>
- *
- * This file contains functions that are called by the web server
- * scripts. The functions takes one argument, and the return value is
- * interpreted as follows. A zero means that the function did not
- * complete and should be invoked for the next packet as well. A
- * non-zero value indicates that the function has completed and that
- * the web server should move along to the next script line.
- *
- */
-
-/*
- * Copyright (c) 2001, Adam Dunkels.
- * All rights reserved.
- *
- * 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. The name of the author may not be used to endorse or promote
- * products derived from this software without specific prior
- * written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``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 AUTHOR 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.
- *
- * This file is part of the uIP TCP/IP stack.
- *
- * $Id: cgi.c,v 1.23.2.4 2003/10/07 13:22:27 adam Exp $
- *
- */
-
-#include "uip.h"
-#include "cgi.h"
-#include "httpd.h"
-#include "fs.h"
-
-#include <stdio.h>
-#include <string.h>
-
-static u8_t print_stats(u8_t next);
-static u8_t file_stats(u8_t next);
-static u8_t tcp_stats(u8_t next);
-
-cgifunction cgitab[] = {
- print_stats, /* CGI function "a" */
- file_stats, /* CGI function "b" */
- tcp_stats /* CGI function "c" */
-};
-
-static const char closed[] = /* "CLOSED",*/
-{0x43, 0x4c, 0x4f, 0x53, 0x45, 0x44, 0};
-static const char syn_rcvd[] = /* "SYN-RCVD",*/
-{0x53, 0x59, 0x4e, 0x2d, 0x52, 0x43, 0x56,
- 0x44, 0};
-static const char syn_sent[] = /* "SYN-SENT",*/
-{0x53, 0x59, 0x4e, 0x2d, 0x53, 0x45, 0x4e,
- 0x54, 0};
-static const char established[] = /* "ESTABLISHED",*/
-{0x45, 0x53, 0x54, 0x41, 0x42, 0x4c, 0x49, 0x53, 0x48,
- 0x45, 0x44, 0};
-static const char fin_wait_1[] = /* "FIN-WAIT-1",*/
-{0x46, 0x49, 0x4e, 0x2d, 0x57, 0x41, 0x49,
- 0x54, 0x2d, 0x31, 0};
-static const char fin_wait_2[] = /* "FIN-WAIT-2",*/
-{0x46, 0x49, 0x4e, 0x2d, 0x57, 0x41, 0x49,
- 0x54, 0x2d, 0x32, 0};
-static const char closing[] = /* "CLOSING",*/
-{0x43, 0x4c, 0x4f, 0x53, 0x49,
- 0x4e, 0x47, 0};
-static const char time_wait[] = /* "TIME-WAIT,"*/
-{0x54, 0x49, 0x4d, 0x45, 0x2d, 0x57, 0x41,
- 0x49, 0x54, 0};
-static const char last_ack[] = /* "LAST-ACK"*/
-{0x4c, 0x41, 0x53, 0x54, 0x2d, 0x41, 0x43,
- 0x4b, 0};
-
-static const char *states[] = {
- closed,
- syn_rcvd,
- syn_sent,
- established,
- fin_wait_1,
- fin_wait_2,
- closing,
- time_wait,
- last_ack};
-
-
-/*-----------------------------------------------------------------------------------*/
-/* print_stats:
- *
- * Prints out a part of the uIP statistics. The statistics data is
- * written into the uip_appdata buffer. It overwrites any incoming
- * packet.
- */
-static u8_t
-print_stats(u8_t next)
-{
-#if UIP_STATISTICS
- u16_t i, j;
- u8_t *buf;
- u16_t *databytes;
-
- if(next) {
- /* If our last data has been acknowledged, we move on the next
- chunk of statistics. */
- hs->count = hs->count + 4;
- if(hs->count >= sizeof(struct uip_stats)/sizeof(u16_t)) {
- /* We have printed out all statistics, so we return 1 to
- indicate that we are done. */
- return 1;
- }
- }
-
- /* Write part of the statistics into the uip_appdata buffer. */
- databytes = (u16_t *)&uip_stat + hs->count;
- buf = (u8_t *)uip_appdata;
-
- j = 4 + 1;
- i = hs->count;
- while (i < sizeof(struct uip_stats)/sizeof(u16_t) && --j > 0) {
- sprintf((char *)buf, "%5u\r\n", *databytes);
- ++databytes;
- buf += 6;
- ++i;
- }
-
- /* Send the data. */
- uip_send(uip_appdata, buf - uip_appdata);
-
- return 0;
-#else
- return 1;
-#endif /* UIP_STATISTICS */
-}
-/*-----------------------------------------------------------------------------------*/
-static u8_t
-file_stats(u8_t next)
-{
- /* We use sprintf() to print the number of file accesses to a
- particular file (given as an argument to the function in the
- script). We then use uip_send() to actually send the data. */
- if(next) {
- return 1;
- }
- uip_send(uip_appdata, sprintf((char *)uip_appdata, "%5u", fs_count(&hs->script[4])));
- return 0;
-}
-/*-----------------------------------------------------------------------------------*/
-static u8_t
-tcp_stats(u8_t next)
-{
- struct uip_conn *conn;
-
- if(next) {
- /* If the previously sent data has been acknowledged, we move
- forward one connection. */
- if(++hs->count == UIP_CONNS) {
- /* If all connections has been printed out, we are done and
- return 1. */
- return 1;
- }
- }
-
- conn = &uip_conns[hs->count];
- if((conn->tcpstateflags & TS_MASK) == CLOSED) {
- uip_send(uip_appdata, sprintf((char *)uip_appdata,
- "<tr align=\"center\"><td>-</td><td>-</td><td>%u</td><td>%u</td><td>%c %c</td></tr>\r\n",
- conn->nrtx,
- conn->timer,
- (uip_outstanding(conn))? '*':' ',
- (uip_stopped(conn))? '!':' '));
- } else {
- uip_send(uip_appdata, sprintf((char *)uip_appdata,
- "<tr align=\"center\"><td>%u.%u.%u.%u:%u</td><td>%s</td><td>%u</td><td>%u</td><td>%c %c</td></tr>\r\n",
- htons(conn->ripaddr[0]) >> 8,
- htons(conn->ripaddr[0]) & 0xff,
- htons(conn->ripaddr[1]) >> 8,
- htons(conn->ripaddr[1]) & 0xff,
- htons(conn->rport),
- states[conn->tcpstateflags & TS_MASK],
- conn->nrtx,
- conn->timer,
- (uip_outstanding(conn))? '*':' ',
- (uip_stopped(conn))? '!':' '));
- }
- return 0;
-}
-/*-----------------------------------------------------------------------------------*/
diff --git a/FreeRTOS/Demo/uIP_Demo_Rowley_ARM7/uip/cgi.h b/FreeRTOS/Demo/uIP_Demo_Rowley_ARM7/uip/cgi.h
deleted file mode 100644
index d85389b52..000000000
--- a/FreeRTOS/Demo/uIP_Demo_Rowley_ARM7/uip/cgi.h
+++ /dev/null
@@ -1,57 +0,0 @@
-/**
- * \addtogroup httpd
- * @{
- */
-
-/**
- * \file
- * HTTP script language header file.
- * \author Adam Dunkels <adam@dunkels.com>
- */
-
-/*
- * Copyright (c) 2001, Adam Dunkels.
- * All rights reserved.
- *
- * 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. The name of the author may not be used to endorse or promote
- * products derived from this software without specific prior
- * written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``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 AUTHOR 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.
- *
- * This file is part of the uIP TCP/IP stack.
- *
- * $Id: cgi.h,v 1.3.2.4 2003/10/07 13:22:27 adam Exp $
- *
- */
-
-#ifndef __CGI_H__
-#define __CGI_H__
-
-typedef u8_t (* cgifunction)(u8_t next);
-
-/**
- * A table containing pointers to C functions that can be called from
- * a web server script.
- */
-extern cgifunction cgitab[];
-
-#endif /* __CGI_H__ */
diff --git a/FreeRTOS/Demo/uIP_Demo_Rowley_ARM7/uip/crt0.asm b/FreeRTOS/Demo/uIP_Demo_Rowley_ARM7/uip/crt0.asm
deleted file mode 100644
index ef91f42a8..000000000
--- a/FreeRTOS/Demo/uIP_Demo_Rowley_ARM7/uip/crt0.asm
+++ /dev/null
@@ -1,66 +0,0 @@
-// Rowley C Compiler, runtime support.
-//
-// Copyright (c) 2001, 2002, 2003 Rowley Associates Limited.
-//
-// This file may be distributed under the terms of the License Agreement
-// provided with this software.
-//
-// THIS FILE IS PROVIDED AS IS WITH NO WARRANTY OF ANY KIND, INCLUDING THE
-// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
-
-; Create sections
- .data
- .bss
-
-; Go to code section.
- .code
-
-; Executed upon reset
-__reset proc
-
-; Turn off watchdog. You can enable it in main() if required.
- mov.w #0x5a80, &0x120
-
-; Set up stack.
- mov.w #RAM_Start_Address+RAM_Size, sp
-
-; Copy from initialised data section to data section.
- mov.w #SFB(IDATA0), r15
- mov.w #data_init_begin, r14
- mov.w #data_init_end-data_init_begin, r13
- call #_memcpy
-
-; Zero the bss. Ensure the stack is not allocated in the bss!
- mov.w #SFB(UDATA0), r15
- mov.w #0, r14
- mov.w #SFE(UDATA0)-SFB(UDATA0), r13
- call #_memset
-
-; Call user entry point void main(void).
- call #_main
-
-; If main() returns, kick off again.
- jmp __reset
- endproc
-
-; Heap data structures; removed by the linker if the heap isn't used.
- .break
- .data
- align WORD
-___heap_start__::
- DW 0
- DW heap_size
- DS heap_size-4
-
-; Reset vector
- .vectors
- .keep
- org 0x1e
- dw __reset
-
-; Initialise the IDATA0 section by duplicating the contents into the
-; CONST section and copying them on startup.
- .const
-data_init_begin:
- .init "IDATA0"
-data_init_end:
diff --git a/FreeRTOS/Demo/uIP_Demo_Rowley_ARM7/uip/cs8900a.c b/FreeRTOS/Demo/uIP_Demo_Rowley_ARM7/uip/cs8900a.c
deleted file mode 100644
index 6d06fd673..000000000
--- a/FreeRTOS/Demo/uIP_Demo_Rowley_ARM7/uip/cs8900a.c
+++ /dev/null
@@ -1,546 +0,0 @@
-// cs8900a.c: device driver for the CS8900a chip in 8-bit mode.
-
-#include <LPC210x.h>
-
-#include "cs8900a.h"
-#include "uip.h"
-#include "uip_arp.h"
-
-#define IOR (1<<12) // CS8900's ISA-bus interface pins
-#define IOW (1<<13)
-
-// definitions for Crystal CS8900 ethernet-controller
-// based on linux-header by Russel Nelson
-
-#define PP_ChipID 0x0000 // offset 0h -> Corp-ID
-
- // offset 2h -> Model/Product Number
-#define LED_RED (1<<8)
-#define LED_GREEN (1<<10)
-#define LED_YELLOW (1<<11)
-
-#define PP_ISAIOB 0x0020 // IO base address
-#define PP_CS8900_ISAINT 0x0022 // ISA interrupt select
-#define PP_CS8900_ISADMA 0x0024 // ISA Rec DMA channel
-#define PP_ISASOF 0x0026 // ISA DMA offset
-#define PP_DmaFrameCnt 0x0028 // ISA DMA Frame count
-#define PP_DmaByteCnt 0x002A // ISA DMA Byte count
-#define PP_CS8900_ISAMemB 0x002C // Memory base
-#define PP_ISABootBase 0x0030 // Boot Prom base
-#define PP_ISABootMask 0x0034 // Boot Prom Mask
-
-// EEPROM data and command registers
-#define PP_EECMD 0x0040 // NVR Interface Command register
-#define PP_EEData 0x0042 // NVR Interface Data Register
-
-// Configuration and control registers
-#define PP_RxCFG 0x0102 // Rx Bus config
-#define PP_RxCTL 0x0104 // Receive Control Register
-#define PP_TxCFG 0x0106 // Transmit Config Register
-#define PP_TxCMD 0x0108 // Transmit Command Register
-#define PP_BufCFG 0x010A // Bus configuration Register
-#define PP_LineCTL 0x0112 // Line Config Register
-#define PP_SelfCTL 0x0114 // Self Command Register
-#define PP_BusCTL 0x0116 // ISA bus control Register
-#define PP_TestCTL 0x0118 // Test Register
-
-// Status and Event Registers
-#define PP_ISQ 0x0120 // Interrupt Status
-#define PP_RxEvent 0x0124 // Rx Event Register
-#define PP_TxEvent 0x0128 // Tx Event Register
-#define PP_BufEvent 0x012C // Bus Event Register
-#define PP_RxMiss 0x0130 // Receive Miss Count
-#define PP_TxCol 0x0132 // Transmit Collision Count
-#define PP_LineST 0x0134 // Line State Register
-#define PP_SelfST 0x0136 // Self State register
-#define PP_BusST 0x0138 // Bus Status
-#define PP_TDR 0x013C // Time Domain Reflectometry
-
-// Initiate Transmit Registers
-#define PP_TxCommand 0x0144 // Tx Command
-#define PP_TxLength 0x0146 // Tx Length
-
-// Adress Filter Registers
-#define PP_LAF 0x0150 // Hash Table
-#define PP_IA 0x0158 // Physical Address Register
-
-// Frame Location
-#define PP_RxStatus 0x0400 // Receive start of frame
-#define PP_RxLength 0x0402 // Receive Length of frame
-#define PP_RxFrame 0x0404 // Receive frame pointer
-#define PP_TxFrame 0x0A00 // Transmit frame pointer
-
-// Primary I/O Base Address. If no I/O base is supplied by the user, then this
-// can be used as the default I/O base to access the PacketPage Area.
-#define DEFAULTIOBASE 0x0300
-
-// PP_RxCFG - Receive Configuration and Interrupt Mask bit definition - Read/write
-#define SKIP_1 0x0040
-#define RX_STREAM_ENBL 0x0080
-#define RX_OK_ENBL 0x0100
-#define RX_DMA_ONLY 0x0200
-#define AUTO_RX_DMA 0x0400
-#define BUFFER_CRC 0x0800
-#define RX_CRC_ERROR_ENBL 0x1000
-#define RX_RUNT_ENBL 0x2000
-#define RX_EXTRA_DATA_ENBL 0x4000
-
-// PP_RxCTL - Receive Control bit definition - Read/write
-#define RX_IA_HASH_ACCEPT 0x0040
-#define RX_PROM_ACCEPT 0x0080
-#define RX_OK_ACCEPT 0x0100
-#define RX_MULTCAST_ACCEPT 0x0200
-#define RX_IA_ACCEPT 0x0400
-#define RX_BROADCAST_ACCEPT 0x0800
-#define RX_BAD_CRC_ACCEPT 0x1000
-#define RX_RUNT_ACCEPT 0x2000
-#define RX_EXTRA_DATA_ACCEPT 0x4000
-
-// PP_TxCFG - Transmit Configuration Interrupt Mask bit definition - Read/write
-#define TX_LOST_CRS_ENBL 0x0040
-#define TX_SQE_ERROR_ENBL 0x0080
-#define TX_OK_ENBL 0x0100
-#define TX_LATE_COL_ENBL 0x0200
-#define TX_JBR_ENBL 0x0400
-#define TX_ANY_COL_ENBL 0x0800
-#define TX_16_COL_ENBL 0x8000
-
-// PP_TxCMD - Transmit Command bit definition - Read-only and
-// PP_TxCommand - Write-only
-#define TX_START_5_BYTES 0x0000
-#define TX_START_381_BYTES 0x0040
-#define TX_START_1021_BYTES 0x0080
-#define TX_START_ALL_BYTES 0x00C0
-#define TX_FORCE 0x0100
-#define TX_ONE_COL 0x0200
-#define TX_NO_CRC 0x1000
-#define TX_RUNT 0x2000
-
-// PP_BufCFG - Buffer Configuration Interrupt Mask bit definition - Read/write
-#define GENERATE_SW_INTERRUPT 0x0040
-#define RX_DMA_ENBL 0x0080
-#define READY_FOR_TX_ENBL 0x0100
-#define TX_UNDERRUN_ENBL 0x0200
-#define RX_MISS_ENBL 0x0400
-#define RX_128_BYTE_ENBL 0x0800
-#define TX_COL_COUNT_OVRFLOW_ENBL 0x1000
-#define RX_MISS_COUNT_OVRFLOW_ENBL 0x2000
-#define RX_DEST_MATCH_ENBL 0x8000
-
-// PP_LineCTL - Line Control bit definition - Read/write
-#define SERIAL_RX_ON 0x0040
-#define SERIAL_TX_ON 0x0080
-#define AUI_ONLY 0x0100
-#define AUTO_AUI_10BASET 0x0200
-#define MODIFIED_BACKOFF 0x0800
-#define NO_AUTO_POLARITY 0x1000
-#define TWO_PART_DEFDIS 0x2000
-#define LOW_RX_SQUELCH 0x4000
-
-// PP_SelfCTL - Software Self Control bit definition - Read/write
-#define POWER_ON_RESET 0x0040
-#define SW_STOP 0x0100
-#define SLEEP_ON 0x0200
-#define AUTO_WAKEUP 0x0400
-#define HCB0_ENBL 0x1000
-#define HCB1_ENBL 0x2000
-#define HCB0 0x4000
-#define HCB1 0x8000
-
-// PP_BusCTL - ISA Bus Control bit definition - Read/write
-#define RESET_RX_DMA 0x0040
-#define MEMORY_ON 0x0400
-#define DMA_BURST_MODE 0x0800
-#define IO_CHANNEL_READY_ON 0x1000
-#define RX_DMA_SIZE_64K 0x2000
-#define ENABLE_IRQ 0x8000
-
-// PP_TestCTL - Test Control bit definition - Read/write
-#define LINK_OFF 0x0080
-#define ENDEC_LOOPBACK 0x0200
-#define AUI_LOOPBACK 0x0400
-#define BACKOFF_OFF 0x0800
-#define FDX_8900 0x4000
-
-// PP_RxEvent - Receive Event Bit definition - Read-only
-#define RX_IA_HASHED 0x0040
-#define RX_DRIBBLE 0x0080
-#define RX_OK 0x0100
-#define RX_HASHED 0x0200
-#define RX_IA 0x0400
-#define RX_BROADCAST 0x0800
-#define RX_CRC_ERROR 0x1000
-#define RX_RUNT 0x2000
-#define RX_EXTRA_DATA 0x4000
-#define HASH_INDEX_MASK 0xFC00 // Hash-Table Index Mask (6 Bit)
-
-// PP_TxEvent - Transmit Event Bit definition - Read-only
-#define TX_LOST_CRS 0x0040
-#define TX_SQE_ERROR 0x0080
-#define TX_OK 0x0100
-#define TX_LATE_COL 0x0200
-#define TX_JBR 0x0400
-#define TX_16_COL 0x8000
-#define TX_COL_COUNT_MASK 0x7800
-
-// PP_BufEvent - Buffer Event Bit definition - Read-only
-#define SW_INTERRUPT 0x0040
-#define RX_DMA 0x0080
-#define READY_FOR_TX 0x0100
-#define TX_UNDERRUN 0x0200
-#define RX_MISS 0x0400
-#define RX_128_BYTE 0x0800
-#define TX_COL_OVRFLW 0x1000
-#define RX_MISS_OVRFLW 0x2000
-#define RX_DEST_MATCH 0x8000
-
-// PP_LineST - Ethernet Line Status bit definition - Read-only
-#define LINK_OK 0x0080
-#define AUI_ON 0x0100
-#define TENBASET_ON 0x0200
-#define POLARITY_OK 0x1000
-#define CRS_OK 0x4000
-
-// PP_SelfST - Chip Software Status bit definition
-#define ACTIVE_33V 0x0040
-#define INIT_DONE 0x0080
-#define SI_BUSY 0x0100
-#define EEPROM_PRESENT 0x0200
-#define EEPROM_OK 0x0400
-#define EL_PRESENT 0x0800
-#define EE_SIZE_64 0x1000
-
-// PP_BusST - ISA Bus Status bit definition
-#define TX_BID_ERROR 0x0080
-#define READY_FOR_TX_NOW 0x0100
-
-// The following block defines the ISQ event types
-#define ISQ_RX_EVENT 0x0004
-#define ISQ_TX_EVENT 0x0008
-#define ISQ_BUFFER_EVENT 0x000C
-#define ISQ_RX_MISS_EVENT 0x0010
-#define ISQ_TX_COL_EVENT 0x0012
-
-#define ISQ_EVENT_MASK 0x003F // ISQ mask to find out type of event
-
-// Ports for I/O-Mode
-#define RX_FRAME_PORT 0x0000
-#define TX_FRAME_PORT 0x0000
-#define TX_CMD_PORT 0x0004
-#define TX_LEN_PORT 0x0006
-#define ISQ_PORT 0x0008
-#define ADD_PORT 0x000A
-#define DATA_PORT 0x000C
-
-#define AUTOINCREMENT 0x8000 // Bit mask to set Bit-15 for autoincrement
-
-// EEProm Commands
-#define EEPROM_WRITE_EN 0x00F0
-#define EEPROM_WRITE_DIS 0x0000
-#define EEPROM_WRITE_CMD 0x0100
-#define EEPROM_READ_CMD 0x0200
-
-// Receive Header of each packet in receive area of memory for DMA-Mode
-#define RBUF_EVENT_LOW 0x0000 // Low byte of RxEvent
-#define RBUF_EVENT_HIGH 0x0001 // High byte of RxEvent
-#define RBUF_LEN_LOW 0x0002 // Length of received data - low byte
-#define RBUF_LEN_HI 0x0003 // Length of received data - high byte
-#define RBUF_HEAD_LEN 0x0004 // Length of this header
-
-// typedefs
-typedef struct { // struct to store CS8900's
- unsigned int Addr; // init-sequence
- unsigned int Data;
-} TInitSeq;
-
-unsigned short ticks;
-
-static void skip_frame(void);
-
-const TInitSeq InitSeq[] =
-{
- PP_IA, UIP_ETHADDR0 + (UIP_ETHADDR1 << 8), // set our MAC as Individual Address
- PP_IA + 2, UIP_ETHADDR2 + (UIP_ETHADDR3 << 8),
- PP_IA + 4, UIP_ETHADDR4 + (UIP_ETHADDR5 << 8),
- PP_LineCTL, SERIAL_RX_ON | SERIAL_TX_ON, // configure the Physical Interface
- PP_RxCTL, RX_OK_ACCEPT | RX_IA_ACCEPT | RX_BROADCAST_ACCEPT
-};
-
-// Writes a word in little-endian byte order to a specified port-address
-void
-cs8900a_write(unsigned addr, unsigned int data)
-{
- GPIO_IODIR |= 0xff << 16; // Data port to output
-
- GPIO_IOCLR = 0xf << 4; // Put address on bus
- GPIO_IOSET = addr << 4;
-
- GPIO_IOCLR = 0xff << 16; // Write low order byte to data bus
- GPIO_IOSET = data << 16;
-
- __asm volatile ( "NOP" );
- GPIO_IOCLR = IOW; // Toggle IOW-signal
- __asm volatile ( "NOP" );
- GPIO_IOSET = IOW;
- __asm volatile ( "NOP" );
-
- GPIO_IOCLR = 0xf << 4;
- GPIO_IOSET = ((addr | 1) << 4); // And put next address on bus
-
- GPIO_IOCLR = 0xff << 16; // Write high order byte to data bus
- GPIO_IOSET = data >> 8 << 16;
-
- __asm volatile ( "NOP" );
- GPIO_IOCLR = IOW; // Toggle IOW-signal
- __asm volatile ( "NOP" );
- GPIO_IOSET = IOW;
- __asm volatile ( "NOP" );
-}
-
-// Reads a word in little-endian byte order from a specified port-address
-unsigned
-cs8900a_read(unsigned addr)
-{
- unsigned int value;
-
- GPIO_IODIR &= ~(0xff << 16); // Data port to input
-
- GPIO_IOCLR = 0xf << 4; // Put address on bus
- GPIO_IOSET = addr << 4;
-
- __asm volatile ( "NOP" );
- GPIO_IOCLR = IOR; // IOR-signal low
- __asm volatile ( "NOP" );
- value = (GPIO_IOPIN >> 16) & 0xff; // get low order byte from data bus
- GPIO_IOSET = IOR;
-
- GPIO_IOSET = 1 << 4; // IOR high and put next address on bus
-
- __asm volatile ( "NOP" );
- GPIO_IOCLR = IOR; // IOR-signal low
- __asm volatile ( "NOP" );
- value |= ((GPIO_IOPIN >> 8) & 0xff00); // get high order byte from data bus
- GPIO_IOSET = IOR; // IOR-signal low
-
- return value;
-}
-
-// Reads a word in little-endian byte order from a specified port-address
-unsigned
-cs8900a_read_addr_high_first(unsigned addr)
-{
- unsigned int value;
-
- GPIO_IODIR &= ~(0xff << 16); // Data port to input
-
- GPIO_IOCLR = 0xf << 4; // Put address on bus
- GPIO_IOSET = (addr+1) << 4;
-
- __asm volatile ( "NOP" );
- GPIO_IOCLR = IOR; // IOR-signal low
- __asm volatile ( "NOP" );
- value = ((GPIO_IOPIN >> 8) & 0xff00); // get high order byte from data bus
- GPIO_IOSET = IOR; // IOR-signal high
-
- GPIO_IOCLR = 1 << 4; // Put low address on bus
-
- __asm volatile ( "NOP" );
- GPIO_IOCLR = IOR; // IOR-signal low
- __asm volatile ( "NOP" );
- value |= (GPIO_IOPIN >> 16) & 0xff; // get low order byte from data bus
- GPIO_IOSET = IOR;
-
- return value;
-}
-
-void
-cs8900a_init(void)
-{
- int i;
-
- // Reset outputs, control lines high
- GPIO_IOSET = IOR | IOW;
-
- // No LEDs on.
- GPIO_IOSET = LED_RED | LED_YELLOW | LED_GREEN;
-
- // Port 3 as output (all pins but RS232)
- GPIO_IODIR = ~0U; // everything to output.
-
- // Reset outputs
- GPIO_IOCLR = 0xff << 16; // clear data outputs
-
- // Reset the CS8900A
- cs8900a_write(ADD_PORT, PP_SelfCTL);
- cs8900a_write(DATA_PORT, POWER_ON_RESET);
-
- // Wait until chip-reset is done
- cs8900a_write(ADD_PORT, PP_SelfST);
- while ((cs8900a_read(DATA_PORT) & INIT_DONE) == 0)
- ;
-
- // Configure the CS8900A
- for (i = 0; i < sizeof InitSeq / sizeof (TInitSeq); ++i)
- {
- cs8900a_write(ADD_PORT, InitSeq[i].Addr);
- cs8900a_write(DATA_PORT, InitSeq[i].Data);
- }
-}
-
-void
-cs8900a_send(void)
-{
- unsigned u;
-
- GPIO_IOCLR = LED_RED; // Light RED LED when frame starting
-
- // Transmit command
- cs8900a_write(TX_CMD_PORT, TX_START_ALL_BYTES);
- cs8900a_write(TX_LEN_PORT, uip_len);
-
- // Maximum number of retries
- u = 8;
- for (;;)
- {
- // Check for avaliable buffer space
- cs8900a_write(ADD_PORT, PP_BusST);
- if (cs8900a_read(DATA_PORT) & READY_FOR_TX_NOW)
- break;
- if (u -- == 0)
- {
- GPIO_IOSET = LED_RED; // Extinguish RED LED on end of frame
- return;
- }
-
- // No space avaliable, skip a received frame and try again
- skip_frame();
- }
-
- GPIO_IODIR |= 0xff << 16; // Data port to output
-
- // Send 40+14=54 bytes of header
- for (u = 0; u < 54; u += 2)
- {
- GPIO_IOCLR = 0xf << 4; // Put address on bus
- GPIO_IOSET = TX_FRAME_PORT << 4;
-
- GPIO_IOCLR = 0xff << 16; // Write low order byte to data bus
- GPIO_IOSET = uip_buf[u] << 16; // write low order byte to data bus
-
- __asm volatile ( "NOP" );
- GPIO_IOCLR = IOW; // Toggle IOW-signal
- __asm volatile ( "NOP" );
- GPIO_IOSET = IOW;
-
- GPIO_IOCLR = 0xf << 4; // Put address on bus
- GPIO_IOSET = (TX_FRAME_PORT | 1) << 4; // and put next address on bus
-
- GPIO_IOCLR = 0xff << 16; // Write low order byte to data bus
- GPIO_IOSET = uip_buf[u+1] << 16; // write low order byte to data bus
-
- __asm volatile ( "NOP" );
- GPIO_IOCLR = IOW; // Toggle IOW-signal
- __asm volatile ( "NOP" );
- GPIO_IOSET = IOW;
- }
-
- if (uip_len <= 54)
- {
- GPIO_IOSET = LED_RED; // Extinguish RED LED on end of frame
- return;
- }
-
- // Send remainder of packet, the application data
- uip_len -= 54;
- for (u = 0; u < uip_len; u += 2)
- {
-
- GPIO_IOCLR = 0xf << 4; // Put address on bus
- GPIO_IOSET = TX_FRAME_PORT << 4;
-
- GPIO_IOCLR = 0xff << 16; // Write low order byte to data bus
- GPIO_IOSET = uip_appdata[u] << 16; // write low order byte to data bus
-
- __asm volatile ( "NOP" );
- GPIO_IOCLR = IOW; // Toggle IOW-signal
- __asm volatile ( "NOP" );
- GPIO_IOSET = IOW;
-
- GPIO_IOCLR = 0xf << 4; // Put address on bus
- GPIO_IOSET = (TX_FRAME_PORT | 1) << 4; // and put next address on bus
-
- GPIO_IOCLR = 0xff << 16; // Write low order byte to data bus
- GPIO_IOSET = uip_appdata[u+1] << 16; // write low order byte to data bus
-
- __asm volatile ( "NOP" );
- GPIO_IOCLR = IOW; // Toggle IOW-signal
- __asm volatile ( "NOP" );
- GPIO_IOSET = IOW;
- }
-
- GPIO_IOSET = LED_RED; // Extinguish RED LED on end of frame
-}
-
-static void
-skip_frame(void)
-{
- // No space avaliable, skip a received frame and try again
- cs8900a_write(ADD_PORT, PP_RxCFG);
- cs8900a_write(DATA_PORT, cs8900a_read(DATA_PORT) | SKIP_1);
-}
-
-u8_t
-cs8900a_poll(void)
-{
- u16_t len, u;
-
- // Check receiver event register to see if there are any valid frames avaliable
- cs8900a_write(ADD_PORT, PP_RxEvent);
- if ((cs8900a_read(DATA_PORT) & 0xd00) == 0)
- return 0;
-
- GPIO_IOCLR = LED_GREEN; // Light GREED LED when frame coming in.
-
- // Read receiver status and discard it.
- cs8900a_read_addr_high_first(RX_FRAME_PORT);
-
- // Read frame length
- len = cs8900a_read_addr_high_first(RX_FRAME_PORT);
-
- // If the frame is too big to handle, throw it away
- if (len > UIP_BUFSIZE)
- {
- skip_frame();
- return 0;
- }
-
- // Data port to input
- GPIO_IODIR &= ~(0xff << 16);
-
- GPIO_IOCLR = 0xf << 4; // put address on bus
- GPIO_IOSET = RX_FRAME_PORT << 4;
-
- // Read bytes into uip_buf
- u = 0;
- while (u < len)
- {
- GPIO_IOCLR = 1 << 4; // put address on bus
-
- GPIO_IOCLR = IOR; // IOR-signal low
- uip_buf[u] = GPIO_IOPIN >> 16; // get high order byte from data bus
- __asm volatile ( "NOP" );
- GPIO_IOSET = IOR; // IOR-signal high
-
- GPIO_IOSET = 1 << 4; // put address on bus
-
- GPIO_IOCLR = IOR; // IOR-signal low
- __asm volatile ( "NOP" );
- uip_buf[u+1] = GPIO_IOPIN >> 16; // get high order byte from data bus
- GPIO_IOSET = IOR; // IOR-signal high
- u += 2;
- }
-
- GPIO_IOSET = LED_GREEN; // Extinguish GREED LED when frame finished.
- return len;
-}
-
diff --git a/FreeRTOS/Demo/uIP_Demo_Rowley_ARM7/uip/cs8900a.h b/FreeRTOS/Demo/uIP_Demo_Rowley_ARM7/uip/cs8900a.h
deleted file mode 100644
index 2d4b56fe0..000000000
--- a/FreeRTOS/Demo/uIP_Demo_Rowley_ARM7/uip/cs8900a.h
+++ /dev/null
@@ -1,10 +0,0 @@
-#ifndef __CS8900A_H__
-#define __CS8900A_H__
-
-#include "uip_arch.h"
-
-void cs8900a_init(void);
-void cs8900a_send(void);
-u8_t cs8900a_poll(void);
-
-#endif /* __CS8900A_H__ */
diff --git a/FreeRTOS/Demo/uIP_Demo_Rowley_ARM7/uip/fs.c b/FreeRTOS/Demo/uIP_Demo_Rowley_ARM7/uip/fs.c
deleted file mode 100644
index 7e15200b2..000000000
--- a/FreeRTOS/Demo/uIP_Demo_Rowley_ARM7/uip/fs.c
+++ /dev/null
@@ -1,155 +0,0 @@
-/**
- * \addtogroup httpd
- * @{
- */
-
-/**
- * \file
- * HTTP server read-only file system code.
- * \author Adam Dunkels <adam@dunkels.com>
- *
- * A simple read-only filesystem.
- */
-
-/*
- * Copyright (c) 2001, Swedish Institute of Computer Science.
- * All rights reserved.
- *
- * 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 of the Institute 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 INSTITUTE 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 INSTITUTE 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.
- *
- * This file is part of the lwIP TCP/IP stack.
- *
- * Author: Adam Dunkels <adam@sics.se>
- *
- * $Id: fs.c,v 1.7.2.3 2003/10/07 13:22:27 adam Exp $
- */
-
-#include "uip.h"
-#include "httpd.h"
-#include "fs.h"
-#include "fsdata.h"
-
-#define NULL (void *)0
-#include "fsdata.c"
-
-#ifdef FS_STATISTICS
-#if FS_STATISTICS == 1
-static u16_t count[FS_NUMFILES];
-#endif /* FS_STATISTICS */
-#endif /* FS_STATISTICS */
-
-/*-----------------------------------------------------------------------------------*/
-static u8_t
-fs_strcmp(const char *str1, const char *str2)
-{
- u8_t i;
- i = 0;
- loop:
-
- if(str2[i] == 0 ||
- str1[i] == '\r' ||
- str1[i] == '\n') {
- return 0;
- }
-
- if(str1[i] != str2[i]) {
- return 1;
- }
-
-
- ++i;
- goto loop;
-}
-/*-----------------------------------------------------------------------------------*/
-int
-fs_open(const char *name, struct fs_file *file)
-{
-#ifdef FS_STATISTICS
-#if FS_STATISTICS == 1
- u16_t i = 0;
-#endif /* FS_STATISTICS */
-#endif /* FS_STATISTICS */
- struct fsdata_file_noconst *f;
-
- for(f = (struct fsdata_file_noconst *)FS_ROOT;
- f != NULL;
- f = (struct fsdata_file_noconst *)f->next) {
-
- if(fs_strcmp(name, f->name) == 0) {
- file->data = f->data;
- file->len = f->len;
-#ifdef FS_STATISTICS
-#if FS_STATISTICS == 1
- ++count[i];
-#endif /* FS_STATISTICS */
-#endif /* FS_STATISTICS */
- return 1;
- }
-#ifdef FS_STATISTICS
-#if FS_STATISTICS == 1
- ++i;
-#endif /* FS_STATISTICS */
-#endif /* FS_STATISTICS */
-
- }
- return 0;
-}
-/*-----------------------------------------------------------------------------------*/
-void
-fs_init(void)
-{
-#ifdef FS_STATISTICS
-#if FS_STATISTICS == 1
- u16_t i;
- for(i = 0; i < FS_NUMFILES; i++) {
- count[i] = 0;
- }
-#endif /* FS_STATISTICS */
-#endif /* FS_STATISTICS */
-}
-/*-----------------------------------------------------------------------------------*/
-#ifdef FS_STATISTICS
-#if FS_STATISTICS == 1
-u16_t fs_count
-(char *name)
-{
- struct fsdata_file_noconst *f;
- u16_t i;
-
- i = 0;
- for(f = (struct fsdata_file_noconst *)FS_ROOT;
- f != NULL;
- f = (struct fsdata_file_noconst *)f->next) {
-
- if(fs_strcmp(name, f->name) == 0) {
- return count[i];
- }
- ++i;
- }
- return 0;
-}
-#endif /* FS_STATISTICS */
-#endif /* FS_STATISTICS */
-/*-----------------------------------------------------------------------------------*/
diff --git a/FreeRTOS/Demo/uIP_Demo_Rowley_ARM7/uip/fs.h b/FreeRTOS/Demo/uIP_Demo_Rowley_ARM7/uip/fs.h
deleted file mode 100644
index 65551ba41..000000000
--- a/FreeRTOS/Demo/uIP_Demo_Rowley_ARM7/uip/fs.h
+++ /dev/null
@@ -1,80 +0,0 @@
-/**
- * \addtogroup httpd
- * @{
- */
-
-/**
- * \file
- * HTTP server read-only file system header file.
- * \author Adam Dunkels <adam@dunkels.com>
- */
-
-/*
- * Copyright (c) 2001, Swedish Institute of Computer Science.
- * All rights reserved.
- *
- * 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 of the Institute 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 INSTITUTE 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 INSTITUTE 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.
- *
- * This file is part of the lwIP TCP/IP stack.
- *
- * Author: Adam Dunkels <adam@sics.se>
- *
- * $Id: fs.h,v 1.6.2.3 2003/10/07 13:22:27 adam Exp $
- */
-#ifndef __FS_H__
-#define __FS_H__
-
-#include "uip.h"
-
-/**
- * An open file in the read-only file system.
- */
-struct fs_file {
- char *data; /**< The actual file data. */
- int len; /**< The length of the file data. */
-};
-
-/**
- * Open a file in the read-only file system.
- *
- * \param name The name of the file.
- *
- * \param file The file pointer, which must be allocated by caller and
- * will be filled in by the function.
- */
-int fs_open(const char *name, struct fs_file *file);
-
-#ifdef FS_STATISTICS
-#if FS_STATISTICS == 1
-u16_t fs_count(char *name);
-#endif /* FS_STATISTICS */
-#endif /* FS_STATISTICS */
-
-/**
- * Initialize the read-only file system.
- */
-void fs_init(void);
-
-#endif /* __FS_H__ */
diff --git a/FreeRTOS/Demo/uIP_Demo_Rowley_ARM7/uip/fs/404.html b/FreeRTOS/Demo/uIP_Demo_Rowley_ARM7/uip/fs/404.html
deleted file mode 100644
index 8d6beec83..000000000
--- a/FreeRTOS/Demo/uIP_Demo_Rowley_ARM7/uip/fs/404.html
+++ /dev/null
@@ -1 +0,0 @@
-<html><body bgcolor="white"><center><h1>404 - file not found</h1></center></body></html> \ No newline at end of file
diff --git a/FreeRTOS/Demo/uIP_Demo_Rowley_ARM7/uip/fs/about.html b/FreeRTOS/Demo/uIP_Demo_Rowley_ARM7/uip/fs/about.html
deleted file mode 100644
index 4c886897b..000000000
--- a/FreeRTOS/Demo/uIP_Demo_Rowley_ARM7/uip/fs/about.html
+++ /dev/null
@@ -1,18 +0,0 @@
-<html>
-<body bgcolor="white">
-<center>
-<table width="600" border="0"><tr><td>
-<h2>Welcome</h2>
-<p align="justify">
-These web pages are served by the small web server running on top of
-the <a href="http://dunkels.com/adam/uip/" target="_top">uIP TCP/IP
-stack</a>.
-</p>
-<p align="justify">
-Click on the links above to see some status information about the web
-server and the TCP/IP stack.
-</p>
-</td></tr></table>
-</center>
-</body>
-</html> \ No newline at end of file
diff --git a/FreeRTOS/Demo/uIP_Demo_Rowley_ARM7/uip/fs/cgi/files b/FreeRTOS/Demo/uIP_Demo_Rowley_ARM7/uip/fs/cgi/files
deleted file mode 100644
index 64e0b5005..000000000
--- a/FreeRTOS/Demo/uIP_Demo_Rowley_ARM7/uip/fs/cgi/files
+++ /dev/null
@@ -1,28 +0,0 @@
-# This script shows the access statistics for different files on the
-# web server.
-#
-# First, we include the HTML header.
-i /files_header.html
-# Print out the name of the file, and call the function that prints
-# the access statistics of that file.
-t <tr><td><a href="/index.html">/index.html</a></td><td>
-c b /index.html
-t </td></tr> <tr><td><a href="/about.html">/about.html</a></td><td>
-c b /about.html
-t </td></tr> <tr><td><a href="/control.html">/control.html</a></td><td>
-c b /control.html
-t </td></tr> <tr><td><a href="/img/bg.png">/img/bg.png</a></td><td>
-c b /img/bg.png
-t </td></tr> <tr><td><a href="/404.html">/404.html</a></td><td>
-c b /404.html
-t </td></tr> <tr><td><a href="/cgi/files">/cgi/files</a></td><td>
-c b /cgi/files
-t </td></tr> <tr><td><a href="/cgi/stats">/cgi/stats</a></td><td>
-c b /cgi/stats
-t </td></tr> <tr><td><a href="/cgi/tcp">/cgi/tcp</a></td><td>
-c b /cgi/tcp
-t </td></tr>
-# Include the HTML footer.
-i /files_footer.plain
-# End of script.
-. \ No newline at end of file
diff --git a/FreeRTOS/Demo/uIP_Demo_Rowley_ARM7/uip/fs/cgi/stats b/FreeRTOS/Demo/uIP_Demo_Rowley_ARM7/uip/fs/cgi/stats
deleted file mode 100644
index 2c71c90dc..000000000
--- a/FreeRTOS/Demo/uIP_Demo_Rowley_ARM7/uip/fs/cgi/stats
+++ /dev/null
@@ -1,4 +0,0 @@
-i /stats_header.html
-c a
-i /stats_footer.plain
-.
diff --git a/FreeRTOS/Demo/uIP_Demo_Rowley_ARM7/uip/fs/cgi/tcp b/FreeRTOS/Demo/uIP_Demo_Rowley_ARM7/uip/fs/cgi/tcp
deleted file mode 100644
index 14efd3700..000000000
--- a/FreeRTOS/Demo/uIP_Demo_Rowley_ARM7/uip/fs/cgi/tcp
+++ /dev/null
@@ -1,4 +0,0 @@
-i /tcp_header.html
-c c
-i /tcp_footer.plain
-. \ No newline at end of file
diff --git a/FreeRTOS/Demo/uIP_Demo_Rowley_ARM7/uip/fs/control.html b/FreeRTOS/Demo/uIP_Demo_Rowley_ARM7/uip/fs/control.html
deleted file mode 100644
index ce28dbe7d..000000000
--- a/FreeRTOS/Demo/uIP_Demo_Rowley_ARM7/uip/fs/control.html
+++ /dev/null
@@ -1,14 +0,0 @@
-<html>
-<body bgcolor="white">
-<center>
-<table width="797" height="94" border="0" cellpadding="0"
- cellspacing="0" background="/img/bg.png"><tr><td align="center">
-<h1>uIP web server test pages</h1>
-[ <a href="about.html" target="main">About</a> |
-<a href="/cgi/tcp" target="main">Connections</a> |
-<a href="/cgi/files" target="main">Files</a> |
-<a href="/cgi/stats" target="main">Statistics</a> ]
-</td></tr></table>
-</center>
-</body>
-</html> \ No newline at end of file
diff --git a/FreeRTOS/Demo/uIP_Demo_Rowley_ARM7/uip/fs/files_footer.plain b/FreeRTOS/Demo/uIP_Demo_Rowley_ARM7/uip/fs/files_footer.plain
deleted file mode 100644
index 0b6dceb4f..000000000
--- a/FreeRTOS/Demo/uIP_Demo_Rowley_ARM7/uip/fs/files_footer.plain
+++ /dev/null
@@ -1,3 +0,0 @@
-</td></tr></table>
-</body>
-</html>
diff --git a/FreeRTOS/Demo/uIP_Demo_Rowley_ARM7/uip/fs/files_header.html b/FreeRTOS/Demo/uIP_Demo_Rowley_ARM7/uip/fs/files_header.html
deleted file mode 100644
index 25d86501e..000000000
--- a/FreeRTOS/Demo/uIP_Demo_Rowley_ARM7/uip/fs/files_header.html
+++ /dev/null
@@ -1,4 +0,0 @@
-<html>
-<body bgcolor="white">
-<center>
-<table width="600" border="0">
diff --git a/FreeRTOS/Demo/uIP_Demo_Rowley_ARM7/uip/fs/img/bg.png b/FreeRTOS/Demo/uIP_Demo_Rowley_ARM7/uip/fs/img/bg.png
deleted file mode 100644
index 18533b369..000000000
--- a/FreeRTOS/Demo/uIP_Demo_Rowley_ARM7/uip/fs/img/bg.png
+++ /dev/null
Binary files differ
diff --git a/FreeRTOS/Demo/uIP_Demo_Rowley_ARM7/uip/fs/index.html b/FreeRTOS/Demo/uIP_Demo_Rowley_ARM7/uip/fs/index.html
deleted file mode 100644
index 3429ef3af..000000000
--- a/FreeRTOS/Demo/uIP_Demo_Rowley_ARM7/uip/fs/index.html
+++ /dev/null
@@ -1,14 +0,0 @@
-<html>
-<head><title>uIP web server test page</title></head>
-
-<frameset cols="*" rows="120,*" frameborder="no">
- <frame src="control.html">
- <frame src="about.html" name="main">
-</frameset>
-
-<noframes>
-<body>
-Your browser must support frames
-</body>
-</noframes>
-</html> \ No newline at end of file
diff --git a/FreeRTOS/Demo/uIP_Demo_Rowley_ARM7/uip/fs/stats_footer.plain b/FreeRTOS/Demo/uIP_Demo_Rowley_ARM7/uip/fs/stats_footer.plain
deleted file mode 100644
index 0b6dceb4f..000000000
--- a/FreeRTOS/Demo/uIP_Demo_Rowley_ARM7/uip/fs/stats_footer.plain
+++ /dev/null
@@ -1,3 +0,0 @@
-</td></tr></table>
-</body>
-</html>
diff --git a/FreeRTOS/Demo/uIP_Demo_Rowley_ARM7/uip/fs/stats_header.html b/FreeRTOS/Demo/uIP_Demo_Rowley_ARM7/uip/fs/stats_header.html
deleted file mode 100644
index 4efaddf5b..000000000
--- a/FreeRTOS/Demo/uIP_Demo_Rowley_ARM7/uip/fs/stats_header.html
+++ /dev/null
@@ -1,30 +0,0 @@
-<html>
-<body bgcolor="white">
-<center>
-<table width="600" border="0">
-<tr><td>
-<pre>
-IP Packets dropped
- Packets received
- Packets sent
-IP errors IP version/header length
- IP length, high byte
- IP length, low byte
- IP fragments
- Header checksum
- Wrong protocol
-ICMP Packets dropped
- Packets received
- Packets sent
- Type errors
-TCP Packets dropped
- Packets received
- Packets sent
- Checksum errors
- Data packets without ACKs
- Resets
- Retransmissions
- No connection avaliable
- Connection attempts to closed ports
-</pre>
-</td><td><pre> \ No newline at end of file
diff --git a/FreeRTOS/Demo/uIP_Demo_Rowley_ARM7/uip/fs/tcp_footer.plain b/FreeRTOS/Demo/uIP_Demo_Rowley_ARM7/uip/fs/tcp_footer.plain
deleted file mode 100644
index 442c17a58..000000000
--- a/FreeRTOS/Demo/uIP_Demo_Rowley_ARM7/uip/fs/tcp_footer.plain
+++ /dev/null
@@ -1,5 +0,0 @@
-
-</td></tr></table>
-</center>
-</body>
-</html> \ No newline at end of file
diff --git a/FreeRTOS/Demo/uIP_Demo_Rowley_ARM7/uip/fs/tcp_header.html b/FreeRTOS/Demo/uIP_Demo_Rowley_ARM7/uip/fs/tcp_header.html
deleted file mode 100644
index 1a5057167..000000000
--- a/FreeRTOS/Demo/uIP_Demo_Rowley_ARM7/uip/fs/tcp_header.html
+++ /dev/null
@@ -1,6 +0,0 @@
-<html>
-<body bgcolor="white">
-<center>
-<table width="600" border="0">
-<tr><th>Remote</th><th>State</th><th>Retransmissions</th><th>Timer</th><th>Flags</th></tr>
-
diff --git a/FreeRTOS/Demo/uIP_Demo_Rowley_ARM7/uip/fsdata.c b/FreeRTOS/Demo/uIP_Demo_Rowley_ARM7/uip/fsdata.c
deleted file mode 100644
index ff855e7dc..000000000
--- a/FreeRTOS/Demo/uIP_Demo_Rowley_ARM7/uip/fsdata.c
+++ /dev/null
@@ -1,619 +0,0 @@
-static const char data_cgi_files[] = {
- /* /cgi/files */
- 0x2f, 0x63, 0x67, 0x69, 0x2f, 0x66, 0x69, 0x6c, 0x65, 0x73, 0,
- 0x23, 0x20, 0x54, 0x68, 0x69, 0x73, 0x20, 0x73, 0x63, 0x72,
- 0x69, 0x70, 0x74, 0x20, 0x73, 0x68, 0x6f, 0x77, 0x73, 0x20,
- 0x74, 0x68, 0x65, 0x20, 0x61, 0x63, 0x63, 0x65, 0x73, 0x73,
- 0x20, 0x73, 0x74, 0x61, 0x74, 0x69, 0x73, 0x74, 0x69, 0x63,
- 0x73, 0x20, 0x66, 0x6f, 0x72, 0x20, 0x64, 0x69, 0x66, 0x66,
- 0x65, 0x72, 0x65, 0x6e, 0x74, 0x20, 0x66, 0x69, 0x6c, 0x65,
- 0x73, 0x20, 0x6f, 0x6e, 0x20, 0x74, 0x68, 0x65, 0xa, 0x23,
- 0x20, 0x77, 0x65, 0x62, 0x20, 0x73, 0x65, 0x72, 0x76, 0x65,
- 0x72, 0x2e, 0xa, 0x23, 0xa, 0x23, 0x20, 0x46, 0x69, 0x72,
- 0x73, 0x74, 0x2c, 0x20, 0x77, 0x65, 0x20, 0x69, 0x6e, 0x63,
- 0x6c, 0x75, 0x64, 0x65, 0x20, 0x74, 0x68, 0x65, 0x20, 0x48,
- 0x54, 0x4d, 0x4c, 0x20, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72,
- 0x2e, 0xa, 0x69, 0x20, 0x2f, 0x66, 0x69, 0x6c, 0x65, 0x73,
- 0x5f, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x2e, 0x68, 0x74,
- 0x6d, 0x6c, 0xa, 0x23, 0x20, 0x50, 0x72, 0x69, 0x6e, 0x74,
- 0x20, 0x6f, 0x75, 0x74, 0x20, 0x74, 0x68, 0x65, 0x20, 0x6e,
- 0x61, 0x6d, 0x65, 0x20, 0x6f, 0x66, 0x20, 0x74, 0x68, 0x65,
- 0x20, 0x66, 0x69, 0x6c, 0x65, 0x2c, 0x20, 0x61, 0x6e, 0x64,
- 0x20, 0x63, 0x61, 0x6c, 0x6c, 0x20, 0x74, 0x68, 0x65, 0x20,
- 0x66, 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x74,
- 0x68, 0x61, 0x74, 0x20, 0x70, 0x72, 0x69, 0x6e, 0x74, 0x73,
- 0xa, 0x23, 0x20, 0x74, 0x68, 0x65, 0x20, 0x61, 0x63, 0x63,
- 0x65, 0x73, 0x73, 0x20, 0x73, 0x74, 0x61, 0x74, 0x69, 0x73,
- 0x74, 0x69, 0x63, 0x73, 0x20, 0x6f, 0x66, 0x20, 0x74, 0x68,
- 0x61, 0x74, 0x20, 0x66, 0x69, 0x6c, 0x65, 0x2e, 0xa, 0x74,
- 0x20, 0x3c, 0x74, 0x72, 0x3e, 0x3c, 0x74, 0x64, 0x3e, 0x3c,
- 0x61, 0x20, 0x68, 0x72, 0x65, 0x66, 0x3d, 0x22, 0x2f, 0x69,
- 0x6e, 0x64, 0x65, 0x78, 0x2e, 0x68, 0x74, 0x6d, 0x6c, 0x22,
- 0x3e, 0x2f, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x2e, 0x68, 0x74,
- 0x6d, 0x6c, 0x3c, 0x2f, 0x61, 0x3e, 0x3c, 0x2f, 0x74, 0x64,
- 0x3e, 0x3c, 0x74, 0x64, 0x3e, 0xa, 0x63, 0x20, 0x62, 0x20,
- 0x2f, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x2e, 0x68, 0x74, 0x6d,
- 0x6c, 0xa, 0x74, 0x20, 0x3c, 0x2f, 0x74, 0x64, 0x3e, 0x3c,
- 0x2f, 0x74, 0x72, 0x3e, 0x20, 0x3c, 0x74, 0x72, 0x3e, 0x3c,
- 0x74, 0x64, 0x3e, 0x3c, 0x61, 0x20, 0x68, 0x72, 0x65, 0x66,
- 0x3d, 0x22, 0x2f, 0x61, 0x62, 0x6f, 0x75, 0x74, 0x2e, 0x68,
- 0x74, 0x6d, 0x6c, 0x22, 0x3e, 0x2f, 0x61, 0x62, 0x6f, 0x75,
- 0x74, 0x2e, 0x68, 0x74, 0x6d, 0x6c, 0x3c, 0x2f, 0x61, 0x3e,
- 0x3c, 0x2f, 0x74, 0x64, 0x3e, 0x3c, 0x74, 0x64, 0x3e, 0xa,
- 0x63, 0x20, 0x62, 0x20, 0x2f, 0x61, 0x62, 0x6f, 0x75, 0x74,
- 0x2e, 0x68, 0x74, 0x6d, 0x6c, 0xa, 0x74, 0x20, 0x3c, 0x2f,
- 0x74, 0x64, 0x3e, 0x3c, 0x2f, 0x74, 0x72, 0x3e, 0x20, 0x3c,
- 0x74, 0x72, 0x3e, 0x3c, 0x74, 0x64, 0x3e, 0x3c, 0x61, 0x20,
- 0x68, 0x72, 0x65, 0x66, 0x3d, 0x22, 0x2f, 0x63, 0x6f, 0x6e,
- 0x74, 0x72, 0x6f, 0x6c, 0x2e, 0x68, 0x74, 0x6d, 0x6c, 0x22,
- 0x3e, 0x2f, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x2e,
- 0x68, 0x74, 0x6d, 0x6c, 0x3c, 0x2f, 0x61, 0x3e, 0x3c, 0x2f,
- 0x74, 0x64, 0x3e, 0x3c, 0x74, 0x64, 0x3e, 0xa, 0x63, 0x20,
- 0x62, 0x20, 0x2f, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c,
- 0x2e, 0x68, 0x74, 0x6d, 0x6c, 0xa, 0x74, 0x20, 0x3c, 0x2f,
- 0x74, 0x64, 0x3e, 0x3c, 0x2f, 0x74, 0x72, 0x3e, 0x20, 0x3c,
- 0x74, 0x72, 0x3e, 0x3c, 0x74, 0x64, 0x3e, 0x3c, 0x61, 0x20,
- 0x68, 0x72, 0x65, 0x66, 0x3d, 0x22, 0x2f, 0x69, 0x6d, 0x67,
- 0x2f, 0x62, 0x67, 0x2e, 0x70, 0x6e, 0x67, 0x22, 0x3e, 0x2f,
- 0x69, 0x6d, 0x67, 0x2f, 0x62, 0x67, 0x2e, 0x70, 0x6e, 0x67,
- 0x3c, 0x2f, 0x61, 0x3e, 0x3c, 0x2f, 0x74, 0x64, 0x3e, 0x3c,
- 0x74, 0x64, 0x3e, 0xa, 0x63, 0x20, 0x62, 0x20, 0x2f, 0x69,
- 0x6d, 0x67, 0x2f, 0x62, 0x67, 0x2e, 0x70, 0x6e, 0x67, 0xa,
- 0x74, 0x20, 0x3c, 0x2f, 0x74, 0x64, 0x3e, 0x3c, 0x2f, 0x74,
- 0x72, 0x3e, 0x20, 0x3c, 0x74, 0x72, 0x3e, 0x3c, 0x74, 0x64,
- 0x3e, 0x3c, 0x61, 0x20, 0x68, 0x72, 0x65, 0x66, 0x3d, 0x22,
- 0x2f, 0x34, 0x30, 0x34, 0x2e, 0x68, 0x74, 0x6d, 0x6c, 0x22,
- 0x3e, 0x2f, 0x34, 0x30, 0x34, 0x2e, 0x68, 0x74, 0x6d, 0x6c,
- 0x3c, 0x2f, 0x61, 0x3e, 0x3c, 0x2f, 0x74, 0x64, 0x3e, 0x3c,
- 0x74, 0x64, 0x3e, 0xa, 0x63, 0x20, 0x62, 0x20, 0x2f, 0x34,
- 0x30, 0x34, 0x2e, 0x68, 0x74, 0x6d, 0x6c, 0xa, 0x74, 0x20,
- 0x3c, 0x2f, 0x74, 0x64, 0x3e, 0x3c, 0x2f, 0x74, 0x72, 0x3e,
- 0x20, 0x3c, 0x74, 0x72, 0x3e, 0x3c, 0x74, 0x64, 0x3e, 0x3c,
- 0x61, 0x20, 0x68, 0x72, 0x65, 0x66, 0x3d, 0x22, 0x2f, 0x63,
- 0x67, 0x69, 0x2f, 0x66, 0x69, 0x6c, 0x65, 0x73, 0x22, 0x3e,
- 0x2f, 0x63, 0x67, 0x69, 0x2f, 0x66, 0x69, 0x6c, 0x65, 0x73,
- 0x3c, 0x2f, 0x61, 0x3e, 0x3c, 0x2f, 0x74, 0x64, 0x3e, 0x3c,
- 0x74, 0x64, 0x3e, 0xa, 0x63, 0x20, 0x62, 0x20, 0x2f, 0x63,
- 0x67, 0x69, 0x2f, 0x66, 0x69, 0x6c, 0x65, 0x73, 0xa, 0x74,
- 0x20, 0x3c, 0x2f, 0x74, 0x64, 0x3e, 0x3c, 0x2f, 0x74, 0x72,
- 0x3e, 0x20, 0x3c, 0x74, 0x72, 0x3e, 0x3c, 0x74, 0x64, 0x3e,
- 0x3c, 0x61, 0x20, 0x68, 0x72, 0x65, 0x66, 0x3d, 0x22, 0x2f,
- 0x63, 0x67, 0x69, 0x2f, 0x73, 0x74, 0x61, 0x74, 0x73, 0x22,
- 0x3e, 0x2f, 0x63, 0x67, 0x69, 0x2f, 0x73, 0x74, 0x61, 0x74,
- 0x73, 0x3c, 0x2f, 0x61, 0x3e, 0x3c, 0x2f, 0x74, 0x64, 0x3e,
- 0x3c, 0x74, 0x64, 0x3e, 0xa, 0x63, 0x20, 0x62, 0x20, 0x2f,
- 0x63, 0x67, 0x69, 0x2f, 0x73, 0x74, 0x61, 0x74, 0x73, 0xa,
- 0x74, 0x20, 0x3c, 0x2f, 0x74, 0x64, 0x3e, 0x3c, 0x2f, 0x74,
- 0x72, 0x3e, 0x20, 0x3c, 0x74, 0x72, 0x3e, 0x3c, 0x74, 0x64,
- 0x3e, 0x3c, 0x61, 0x20, 0x68, 0x72, 0x65, 0x66, 0x3d, 0x22,
- 0x2f, 0x63, 0x67, 0x69, 0x2f, 0x74, 0x63, 0x70, 0x22, 0x3e,
- 0x2f, 0x63, 0x67, 0x69, 0x2f, 0x74, 0x63, 0x70, 0x3c, 0x2f,
- 0x61, 0x3e, 0x3c, 0x2f, 0x74, 0x64, 0x3e, 0x3c, 0x74, 0x64,
- 0x3e, 0xa, 0x63, 0x20, 0x62, 0x20, 0x2f, 0x63, 0x67, 0x69,
- 0x2f, 0x74, 0x63, 0x70, 0xa, 0x74, 0x20, 0x3c, 0x2f, 0x74,
- 0x64, 0x3e, 0x3c, 0x2f, 0x74, 0x72, 0x3e, 0xa, 0x23, 0x20,
- 0x49, 0x6e, 0x63, 0x6c, 0x75, 0x64, 0x65, 0x20, 0x74, 0x68,
- 0x65, 0x20, 0x48, 0x54, 0x4d, 0x4c, 0x20, 0x66, 0x6f, 0x6f,
- 0x74, 0x65, 0x72, 0x2e, 0xa, 0x69, 0x20, 0x2f, 0x66, 0x69,
- 0x6c, 0x65, 0x73, 0x5f, 0x66, 0x6f, 0x6f, 0x74, 0x65, 0x72,
- 0x2e, 0x70, 0x6c, 0x61, 0x69, 0x6e, 0xa, 0x23, 0x20, 0x45,
- 0x6e, 0x64, 0x20, 0x6f, 0x66, 0x20, 0x73, 0x63, 0x72, 0x69,
- 0x70, 0x74, 0x2e, 0xa, 0x2e, };
-
-static const char data_cgi_stats[] = {
- /* /cgi/stats */
- 0x2f, 0x63, 0x67, 0x69, 0x2f, 0x73, 0x74, 0x61, 0x74, 0x73, 0,
- 0x69, 0x20, 0x2f, 0x73, 0x74, 0x61, 0x74, 0x73, 0x5f, 0x68,
- 0x65, 0x61, 0x64, 0x65, 0x72, 0x2e, 0x68, 0x74, 0x6d, 0x6c,
- 0xa, 0x63, 0x20, 0x61, 0xa, 0x69, 0x20, 0x2f, 0x73, 0x74,
- 0x61, 0x74, 0x73, 0x5f, 0x66, 0x6f, 0x6f, 0x74, 0x65, 0x72,
- 0x2e, 0x70, 0x6c, 0x61, 0x69, 0x6e, 0xa, 0x2e, 0xa, };
-
-static const char data_cgi_tcp[] = {
- /* /cgi/tcp */
- 0x2f, 0x63, 0x67, 0x69, 0x2f, 0x74, 0x63, 0x70, 0,
- 0x69, 0x20, 0x2f, 0x74, 0x63, 0x70, 0x5f, 0x68, 0x65, 0x61,
- 0x64, 0x65, 0x72, 0x2e, 0x68, 0x74, 0x6d, 0x6c, 0xa, 0x63,
- 0x20, 0x63, 0xa, 0x69, 0x20, 0x2f, 0x74, 0x63, 0x70, 0x5f,
- 0x66, 0x6f, 0x6f, 0x74, 0x65, 0x72, 0x2e, 0x70, 0x6c, 0x61,
- 0x69, 0x6e, 0xa, 0x2e, };
-
-static const char data_img_bg_png[] = {
- /* /img/bg.png */
- 0x2f, 0x69, 0x6d, 0x67, 0x2f, 0x62, 0x67, 0x2e, 0x70, 0x6e, 0x67, 0,
- 0x48, 0x54, 0x54, 0x50, 0x2f, 0x31, 0x2e, 0x30, 0x20, 0x32,
- 0x30, 0x30, 0x20, 0x4f, 0x4b, 0xd, 0xa, 0x53, 0x65, 0x72,
- 0x76, 0x65, 0x72, 0x3a, 0x20, 0x75, 0x49, 0x50, 0x2f, 0x30,
- 0x2e, 0x39, 0x20, 0x28, 0x68, 0x74, 0x74, 0x70, 0x3a, 0x2f,
- 0x2f, 0x64, 0x75, 0x6e, 0x6b, 0x65, 0x6c, 0x73, 0x2e, 0x63,
- 0x6f, 0x6d, 0x2f, 0x61, 0x64, 0x61, 0x6d, 0x2f, 0x75, 0x69,
- 0x70, 0x2f, 0x29, 0xd, 0xa, 0x43, 0x6f, 0x6e, 0x74, 0x65,
- 0x6e, 0x74, 0x2d, 0x74, 0x79, 0x70, 0x65, 0x3a, 0x20, 0x69,
- 0x6d, 0x61, 0x67, 0x65, 0x2f, 0x70, 0x6e, 0x67, 0xd, 0xa,
- 0xd, 0xa, 0x89, 0x50, 0x4e, 0x47, 0xd, 0xa, 0x1a, 0xa,
- 00, 00, 00, 0xd, 0x49, 0x48, 0x44, 0x52, 00, 00,
- 0x3, 0x1d, 00, 00, 00, 0x5e, 0x8, 0x6, 00, 00,
- 00, 0x46, 0xbd, 0x79, 0xcc, 00, 00, 00, 0x6, 0x62,
- 0x4b, 0x47, 0x44, 00, 0xff, 00, 0xff, 00, 0xff, 0xa0,
- 0xbd, 0xa7, 0x93, 00, 00, 00, 0x9, 0x70, 0x48, 0x59,
- 0x73, 00, 00, 0xb, 0x12, 00, 00, 0xb, 0x12, 0x1,
- 0xd2, 0xdd, 0x7e, 0xfc, 00, 00, 00, 0x7, 0x74, 0x49,
- 0x4d, 0x45, 0x7, 0xd3, 0xa, 0x5, 0x12, 0x22, 0x33, 0x22,
- 0xd0, 0x7c, 0x9a, 00, 00, 00, 0x1d, 0x74, 0x45, 0x58,
- 0x74, 0x43, 0x6f, 0x6d, 0x6d, 0x65, 0x6e, 0x74, 00, 0x43,
- 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x20, 0x77, 0x69, 0x74,
- 0x68, 0x20, 0x54, 0x68, 0x65, 0x20, 0x47, 0x49, 0x4d, 0x50,
- 0xef, 0x64, 0x25, 0x6e, 00, 00, 0x3, 0xa0, 0x49, 0x44,
- 0x41, 0x54, 0x78, 0xda, 0xed, 0xdd, 0xc1, 0x76, 0x9a, 0x40,
- 0x18, 0x80, 0x51, 0x27, 0xc7, 0x5, 0x6c, 0xd1, 0x65, 0x1a,
- 0xec, 0xe9, 0xfb, 0xbf, 0x45, 0x9e, 0x23, 0xd5, 0xb4, 0x4b,
- 0x71, 0x19, 0xdd, 0x4d, 0x97, 0x36, 0x8a, 0x6, 0x1c, 0x82,
- 0x20, 0xf7, 0xee, 0x92, 0xa8, 0x3f, 0xc, 0x68, 0xfa, 0xa1,
- 0x3d, 0x9, 0x6f, 0xaf, 0x1f, 0x71, 0x76, 0x26, 0xcc, 0x6e,
- 0x15, 0x9e, 0xce, 0xbf, 0x17, 0xe3, 0x71, 0x44, 0xb8, 0xfd,
- 0xa1, 0x93, 0xd5, 0x6d, 0x5b, 0x7f, 0xc3, 0x13, 0xef, 0x1e,
- 0x86, 0xb3, 0x2d, 0x5d, 0x6d, 0xdb, 0xf2, 0x57, 0x96, 0x34,
- 0x77, 0xfb, 0xfb, 0x90, 0x74, 0xff, 0xe5, 0xcf, 0xb4, 0xf9,
- 0xbb, 0x4d, 0xda, 0xfc, 0xa2, 0xcc, 0x92, 0xd6, 0xb4, 0x5a,
- 0x5f, 0x99, 0xdf, 0xe0, 0x5c, 0x5f, 0xae, 0xb2, 0xd9, 0x20,
- 0x85, 0x6f, 0x5c, 0xff, 0x70, 0x7c, 0x2d, 0x5a, 0x94, 0xf9,
- 0xf0, 0x76, 0xfd, 0x69, 0x36, 0x39, 0x53, 0xdc, 0xe7, 0x41,
- 0xfc, 0x1e, 0x18, 0xe1, 0xef, 0x41, 0xc6, 0xf1, 0x7c, 0xa9,
- 0x3d, 0x4f, 0xe3, 0x83, 0x1f, 0xfc, 0xb1, 0x1e, 0x17, 0xcb,
- 0x4, 00, 00, 0x68, 0x33, 00, 00, 00, 0xd1, 0x1,
- 00, 00, 0x88, 0xe, 00, 00, 0x40, 0x74, 00, 00,
- 00, 0x88, 0xe, 00, 00, 0x40, 0x74, 00, 00, 00,
- 0xa2, 0x3, 00, 00, 0x40, 0x74, 00, 00, 00, 0xa2,
- 0x3, 00, 00, 0x40, 0x74, 00, 00, 00, 0xa2, 0x3,
- 00, 00, 0x10, 0x1d, 00, 0x1d, 0xa, 0x96, 00, 00,
- 0x44, 0x7, 00, 00, 0x40, 0x4b, 0xe1, 0xed, 0xf5, 0x23,
- 0xd6, 0x7c, 0xfb, 0xf6, 0x7, 0xac, 0xc9, 0x98, 0x18, 0x8f,
- 0x23, 0xc2, 0x1d, 0xaf, 0x64, 0x86, 0x7b, 0x26, 0x56, 0xe2,
- 0x7e, 0x77, 0xba, 0x6e, 0x1d, 0x1f, 0x83, 0xa4, 0x6d, 0xb,
- 0xfd, 0x6e, 0x6b, 0x97, 0x6b, 0x1a, 0xee, 0x7c, 0x55, 0x7e,
- 0xb1, 0xca, 0x92, 0x9e, 0xb, 0xdb, 0xf5, 0x21, 0x69, 0xfe,
- 0x32, 0x61, 0xfe, 0x18, 0x8f, 0xf7, 0xc3, 0xbf, 0x46, 0xd9,
- 0xe7, 0xe1, 0xaf, 0xd5, 0xd8, 0xdf, 0x9, 0xf4, 0x4e, 0xe6,
- 0x24, 0x9e, 0x2f, 0xb5, 0xe7, 0x69, 0x7c, 0xf0, 0x83, 0x3f,
- 0xd6, 0xe3, 0x62, 0x99, 00, 00, 00, 0x6d, 0x6, 00,
- 00, 0x20, 0x3a, 00, 00, 00, 0xd1, 0x1, 00, 00,
- 0x88, 0xe, 00, 00, 00, 0xd1, 0x1, 00, 00, 0x88,
- 0xe, 00, 00, 0x40, 0x74, 00, 00, 00, 0x88, 0xe,
- 00, 00, 0x40, 0x74, 00, 00, 00, 0x88, 0xe, 0x98,
- 0xaa, 0xe0, 0x59, 0xf, 00, 0x88, 0xe, 00, 0x86, 0x53,
- 0xa9, 0x96, 00, 00, 0xd1, 0x1, 00, 00, 0x88, 0xe,
- 00, 00, 0x40, 0x74, 00, 00, 00, 0x7c, 0x93, 0xb9,
- 0x25, 0x80, 0xfb, 0x28, 0xca, 0xec, 0xe2, 0xcf, 0x42, 0x83,
- 0xcf, 0xd1, 0x57, 0xeb, 0xc3, 0xe5, 0x1f, 0x36, 0xb8, 0x9c,
- 0xb0, 0x5c, 0x65, 0x49, 0xdb, 0xbf, 0xbd, 0x30, 0x3f, 0x34,
- 0xfc, 0x3f, 00, 0x8b, 0x32, 0x6d, 0xfe, 0x6e, 0x73, 0x68,
- 0x7f, 0xa7, 0x10, 0xff, 0x9b, 0x9f, 0x27, 0xcd, 0xaf, 0xde,
- 0xf7, 0xed, 0x46, 0x9f, 0x1c, 0x93, 0xe2, 0x39, 0xf7, 0x24,
- 00, 0x60, 0x32, 0xbc, 0xd3, 0x1, 00, 00, 0x88, 0xe,
- 00, 00, 0x40, 0x74, 00, 00, 00, 0x88, 0xe, 00,
- 00, 0x40, 0x74, 00, 00, 00, 0x8f, 0x1f, 0x1d, 0xdd,
- 0xfe, 0xf9, 0xd9, 0x18, 0xa3, 0x55, 0x6, 00, 00, 0xd1,
- 0xc1, 0x64, 0x84, 0x8e, 0x1f, 0x2e, 0x58, 0x52, 00, 00,
- 0x44, 0x7, 00, 00, 0x20, 0x3a, 00, 00, 00, 0xd1,
- 0x1, 00, 00, 0x20, 0x3a, 00, 00, 00, 0xd1, 0x1,
- 00, 00, 0x88, 0xe, 00, 00, 00, 0xd1, 0x1, 00,
- 00, 0x88, 0xe, 00, 00, 0x80, 0xb9, 0x25, 0x80, 0xfb,
- 0xd8, 0x6d, 0xe, 0x77, 0x9d, 0xbf, 0x5d, 0xa7, 0xcd, 0x5f,
- 0xae, 0xb2, 0xa4, 0xfb, 0x57, 0x35, 0xfb, 0xdf, 0xe6, 0x8f,
- 0x4d, 0x16, 0x65, 0xbb, 0xf9, 0xa7, 0x8f, 0x5d, 0x6d, 0xf6,
- 0xe7, 0x37, 0x88, 0xf1, 0xca, 0x3, 0x7c, 0xfe, 0x72, 0xf1,
- 0x92, 0x3b, 0x89, 0x1, 0xa0, 0x21, 0xef, 0x74, 00, 00,
- 00, 0xa2, 0x3, 00, 00, 0x10, 0x1d, 00, 00, 00,
- 0xa2, 0x63, 0xac, 0xda, 0x7c, 0xce, 0x1d, 00, 00, 0x44,
- 0x7, 0xe0, 0x59, 0xd, 00, 0xf8, 0xe7, 0x9, 00, 00,
- 0x80, 0xe8, 00, 00, 00, 0x44, 0x7, 00, 00, 0x80,
- 0xe8, 00, 00, 00, 0x44, 0x7, 00, 00, 0x20, 0x3a,
- 00, 00, 00, 0x44, 0x7, 00, 00, 0x20, 0x3a, 00,
- 00, 00, 0xd1, 0x1, 00, 00, 0x20, 0x3a, 00, 00,
- 0x80, 0x81, 0x98, 0x5b, 0x2, 0xe0, 0x16, 0xdb, 0xf5, 0xa1,
- 0xf6, 0xfb, 0x21, 0xf4, 0x33, 0x7f, 0xb7, 0x39, 0xb4, 0xbb,
- 0x43, 0x88, 0x9f, 0xbe, 0x5c, 0x94, 0x79, 0xd2, 0xfc, 0xea,
- 0x7d, 0xdf, 0x6e, 0xfc, 0xc9, 0x25, 0x9e, 0xe2, 0xb9, 0xbf,
- 0xf9, 0x75, 0xc7, 0xa4, 0xf8, 0x91, 0x3b, 0x89, 0x1, 0xe8,
- 0x8d, 0x77, 0x3a, 00, 00, 00, 0xd1, 0x1, 0x43, 0xd3,
- 0xd7, 0xd5, 0x7c, 0xeb, 0x2, 00, 0x88, 0xe, 00, 0xbe,
- 0x8e, 0x31, 0xaf, 0xb4, 00, 0x88, 0xe, 00, 00, 00,
- 0xd1, 0x1, 00, 00, 0x88, 0xe, 00, 00, 00, 0xd1,
- 0x1, 00, 00, 0x88, 0xe, 00, 00, 0x40, 0x74, 00,
- 00, 00, 0x88, 0xe, 00, 00, 0x40, 0x74, 00, 00,
- 00, 0xa2, 0x3, 00, 00, 0x60, 0x34, 0xd1, 0x11, 0x82,
- 0x5, 0x7, 00, 00, 0xd1, 0x1, 0x43, 0x21, 0x52, 0x1,
- 00, 0x44, 0x7, 00, 00, 0xc0, 0x57, 0xe6, 0x96, 00,
- 0x18, 0xa3, 0xa2, 0xcc, 0x5a, 0xdd, 0xfe, 0xf4, 0xe3, 0x9d,
- 0xd5, 0x66, 0x7f, 0x7e, 0x83, 0x18, 0xaf, 0x3c, 0x40, 0xb7,
- 0xdb, 0xbf, 0xfb, 0xbb, 0x4f, 0xba, 0xff, 0xe2, 0x25, 0x4f,
- 0x9b, 0xff, 0xa7, 0xe1, 0xfc, 0xb, 0xfb, 0x5d, 0x3c, 0xe7,
- 0xdf, 0xbe, 0xff, 0xe1, 0xca, 0x65, 0xb1, 0x3e, 0xe6, 0x5f,
- 0x3d, 0xff, 0x12, 0xe7, 0x3, 0x4c, 0x8d, 0x77, 0x3a, 00,
- 00, 00, 0xd1, 0x1, 00, 00, 0x88, 0xe, 00, 00,
- 00, 0xd1, 0x1, 00, 00, 0x88, 0xe, 00, 00, 0x40,
- 0x74, 00, 00, 00, 0x88, 0xe, 00, 00, 0x40, 0x74,
- 00, 00, 00, 0xa2, 0x3, 00, 00, 0x40, 0x74, 0x34,
- 0x13, 0xe4, 0x15, 00, 00, 0x88, 0xe, 00, 00, 0x40,
- 0x74, 00, 00, 00, 0x88, 0xe, 00, 00, 0x40, 0x74,
- 00, 00, 00, 0x13, 0xf1, 0xf, 0x24, 0xa1, 0x5c, 0xab,
- 0x41, 0xd8, 0x92, 0xa4, 00, 00, 00, 00, 0x49, 0x45,
- 0x4e, 0x44, 0xae, 0x42, 0x60, 0x82, };
-
-static const char data_about_html[] = {
- /* /about.html */
- 0x2f, 0x61, 0x62, 0x6f, 0x75, 0x74, 0x2e, 0x68, 0x74, 0x6d, 0x6c, 0,
- 0x48, 0x54, 0x54, 0x50, 0x2f, 0x31, 0x2e, 0x30, 0x20, 0x32,
- 0x30, 0x30, 0x20, 0x4f, 0x4b, 0xd, 0xa, 0x53, 0x65, 0x72,
- 0x76, 0x65, 0x72, 0x3a, 0x20, 0x75, 0x49, 0x50, 0x2f, 0x30,
- 0x2e, 0x39, 0x20, 0x28, 0x68, 0x74, 0x74, 0x70, 0x3a, 0x2f,
- 0x2f, 0x64, 0x75, 0x6e, 0x6b, 0x65, 0x6c, 0x73, 0x2e, 0x63,
- 0x6f, 0x6d, 0x2f, 0x61, 0x64, 0x61, 0x6d, 0x2f, 0x75, 0x69,
- 0x70, 0x2f, 0x29, 0xd, 0xa, 0x43, 0x6f, 0x6e, 0x74, 0x65,
- 0x6e, 0x74, 0x2d, 0x74, 0x79, 0x70, 0x65, 0x3a, 0x20, 0x74,
- 0x65, 0x78, 0x74, 0x2f, 0x68, 0x74, 0x6d, 0x6c, 0xd, 0xa,
- 0xd, 0xa, 0x3c, 0x68, 0x74, 0x6d, 0x6c, 0x3e, 0xa, 0x3c,
- 0x62, 0x6f, 0x64, 0x79, 0x20, 0x62, 0x67, 0x63, 0x6f, 0x6c,
- 0x6f, 0x72, 0x3d, 0x22, 0x77, 0x68, 0x69, 0x74, 0x65, 0x22,
- 0x3e, 0xa, 0x3c, 0x63, 0x65, 0x6e, 0x74, 0x65, 0x72, 0x3e,
- 0xa, 0x3c, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x20, 0x77, 0x69,
- 0x64, 0x74, 0x68, 0x3d, 0x22, 0x36, 0x30, 0x30, 0x22, 0x20,
- 0x62, 0x6f, 0x72, 0x64, 0x65, 0x72, 0x3d, 0x22, 0x30, 0x22,
- 0x3e, 0x3c, 0x74, 0x72, 0x3e, 0x3c, 0x74, 0x64, 0x3e, 0xa,
- 0x3c, 0x68, 0x32, 0x3e, 0x57, 0x65, 0x6c, 0x63, 0x6f, 0x6d,
- 0x65, 0x3c, 0x2f, 0x68, 0x32, 0x3e, 0xa, 0x3c, 0x70, 0x20,
- 0x61, 0x6c, 0x69, 0x67, 0x6e, 0x3d, 0x22, 0x6a, 0x75, 0x73,
- 0x74, 0x69, 0x66, 0x79, 0x22, 0x3e, 0xa, 0x54, 0x68, 0x65,
- 0x73, 0x65, 0x20, 0x77, 0x65, 0x62, 0x20, 0x70, 0x61, 0x67,
- 0x65, 0x73, 0x20, 0x61, 0x72, 0x65, 0x20, 0x73, 0x65, 0x72,
- 0x76, 0x65, 0x64, 0x20, 0x62, 0x79, 0x20, 0x74, 0x68, 0x65,
- 0x20, 0x73, 0x6d, 0x61, 0x6c, 0x6c, 0x20, 0x77, 0x65, 0x62,
- 0x20, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x20, 0x72, 0x75,
- 0x6e, 0x6e, 0x69, 0x6e, 0x67, 0x20, 0x6f, 0x6e, 0x20, 0x74,
- 0x6f, 0x70, 0x20, 0x6f, 0x66, 0xa, 0x74, 0x68, 0x65, 0x20,
- 0x3c, 0x61, 0x20, 0x68, 0x72, 0x65, 0x66, 0x3d, 0x22, 0x68,
- 0x74, 0x74, 0x70, 0x3a, 0x2f, 0x2f, 0x64, 0x75, 0x6e, 0x6b,
- 0x65, 0x6c, 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x61, 0x64,
- 0x61, 0x6d, 0x2f, 0x75, 0x69, 0x70, 0x2f, 0x22, 0x20, 0x74,
- 0x61, 0x72, 0x67, 0x65, 0x74, 0x3d, 0x22, 0x5f, 0x74, 0x6f,
- 0x70, 0x22, 0x3e, 0x75, 0x49, 0x50, 0x20, 0x54, 0x43, 0x50,
- 0x2f, 0x49, 0x50, 0xa, 0x73, 0x74, 0x61, 0x63, 0x6b, 0x3c,
- 0x2f, 0x61, 0x3e, 0x2e, 0xa, 0x3c, 0x2f, 0x70, 0x3e, 0xa,
- 0x3c, 0x70, 0x20, 0x61, 0x6c, 0x69, 0x67, 0x6e, 0x3d, 0x22,
- 0x6a, 0x75, 0x73, 0x74, 0x69, 0x66, 0x79, 0x22, 0x3e, 0xa,
- 0x43, 0x6c, 0x69, 0x63, 0x6b, 0x20, 0x6f, 0x6e, 0x20, 0x74,
- 0x68, 0x65, 0x20, 0x6c, 0x69, 0x6e, 0x6b, 0x73, 0x20, 0x61,
- 0x62, 0x6f, 0x76, 0x65, 0x20, 0x74, 0x6f, 0x20, 0x73, 0x65,
- 0x65, 0x20, 0x73, 0x6f, 0x6d, 0x65, 0x20, 0x73, 0x74, 0x61,
- 0x74, 0x75, 0x73, 0x20, 0x69, 0x6e, 0x66, 0x6f, 0x72, 0x6d,
- 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x61, 0x62, 0x6f, 0x75,
- 0x74, 0x20, 0x74, 0x68, 0x65, 0x20, 0x77, 0x65, 0x62, 0xa,
- 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x20, 0x61, 0x6e, 0x64,
- 0x20, 0x74, 0x68, 0x65, 0x20, 0x54, 0x43, 0x50, 0x2f, 0x49,
- 0x50, 0x20, 0x73, 0x74, 0x61, 0x63, 0x6b, 0x2e, 0xa, 0x3c,
- 0x2f, 0x70, 0x3e, 0xa, 0x3c, 0x2f, 0x74, 0x64, 0x3e, 0x3c,
- 0x2f, 0x74, 0x72, 0x3e, 0x3c, 0x2f, 0x74, 0x61, 0x62, 0x6c,
- 0x65, 0x3e, 0xa, 0x3c, 0x2f, 0x63, 0x65, 0x6e, 0x74, 0x65,
- 0x72, 0x3e, 0xa, 0x3c, 0x2f, 0x62, 0x6f, 0x64, 0x79, 0x3e,
- 0xa, 0x3c, 0x2f, 0x68, 0x74, 0x6d, 0x6c, 0x3e, };
-
-static const char data_control_html[] = {
- /* /control.html */
- 0x2f, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x2e, 0x68, 0x74, 0x6d, 0x6c, 0,
- 0x48, 0x54, 0x54, 0x50, 0x2f, 0x31, 0x2e, 0x30, 0x20, 0x32,
- 0x30, 0x30, 0x20, 0x4f, 0x4b, 0xd, 0xa, 0x53, 0x65, 0x72,
- 0x76, 0x65, 0x72, 0x3a, 0x20, 0x75, 0x49, 0x50, 0x2f, 0x30,
- 0x2e, 0x39, 0x20, 0x28, 0x68, 0x74, 0x74, 0x70, 0x3a, 0x2f,
- 0x2f, 0x64, 0x75, 0x6e, 0x6b, 0x65, 0x6c, 0x73, 0x2e, 0x63,
- 0x6f, 0x6d, 0x2f, 0x61, 0x64, 0x61, 0x6d, 0x2f, 0x75, 0x69,
- 0x70, 0x2f, 0x29, 0xd, 0xa, 0x43, 0x6f, 0x6e, 0x74, 0x65,
- 0x6e, 0x74, 0x2d, 0x74, 0x79, 0x70, 0x65, 0x3a, 0x20, 0x74,
- 0x65, 0x78, 0x74, 0x2f, 0x68, 0x74, 0x6d, 0x6c, 0xd, 0xa,
- 0xd, 0xa, 0x3c, 0x68, 0x74, 0x6d, 0x6c, 0x3e, 0xa, 0x3c,
- 0x62, 0x6f, 0x64, 0x79, 0x20, 0x62, 0x67, 0x63, 0x6f, 0x6c,
- 0x6f, 0x72, 0x3d, 0x22, 0x77, 0x68, 0x69, 0x74, 0x65, 0x22,
- 0x3e, 0xa, 0x3c, 0x63, 0x65, 0x6e, 0x74, 0x65, 0x72, 0x3e,
- 0xa, 0x3c, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x20, 0x77, 0x69,
- 0x64, 0x74, 0x68, 0x3d, 0x22, 0x37, 0x39, 0x37, 0x22, 0x20,
- 0x68, 0x65, 0x69, 0x67, 0x68, 0x74, 0x3d, 0x22, 0x39, 0x34,
- 0x22, 0x20, 0x62, 0x6f, 0x72, 0x64, 0x65, 0x72, 0x3d, 0x22,
- 0x30, 0x22, 0x20, 0x63, 0x65, 0x6c, 0x6c, 0x70, 0x61, 0x64,
- 0x64, 0x69, 0x6e, 0x67, 0x3d, 0x22, 0x30, 0x22, 0xa, 0x9,
- 0x63, 0x65, 0x6c, 0x6c, 0x73, 0x70, 0x61, 0x63, 0x69, 0x6e,
- 0x67, 0x3d, 0x22, 0x30, 0x22, 0x20, 0x62, 0x61, 0x63, 0x6b,
- 0x67, 0x72, 0x6f, 0x75, 0x6e, 0x64, 0x3d, 0x22, 0x2f, 0x69,
- 0x6d, 0x67, 0x2f, 0x62, 0x67, 0x2e, 0x70, 0x6e, 0x67, 0x22,
- 0x3e, 0x3c, 0x74, 0x72, 0x3e, 0x3c, 0x74, 0x64, 0x20, 0x61,
- 0x6c, 0x69, 0x67, 0x6e, 0x3d, 0x22, 0x63, 0x65, 0x6e, 0x74,
- 0x65, 0x72, 0x22, 0x3e, 0xa, 0x3c, 0x68, 0x31, 0x3e, 0x75,
- 0x49, 0x50, 0x20, 0x77, 0x65, 0x62, 0x20, 0x73, 0x65, 0x72,
- 0x76, 0x65, 0x72, 0x20, 0x74, 0x65, 0x73, 0x74, 0x20, 0x70,
- 0x61, 0x67, 0x65, 0x73, 0x3c, 0x2f, 0x68, 0x31, 0x3e, 0xa,
- 0x5b, 0x20, 0x3c, 0x61, 0x20, 0x68, 0x72, 0x65, 0x66, 0x3d,
- 0x22, 0x61, 0x62, 0x6f, 0x75, 0x74, 0x2e, 0x68, 0x74, 0x6d,
- 0x6c, 0x22, 0x20, 0x74, 0x61, 0x72, 0x67, 0x65, 0x74, 0x3d,
- 0x22, 0x6d, 0x61, 0x69, 0x6e, 0x22, 0x3e, 0x41, 0x62, 0x6f,
- 0x75, 0x74, 0x3c, 0x2f, 0x61, 0x3e, 0x20, 0x7c, 0xa, 0x3c,
- 0x61, 0x20, 0x68, 0x72, 0x65, 0x66, 0x3d, 0x22, 0x2f, 0x63,
- 0x67, 0x69, 0x2f, 0x74, 0x63, 0x70, 0x22, 0x20, 0x74, 0x61,
- 0x72, 0x67, 0x65, 0x74, 0x3d, 0x22, 0x6d, 0x61, 0x69, 0x6e,
- 0x22, 0x3e, 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69,
- 0x6f, 0x6e, 0x73, 0x3c, 0x2f, 0x61, 0x3e, 0x20, 0x7c, 0xa,
- 0x3c, 0x61, 0x20, 0x68, 0x72, 0x65, 0x66, 0x3d, 0x22, 0x2f,
- 0x63, 0x67, 0x69, 0x2f, 0x66, 0x69, 0x6c, 0x65, 0x73, 0x22,
- 0x20, 0x74, 0x61, 0x72, 0x67, 0x65, 0x74, 0x3d, 0x22, 0x6d,
- 0x61, 0x69, 0x6e, 0x22, 0x3e, 0x46, 0x69, 0x6c, 0x65, 0x73,
- 0x3c, 0x2f, 0x61, 0x3e, 0x20, 0x7c, 0xa, 0x3c, 0x61, 0x20,
- 0x68, 0x72, 0x65, 0x66, 0x3d, 0x22, 0x2f, 0x63, 0x67, 0x69,
- 0x2f, 0x73, 0x74, 0x61, 0x74, 0x73, 0x22, 0x20, 0x74, 0x61,
- 0x72, 0x67, 0x65, 0x74, 0x3d, 0x22, 0x6d, 0x61, 0x69, 0x6e,
- 0x22, 0x3e, 0x53, 0x74, 0x61, 0x74, 0x69, 0x73, 0x74, 0x69,
- 0x63, 0x73, 0x3c, 0x2f, 0x61, 0x3e, 0x20, 0x5d, 0xa, 0x3c,
- 0x2f, 0x74, 0x64, 0x3e, 0x3c, 0x2f, 0x74, 0x72, 0x3e, 0x3c,
- 0x2f, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x3e, 0xa, 0x3c, 0x2f,
- 0x63, 0x65, 0x6e, 0x74, 0x65, 0x72, 0x3e, 0xa, 0x3c, 0x2f,
- 0x62, 0x6f, 0x64, 0x79, 0x3e, 0xa, 0x3c, 0x2f, 0x68, 0x74,
- 0x6d, 0x6c, 0x3e, };
-
-static const char data_404_html[] = {
- /* /404.html */
- 0x2f, 0x34, 0x30, 0x34, 0x2e, 0x68, 0x74, 0x6d, 0x6c, 0,
- 0x48, 0x54, 0x54, 0x50, 0x2f, 0x31, 0x2e, 0x30, 0x20, 0x34,
- 0x30, 0x34, 0x20, 0x46, 0x69, 0x6c, 0x65, 0x20, 0x6e, 0x6f,
- 0x74, 0x20, 0x66, 0x6f, 0x75, 0x6e, 0x64, 0xd, 0xa, 0x53,
- 0x65, 0x72, 0x76, 0x65, 0x72, 0x3a, 0x20, 0x75, 0x49, 0x50,
- 0x2f, 0x30, 0x2e, 0x39, 0x20, 0x28, 0x68, 0x74, 0x74, 0x70,
- 0x3a, 0x2f, 0x2f, 0x64, 0x75, 0x6e, 0x6b, 0x65, 0x6c, 0x73,
- 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x61, 0x64, 0x61, 0x6d, 0x2f,
- 0x75, 0x69, 0x70, 0x2f, 0x29, 0xd, 0xa, 0x43, 0x6f, 0x6e,
- 0x74, 0x65, 0x6e, 0x74, 0x2d, 0x74, 0x79, 0x70, 0x65, 0x3a,
- 0x20, 0x74, 0x65, 0x78, 0x74, 0x2f, 0x68, 0x74, 0x6d, 0x6c,
- 0xd, 0xa, 0xd, 0xa, 0x3c, 0x68, 0x74, 0x6d, 0x6c, 0x3e,
- 0x3c, 0x62, 0x6f, 0x64, 0x79, 0x20, 0x62, 0x67, 0x63, 0x6f,
- 0x6c, 0x6f, 0x72, 0x3d, 0x22, 0x77, 0x68, 0x69, 0x74, 0x65,
- 0x22, 0x3e, 0x3c, 0x63, 0x65, 0x6e, 0x74, 0x65, 0x72, 0x3e,
- 0x3c, 0x68, 0x31, 0x3e, 0x34, 0x30, 0x34, 0x20, 0x2d, 0x20,
- 0x66, 0x69, 0x6c, 0x65, 0x20, 0x6e, 0x6f, 0x74, 0x20, 0x66,
- 0x6f, 0x75, 0x6e, 0x64, 0x3c, 0x2f, 0x68, 0x31, 0x3e, 0x3c,
- 0x2f, 0x63, 0x65, 0x6e, 0x74, 0x65, 0x72, 0x3e, 0x3c, 0x2f,
- 0x62, 0x6f, 0x64, 0x79, 0x3e, 0x3c, 0x2f, 0x68, 0x74, 0x6d,
- 0x6c, 0x3e, };
-
-static const char data_files_footer_plain[] = {
- /* /files_footer.plain */
- 0x2f, 0x66, 0x69, 0x6c, 0x65, 0x73, 0x5f, 0x66, 0x6f, 0x6f, 0x74, 0x65, 0x72, 0x2e, 0x70, 0x6c, 0x61, 0x69, 0x6e, 0,
- 0x3c, 0x2f, 0x74, 0x64, 0x3e, 0x3c, 0x2f, 0x74, 0x72, 0x3e,
- 0x3c, 0x2f, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x3e, 0xa, 0x3c,
- 0x2f, 0x62, 0x6f, 0x64, 0x79, 0x3e, 0xa, 0x3c, 0x2f, 0x68,
- 0x74, 0x6d, 0x6c, 0x3e, 0xa, };
-
-static const char data_files_header_html[] = {
- /* /files_header.html */
- 0x2f, 0x66, 0x69, 0x6c, 0x65, 0x73, 0x5f, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x2e, 0x68, 0x74, 0x6d, 0x6c, 0,
- 0x48, 0x54, 0x54, 0x50, 0x2f, 0x31, 0x2e, 0x30, 0x20, 0x32,
- 0x30, 0x30, 0x20, 0x4f, 0x4b, 0xd, 0xa, 0x53, 0x65, 0x72,
- 0x76, 0x65, 0x72, 0x3a, 0x20, 0x75, 0x49, 0x50, 0x2f, 0x30,
- 0x2e, 0x39, 0x20, 0x28, 0x68, 0x74, 0x74, 0x70, 0x3a, 0x2f,
- 0x2f, 0x64, 0x75, 0x6e, 0x6b, 0x65, 0x6c, 0x73, 0x2e, 0x63,
- 0x6f, 0x6d, 0x2f, 0x61, 0x64, 0x61, 0x6d, 0x2f, 0x75, 0x69,
- 0x70, 0x2f, 0x29, 0xd, 0xa, 0x43, 0x6f, 0x6e, 0x74, 0x65,
- 0x6e, 0x74, 0x2d, 0x74, 0x79, 0x70, 0x65, 0x3a, 0x20, 0x74,
- 0x65, 0x78, 0x74, 0x2f, 0x68, 0x74, 0x6d, 0x6c, 0xd, 0xa,
- 0xd, 0xa, 0x3c, 0x68, 0x74, 0x6d, 0x6c, 0x3e, 0xa, 0x3c,
- 0x62, 0x6f, 0x64, 0x79, 0x20, 0x62, 0x67, 0x63, 0x6f, 0x6c,
- 0x6f, 0x72, 0x3d, 0x22, 0x77, 0x68, 0x69, 0x74, 0x65, 0x22,
- 0x3e, 0xa, 0x3c, 0x63, 0x65, 0x6e, 0x74, 0x65, 0x72, 0x3e,
- 0xa, 0x3c, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x20, 0x77, 0x69,
- 0x64, 0x74, 0x68, 0x3d, 0x22, 0x36, 0x30, 0x30, 0x22, 0x20,
- 0x62, 0x6f, 0x72, 0x64, 0x65, 0x72, 0x3d, 0x22, 0x30, 0x22,
- 0x3e, 0xa, };
-
-static const char data_index_html[] = {
- /* /index.html */
- 0x2f, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x2e, 0x68, 0x74, 0x6d, 0x6c, 0,
- 0x48, 0x54, 0x54, 0x50, 0x2f, 0x31, 0x2e, 0x30, 0x20, 0x32,
- 0x30, 0x30, 0x20, 0x4f, 0x4b, 0xd, 0xa, 0x53, 0x65, 0x72,
- 0x76, 0x65, 0x72, 0x3a, 0x20, 0x75, 0x49, 0x50, 0x2f, 0x30,
- 0x2e, 0x39, 0x20, 0x28, 0x68, 0x74, 0x74, 0x70, 0x3a, 0x2f,
- 0x2f, 0x64, 0x75, 0x6e, 0x6b, 0x65, 0x6c, 0x73, 0x2e, 0x63,
- 0x6f, 0x6d, 0x2f, 0x61, 0x64, 0x61, 0x6d, 0x2f, 0x75, 0x69,
- 0x70, 0x2f, 0x29, 0xd, 0xa, 0x43, 0x6f, 0x6e, 0x74, 0x65,
- 0x6e, 0x74, 0x2d, 0x74, 0x79, 0x70, 0x65, 0x3a, 0x20, 0x74,
- 0x65, 0x78, 0x74, 0x2f, 0x68, 0x74, 0x6d, 0x6c, 0xd, 0xa,
- 0xd, 0xa, 0x3c, 0x68, 0x74, 0x6d, 0x6c, 0x3e, 0xa, 0x3c,
- 0x68, 0x65, 0x61, 0x64, 0x3e, 0x3c, 0x74, 0x69, 0x74, 0x6c,
- 0x65, 0x3e, 0x75, 0x49, 0x50, 0x20, 0x77, 0x65, 0x62, 0x20,
- 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x20, 0x74, 0x65, 0x73,
- 0x74, 0x20, 0x70, 0x61, 0x67, 0x65, 0x3c, 0x2f, 0x74, 0x69,
- 0x74, 0x6c, 0x65, 0x3e, 0x3c, 0x2f, 0x68, 0x65, 0x61, 0x64,
- 0x3e, 0xa, 0xa, 0x3c, 0x66, 0x72, 0x61, 0x6d, 0x65, 0x73,
- 0x65, 0x74, 0x20, 0x63, 0x6f, 0x6c, 0x73, 0x3d, 0x22, 0x2a,
- 0x22, 0x20, 0x72, 0x6f, 0x77, 0x73, 0x3d, 0x22, 0x31, 0x32,
- 0x30, 0x2c, 0x2a, 0x22, 0x20, 0x66, 0x72, 0x61, 0x6d, 0x65,
- 0x62, 0x6f, 0x72, 0x64, 0x65, 0x72, 0x3d, 0x22, 0x6e, 0x6f,
- 0x22, 0x3e, 0x20, 0xa, 0x20, 0x20, 0x3c, 0x66, 0x72, 0x61,
- 0x6d, 0x65, 0x20, 0x73, 0x72, 0x63, 0x3d, 0x22, 0x63, 0x6f,
- 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x2e, 0x68, 0x74, 0x6d, 0x6c,
- 0x22, 0x3e, 0xa, 0x20, 0x20, 0x3c, 0x66, 0x72, 0x61, 0x6d,
- 0x65, 0x20, 0x73, 0x72, 0x63, 0x3d, 0x22, 0x61, 0x62, 0x6f,
- 0x75, 0x74, 0x2e, 0x68, 0x74, 0x6d, 0x6c, 0x22, 0x20, 0x6e,
- 0x61, 0x6d, 0x65, 0x3d, 0x22, 0x6d, 0x61, 0x69, 0x6e, 0x22,
- 0x3e, 0xa, 0x3c, 0x2f, 0x66, 0x72, 0x61, 0x6d, 0x65, 0x73,
- 0x65, 0x74, 0x3e, 0xa, 0xa, 0x3c, 0x6e, 0x6f, 0x66, 0x72,
- 0x61, 0x6d, 0x65, 0x73, 0x3e, 0xa, 0x3c, 0x62, 0x6f, 0x64,
- 0x79, 0x3e, 0xa, 0x59, 0x6f, 0x75, 0x72, 0x20, 0x62, 0x72,
- 0x6f, 0x77, 0x73, 0x65, 0x72, 0x20, 0x6d, 0x75, 0x73, 0x74,
- 0x20, 0x73, 0x75, 0x70, 0x70, 0x6f, 0x72, 0x74, 0x20, 0x66,
- 0x72, 0x61, 0x6d, 0x65, 0x73, 0xa, 0x3c, 0x2f, 0x62, 0x6f,
- 0x64, 0x79, 0x3e, 0xa, 0x3c, 0x2f, 0x6e, 0x6f, 0x66, 0x72,
- 0x61, 0x6d, 0x65, 0x73, 0x3e, 0xa, 0x3c, 0x2f, 0x68, 0x74,
- 0x6d, 0x6c, 0x3e, };
-
-static const char data_stats_footer_plain[] = {
- /* /stats_footer.plain */
- 0x2f, 0x73, 0x74, 0x61, 0x74, 0x73, 0x5f, 0x66, 0x6f, 0x6f, 0x74, 0x65, 0x72, 0x2e, 0x70, 0x6c, 0x61, 0x69, 0x6e, 0,
- 0x3c, 0x2f, 0x74, 0x64, 0x3e, 0x3c, 0x2f, 0x74, 0x72, 0x3e,
- 0x3c, 0x2f, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x3e, 0xa, 0x3c,
- 0x2f, 0x62, 0x6f, 0x64, 0x79, 0x3e, 0xa, 0x3c, 0x2f, 0x68,
- 0x74, 0x6d, 0x6c, 0x3e, 0xa, };
-
-static const char data_stats_header_html[] = {
- /* /stats_header.html */
- 0x2f, 0x73, 0x74, 0x61, 0x74, 0x73, 0x5f, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x2e, 0x68, 0x74, 0x6d, 0x6c, 0,
- 0x48, 0x54, 0x54, 0x50, 0x2f, 0x31, 0x2e, 0x30, 0x20, 0x32,
- 0x30, 0x30, 0x20, 0x4f, 0x4b, 0xd, 0xa, 0x53, 0x65, 0x72,
- 0x76, 0x65, 0x72, 0x3a, 0x20, 0x75, 0x49, 0x50, 0x2f, 0x30,
- 0x2e, 0x39, 0x20, 0x28, 0x68, 0x74, 0x74, 0x70, 0x3a, 0x2f,
- 0x2f, 0x64, 0x75, 0x6e, 0x6b, 0x65, 0x6c, 0x73, 0x2e, 0x63,
- 0x6f, 0x6d, 0x2f, 0x61, 0x64, 0x61, 0x6d, 0x2f, 0x75, 0x69,
- 0x70, 0x2f, 0x29, 0xd, 0xa, 0x43, 0x6f, 0x6e, 0x74, 0x65,
- 0x6e, 0x74, 0x2d, 0x74, 0x79, 0x70, 0x65, 0x3a, 0x20, 0x74,
- 0x65, 0x78, 0x74, 0x2f, 0x68, 0x74, 0x6d, 0x6c, 0xd, 0xa,
- 0xd, 0xa, 0x3c, 0x68, 0x74, 0x6d, 0x6c, 0x3e, 0xa, 0x3c,
- 0x62, 0x6f, 0x64, 0x79, 0x20, 0x62, 0x67, 0x63, 0x6f, 0x6c,
- 0x6f, 0x72, 0x3d, 0x22, 0x77, 0x68, 0x69, 0x74, 0x65, 0x22,
- 0x3e, 0xa, 0x3c, 0x63, 0x65, 0x6e, 0x74, 0x65, 0x72, 0x3e,
- 0xa, 0x3c, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x20, 0x77, 0x69,
- 0x64, 0x74, 0x68, 0x3d, 0x22, 0x36, 0x30, 0x30, 0x22, 0x20,
- 0x62, 0x6f, 0x72, 0x64, 0x65, 0x72, 0x3d, 0x22, 0x30, 0x22,
- 0x3e, 0xa, 0x3c, 0x74, 0x72, 0x3e, 0x3c, 0x74, 0x64, 0x3e,
- 0xa, 0x3c, 0x70, 0x72, 0x65, 0x3e, 0xa, 0x49, 0x50, 0x20,
- 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
- 0x50, 0x61, 0x63, 0x6b, 0x65, 0x74, 0x73, 0x20, 0x64, 0x72,
- 0x6f, 0x70, 0x70, 0x65, 0x64, 0xa, 0x20, 0x20, 0x20, 0x20,
- 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x50,
- 0x61, 0x63, 0x6b, 0x65, 0x74, 0x73, 0x20, 0x72, 0x65, 0x63,
- 0x65, 0x69, 0x76, 0x65, 0x64, 0xa, 0x20, 0x20, 0x20, 0x20,
- 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x50,
- 0x61, 0x63, 0x6b, 0x65, 0x74, 0x73, 0x20, 0x73, 0x65, 0x6e,
- 0x74, 0xa, 0x49, 0x50, 0x20, 0x65, 0x72, 0x72, 0x6f, 0x72,
- 0x73, 0x20, 0x20, 0x20, 0x20, 0x49, 0x50, 0x20, 0x76, 0x65,
- 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x2f, 0x68, 0x65, 0x61, 0x64,
- 0x65, 0x72, 0x20, 0x6c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0xa,
- 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
- 0x20, 0x20, 0x20, 0x49, 0x50, 0x20, 0x6c, 0x65, 0x6e, 0x67,
- 0x74, 0x68, 0x2c, 0x20, 0x68, 0x69, 0x67, 0x68, 0x20, 0x62,
- 0x79, 0x74, 0x65, 0xa, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
- 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x49, 0x50, 0x20,
- 0x6c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x2c, 0x20, 0x6c, 0x6f,
- 0x77, 0x20, 0x62, 0x79, 0x74, 0x65, 0xa, 0x20, 0x20, 0x20,
- 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
- 0x49, 0x50, 0x20, 0x66, 0x72, 0x61, 0x67, 0x6d, 0x65, 0x6e,
- 0x74, 0x73, 0xa, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
- 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x48, 0x65, 0x61, 0x64,
- 0x65, 0x72, 0x20, 0x63, 0x68, 0x65, 0x63, 0x6b, 0x73, 0x75,
- 0x6d, 0xa, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
- 0x20, 0x20, 0x20, 0x20, 0x20, 0x57, 0x72, 0x6f, 0x6e, 0x67,
- 0x20, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0xa,
- 0x49, 0x43, 0x4d, 0x50, 0x9, 0x20, 0x20, 0x20, 0x20, 0x20,
- 0x50, 0x61, 0x63, 0x6b, 0x65, 0x74, 0x73, 0x20, 0x64, 0x72,
- 0x6f, 0x70, 0x70, 0x65, 0x64, 0xa, 0x20, 0x20, 0x20, 0x20,
- 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x50,
- 0x61, 0x63, 0x6b, 0x65, 0x74, 0x73, 0x20, 0x72, 0x65, 0x63,
- 0x65, 0x69, 0x76, 0x65, 0x64, 0xa, 0x20, 0x20, 0x20, 0x20,
- 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x50,
- 0x61, 0x63, 0x6b, 0x65, 0x74, 0x73, 0x20, 0x73, 0x65, 0x6e,
- 0x74, 0xa, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
- 0x20, 0x20, 0x20, 0x20, 0x20, 0x54, 0x79, 0x70, 0x65, 0x20,
- 0x65, 0x72, 0x72, 0x6f, 0x72, 0x73, 0xa, 0x54, 0x43, 0x50,
- 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
- 0x50, 0x61, 0x63, 0x6b, 0x65, 0x74, 0x73, 0x20, 0x64, 0x72,
- 0x6f, 0x70, 0x70, 0x65, 0x64, 0xa, 0x20, 0x20, 0x20, 0x20,
- 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x50,
- 0x61, 0x63, 0x6b, 0x65, 0x74, 0x73, 0x20, 0x72, 0x65, 0x63,
- 0x65, 0x69, 0x76, 0x65, 0x64, 0xa, 0x20, 0x20, 0x20, 0x20,
- 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x50,
- 0x61, 0x63, 0x6b, 0x65, 0x74, 0x73, 0x20, 0x73, 0x65, 0x6e,
- 0x74, 0xa, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
- 0x20, 0x20, 0x20, 0x20, 0x20, 0x43, 0x68, 0x65, 0x63, 0x6b,
- 0x73, 0x75, 0x6d, 0x20, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x73,
- 0xa, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
- 0x20, 0x20, 0x20, 0x20, 0x44, 0x61, 0x74, 0x61, 0x20, 0x70,
- 0x61, 0x63, 0x6b, 0x65, 0x74, 0x73, 0x20, 0x77, 0x69, 0x74,
- 0x68, 0x6f, 0x75, 0x74, 0x20, 0x41, 0x43, 0x4b, 0x73, 0xa,
- 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
- 0x20, 0x20, 0x20, 0x52, 0x65, 0x73, 0x65, 0x74, 0x73, 0xa,
- 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
- 0x20, 0x20, 0x20, 0x52, 0x65, 0x74, 0x72, 0x61, 0x6e, 0x73,
- 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0xa, 0x9,
- 0x20, 0x20, 0x20, 0x20, 0x20, 0x4e, 0x6f, 0x20, 0x63, 0x6f,
- 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x61,
- 0x76, 0x61, 0x6c, 0x69, 0x61, 0x62, 0x6c, 0x65, 0xa, 0x9,
- 0x20, 0x20, 0x20, 0x20, 0x20, 0x43, 0x6f, 0x6e, 0x6e, 0x65,
- 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x61, 0x74, 0x74, 0x65,
- 0x6d, 0x70, 0x74, 0x73, 0x20, 0x74, 0x6f, 0x20, 0x63, 0x6c,
- 0x6f, 0x73, 0x65, 0x64, 0x20, 0x70, 0x6f, 0x72, 0x74, 0x73,
- 0xa, 0x3c, 0x2f, 0x70, 0x72, 0x65, 0x3e, 0x9, 0x20, 0x20,
- 0x20, 0x20, 0x20, 0xa, 0x3c, 0x2f, 0x74, 0x64, 0x3e, 0x3c,
- 0x74, 0x64, 0x3e, 0x3c, 0x70, 0x72, 0x65, 0x3e, };
-
-static const char data_tcp_footer_plain[] = {
- /* /tcp_footer.plain */
- 0x2f, 0x74, 0x63, 0x70, 0x5f, 0x66, 0x6f, 0x6f, 0x74, 0x65, 0x72, 0x2e, 0x70, 0x6c, 0x61, 0x69, 0x6e, 0,
- 0xa, 0x3c, 0x2f, 0x74, 0x64, 0x3e, 0x3c, 0x2f, 0x74, 0x72,
- 0x3e, 0x3c, 0x2f, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x3e, 0xa,
- 0x3c, 0x2f, 0x63, 0x65, 0x6e, 0x74, 0x65, 0x72, 0x3e, 0xa,
- 0x3c, 0x2f, 0x62, 0x6f, 0x64, 0x79, 0x3e, 0xa, 0x3c, 0x2f,
- 0x68, 0x74, 0x6d, 0x6c, 0x3e, };
-
-static const char data_tcp_header_html[] = {
- /* /tcp_header.html */
- 0x2f, 0x74, 0x63, 0x70, 0x5f, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x2e, 0x68, 0x74, 0x6d, 0x6c, 0,
- 0x48, 0x54, 0x54, 0x50, 0x2f, 0x31, 0x2e, 0x30, 0x20, 0x32,
- 0x30, 0x30, 0x20, 0x4f, 0x4b, 0xd, 0xa, 0x53, 0x65, 0x72,
- 0x76, 0x65, 0x72, 0x3a, 0x20, 0x75, 0x49, 0x50, 0x2f, 0x30,
- 0x2e, 0x39, 0x20, 0x28, 0x68, 0x74, 0x74, 0x70, 0x3a, 0x2f,
- 0x2f, 0x64, 0x75, 0x6e, 0x6b, 0x65, 0x6c, 0x73, 0x2e, 0x63,
- 0x6f, 0x6d, 0x2f, 0x61, 0x64, 0x61, 0x6d, 0x2f, 0x75, 0x69,
- 0x70, 0x2f, 0x29, 0xd, 0xa, 0x43, 0x6f, 0x6e, 0x74, 0x65,
- 0x6e, 0x74, 0x2d, 0x74, 0x79, 0x70, 0x65, 0x3a, 0x20, 0x74,
- 0x65, 0x78, 0x74, 0x2f, 0x68, 0x74, 0x6d, 0x6c, 0xd, 0xa,
- 0xd, 0xa, 0x3c, 0x68, 0x74, 0x6d, 0x6c, 0x3e, 0xa, 0x3c,
- 0x62, 0x6f, 0x64, 0x79, 0x20, 0x62, 0x67, 0x63, 0x6f, 0x6c,
- 0x6f, 0x72, 0x3d, 0x22, 0x77, 0x68, 0x69, 0x74, 0x65, 0x22,
- 0x3e, 0xa, 0x3c, 0x63, 0x65, 0x6e, 0x74, 0x65, 0x72, 0x3e,
- 0xa, 0x3c, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x20, 0x77, 0x69,
- 0x64, 0x74, 0x68, 0x3d, 0x22, 0x36, 0x30, 0x30, 0x22, 0x20,
- 0x62, 0x6f, 0x72, 0x64, 0x65, 0x72, 0x3d, 0x22, 0x30, 0x22,
- 0x3e, 0xa, 0x3c, 0x74, 0x72, 0x3e, 0x3c, 0x74, 0x68, 0x3e,
- 0x52, 0x65, 0x6d, 0x6f, 0x74, 0x65, 0x3c, 0x2f, 0x74, 0x68,
- 0x3e, 0x3c, 0x74, 0x68, 0x3e, 0x53, 0x74, 0x61, 0x74, 0x65,
- 0x3c, 0x2f, 0x74, 0x68, 0x3e, 0x3c, 0x74, 0x68, 0x3e, 0x52,
- 0x65, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x6d, 0x69, 0x73, 0x73,
- 0x69, 0x6f, 0x6e, 0x73, 0x3c, 0x2f, 0x74, 0x68, 0x3e, 0x3c,
- 0x74, 0x68, 0x3e, 0x54, 0x69, 0x6d, 0x65, 0x72, 0x3c, 0x2f,
- 0x74, 0x68, 0x3e, 0x3c, 0x74, 0x68, 0x3e, 0x46, 0x6c, 0x61,
- 0x67, 0x73, 0x3c, 0x2f, 0x74, 0x68, 0x3e, 0x3c, 0x2f, 0x74,
- 0x72, 0x3e, 0xa, 0xa, };
-
-const struct fsdata_file file_cgi_files[] = {{NULL, data_cgi_files, data_cgi_files + 11, sizeof(data_cgi_files) - 11}};
-
-const struct fsdata_file file_cgi_stats[] = {{file_cgi_files, data_cgi_stats, data_cgi_stats + 11, sizeof(data_cgi_stats) - 11}};
-
-const struct fsdata_file file_cgi_tcp[] = {{file_cgi_stats, data_cgi_tcp, data_cgi_tcp + 9, sizeof(data_cgi_tcp) - 9}};
-
-const struct fsdata_file file_img_bg_png[] = {{file_cgi_tcp, data_img_bg_png, data_img_bg_png + 12, sizeof(data_img_bg_png) - 12}};
-
-const struct fsdata_file file_about_html[] = {{file_img_bg_png, data_about_html, data_about_html + 12, sizeof(data_about_html) - 12}};
-
-const struct fsdata_file file_control_html[] = {{file_about_html, data_control_html, data_control_html + 14, sizeof(data_control_html) - 14}};
-
-const struct fsdata_file file_404_html[] = {{file_control_html, data_404_html, data_404_html + 10, sizeof(data_404_html) - 10}};
-
-const struct fsdata_file file_files_footer_plain[] = {{file_404_html, data_files_footer_plain, data_files_footer_plain + 20, sizeof(data_files_footer_plain) - 20}};
-
-const struct fsdata_file file_files_header_html[] = {{file_files_footer_plain, data_files_header_html, data_files_header_html + 19, sizeof(data_files_header_html) - 19}};
-
-const struct fsdata_file file_index_html[] = {{file_files_header_html, data_index_html, data_index_html + 12, sizeof(data_index_html) - 12}};
-
-const struct fsdata_file file_stats_footer_plain[] = {{file_index_html, data_stats_footer_plain, data_stats_footer_plain + 20, sizeof(data_stats_footer_plain) - 20}};
-
-const struct fsdata_file file_stats_header_html[] = {{file_stats_footer_plain, data_stats_header_html, data_stats_header_html + 19, sizeof(data_stats_header_html) - 19}};
-
-const struct fsdata_file file_tcp_footer_plain[] = {{file_stats_header_html, data_tcp_footer_plain, data_tcp_footer_plain + 18, sizeof(data_tcp_footer_plain) - 18}};
-
-const struct fsdata_file file_tcp_header_html[] = {{file_tcp_footer_plain, data_tcp_header_html, data_tcp_header_html + 17, sizeof(data_tcp_header_html) - 17}};
-
-#define FS_ROOT file_tcp_header_html
-
-#define FS_NUMFILES 14
diff --git a/FreeRTOS/Demo/uIP_Demo_Rowley_ARM7/uip/fsdata.h b/FreeRTOS/Demo/uIP_Demo_Rowley_ARM7/uip/fsdata.h
deleted file mode 100644
index 94086c4df..000000000
--- a/FreeRTOS/Demo/uIP_Demo_Rowley_ARM7/uip/fsdata.h
+++ /dev/null
@@ -1,64 +0,0 @@
-/*
- * Copyright (c) 2001, Swedish Institute of Computer Science.
- * All rights reserved.
- *
- * 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 of the Institute 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 INSTITUTE 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 INSTITUTE 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.
- *
- * This file is part of the lwIP TCP/IP stack.
- *
- * Author: Adam Dunkels <adam@sics.se>
- *
- * $Id: fsdata.h,v 1.4.2.1 2003/10/04 22:54:06 adam Exp $
- */
-#ifndef __FSDATA_H__
-#define __FSDATA_H__
-
-#include "uipopt.h"
-
-struct fsdata_file {
- const struct fsdata_file *next;
- const char *name;
- const char *data;
- const int len;
-#ifdef FS_STATISTICS
-#if FS_STATISTICS == 1
- u16_t count;
-#endif /* FS_STATISTICS */
-#endif /* FS_STATISTICS */
-};
-
-struct fsdata_file_noconst {
- struct fsdata_file *next;
- char *name;
- char *data;
- int len;
-#ifdef FS_STATISTICS
-#if FS_STATISTICS == 1
- u16_t count;
-#endif /* FS_STATISTICS */
-#endif /* FS_STATISTICS */
-};
-
-#endif /* __FSDATA_H__ */
diff --git a/FreeRTOS/Demo/uIP_Demo_Rowley_ARM7/uip/httpd.c b/FreeRTOS/Demo/uIP_Demo_Rowley_ARM7/uip/httpd.c
deleted file mode 100644
index 9d2c6e599..000000000
--- a/FreeRTOS/Demo/uIP_Demo_Rowley_ARM7/uip/httpd.c
+++ /dev/null
@@ -1,373 +0,0 @@
-/**
- * \addtogroup exampleapps
- * @{
- */
-
-/**
- * \defgroup httpd Web server
- * @{
- *
- * The uIP web server is a very simplistic implementation of an HTTP
- * server. It can serve web pages and files from a read-only ROM
- * filesystem, and provides a very small scripting language.
- *
- * The script language is very simple and works as follows. Each
- * script line starts with a command character, either "i", "t", "c",
- * "#" or ".". The "i" command tells the script interpreter to
- * "include" a file from the virtual file system and output it to the
- * web browser. The "t" command should be followed by a line of text
- * that is to be output to the browser. The "c" command is used to
- * call one of the C functions from the httpd-cgi.c file. A line that
- * starts with a "#" is ignored (i.e., the "#" denotes a comment), and
- * the "." denotes the last script line.
- *
- * The script that produces the file statistics page looks somewhat
- * like this:
- *
- \code
-i /header.html
-t <h1>File statistics</h1><br><table width="100%">
-t <tr><td><a href="/index.html">/index.html</a></td><td>
-c a /index.html
-t </td></tr> <tr><td><a href="/cgi/files">/cgi/files</a></td><td>
-c a /cgi/files
-t </td></tr> <tr><td><a href="/cgi/tcp">/cgi/tcp</a></td><td>
-c a /cgi/tcp
-t </td></tr> <tr><td><a href="/404.html">/404.html</a></td><td>
-c a /404.html
-t </td></tr></table>
-i /footer.plain
-.
- \endcode
- *
- */
-
-
-/**
- * \file
- * HTTP server.
- * \author Adam Dunkels <adam@dunkels.com>
- */
-
-/*
- * Copyright (c) 2001, Adam Dunkels.
- * All rights reserved.
- *
- * 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. The name of the author may not be used to endorse or promote
- * products derived from this software without specific prior
- * written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``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 AUTHOR 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.
- *
- * This file is part of the uIP TCP/IP stack.
- *
- * $Id: httpd.c,v 1.28.2.6 2003/10/07 13:22:27 adam Exp $
- *
- */
-
-
-#include "uip.h"
-#include "httpd.h"
-#include "fs.h"
-#include "fsdata.h"
-#include "cgi.h"
-
-#define NULL (void *)0
-
-/* The HTTP server states: */
-#define HTTP_NOGET 0
-#define HTTP_FILE 1
-#define HTTP_TEXT 2
-#define HTTP_FUNC 3
-#define HTTP_END 4
-
-#ifdef DEBUG
-#include <stdio.h>
-#define PRINT(x)
-#define PRINTLN(x)
-#else /* DEBUG */
-#define PRINT(x)
-#define PRINTLN(x)
-#endif /* DEBUG */
-
-struct httpd_state *hs;
-
-extern const struct fsdata_file file_index_html;
-extern const struct fsdata_file file_404_html;
-
-static void next_scriptline(void);
-static void next_scriptstate(void);
-
-#define ISO_G 0x47
-#define ISO_E 0x45
-#define ISO_T 0x54
-#define ISO_slash 0x2f
-#define ISO_c 0x63
-#define ISO_g 0x67
-#define ISO_i 0x69
-#define ISO_space 0x20
-#define ISO_nl 0x0a
-#define ISO_cr 0x0d
-#define ISO_a 0x61
-#define ISO_t 0x74
-#define ISO_hash 0x23
-#define ISO_period 0x2e
-
-#define httpPORT 80
-
-/*-----------------------------------------------------------------------------------*/
-/**
- * Initialize the web server.
- *
- * Starts to listen for incoming connection requests on TCP port 80.
- */
-/*-----------------------------------------------------------------------------------*/
-void
-httpd_init(void)
-{
- fs_init();
-
- /* Listen to port 80. */
- uip_listen(HTONS(httpPORT));
-}
-/*-----------------------------------------------------------------------------------*/
-void
-httpd_appcall(void)
-{
- struct fs_file fsfile;
-
- u8_t i;
-
- switch(uip_conn->lport) {
- /* This is the web server: */
- case HTONS(httpPORT):
- /* Pick out the application state from the uip_conn structure. */
- hs = (struct httpd_state *)(uip_conn->appstate);
-
- /* We use the uip_ test functions to deduce why we were
- called. If uip_connected() is non-zero, we were called
- because a remote host has connected to us. If
- uip_newdata() is non-zero, we were called because the
- remote host has sent us new data, and if uip_acked() is
- non-zero, the remote host has acknowledged the data we
- previously sent to it. */
- if(uip_connected()) {
- /* Since we have just been connected with the remote host, we
- reset the state for this connection. The ->count variable
- contains the amount of data that is yet to be sent to the
- remote host, and the ->state is set to HTTP_NOGET to signal
- that we haven't received any HTTP GET request for this
- connection yet. */
-
- hs->state = HTTP_NOGET;
- hs->count = 0;
- return;
-
- } else if(uip_poll()) {
- /* If we are polled ten times, we abort the connection. This is
- because we don't want connections lingering indefinately in
- the system. */
- if(hs->count++ >= 10) {
- uip_abort();
- }
- return;
- } else if(uip_newdata() && hs->state == HTTP_NOGET) {
- /* This is the first data we receive, and it should contain a
- GET. */
-
- /* Check for GET. */
- if(uip_appdata[0] != ISO_G ||
- uip_appdata[1] != ISO_E ||
- uip_appdata[2] != ISO_T ||
- uip_appdata[3] != ISO_space) {
- /* If it isn't a GET, we abort the connection. */
- uip_abort();
- return;
- }
-
- /* Find the file we are looking for. */
- for(i = 4; i < 40; ++i) {
- if(uip_appdata[i] == ISO_space ||
- uip_appdata[i] == ISO_cr ||
- uip_appdata[i] == ISO_nl) {
- uip_appdata[i] = 0;
- break;
- }
- }
-
- PRINT("request for file ");
- PRINTLN(&uip_appdata[4]);
-
- /* Check for a request for "/". */
- if(uip_appdata[4] == ISO_slash &&
- uip_appdata[5] == 0) {
- fs_open(file_index_html.name, &fsfile);
- } else {
- if(!fs_open((const char *)&uip_appdata[4], &fsfile)) {
- PRINTLN("couldn't open file");
- fs_open(file_404_html.name, &fsfile);
- }
- }
-
-
- if(uip_appdata[4] == ISO_slash &&
- uip_appdata[5] == ISO_c &&
- uip_appdata[6] == ISO_g &&
- uip_appdata[7] == ISO_i &&
- uip_appdata[8] == ISO_slash) {
- /* If the request is for a file that starts with "/cgi/", we
- prepare for invoking a script. */
- hs->script = fsfile.data;
- next_scriptstate();
- } else {
- hs->script = NULL;
- /* The web server is now no longer in the HTTP_NOGET state, but
- in the HTTP_FILE state since is has now got the GET from
- the client and will start transmitting the file. */
- hs->state = HTTP_FILE;
-
- /* Point the file pointers in the connection state to point to
- the first byte of the file. */
- hs->dataptr = fsfile.data;
- hs->count = fsfile.len;
- }
- }
-
-
- if(hs->state != HTTP_FUNC) {
- /* Check if the client (remote end) has acknowledged any data that
- we've previously sent. If so, we move the file pointer further
- into the file and send back more data. If we are out of data to
- send, we close the connection. */
- if(uip_acked()) {
- if(hs->count >= uip_conn->len) {
- hs->count -= uip_conn->len;
- hs->dataptr += uip_conn->len;
- } else {
- hs->count = 0;
- }
-
- if(hs->count == 0) {
- if(hs->script != NULL) {
- next_scriptline();
- next_scriptstate();
- } else {
- uip_close();
- }
- }
- }
- } else {
- /* Call the CGI function. */
- if(cgitab[hs->script[2] - ISO_a](uip_acked())) {
- /* If the function returns non-zero, we jump to the next line
- in the script. */
- next_scriptline();
- next_scriptstate();
- }
- }
-
- if(hs->state != HTTP_FUNC && !uip_poll()) {
- /* Send a piece of data, but not more than the MSS of the
- connection. */
- uip_send(hs->dataptr, hs->count);
- }
-
- /* Finally, return to uIP. Our outgoing packet will soon be on its
- way... */
- return;
-
- default:
- /* Should never happen. */
- uip_abort();
- break;
- }
-}
-/*-----------------------------------------------------------------------------------*/
-/* next_scriptline():
- *
- * Reads the script until it finds a newline. */
-static void
-next_scriptline(void)
-{
- /* Loop until we find a newline character. */
- do {
- ++(hs->script);
- } while(hs->script[0] != ISO_nl);
-
- /* Eat up the newline as well. */
- ++(hs->script);
-}
-/*-----------------------------------------------------------------------------------*/
-/* next_sciptstate:
- *
- * Reads one line of script and decides what to do next.
- */
-static void
-next_scriptstate(void)
-{
- struct fs_file fsfile;
- u8_t i;
-
- again:
- switch(hs->script[0]) {
- case ISO_t:
- /* Send a text string. */
- hs->state = HTTP_TEXT;
- hs->dataptr = &hs->script[2];
-
- /* Calculate length of string. */
- for(i = 0; hs->dataptr[i] != ISO_nl; ++i);
- hs->count = i;
- break;
- case ISO_c:
- /* Call a function. */
- hs->state = HTTP_FUNC;
- hs->dataptr = NULL;
- hs->count = 0;
- cgitab[hs->script[2] - ISO_a](0);
- break;
- case ISO_i:
- /* Include a file. */
- hs->state = HTTP_FILE;
- if(!fs_open(&hs->script[2], &fsfile)) {
- uip_abort();
- }
- hs->dataptr = fsfile.data;
- hs->count = fsfile.len;
- break;
- case ISO_hash:
- /* Comment line. */
- next_scriptline();
- goto again;
- break;
- case ISO_period:
- /* End of script. */
- hs->state = HTTP_END;
- uip_close();
- break;
- default:
- uip_abort();
- break;
- }
-}
-/*-----------------------------------------------------------------------------------*/
-/** @} */
-/** @} */
diff --git a/FreeRTOS/Demo/uIP_Demo_Rowley_ARM7/uip/httpd.h b/FreeRTOS/Demo/uIP_Demo_Rowley_ARM7/uip/httpd.h
deleted file mode 100644
index 34d6bb35f..000000000
--- a/FreeRTOS/Demo/uIP_Demo_Rowley_ARM7/uip/httpd.h
+++ /dev/null
@@ -1,77 +0,0 @@
-/**
- * \addtogroup httpd
- * @{
- */
-
-/**
- * \file
- * HTTP server header file.
- * \author Adam Dunkels <adam@dunkels.com>
- */
-
-/*
- * Copyright (c) 2001, Adam Dunkels.
- * All rights reserved.
- *
- * 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. The name of the author may not be used to endorse or promote
- * products derived from this software without specific prior
- * written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``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 AUTHOR 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.
- *
- * This file is part of the uIP TCP/IP stack.
- *
- * $Id: httpd.h,v 1.4.2.3 2003/10/06 22:56:44 adam Exp $
- *
- */
-
-#ifndef __HTTPD_H__
-#define __HTTPD_H__
-
-void httpd_init(void);
-void httpd_appcall(void);
-
-/* UIP_APPCALL: the name of the application function. This function
- must return void and take no arguments (i.e., C type "void
- appfunc(void)"). */
-#ifndef UIP_APPCALL
-#define UIP_APPCALL httpd_appcall
-#endif
-
-struct httpd_state {
- u8_t state;
- u16_t count;
- char *dataptr;
- char *script;
-};
-
-
-/* UIP_APPSTATE_SIZE: The size of the application-specific state
- stored in the uip_conn structure. */
-#ifndef UIP_APPSTATE_SIZE
-#define UIP_APPSTATE_SIZE (sizeof(struct httpd_state))
-#endif
-
-#define FS_STATISTICS 1
-
-extern struct httpd_state *hs;
-
-#endif /* __HTTPD_H__ */
diff --git a/FreeRTOS/Demo/uIP_Demo_Rowley_ARM7/uip/main_led b/FreeRTOS/Demo/uIP_Demo_Rowley_ARM7/uip/main_led
deleted file mode 100644
index 8fe01ea6d..000000000
--- a/FreeRTOS/Demo/uIP_Demo_Rowley_ARM7/uip/main_led
+++ /dev/null
@@ -1,67 +0,0 @@
-// Copyright (c) 2001-2004 Rowley Associates Limited.
-//
-// This file may be distributed under the terms of the License Agreement
-// provided with this software.
-//
-// THIS FILE IS PROVIDED AS IS WITH NO WARRANTY OF ANY KIND, INCLUDING THE
-// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
-//
-////////////////////////////////////////////////////////////////////////////////
-//
-// Olimex LPC-P1 LED Example
-//
-// Description
-// -----------
-// This example demonstrates writing to the programmable peripheral interface.
-//
-////////////////////////////////////////////////////////////////////////////////
-
-#include <targets/LPC210x.h>
-
-#define LED_RED (1<<8)
-#define LED_GREEN (1<<10)
-#define LED_YELLOW (1<<11)
-
-#define LED1 LED_YELLOW
-
-static void
-ledInit()
-{
- IODIR |= LED1;
- IOSET = LED1;
-}
-
-static void
-ledOn(void)
-{
- IOCLR = LED1;
-}
-
-static void
-ledOff(void)
-{
- IOSET = LED1;
-}
-
-void
-delay(int d)
-{
- for(; d; --d);
-}
-
-int
-main(void)
-{
- MAMCR = 2;
- ledInit();
- while (1)
- {
- ledOn();
- delay(100000);
- ledOff();
- delay(100000);
- }
- return 0;
-}
-
-
diff --git a/FreeRTOS/Demo/uIP_Demo_Rowley_ARM7/uip/makefsdata b/FreeRTOS/Demo/uIP_Demo_Rowley_ARM7/uip/makefsdata
deleted file mode 100644
index f5f75f174..000000000
--- a/FreeRTOS/Demo/uIP_Demo_Rowley_ARM7/uip/makefsdata
+++ /dev/null
@@ -1,93 +0,0 @@
-#!/usr/bin/perl
-
-open(OUTPUT, "> fsdata.c");
-
-chdir("fs");
-open(FILES, "find . -type f |");
-
-while($file = <FILES>) {
-
- # Do not include files in CVS directories nor backup files.
- if($file =~ /(CVS|~)/) {
- next;
- }
-
- chop($file);
-
- open(HEADER, "> /tmp/header") || die $!;
- if($file =~ /404.html/) {
- print(HEADER "HTTP/1.0 404 File not found\r\n");
- } else {
- print(HEADER "HTTP/1.0 200 OK\r\n");
- }
- print(HEADER "Server: uIP/0.9 (http://dunkels.com/adam/uip/)\r\n");
- if($file =~ /\.html$/) {
- print(HEADER "Content-type: text/html\r\n");
- } elsif($file =~ /\.gif$/) {
- print(HEADER "Content-type: image/gif\r\n");
- } elsif($file =~ /\.png$/) {
- print(HEADER "Content-type: image/png\r\n");
- } elsif($file =~ /\.jpg$/) {
- print(HEADER "Content-type: image/jpeg\r\n");
- } else {
- print(HEADER "Content-type: text/plain\r\n");
- }
- print(HEADER "\r\n");
- close(HEADER);
-
- unless($file =~ /\.plain$/ || $file =~ /cgi/) {
- system("cat /tmp/header $file > /tmp/file");
- } else {
- system("cp $file /tmp/file");
- }
-
- open(FILE, "/tmp/file");
- unlink("/tmp/file");
- unlink("/tmp/header");
-
- $file =~ s/\.//;
- $fvar = $file;
- $fvar =~ s-/-_-g;
- $fvar =~ s-\.-_-g;
- print(OUTPUT "static const char data".$fvar."[] = {\n");
- print(OUTPUT "\t/* $file */\n\t");
- for($j = 0; $j < length($file); $j++) {
- printf(OUTPUT "%#02x, ", unpack("C", substr($file, $j, 1)));
- }
- printf(OUTPUT "0,\n");
-
-
- $i = 0;
- while(read(FILE, $data, 1)) {
- if($i == 0) {
- print(OUTPUT "\t");
- }
- printf(OUTPUT "%#02x, ", unpack("C", $data));
- $i++;
- if($i == 10) {
- print(OUTPUT "\n");
- $i = 0;
- }
- }
- print(OUTPUT "};\n\n");
- close(FILE);
- push(@fvars, $fvar);
- push(@files, $file);
-}
-
-for($i = 0; $i < @fvars; $i++) {
- $file = $files[$i];
- $fvar = $fvars[$i];
-
- if($i == 0) {
- $prevfile = "NULL";
- } else {
- $prevfile = "file" . $fvars[$i - 1];
- }
- print(OUTPUT "const struct fsdata_file file".$fvar."[] = {{$prevfile, data$fvar, ");
- print(OUTPUT "data$fvar + ". (length($file) + 1) .", ");
- print(OUTPUT "sizeof(data$fvar) - ". (length($file) + 1) ."}};\n\n");
-}
-
-print(OUTPUT "#define FS_ROOT file$fvars[$i - 1]\n\n");
-print(OUTPUT "#define FS_NUMFILES $i");
diff --git a/FreeRTOS/Demo/uIP_Demo_Rowley_ARM7/uip/memb.c b/FreeRTOS/Demo/uIP_Demo_Rowley_ARM7/uip/memb.c
deleted file mode 100644
index 56e663446..000000000
--- a/FreeRTOS/Demo/uIP_Demo_Rowley_ARM7/uip/memb.c
+++ /dev/null
@@ -1,152 +0,0 @@
-/**
- * \addtogroup exampleapps
- * @{
- */
-
-/**
- * \file
- * Memory block allocation routines.
- * \author Adam Dunkels <adam@sics.se>
- *
- * The memory block allocation routines provide a simple yet powerful
- * set of functions for managing a set of memory blocks of fixed
- * size. A set of memory blocks is statically declared with the
- * MEMB() macro. Memory blocks are allocated from the declared
- * memory by the memb_alloc() function, and are deallocated with the
- * memb_free() function.
- *
- * \note Because of namespace clashes only one MEMB() can be
- * declared per C module, and the name scope of a MEMB() memory
- * block is local to each C module.
- *
- * The following example shows how to declare and use a memory block
- * called "cmem" which has 8 chunks of memory with each memory chunk
- * being 20 bytes large.
- *
- \code
- MEMB(cmem, 20, 8);
-
- int main(int argc, char *argv[]) {
- char *ptr;
-
- memb_init(&cmem);
-
- ptr = memb_alloc(&cmem);
-
- if(ptr != NULL) {
- do_something(ptr);
- } else {
- printf("Could not allocate memory.\n");
- }
-
- if(memb_free(ptr) == 0) {
- printf("Deallocation succeeded.\n");
- }
- }
- \endcode
- *
- */
-
-#include <string.h>
-
-#include "memb.h"
-
-/*------------------------------------------------------------------------------*/
-/**
- * Initialize a memory block that was declared with MEMB().
- *
- * \param m A memory block previosly declared with MEMB().
- */
-/*------------------------------------------------------------------------------*/
-void
-memb_init(struct memb_blocks *m)
-{
- memset(m->mem, (m->size + 1) * m->num, 0);
-}
-/*------------------------------------------------------------------------------*/
-/**
- * Allocate a memory block from a block of memory declared with MEMB().
- *
- * \param m A memory block previosly declared with MEMB().
- */
-/*------------------------------------------------------------------------------*/
-char *
-memb_alloc(struct memb_blocks *m)
-{
- int i;
- char *ptr;
-
- ptr = m->mem;
- for(i = 0; i < m->num; ++i) {
- if(*ptr == 0) {
- /* If this block was unused, we increase the reference count to
- indicate that it now is used and return a pointer to the
- first byte following the reference counter. */
- ++*ptr;
- return ptr + 1;
- }
- ptr += m->size + 1;
- }
-
- /* No free block was found, so we return NULL to indicate failure to
- allocate block. */
- return NULL;
-}
-/*------------------------------------------------------------------------------*/
-/**
- * Deallocate a memory block from a memory block previously declared
- * with MEMB().
- *
- * \param m m A memory block previosly declared with MEMB().
- *
- * \param ptr A pointer to the memory block that is to be deallocated.
- *
- * \return The new reference count for the memory block (should be 0
- * if successfully deallocated) or -1 if the pointer "ptr" did not
- * point to a legal memory block.
- */
-/*------------------------------------------------------------------------------*/
-char
-memb_free(struct memb_blocks *m, char *ptr)
-{
- int i;
- char *ptr2;
-
- /* Walk through the list of blocks and try to find the block to
- which the pointer "ptr" points to. */
- ptr2 = m->mem;
- for(i = 0; i < m->num; ++i) {
-
- if(ptr2 == ptr - 1) {
- /* We've found to block to which "ptr" points so we decrease the
- reference count and return the new value of it. */
- return --*ptr2;
- }
- ptr2 += m->size + 1;
- }
- return -1;
-}
-/*------------------------------------------------------------------------------*/
-/**
- * Increase the reference count for a memory chunk.
- *
- * \note No sanity checks are currently made.
- *
- * \param m m A memory block previosly declared with MEMB().
- *
- * \param ptr A pointer to the memory chunk for which the reference
- * count should be increased.
- *
- * \return The new reference count.
- */
-/*------------------------------------------------------------------------------*/
-char
-memb_ref(struct memb_blocks *m, char *ptr)
-{
- return ++*(ptr - 1);
-}
-/*------------------------------------------------------------------------------*/
-
-
-
-
diff --git a/FreeRTOS/Demo/uIP_Demo_Rowley_ARM7/uip/memb.h b/FreeRTOS/Demo/uIP_Demo_Rowley_ARM7/uip/memb.h
deleted file mode 100644
index 505846f4d..000000000
--- a/FreeRTOS/Demo/uIP_Demo_Rowley_ARM7/uip/memb.h
+++ /dev/null
@@ -1,43 +0,0 @@
-/**
- * \addtogroup exampleapps
- * @{
- */
-
-/**
- * \file
- * Memory block allocation routines.
- * \author Adam Dunkels <adam@sics.se>
- *
- */
-
-#ifndef __MEMB_H__
-#define __MEMB_H__
-
-/**
- * Declare a memory block.
- *
- * \param name The name of the memory block (later used with
- * memb_init(), memb_alloc() and memb_free()).
- *
- * \param size The size of each memory chunk, in bytes.
- *
- * \param num The total number of memory chunks in the block.
- *
- */
-#define MEMB(name, size, num) \
- static char memb_mem[(size + 1) * num]; \
- static struct memb_blocks name = {size, num, memb_mem}
-
-struct memb_blocks {
- unsigned short size;
- unsigned short num;
- char *mem;
-};
-
-void memb_init(struct memb_blocks *m);
-char *memb_alloc(struct memb_blocks *m);
-char memb_ref(struct memb_blocks *m, char *ptr);
-char memb_free(struct memb_blocks *m, char *ptr);
-
-
-#endif /* __MEMB_H__ */
diff --git a/FreeRTOS/Demo/uIP_Demo_Rowley_ARM7/uip/slipdev.c b/FreeRTOS/Demo/uIP_Demo_Rowley_ARM7/uip/slipdev.c
deleted file mode 100644
index fc968c82e..000000000
--- a/FreeRTOS/Demo/uIP_Demo_Rowley_ARM7/uip/slipdev.c
+++ /dev/null
@@ -1,202 +0,0 @@
-/**
- * \addtogroup uip
- * @{
- */
-
-/**
- * \defgroup slip Serial Line IP (SLIP) protocol
- * @{
- *
- * The SLIP protocol is a very simple way to transmit IP packets over
- * a serial line. It does not provide any framing or error control,
- * and is therefore not very widely used today.
- *
- * This SLIP implementation requires two functions for accessing the
- * serial device: slipdev_char_poll() and slipdev_char_put(). These
- * must be implemented specifically for the system on which the SLIP
- * protocol is to be run.
- */
-
-/**
- * \file
- * SLIP protocol implementation
- * \author Adam Dunkels <adam@dunkels.com>
- */
-
-/*
- * Copyright (c) 2001, Adam Dunkels.
- * All rights reserved.
- *
- * 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. The name of the author may not be used to endorse or promote
- * products derived from this software without specific prior
- * written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``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 AUTHOR 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.
- *
- * This file is part of the uIP TCP/IP stack.
- *
- * $Id: slipdev.c,v 1.1.2.3 2003/10/07 13:23:01 adam Exp $
- *
- */
-
-/*
- * This is a generic implementation of the SLIP protocol over an RS232
- * (serial) device.
- *
- * Huge thanks to Ullrich von Bassewitz <uz@cc65.org> of cc65 fame for
- * and endless supply of bugfixes, insightsful comments and
- * suggestions, and improvements to this code!
- */
-
-#include "uip.h"
-
-#define SLIP_END 0300
-#define SLIP_ESC 0333
-#define SLIP_ESC_END 0334
-#define SLIP_ESC_ESC 0335
-
-static u8_t slip_buf[UIP_BUFSIZE];
-
-static u16_t len, tmplen;
-static u8_t lastc;
-
-/*-----------------------------------------------------------------------------------*/
-/**
- * Send the packet in the uip_buf and uip_appdata buffers using the
- * SLIP protocol.
- *
- * The first 40 bytes of the packet (the IP and TCP headers) are read
- * from the uip_buf buffer, and the following bytes (the application
- * data) are read from the uip_appdata buffer.
- *
- */
-/*-----------------------------------------------------------------------------------*/
-void
-slipdev_send(void)
-{
- u16_t i;
- u8_t *ptr;
- u8_t c;
-
- slipdev_char_put(SLIP_END);
-
- ptr = uip_buf;
- for(i = 0; i < uip_len; ++i) {
- if(i == 40) {
- ptr = (u8_t *)uip_appdata;
- }
- c = *ptr++;
- switch(c) {
- case SLIP_END:
- slipdev_char_put(SLIP_ESC);
- slipdev_char_put(SLIP_ESC_END);
- break;
- case SLIP_ESC:
- slipdev_char_put(SLIP_ESC);
- slipdev_char_put(SLIP_ESC_ESC);
- break;
- default:
- slipdev_char_put(c);
- break;
- }
- }
- slipdev_char_put(SLIP_END);
-}
-/*-----------------------------------------------------------------------------------*/
-/**
- * Poll the SLIP device for an available packet.
- *
- * This function will poll the SLIP device to see if a packet is
- * available. It uses a buffer in which all avaliable bytes from the
- * RS232 interface are read into. When a full packet has been read
- * into the buffer, the packet is copied into the uip_buf buffer and
- * the length of the packet is returned.
- *
- * \return The length of the packet placed in the uip_buf buffer, or
- * zero if no packet is available.
- */
-/*-----------------------------------------------------------------------------------*/
-u16_t
-slipdev_poll(void)
-{
- u8_t c;
-
- while(slipdev_char_poll(c)) {
- switch(c) {
- case SLIP_ESC:
- lastc = c;
- break;
-
- case SLIP_END:
- lastc = c;
- /* End marker found, we copy our input buffer to the uip_buf
- buffer and return the size of the packet we copied. */
- memcpy(uip_buf, slip_buf, len);
- tmplen = len;
- len = 0;
- return tmplen;
-
- default:
- if(lastc == SLIP_ESC) {
- lastc = c;
- /* Previous read byte was an escape byte, so this byte will be
- interpreted differently from others. */
- switch(c) {
- case SLIP_ESC_END:
- c = SLIP_END;
- break;
- case SLIP_ESC_ESC:
- c = SLIP_ESC;
- break;
- }
- } else {
- lastc = c;
- }
-
- slip_buf[len] = c;
- ++len;
-
- if(len > UIP_BUFSIZE) {
- len = 0;
- }
-
- break;
- }
- }
- return 0;
-}
-/*-----------------------------------------------------------------------------------*/
-/**
- * Initialize the SLIP module.
- *
- * This function does not initialize the underlying RS232 device, but
- * only the SLIP part.
- */
-/*-----------------------------------------------------------------------------------*/
-void
-slipdev_init(void)
-{
- lastc = len = 0;
-}
-/*-----------------------------------------------------------------------------------*/
-
-/** @} */
-/** @} */
diff --git a/FreeRTOS/Demo/uIP_Demo_Rowley_ARM7/uip/slipdev.h b/FreeRTOS/Demo/uIP_Demo_Rowley_ARM7/uip/slipdev.h
deleted file mode 100644
index 3fbfe2d2d..000000000
--- a/FreeRTOS/Demo/uIP_Demo_Rowley_ARM7/uip/slipdev.h
+++ /dev/null
@@ -1,88 +0,0 @@
-/**
- * \addtogroup slip
- * @{
- */
-
-/**
- * \file
- * SLIP header file.
- * \author Adam Dunkels <adam@dunkels.com>
- */
-
-/*
- * Copyright (c) 2001, Adam Dunkels.
- * All rights reserved.
- *
- * 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. The name of the author may not be used to endorse or promote
- * products derived from this software without specific prior
- * written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``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 AUTHOR 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.
- *
- * This file is part of the uIP TCP/IP stack.
- *
- * $Id: slipdev.h,v 1.1.2.3 2003/10/06 22:42:51 adam Exp $
- *
- */
-
-#ifndef __SLIPDEV_H__
-#define __SLIPDEV_H__
-
-#include "uip.h"
-
-/**
- * Put a character on the serial device.
- *
- * This function is used by the SLIP implementation to put a character
- * on the serial device. It must be implemented specifically for the
- * system on which the SLIP implementation is to be run.
- *
- * \param c The character to be put on the serial device.
- */
-void slipdev_char_put(u8_t c);
-
-/**
- * Poll the serial device for a character.
- *
- * This function is used by the SLIP implementation to poll the serial
- * device for a character. It must be implemented specifically for the
- * system on which the SLIP implementation is to be run.
- *
- * The function should return immediately regardless if a character is
- * available or not. If a character is available it should be placed
- * at the memory location pointed to by the pointer supplied by the
- * arguement c.
- *
- * \param c A pointer to a byte that is filled in by the function with
- * the received character, if available.
- *
- * \retval 0 If no character is available.
- * \retval Non-zero If a character is available.
- */
-u8_t slipdev_char_poll(u8_t *c);
-
-void slipdev_init(void);
-void slipdev_send(void);
-u16_t slipdev_poll(void);
-
-#endif /* __SLIPDEV_H__ */
-
-/** @} */
diff --git a/FreeRTOS/Demo/uIP_Demo_Rowley_ARM7/uip/tapdev.c b/FreeRTOS/Demo/uIP_Demo_Rowley_ARM7/uip/tapdev.c
deleted file mode 100644
index 0d23fc4d9..000000000
--- a/FreeRTOS/Demo/uIP_Demo_Rowley_ARM7/uip/tapdev.c
+++ /dev/null
@@ -1,171 +0,0 @@
-/*
- * Copyright (c) 2001, Swedish Institute of Computer Science.
- * All rights reserved.
- *
- * 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 of the Institute 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 INSTITUTE 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 INSTITUTE 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.
- *
- * Author: Adam Dunkels <adam@sics.se>
- *
- * $Id: tapdev.c,v 1.7.2.1 2003/10/07 13:23:19 adam Exp $
- */
-
-
-#include <fcntl.h>
-#include <stdlib.h>
-#include <stdio.h>
-#include <unistd.h>
-#include <string.h>
-#include <sys/ioctl.h>
-#include <sys/socket.h>
-#include <sys/types.h>
-#include <sys/time.h>
-#include <sys/uio.h>
-#include <sys/socket.h>
-
-#ifdef linux
-#include <sys/ioctl.h>
-#include <linux/if.h>
-#include <linux/if_tun.h>
-#define DEVTAP "/dev/net/tun"
-#else /* linux */
-#define DEVTAP "/dev/tap0"
-#endif /* linux */
-
-#include "uip.h"
-
-static int fd;
-
-static unsigned long lasttime;
-static struct timezone tz;
-
-/*-----------------------------------------------------------------------------------*/
-void
-tapdev_init(void)
-{
- char buf[1024];
-
- fd = open(DEVTAP, O_RDWR);
- if(fd == -1) {
- perror("tapdev: tapdev_init: open");
- exit(1);
- }
-
-#ifdef linux
- {
- struct ifreq ifr;
- memset(&ifr, 0, sizeof(ifr));
- ifr.ifr_flags = IFF_TAP|IFF_NO_PI;
- if (ioctl(fd, TUNSETIFF, (void *) &ifr) < 0) {
- perror(buf);
- exit(1);
- }
- }
-#endif /* Linux */
-
- snprintf(buf, sizeof(buf), "ifconfig tap0 inet %d.%d.%d.%d",
- UIP_DRIPADDR0, UIP_DRIPADDR1, UIP_DRIPADDR2, UIP_DRIPADDR3);
- system(buf);
-
- lasttime = 0;
-}
-/*-----------------------------------------------------------------------------------*/
-unsigned int
-tapdev_read(void)
-{
- fd_set fdset;
- struct timeval tv, now;
- int ret;
-
- if(lasttime >= 500000) {
- lasttime = 0;
- return 0;
- }
-
- tv.tv_sec = 0;
- tv.tv_usec = 500000 - lasttime;
-
-
- FD_ZERO(&fdset);
- FD_SET(fd, &fdset);
-
- gettimeofday(&now, &tz);
- ret = select(fd + 1, &fdset, NULL, NULL, &tv);
- if(ret == 0) {
- lasttime = 0;
- return 0;
- }
- ret = read(fd, uip_buf, UIP_BUFSIZE);
- if(ret == -1) {
- perror("tap_dev: tapdev_read: read");
- }
- gettimeofday(&tv, &tz);
- lasttime += (tv.tv_sec - now.tv_sec) * 1000000 + (tv.tv_usec - now.tv_usec);
-
- return ret;
-}
-/*-----------------------------------------------------------------------------------*/
-void
-tapdev_send(void)
-{
- int ret;
- struct iovec iov[2];
-
-#ifdef linux
- {
- char tmpbuf[UIP_BUFSIZE];
- int i;
-
- for(i = 0; i < 40 + UIP_LLH_LEN; i++) {
- tmpbuf[i] = uip_buf[i];
- }
-
- for(; i < uip_len; i++) {
- tmpbuf[i] = uip_appdata[i - 40 - UIP_LLH_LEN];
- }
-
- ret = write(fd, tmpbuf, uip_len);
- }
-#else
-
- if(uip_len < 40 + UIP_LLH_LEN) {
- ret = write(fd, uip_buf, uip_len + UIP_LLH_LEN);
- } else {
- iov[0].iov_base = uip_buf;
- iov[0].iov_len = 40 + UIP_LLH_LEN;
- iov[1].iov_base = (char *)uip_appdata;
- iov[1].iov_len = uip_len - (40 + UIP_LLH_LEN);
-
- ret = writev(fd, iov, 2);
- }
-#endif
- if(ret == -1) {
- perror("tap_dev: tapdev_send: writev");
- exit(1);
- }
-}
-/*-----------------------------------------------------------------------------------*/
diff --git a/FreeRTOS/Demo/uIP_Demo_Rowley_ARM7/uip/tapdev.h b/FreeRTOS/Demo/uIP_Demo_Rowley_ARM7/uip/tapdev.h
deleted file mode 100644
index 66f1a4a71..000000000
--- a/FreeRTOS/Demo/uIP_Demo_Rowley_ARM7/uip/tapdev.h
+++ /dev/null
@@ -1,42 +0,0 @@
-/*
- * Copyright (c) 2001, Adam Dunkels.
- * All rights reserved.
- *
- * 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. The name of the author may not be used to endorse or promote
- * products derived from this software without specific prior
- * written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``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 AUTHOR 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.
- *
- * This file is part of the uIP TCP/IP stack.
- *
- * $Id: tapdev.h,v 1.1.2.1 2003/10/04 22:54:17 adam Exp $
- *
- */
-
-#ifndef __TAPDEV_H__
-#define __TAPDEV_H__
-
-void tapdev_init(void);
-unsigned int tapdev_read(void);
-void tapdev_send(void);
-
-#endif /* __TAPDEV_H__ */
diff --git a/FreeRTOS/Demo/uIP_Demo_Rowley_ARM7/uip/telnetd-shell.c b/FreeRTOS/Demo/uIP_Demo_Rowley_ARM7/uip/telnetd-shell.c
deleted file mode 100644
index 7dff714ca..000000000
--- a/FreeRTOS/Demo/uIP_Demo_Rowley_ARM7/uip/telnetd-shell.c
+++ /dev/null
@@ -1,181 +0,0 @@
-/**
- * \addtogroup telnetd
- * @{
- */
-
-/**
- * \file
- * An example telnet server shell
- * \author Adam Dunkels <adam@dunkels.com>
- */
-
-/*
- * Copyright (c) 2003, Adam Dunkels.
- * All rights reserved.
- *
- * 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. The name of the author may not be used to endorse or promote
- * products derived from this software without specific prior
- * written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``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 AUTHOR 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.
- *
- * This file is part of the Contiki desktop OS.
- *
- * $Id: telnetd-shell.c,v 1.1.2.1 2003/10/06 22:56:22 adam Exp $
- *
- */
-
-#include "uip.h"
-#include "telnetd.h"
-#include <string.h>
-
-struct ptentry {
- char c;
- void (* pfunc)(struct telnetd_state *s, char *str);
-};
-
-/*-----------------------------------------------------------------------------------*/
-static void
-parse(struct telnetd_state *s, register char *str, struct ptentry *t)
-{
- register struct ptentry *p;
- char *sstr;
-
- sstr = str;
-
- /* Loop over the parse table entries in t in order to find one that
- matches the first character in str. */
- for(p = t; p->c != 0; ++p) {
- if(*str == p->c) {
- /* Skip rest of the characters up to the first space. */
- while(*str != ' ') {
- ++str;
- }
-
- /* Skip all spaces.*/
- while(*str == ' ') {
- ++str;
- }
-
- /* Call parse table entry function and return. */
- p->pfunc(s, str);
- return;
- }
- }
-
- /* Did not find matching entry in parse table. We just call the
- default handler supplied by the caller and return. */
- p->pfunc(s, str);
-}
-/*-----------------------------------------------------------------------------------*/
-static void
-exitt(struct telnetd_state *s, char *str)
-{
- telnetd_close(s);
-}
-/*-----------------------------------------------------------------------------------*/
-static void
-inttostr(register char *str, unsigned int i)
-{
- str[0] = '0' + i / 100;
- if(str[0] == '0') {
- str[0] = ' ';
- }
- str[1] = '0' + (i / 10) % 10;
- if(str[1] == '0') {
- str[1] = ' ';
- }
- str[2] = '0' + i % 10;
- str[3] = ' ';
- str[4] = 0;
-}
-/*-----------------------------------------------------------------------------------*/
-static void
-stats(struct telnetd_state *s, char *strr)
-{
- char str[10];
-
- inttostr(str, uip_stat.ip.recv);
- telnetd_output(s, "IP packets received ", str);
- inttostr(str, uip_stat.ip.sent);
- telnetd_output(s, "IP packets sent ", str);
- inttostr(str, uip_stat.ip.drop);
- telnetd_output(s, "IP packets dropped ", str);
-
- inttostr(str, uip_stat.icmp.recv);
- telnetd_output(s, "ICMP packets received ", str);
- inttostr(str, uip_stat.icmp.sent);
- telnetd_output(s, "ICMP packets sent ", str);
- inttostr(str, uip_stat.icmp.drop);
- telnetd_output(s, "ICMP packets dropped ", str);
-
- inttostr(str, uip_stat.tcp.recv);
- telnetd_output(s, "TCP packets received ", str);
- inttostr(str, uip_stat.tcp.sent);
- telnetd_output(s, "TCP packets sent ", str);
- inttostr(str, uip_stat.tcp.drop);
- telnetd_output(s, "TCP packets dropped ", str);
- inttostr(str, uip_stat.tcp.rexmit);
- telnetd_output(s, "TCP packets retransmitted ", str);
- inttostr(str, uip_stat.tcp.synrst);
- telnetd_output(s, "TCP connection attempts ", str);
-}
-/*-----------------------------------------------------------------------------------*/
-static void
-help(struct telnetd_state *s, char *str)
-{
- telnetd_output(s, "Available commands:", "");
- telnetd_output(s, "stats - show uIP statistics", "");
- telnetd_output(s, "exit - exit shell", "");
- telnetd_output(s, "? - show this help", "");
-}
-/*-----------------------------------------------------------------------------------*/
-static void
-none(struct telnetd_state *s, char *str)
-{
- if(strlen(str) > 0) {
- telnetd_output(s, "Unknown command", "");
- }
-}
-/*-----------------------------------------------------------------------------------*/
-static struct ptentry configparsetab[] =
- {{'s', stats},
- {'e', exitt},
- {'?', help},
-
- /* Default action */
- {0, none}};
-/*-----------------------------------------------------------------------------------*/
-void
-telnetd_connected(struct telnetd_state *s)
-{
- telnetd_output(s, "uIP command shell", "");
- telnetd_output(s, "Type '?' for help", "");
- telnetd_prompt(s, "uIP-0.9> ");
-}
-/*-----------------------------------------------------------------------------------*/
-void
-telnetd_input(struct telnetd_state *s, char *cmd)
-{
- parse(s, cmd, configparsetab);
- telnetd_prompt(s, "uIP-0.9> ");
-}
-/*-----------------------------------------------------------------------------------*/
diff --git a/FreeRTOS/Demo/uIP_Demo_Rowley_ARM7/uip/telnetd.c b/FreeRTOS/Demo/uIP_Demo_Rowley_ARM7/uip/telnetd.c
deleted file mode 100644
index dba522271..000000000
--- a/FreeRTOS/Demo/uIP_Demo_Rowley_ARM7/uip/telnetd.c
+++ /dev/null
@@ -1,392 +0,0 @@
-/**
- * \addtogroup exampleapps
- * @{
- */
-
-/**
- * \defgroup telnetd Telnet server
- * @{
- *
- * The uIP telnet server provides a command based interface to uIP. It
- * allows using the "telnet" application to access uIP, and implements
- * the required telnet option negotiation.
- *
- * The code is structured in a way which makes it possible to add
- * commands without having to rewrite the main telnet code. The main
- * telnet code calls two callback functions, telnetd_connected() and
- * telnetd_input(), when a telnet connection has been established and
- * when a line of text arrives on a telnet connection. These two
- * functions can be implemented in a way which suits the particular
- * application or environment in which the uIP system is intended to
- * be run.
- *
- * The uIP distribution contains an example telnet shell
- * implementation that provides a basic set of commands.
- */
-
-/**
- * \file
- * Implementation of the Telnet server.
- * \author Adam Dunkels <adam@dunkels.com>
- */
-
-/*
- * Copyright (c) 2003, Adam Dunkels.
- * All rights reserved.
- *
- * 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. The name of the author may not be used to endorse or promote
- * products derived from this software without specific prior
- * written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``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 AUTHOR 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.
- *
- * This file is part of the uIP TCP/IP stack.
- *
- * $Id: telnetd.c,v 1.1.2.2 2003/10/07 13:47:50 adam Exp $
- *
- */
-
-#include "uip.h"
-#include "memb.h"
-#include "telnetd.h"
-#include <string.h>
-
-#define ISO_nl 0x0a
-#define ISO_cr 0x0d
-
-MEMB(linemem, TELNETD_LINELEN, TELNETD_NUMLINES);
-
-static u8_t i;
-
-#define STATE_NORMAL 0
-#define STATE_IAC 1
-#define STATE_WILL 2
-#define STATE_WONT 3
-#define STATE_DO 4
-#define STATE_DONT 5
-#define STATE_CLOSE 6
-
-#define TELNET_IAC 255
-#define TELNET_WILL 251
-#define TELNET_WONT 252
-#define TELNET_DO 253
-#define TELNET_DONT 254
-/*-----------------------------------------------------------------------------------*/
-static char *
-alloc_line(void)
-{
- return memb_alloc(&linemem);
-}
-/*-----------------------------------------------------------------------------------*/
-static void
-dealloc_line(char *line)
-{
- memb_free(&linemem, line);
-}
-/*-----------------------------------------------------------------------------------*/
-static void
-sendline(struct telnetd_state *s, char *line)
-{
- static unsigned int i;
- for(i = 0; i < TELNETD_NUMLINES; ++i) {
- if(s->lines[i] == NULL) {
- s->lines[i] = line;
- break;
- }
- }
- if(i == TELNETD_NUMLINES) {
- dealloc_line(line);
- }
-}
-/*-----------------------------------------------------------------------------------*/
-/**
- * Close a telnet session.
- *
- * This function can be called from a telnet command in order to close
- * the connection.
- *
- * \param s The connection which is to be closed.
- *
- */
-/*-----------------------------------------------------------------------------------*/
-void
-telnetd_close(struct telnetd_state *s)
-{
- s->state = STATE_CLOSE;
-}
-/*-----------------------------------------------------------------------------------*/
-/**
- * Print a prompt on a telnet connection.
- *
- * This function can be called by the telnet command shell in order to
- * print out a command prompt.
- *
- * \param s A telnet connection.
- *
- * \param str The command prompt.
- *
- */
-/*-----------------------------------------------------------------------------------*/
-void
-telnetd_prompt(struct telnetd_state *s, char *str)
-{
- char *line;
- line = alloc_line();
- if(line != NULL) {
- strncpy(line, str, TELNETD_LINELEN);
- sendline(s, line);
- }
-}
-/*-----------------------------------------------------------------------------------*/
-/**
- * Print out a string on a telnet connection.
- *
- * This function can be called from a telnet command parser in order
- * to print out a string of text on the connection. The two strings
- * given as arguments to the function will be concatenated, a carrige
- * return and a new line character will be added, and the line is
- * sent.
- *
- * \param s The telnet connection.
- *
- * \param str1 The first string.
- *
- * \param str2 The second string.
- *
- */
-/*-----------------------------------------------------------------------------------*/
-void
-telnetd_output(struct telnetd_state *s, char *str1, char *str2)
-{
- static unsigned len;
- char *line;
-
- line = alloc_line();
- if(line != NULL) {
- len = strlen(str1);
- strncpy(line, str1, TELNETD_LINELEN);
- if(len < TELNETD_LINELEN) {
- strncpy(line + len, str2, TELNETD_LINELEN - len);
- }
- len = strlen(line);
- if(len < TELNETD_LINELEN - 2) {
- line[len] = ISO_cr;
- line[len+1] = ISO_nl;
- line[len+2] = 0;
- }
- sendline(s, line);
- }
-}
-/*-----------------------------------------------------------------------------------*/
-/**
- * Initialize the telnet server.
- *
- * This function will perform the necessary initializations and start
- * listening on TCP port 23.
- */
-/*-----------------------------------------------------------------------------------*/
-void
-telnetd_init(void)
-{
- memb_init(&linemem);
- uip_listen(HTONS(23));
-}
-/*-----------------------------------------------------------------------------------*/
-static void
-acked(struct telnetd_state *s)
-{
- dealloc_line(s->lines[0]);
- for(i = 1; i < TELNETD_NUMLINES; ++i) {
- s->lines[i - 1] = s->lines[i];
- }
-}
-/*-----------------------------------------------------------------------------------*/
-static void
-senddata(struct telnetd_state *s)
-{
- if(s->lines[0] != NULL) {
- uip_send(s->lines[0], strlen(s->lines[0]));
- }
-}
-/*-----------------------------------------------------------------------------------*/
-static void
-getchar(struct telnetd_state *s, u8_t c)
-{
- if(c == ISO_cr) {
- return;
- }
-
- s->buf[(int)s->bufptr] = c;
- if(s->buf[(int)s->bufptr] == ISO_nl ||
- s->bufptr == sizeof(s->buf) - 1) {
- if(s->bufptr > 0) {
- s->buf[(int)s->bufptr] = 0;
- }
- telnetd_input(s, s->buf);
- s->bufptr = 0;
- } else {
- ++s->bufptr;
- }
-}
-/*-----------------------------------------------------------------------------------*/
-static void
-sendopt(struct telnetd_state *s, u8_t option, u8_t value)
-{
- char *line;
- line = alloc_line();
- if(line != NULL) {
- line[0] = TELNET_IAC;
- line[1] = option;
- line[2] = value;
- line[3] = 0;
- sendline(s, line);
- }
-}
-/*-----------------------------------------------------------------------------------*/
-static void
-newdata(struct telnetd_state *s)
-{
- u16_t len;
- u8_t c;
-
-
- len = uip_datalen();
-
- while(len > 0 && s->bufptr < sizeof(s->buf)) {
- c = *uip_appdata;
- ++uip_appdata;
- --len;
- switch(s->state) {
- case STATE_IAC:
- if(c == TELNET_IAC) {
- getchar(s, c);
- s->state = STATE_NORMAL;
- } else {
- switch(c) {
- case TELNET_WILL:
- s->state = STATE_WILL;
- break;
- case TELNET_WONT:
- s->state = STATE_WONT;
- break;
- case TELNET_DO:
- s->state = STATE_DO;
- break;
- case TELNET_DONT:
- s->state = STATE_DONT;
- break;
- default:
- s->state = STATE_NORMAL;
- break;
- }
- }
- break;
- case STATE_WILL:
- /* Reply with a DONT */
- sendopt(s, TELNET_DONT, c);
- s->state = STATE_NORMAL;
- break;
-
- case STATE_WONT:
- /* Reply with a DONT */
- sendopt(s, TELNET_DONT, c);
- s->state = STATE_NORMAL;
- break;
- case STATE_DO:
- /* Reply with a WONT */
- sendopt(s, TELNET_WONT, c);
- s->state = STATE_NORMAL;
- break;
- case STATE_DONT:
- /* Reply with a WONT */
- sendopt(s, TELNET_WONT, c);
- s->state = STATE_NORMAL;
- break;
- case STATE_NORMAL:
- if(c == TELNET_IAC) {
- s->state = STATE_IAC;
- } else {
- getchar(s, c);
- }
- break;
- }
-
-
- }
-
-}
-/*-----------------------------------------------------------------------------------*/
-void
-telnetd_app(void)
-{
- struct telnetd_state *s;
-
- s = (struct telnetd_state *)uip_conn->appstate;
-
- if(uip_connected()) {
-
- for(i = 0; i < TELNETD_NUMLINES; ++i) {
- s->lines[i] = NULL;
- }
- s->bufptr = 0;
- s->state = STATE_NORMAL;
-
- telnetd_connected(s);
- senddata(s);
- return;
- }
-
- if(s->state == STATE_CLOSE) {
- s->state = STATE_NORMAL;
- uip_close();
- return;
- }
-
- if(uip_closed()) {
- telnetd_output(s, "Connection closed", "");
- }
-
-
- if(uip_aborted()) {
- telnetd_output(s, "Connection reset", "");
- }
-
- if(uip_timedout()) {
- telnetd_output(s, "Connection timed out", "");
- }
-
- if(uip_acked()) {
- acked(s);
- }
-
- if(uip_newdata()) {
- newdata(s);
- }
-
- if(uip_rexmit() ||
- uip_newdata() ||
- uip_acked()) {
- senddata(s);
- } else if(uip_poll()) {
- senddata(s);
- }
-}
-/*-----------------------------------------------------------------------------------*/
diff --git a/FreeRTOS/Demo/uIP_Demo_Rowley_ARM7/uip/telnetd.h b/FreeRTOS/Demo/uIP_Demo_Rowley_ARM7/uip/telnetd.h
deleted file mode 100644
index 254e44ff1..000000000
--- a/FreeRTOS/Demo/uIP_Demo_Rowley_ARM7/uip/telnetd.h
+++ /dev/null
@@ -1,114 +0,0 @@
-/**
- * \addtogroup telnetd
- * @{
- */
-
-/**
- * \file
- * Header file for the telnet server.
- * \author Adam Dunkels <adam@dunkels.com>
- */
-
-/*
- * Copyright (c) 2002, Adam Dunkels.
- * All rights reserved.
- *
- * 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. The name of the author may not be used to endorse or promote
- * products derived from this software without specific prior
- * written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``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 AUTHOR 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.
- *
- * This file is part of the uIP TCP/IP stack.
- *
- * $Id: telnetd.h,v 1.1.2.2 2003/10/07 13:22:27 adam Exp $
- *
- */
-#ifndef __TELNETD_H__
-#define __TELNETD_H__
-
-#include "uip.h"
-
-/**
- * The maximum length of a telnet line.
- *
- * \hideinitializer
- */
-#define TELNETD_LINELEN 36
-
-/**
- * The number of output lines being buffered for all telnet
- * connections.
- *
- * \hideinitializer
- */
-#define TELNETD_NUMLINES 2
-
-/**
- * A telnet connection structure.
- */
-struct telnetd_state {
- char *lines[TELNETD_NUMLINES];
- char buf[TELNETD_LINELEN];
- char bufptr;
- u8_t state;
-};
-
-
-/**
- * Callback function that is called when a telnet connection has been
- * established.
- *
- * \param s The telnet connection.
- */
-void telnetd_connected(struct telnetd_state *s);
-
-/**
- * Callback function that is called when a line of text has arrived on
- * a telnet connection.
- *
- * \param s The telnet connection.
- *
- * \param cmd The line of text.
- */
-void telnetd_input(struct telnetd_state *s, char *cmd);
-
-
-void telnetd_close(struct telnetd_state *s);
-void telnetd_output(struct telnetd_state *s, char *s1, char *s2);
-void telnetd_prompt(struct telnetd_state *s, char *str);
-
-void telnetd_app(void);
-
-#ifndef UIP_APPCALL
-#define UIP_APPCALL telnetd_app
-#endif
-
-#ifndef UIP_APPSTATE_SIZE
-#define UIP_APPSTATE_SIZE (sizeof(struct telnetd_state))
-#endif
-
-void telnetd_init(void);
-
-
-#endif /* __TELNET_H__ */
-
-/** @} */
diff --git a/FreeRTOS/Demo/uIP_Demo_Rowley_ARM7/uip/uIP_Task.c b/FreeRTOS/Demo/uIP_Demo_Rowley_ARM7/uip/uIP_Task.c
deleted file mode 100644
index fe79b5173..000000000
--- a/FreeRTOS/Demo/uIP_Demo_Rowley_ARM7/uip/uIP_Task.c
+++ /dev/null
@@ -1,201 +0,0 @@
-/*
- * Copyright (c) 2001-2003, Adam Dunkels.
- * All rights reserved.
- *
- * 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. The name of the author may not be used to endorse or promote
- * products derived from this software without specific prior
- * written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``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 AUTHOR 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.
- *
- * This file is part of the uIP TCP/IP stack.
- *
- * $Id: main.c,v 1.10.2.4 2003/10/21 21:27:51 adam Exp $
- *
- */
-
-
-#include <stdlib.h> /* For system(). */
-#include <stdio.h> /* For printf(). */
-
-#include "FreeRTOS.h"
-#include "task.h"
-
-#undef HTONS
-
-#include "cs8900a.h"
-#include "uip.h"
-#include "uip_arp.h"
-#include "tapdev.h"
-#include "httpd.h"
-
-static const struct uip_eth_addr ethaddr = {{0x00,0x00,0xe2,0x58,0xb6,0x6b}};
-
-#define BUF ((struct uip_eth_hdr *)&uip_buf[0])
-#define uipSHORT_DELAY ( ( TickType_t ) 2 / portTICK_PERIOD_MS )
-
-#ifndef NULL
-#define NULL (void *)0
-#endif /* NULL */
-
-static volatile TickType_t start, current;
-
-#define RT_CLOCK_SECOND ( configTICK_RATE_HZ / 2 )
-
-/*-----------------------------------------------------------------------------------*/
-/**
- * \internal
- * A real-time clock.
- *
- * This example main() function uses polling of a real-time clock in
- * order to know when the periodic processing should be
- * performed. This is implemented using this function - rt_ticks(). In
- * this example unix implementation, it simply calls the unix function
- * gettimeofday() which returns the current wall clock time.
- *
- * For a micro-controller, a simple way to implement this function is
- * by having a counter that is incremented by a timer interrupt and
- * read by this function.
- *
- * The macro RT_CLOCK_SECOND should be defined as the approximate
- * number of ticks that are elapsed during one second.
- */
-#define rt_ticks xTaskGetTickCount
-
-/*-----------------------------------------------------------------------------------*/
-void vuIP_TASK( void *pvParameters )
-{
-u8_t i, arptimer;
-u16_t addr[2];
-int z = 3;
-
- /* Initialize the uIP TCP/IP stack. */
- uip_init();
- uip_arp_init();
-
- /* Initialize the device driver. */
- cs8900a_init();
-
- /* Initialize the HTTP server. */
- httpd_init();
-
- start = rt_ticks();
- arptimer = 0;
-
- while(1)
- {
- /* Let the network device driver read an entire IP packet
- into the uip_buf. If it returns > 0, there is a packet in the
- uip_buf buffer. */
- uip_len = cs8900a_poll();
-
- if(uip_len > 0)
- {
- /* A packet is present in the packet buffer. We call the
- appropriate ARP functions depending on what kind of packet we
- have received. If the packet is an IP packet, we should call
- uip_input() as well. */
- if(BUF->type == htons(UIP_ETHTYPE_IP))
- {
- uip_arp_ipin();
- uip_input();
- /* If the above function invocation resulted in data that
- should be sent out on the network, the global variable
- uip_len is set to a value > 0. */
- if(uip_len > 0)
- {
- uip_arp_out();
- cs8900a_send();
- }
- }
- else if(BUF->type == htons(UIP_ETHTYPE_ARP))
- {
- uip_arp_arpin();
- /* If the above function invocation resulted in data that
- should be sent out on the network, the global variable
- uip_len is set to a value > 0. */
- if(uip_len > 0)
- {
- cs8900a_send();
- }
- }
- }
- else
- {
- /* The poll function returned 0, so no packet was
- received. Instead we check if there is time that we do the
- periodic processing. */
- current = rt_ticks();
-
- if((u16_t)(current - start) >= (u16_t)RT_CLOCK_SECOND / 2)
- {
- start = current;
-
- for(i = 0; i < UIP_CONNS; i++)
- {
- uip_periodic(i);
-
- /* If the above function invocation resulted in data that
- should be sent out on the network, the global variable
- uip_len is set to a value > 0. */
-
- if(uip_len > 0)
- {
- uip_arp_out();
- cs8900a_send();
- }
- }
-
- #if UIP_UDP
- for(i = 0; i < UIP_UDP_CONNS; i++)
- {
- uip_udp_periodic(i);
-
- /* If the above function invocation resulted in data that
- should be sent out on the network, the global variable
- uip_len is set to a value > 0. */
-
- if(uip_len > 0)
- {
- uip_arp_out();
- tapdev_send();
- }
- }
- #endif /* UIP_UDP */
-
- /* Call the ARP timer function every 10 seconds. */
- if(++arptimer == 20)
- {
- uip_arp_timer();
- arptimer = 0;
- }
- }
- else
- {
- vTaskDelay( uipSHORT_DELAY );
- } }
- }
-}
-/*-----------------------------------------------------------------------------------*/
-
-
-
-
diff --git a/FreeRTOS/Demo/uIP_Demo_Rowley_ARM7/uip/uip.c b/FreeRTOS/Demo/uIP_Demo_Rowley_ARM7/uip/uip.c
deleted file mode 100644
index 3ef7e8d6c..000000000
--- a/FreeRTOS/Demo/uIP_Demo_Rowley_ARM7/uip/uip.c
+++ /dev/null
@@ -1,1509 +0,0 @@
-/**
- * \addtogroup uip
- * @{
- */
-
-/**
- * \file
- * The uIP TCP/IP stack code.
- * \author Adam Dunkels <adam@dunkels.com>
- */
-
-/*
- * Copyright (c) 2001-2003, Adam Dunkels.
- * All rights reserved.
- *
- * 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. The name of the author may not be used to endorse or promote
- * products derived from this software without specific prior
- * written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``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 AUTHOR 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.
- *
- * This file is part of the uIP TCP/IP stack.
- *
- * $Id: uip.c,v 1.62.2.10 2003/10/07 13:23:01 adam Exp $
- *
- */
-
-/*
-This is a small implementation of the IP and TCP protocols (as well as
-some basic ICMP stuff). The implementation couples the IP, TCP and the
-application layers very tightly. To keep the size of the compiled code
-down, this code also features heavy usage of the goto statement.
-
-The principle is that we have a small buffer, called the uip_buf, in
-which the device driver puts an incoming packet. The TCP/IP stack
-parses the headers in the packet, and calls upon the application. If
-the remote host has sent data to the application, this data is present
-in the uip_buf and the application read the data from there. It is up
-to the application to put this data into a byte stream if needed. The
-application will not be fed with data that is out of sequence.
-
-If the application whishes to send data to the peer, it should put its
-data into the uip_buf, 40 bytes from the start of the buffer. The
-TCP/IP stack will calculate the checksums, and fill in the necessary
-header fields and finally send the packet back to the peer.
-*/
-
-#include "uip.h"
-#include "uipopt.h"
-#include "uip_arch.h"
-
-/*-----------------------------------------------------------------------------------*/
-/* Variable definitions. */
-
-
-/* The IP address of this host. If it is defined to be fixed (by setting UIP_FIXEDADDR to 1 in uipopt.h), the address is set here. Otherwise, the address */
-#if UIP_FIXEDADDR > 0
-const u16_t uip_hostaddr[2] =
- {HTONS((UIP_IPADDR0 << 8) | UIP_IPADDR1),
- HTONS((UIP_IPADDR2 << 8) | UIP_IPADDR3)};
-const u16_t uip_arp_draddr[2] =
- {HTONS((UIP_DRIPADDR0 << 8) | UIP_DRIPADDR1),
- HTONS((UIP_DRIPADDR2 << 8) | UIP_DRIPADDR3)};
-const u16_t uip_arp_netmask[2] =
- {HTONS((UIP_NETMASK0 << 8) | UIP_NETMASK1),
- HTONS((UIP_NETMASK2 << 8) | UIP_NETMASK3)};
-#else
-u16_t uip_hostaddr[2];
-u16_t uip_arp_draddr[2], uip_arp_netmask[2];
-#endif /* UIP_FIXEDADDR */
-
-u8_t uip_buf[UIP_BUFSIZE+2]; /* The packet buffer that contains
- incoming packets. */
-volatile u8_t *uip_appdata; /* The uip_appdata pointer points to
- application data. */
-volatile u8_t *uip_sappdata; /* The uip_appdata pointer points to the
- application data which is to be sent. */
-#if UIP_URGDATA > 0
-volatile u8_t *uip_urgdata; /* The uip_urgdata pointer points to
- urgent data (out-of-band data), if
- present. */
-volatile u8_t uip_urglen, uip_surglen;
-#endif /* UIP_URGDATA > 0 */
-
-volatile u16_t uip_len, uip_slen;
- /* The uip_len is either 8 or 16 bits,
- depending on the maximum packet
- size. */
-
-volatile u8_t uip_flags; /* The uip_flags variable is used for
- communication between the TCP/IP stack
- and the application program. */
-struct uip_conn *uip_conn; /* uip_conn always points to the current
- connection. */
-
-struct uip_conn uip_conns[UIP_CONNS];
- /* The uip_conns array holds all TCP
- connections. */
-u16_t uip_listenports[UIP_LISTENPORTS];
- /* The uip_listenports list all currently
- listning ports. */
-#if UIP_UDP
-struct uip_udp_conn *uip_udp_conn;
-struct uip_udp_conn uip_udp_conns[UIP_UDP_CONNS];
-#endif /* UIP_UDP */
-
-
-static u16_t ipid; /* Ths ipid variable is an increasing
- number that is used for the IP ID
- field. */
-
-static u8_t iss[4]; /* The iss variable is used for the TCP
- initial sequence number. */
-
-#if UIP_ACTIVE_OPEN
-static u16_t lastport; /* Keeps track of the last port used for
- a new connection. */
-#endif /* UIP_ACTIVE_OPEN */
-
-/* Temporary variables. */
-volatile u8_t uip_acc32[4];
-static u8_t c, opt;
-static u16_t tmp16;
-
-/* Structures and definitions. */
-#define TCP_FIN 0x01
-#define TCP_SYN 0x02
-#define TCP_RST 0x04
-#define TCP_PSH 0x08
-#define TCP_ACK 0x10
-#define TCP_URG 0x20
-#define TCP_CTL 0x3f
-
-#define ICMP_ECHO_REPLY 0
-#define ICMP_ECHO 8
-
-/* Macros. */
-#define BUF ((uip_tcpip_hdr *)&uip_buf[UIP_LLH_LEN])
-#define FBUF ((uip_tcpip_hdr *)&uip_reassbuf[0])
-#define ICMPBUF ((uip_icmpip_hdr *)&uip_buf[UIP_LLH_LEN])
-#define UDPBUF ((uip_udpip_hdr *)&uip_buf[UIP_LLH_LEN])
-
-#if UIP_STATISTICS == 1
-struct uip_stats uip_stat;
-#define UIP_STAT(s) s
-#else
-#define UIP_STAT(s)
-#endif /* UIP_STATISTICS == 1 */
-
-#if UIP_LOGGING == 1
-#include <stdio.h>
-void uip_log(char *msg);
-#define UIP_LOG(m) uip_log(m)
-#else
-#define UIP_LOG(m)
-#endif /* UIP_LOGGING == 1 */
-
-/*-----------------------------------------------------------------------------------*/
-void
-uip_init(void)
-{
- for(c = 0; c < UIP_LISTENPORTS; ++c) {
- uip_listenports[c] = 0;
- }
- for(c = 0; c < UIP_CONNS; ++c) {
- uip_conns[c].tcpstateflags = CLOSED;
- }
-#if UIP_ACTIVE_OPEN
- lastport = 1024;
-#endif /* UIP_ACTIVE_OPEN */
-
-#if UIP_UDP
- for(c = 0; c < UIP_UDP_CONNS; ++c) {
- uip_udp_conns[c].lport = 0;
- }
-#endif /* UIP_UDP */
-
-
- /* IPv4 initialization. */
-#if UIP_FIXEDADDR == 0
- uip_hostaddr[0] = uip_hostaddr[1] = 0;
-#endif /* UIP_FIXEDADDR */
-
-}
-/*-----------------------------------------------------------------------------------*/
-#if UIP_ACTIVE_OPEN
-struct uip_conn *
-uip_connect(u16_t *ripaddr, u16_t rport)
-{
- register struct uip_conn *conn, *cconn;
-
- /* Find an unused local port. */
- again:
- ++lastport;
-
- if(lastport >= 32000) {
- lastport = 4096;
- }
-
- /* Check if this port is already in use, and if so try to find
- another one. */
- for(c = 0; c < UIP_CONNS; ++c) {
- conn = &uip_conns[c];
- if(conn->tcpstateflags != CLOSED &&
- conn->lport == htons(lastport)) {
- goto again;
- }
- }
-
-
- conn = 0;
- for(c = 0; c < UIP_CONNS; ++c) {
- cconn = &uip_conns[c];
- if(cconn->tcpstateflags == CLOSED) {
- conn = cconn;
- break;
- }
- if(cconn->tcpstateflags == TIME_WAIT) {
- if(conn == 0 ||
- cconn->timer > uip_conn->timer) {
- conn = cconn;
- }
- }
- }
-
- if(conn == 0) {
- return 0;
- }
-
- conn->tcpstateflags = SYN_SENT;
-
- conn->snd_nxt[0] = iss[0];
- conn->snd_nxt[1] = iss[1];
- conn->snd_nxt[2] = iss[2];
- conn->snd_nxt[3] = iss[3];
-
- conn->initialmss = conn->mss = UIP_TCP_MSS;
-
- conn->len = 1; /* TCP length of the SYN is one. */
- conn->nrtx = 0;
- conn->timer = 1; /* Send the SYN next time around. */
- conn->rto = UIP_RTO;
- conn->sa = 0;
- conn->sv = 16;
- conn->lport = htons(lastport);
- conn->rport = rport;
- conn->ripaddr[0] = ripaddr[0];
- conn->ripaddr[1] = ripaddr[1];
-
- return conn;
-}
-#endif /* UIP_ACTIVE_OPEN */
-/*-----------------------------------------------------------------------------------*/
-#if UIP_UDP
-struct uip_udp_conn *
-uip_udp_new(u16_t *ripaddr, u16_t rport)
-{
- register struct uip_udp_conn *conn;
-
- /* Find an unused local port. */
- again:
- ++lastport;
-
- if(lastport >= 32000) {
- lastport = 4096;
- }
-
- for(c = 0; c < UIP_UDP_CONNS; ++c) {
- if(uip_udp_conns[c].lport == lastport) {
- goto again;
- }
- }
-
-
- conn = 0;
- for(c = 0; c < UIP_UDP_CONNS; ++c) {
- if(uip_udp_conns[c].lport == 0) {
- conn = &uip_udp_conns[c];
- break;
- }
- }
-
- if(conn == 0) {
- return 0;
- }
-
- conn->lport = HTONS(lastport);
- conn->rport = HTONS(rport);
- conn->ripaddr[0] = ripaddr[0];
- conn->ripaddr[1] = ripaddr[1];
-
- return conn;
-}
-#endif /* UIP_UDP */
-/*-----------------------------------------------------------------------------------*/
-void
-uip_unlisten(u16_t port)
-{
- for(c = 0; c < UIP_LISTENPORTS; ++c) {
- if(uip_listenports[c] == port) {
- uip_listenports[c] = 0;
- return;
- }
- }
-}
-/*-----------------------------------------------------------------------------------*/
-void
-uip_listen(u16_t port)
-{
- for(c = 0; c < UIP_LISTENPORTS; ++c) {
- if(uip_listenports[c] == 0) {
- uip_listenports[c] = port;
- return;
- }
- }
-}
-/*-----------------------------------------------------------------------------------*/
-/* XXX: IP fragment reassembly: not well-tested. */
-
-#if UIP_REASSEMBLY
-#define UIP_REASS_BUFSIZE (UIP_BUFSIZE - UIP_LLH_LEN)
-static u8_t uip_reassbuf[UIP_REASS_BUFSIZE];
-static u8_t uip_reassbitmap[UIP_REASS_BUFSIZE / (8 * 8)];
-static const u8_t bitmap_bits[8] = {0xff, 0x7f, 0x3f, 0x1f,
- 0x0f, 0x07, 0x03, 0x01};
-static u16_t uip_reasslen;
-static u8_t uip_reassflags;
-#define UIP_REASS_FLAG_LASTFRAG 0x01
-static u8_t uip_reasstmr;
-
-#define IP_HLEN 20
-#define IP_MF 0x20
-
-static u8_t
-uip_reass(void)
-{
- u16_t offset, len;
- u16_t i;
-
- /* If ip_reasstmr is zero, no packet is present in the buffer, so we
- write the IP header of the fragment into the reassembly
- buffer. The timer is updated with the maximum age. */
- if(uip_reasstmr == 0) {
- memcpy(uip_reassbuf, &BUF->vhl, IP_HLEN);
- uip_reasstmr = UIP_REASS_MAXAGE;
- uip_reassflags = 0;
- /* Clear the bitmap. */
- memset(uip_reassbitmap, sizeof(uip_reassbitmap), 0);
- }
-
- /* Check if the incoming fragment matches the one currently present
- in the reasembly buffer. If so, we proceed with copying the
- fragment into the buffer. */
- if(BUF->srcipaddr[0] == FBUF->srcipaddr[0] &&
- BUF->srcipaddr[1] == FBUF->srcipaddr[1] &&
- BUF->destipaddr[0] == FBUF->destipaddr[0] &&
- BUF->destipaddr[1] == FBUF->destipaddr[1] &&
- BUF->ipid[0] == FBUF->ipid[0] &&
- BUF->ipid[1] == FBUF->ipid[1]) {
-
- len = (BUF->len[0] << 8) + BUF->len[1] - (BUF->vhl & 0x0f) * 4;
- offset = (((BUF->ipoffset[0] & 0x3f) << 8) + BUF->ipoffset[1]) * 8;
-
- /* If the offset or the offset + fragment length overflows the
- reassembly buffer, we discard the entire packet. */
- if(offset > UIP_REASS_BUFSIZE ||
- offset + len > UIP_REASS_BUFSIZE) {
- uip_reasstmr = 0;
- goto nullreturn;
- }
-
- /* Copy the fragment into the reassembly buffer, at the right
- offset. */
- memcpy(&uip_reassbuf[IP_HLEN + offset],
- (char *)BUF + (int)((BUF->vhl & 0x0f) * 4),
- len);
-
- /* Update the bitmap. */
- if(offset / (8 * 8) == (offset + len) / (8 * 8)) {
- /* If the two endpoints are in the same byte, we only update
- that byte. */
-
- uip_reassbitmap[offset / (8 * 8)] |=
- bitmap_bits[(offset / 8 ) & 7] &
- ~bitmap_bits[((offset + len) / 8 ) & 7];
- } else {
- /* If the two endpoints are in different bytes, we update the
- bytes in the endpoints and fill the stuff inbetween with
- 0xff. */
- uip_reassbitmap[offset / (8 * 8)] |=
- bitmap_bits[(offset / 8 ) & 7];
- for(i = 1 + offset / (8 * 8); i < (offset + len) / (8 * 8); ++i) {
- uip_reassbitmap[i] = 0xff;
- }
- uip_reassbitmap[(offset + len) / (8 * 8)] |=
- ~bitmap_bits[((offset + len) / 8 ) & 7];
- }
-
- /* If this fragment has the More Fragments flag set to zero, we
- know that this is the last fragment, so we can calculate the
- size of the entire packet. We also set the
- IP_REASS_FLAG_LASTFRAG flag to indicate that we have received
- the final fragment. */
-
- if((BUF->ipoffset[0] & IP_MF) == 0) {
- uip_reassflags |= UIP_REASS_FLAG_LASTFRAG;
- uip_reasslen = offset + len;
- }
-
- /* Finally, we check if we have a full packet in the buffer. We do
- this by checking if we have the last fragment and if all bits
- in the bitmap are set. */
- if(uip_reassflags & UIP_REASS_FLAG_LASTFRAG) {
- /* Check all bytes up to and including all but the last byte in
- the bitmap. */
- for(i = 0; i < uip_reasslen / (8 * 8) - 1; ++i) {
- if(uip_reassbitmap[i] != 0xff) {
- goto nullreturn;
- }
- }
- /* Check the last byte in the bitmap. It should contain just the
- right amount of bits. */
- if(uip_reassbitmap[uip_reasslen / (8 * 8)] !=
- (u8_t)~bitmap_bits[uip_reasslen / 8 & 7]) {
- goto nullreturn;
- }
-
- /* If we have come this far, we have a full packet in the
- buffer, so we allocate a pbuf and copy the packet into it. We
- also reset the timer. */
- uip_reasstmr = 0;
- memcpy(BUF, FBUF, uip_reasslen);
-
- /* Pretend to be a "normal" (i.e., not fragmented) IP packet
- from now on. */
- BUF->ipoffset[0] = BUF->ipoffset[1] = 0;
- BUF->len[0] = uip_reasslen >> 8;
- BUF->len[1] = uip_reasslen & 0xff;
- BUF->ipchksum = 0;
- BUF->ipchksum = ~(uip_ipchksum());
-
- return uip_reasslen;
- }
- }
-
- nullreturn:
- return 0;
-}
-#endif /* UIP_REASSEMBL */
-/*-----------------------------------------------------------------------------------*/
-static void
-uip_add_rcv_nxt(u16_t n)
-{
- uip_add32(uip_conn->rcv_nxt, n);
- uip_conn->rcv_nxt[0] = uip_acc32[0];
- uip_conn->rcv_nxt[1] = uip_acc32[1];
- uip_conn->rcv_nxt[2] = uip_acc32[2];
- uip_conn->rcv_nxt[3] = uip_acc32[3];
-}
-/*-----------------------------------------------------------------------------------*/
-void
-uip_process(u8_t flag)
-{
- register struct uip_conn *uip_connr = uip_conn;
-
- uip_appdata = &uip_buf[40 + UIP_LLH_LEN];
-
-
- /* Check if we were invoked because of the perodic timer fireing. */
- if(flag == UIP_TIMER) {
-#if UIP_REASSEMBLY
- if(uip_reasstmr != 0) {
- --uip_reasstmr;
- }
-#endif /* UIP_REASSEMBLY */
- /* Increase the initial sequence number. */
- if(++iss[3] == 0) {
- if(++iss[2] == 0) {
- if(++iss[1] == 0) {
- ++iss[0];
- }
- }
- }
- uip_len = 0;
- if(uip_connr->tcpstateflags == TIME_WAIT ||
- uip_connr->tcpstateflags == FIN_WAIT_2) {
- ++(uip_connr->timer);
- if(uip_connr->timer == UIP_TIME_WAIT_TIMEOUT) {
- uip_connr->tcpstateflags = CLOSED;
- }
- } else if(uip_connr->tcpstateflags != CLOSED) {
- /* If the connection has outstanding data, we increase the
- connection's timer and see if it has reached the RTO value
- in which case we retransmit. */
- if(uip_outstanding(uip_connr)) {
- if(uip_connr->timer-- == 0) {
- if(uip_connr->nrtx == UIP_MAXRTX ||
- ((uip_connr->tcpstateflags == SYN_SENT ||
- uip_connr->tcpstateflags == SYN_RCVD) &&
- uip_connr->nrtx == UIP_MAXSYNRTX)) {
- uip_connr->tcpstateflags = CLOSED;
-
- /* We call UIP_APPCALL() with uip_flags set to
- UIP_TIMEDOUT to inform the application that the
- connection has timed out. */
- uip_flags = UIP_TIMEDOUT;
- UIP_APPCALL();
-
- /* We also send a reset packet to the remote host. */
- BUF->flags = TCP_RST | TCP_ACK;
- goto tcp_send_nodata;
- }
-
- /* Exponential backoff. */
- uip_connr->timer = UIP_RTO << (uip_connr->nrtx > 4?
- 4:
- uip_connr->nrtx);
- ++(uip_connr->nrtx);
-
- /* Ok, so we need to retransmit. We do this differently
- depending on which state we are in. In ESTABLISHED, we
- call upon the application so that it may prepare the
- data for the retransmit. In SYN_RCVD, we resend the
- SYNACK that we sent earlier and in LAST_ACK we have to
- retransmit our FINACK. */
- UIP_STAT(++uip_stat.tcp.rexmit);
- switch(uip_connr->tcpstateflags & TS_MASK) {
- case SYN_RCVD:
- /* In the SYN_RCVD state, we should retransmit our
- SYNACK. */
- goto tcp_send_synack;
-
-#if UIP_ACTIVE_OPEN
- case SYN_SENT:
- /* In the SYN_SENT state, we retransmit out SYN. */
- BUF->flags = 0;
- goto tcp_send_syn;
-#endif /* UIP_ACTIVE_OPEN */
-
- case ESTABLISHED:
- /* In the ESTABLISHED state, we call upon the application
- to do the actual retransmit after which we jump into
- the code for sending out the packet (the apprexmit
- label). */
- uip_len = 0;
- uip_slen = 0;
- uip_flags = UIP_REXMIT;
- UIP_APPCALL();
- goto apprexmit;
-
- case FIN_WAIT_1:
- case CLOSING:
- case LAST_ACK:
- /* In all these states we should retransmit a FINACK. */
- goto tcp_send_finack;
-
- }
- }
- } else if((uip_connr->tcpstateflags & TS_MASK) == ESTABLISHED) {
- /* If there was no need for a retransmission, we poll the
- application for new data. */
- uip_len = 0;
- uip_slen = 0;
- uip_flags = UIP_POLL;
- UIP_APPCALL();
- goto appsend;
- }
- }
- goto drop;
- }
-#if UIP_UDP
- if(flag == UIP_UDP_TIMER) {
- if(uip_udp_conn->lport != 0) {
- uip_appdata = &uip_buf[UIP_LLH_LEN + 28];
- uip_len = uip_slen = 0;
- uip_flags = UIP_POLL;
- UIP_UDP_APPCALL();
- goto udp_send;
- } else {
- goto drop;
- }
- }
-#endif
-
- /* This is where the input processing starts. */
- UIP_STAT(++uip_stat.ip.recv);
-
-
- /* Start of IPv4 input header processing code. */
-
- /* Check validity of the IP header. */
- if(BUF->vhl != 0x45) { /* IP version and header length. */
- UIP_STAT(++uip_stat.ip.drop);
- UIP_STAT(++uip_stat.ip.vhlerr);
- UIP_LOG("ip: invalid version or header length.");
- goto drop;
- }
-
- /* Check the size of the packet. If the size reported to us in
- uip_len doesn't match the size reported in the IP header, there
- has been a transmission error and we drop the packet. */
-
- if(BUF->len[0] != (uip_len >> 8)) { /* IP length, high byte. */
- uip_len = (uip_len & 0xff) | (BUF->len[0] << 8);
- }
- if(BUF->len[1] != (uip_len & 0xff)) { /* IP length, low byte. */
- uip_len = (uip_len & 0xff00) | BUF->len[1];
- }
-
- /* Check the fragment flag. */
- if((BUF->ipoffset[0] & 0x3f) != 0 ||
- BUF->ipoffset[1] != 0) {
-#if UIP_REASSEMBLY
- uip_len = uip_reass();
- if(uip_len == 0) {
- goto drop;
- }
-#else
- UIP_STAT(++uip_stat.ip.drop);
- UIP_STAT(++uip_stat.ip.fragerr);
- UIP_LOG("ip: fragment dropped.");
- goto drop;
-#endif /* UIP_REASSEMBLY */
- }
-
- /* If we are configured to use ping IP address configuration and
- hasn't been assigned an IP address yet, we accept all ICMP
- packets. */
-#if UIP_PINGADDRCONF
- if((uip_hostaddr[0] | uip_hostaddr[1]) == 0) {
- if(BUF->proto == UIP_PROTO_ICMP) {
- UIP_LOG("ip: possible ping config packet received.");
- goto icmp_input;
- } else {
- UIP_LOG("ip: packet dropped since no address assigned.");
- goto drop;
- }
- }
-#endif /* UIP_PINGADDRCONF */
-
- /* Check if the packet is destined for our IP address. */
- if(BUF->destipaddr[0] != uip_hostaddr[0]) {
- UIP_STAT(++uip_stat.ip.drop);
- UIP_LOG("ip: packet not for us.");
- goto drop;
- }
- if(BUF->destipaddr[1] != uip_hostaddr[1]) {
- UIP_STAT(++uip_stat.ip.drop);
- UIP_LOG("ip: packet not for us.");
- goto drop;
- }
-
-#if 0
- // IP checksum is wrong through Netgear DSL router
- if (uip_ipchksum() != 0xffff) { /* Compute and check the IP header
- checksum. */
- UIP_STAT(++uip_stat.ip.drop);
- UIP_STAT(++uip_stat.ip.chkerr);
- UIP_LOG("ip: bad checksum.");
- goto drop;
- }
-#endif
-
- if(BUF->proto == UIP_PROTO_TCP) /* Check for TCP packet. If so, jump
- to the tcp_input label. */
- goto tcp_input;
-
-#if UIP_UDP
- if(BUF->proto == UIP_PROTO_UDP)
- goto udp_input;
-#endif /* UIP_UDP */
-
- if(BUF->proto != UIP_PROTO_ICMP) { /* We only allow ICMP packets from
- here. */
- UIP_STAT(++uip_stat.ip.drop);
- UIP_STAT(++uip_stat.ip.protoerr);
- UIP_LOG("ip: neither tcp nor icmp.");
- goto drop;
- }
-
- icmp_input:
- UIP_STAT(++uip_stat.icmp.recv);
-
- /* ICMP echo (i.e., ping) processing. This is simple, we only change
- the ICMP type from ECHO to ECHO_REPLY and adjust the ICMP
- checksum before we return the packet. */
- if(ICMPBUF->type != ICMP_ECHO) {
- UIP_STAT(++uip_stat.icmp.drop);
- UIP_STAT(++uip_stat.icmp.typeerr);
- UIP_LOG("icmp: not icmp echo.");
- goto drop;
- }
-
- /* If we are configured to use ping IP address assignment, we use
- the destination IP address of this ping packet and assign it to
- ourself. */
-#if UIP_PINGADDRCONF
- if((uip_hostaddr[0] | uip_hostaddr[1]) == 0) {
- uip_hostaddr[0] = BUF->destipaddr[0];
- uip_hostaddr[1] = BUF->destipaddr[1];
- }
-#endif /* UIP_PINGADDRCONF */
-
- ICMPBUF->type = ICMP_ECHO_REPLY;
-
- if(ICMPBUF->icmpchksum >= HTONS(0xffff - (ICMP_ECHO << 8))) {
- ICMPBUF->icmpchksum += HTONS(ICMP_ECHO << 8) + 1;
- } else {
- ICMPBUF->icmpchksum += HTONS(ICMP_ECHO << 8);
- }
-
- /* Swap IP addresses. */
- tmp16 = BUF->destipaddr[0];
- BUF->destipaddr[0] = BUF->srcipaddr[0];
- BUF->srcipaddr[0] = tmp16;
- tmp16 = BUF->destipaddr[1];
- BUF->destipaddr[1] = BUF->srcipaddr[1];
- BUF->srcipaddr[1] = tmp16;
-
- UIP_STAT(++uip_stat.icmp.sent);
- goto send;
-
- /* End of IPv4 input header processing code. */
-
-
-#if UIP_UDP
- /* UDP input processing. */
- udp_input:
- /* UDP processing is really just a hack. We don't do anything to the
- UDP/IP headers, but let the UDP application do all the hard
- work. If the application sets uip_slen, it has a packet to
- send. */
-#if UIP_UDP_CHECKSUMS
- if(uip_udpchksum() != 0xffff) {
- UIP_STAT(++uip_stat.udp.drop);
- UIP_STAT(++uip_stat.udp.chkerr);
- UIP_LOG("udp: bad checksum.");
- goto drop;
- }
-#endif /* UIP_UDP_CHECKSUMS */
-
- /* Demultiplex this UDP packet between the UDP "connections". */
- for(uip_udp_conn = &uip_udp_conns[0];
- uip_udp_conn < &uip_udp_conns[UIP_UDP_CONNS];
- ++uip_udp_conn) {
- if(uip_udp_conn->lport != 0 &&
- UDPBUF->destport == uip_udp_conn->lport &&
- (uip_udp_conn->rport == 0 ||
- UDPBUF->srcport == uip_udp_conn->rport) &&
- BUF->srcipaddr[0] == uip_udp_conn->ripaddr[0] &&
- BUF->srcipaddr[1] == uip_udp_conn->ripaddr[1]) {
- goto udp_found;
- }
- }
- goto drop;
-
- udp_found:
- uip_len = uip_len - 28;
- uip_appdata = &uip_buf[UIP_LLH_LEN + 28];
- uip_flags = UIP_NEWDATA;
- uip_slen = 0;
- UIP_UDP_APPCALL();
- udp_send:
- if(uip_slen == 0) {
- goto drop;
- }
- uip_len = uip_slen + 28;
-
- BUF->len[0] = (uip_len >> 8);
- BUF->len[1] = (uip_len & 0xff);
-
- BUF->proto = UIP_PROTO_UDP;
-
- UDPBUF->udplen = HTONS(uip_slen + 8);
- UDPBUF->udpchksum = 0;
-#if UIP_UDP_CHECKSUMS
- /* Calculate UDP checksum. */
- UDPBUF->udpchksum = ~(uip_udpchksum());
- if(UDPBUF->udpchksum == 0) {
- UDPBUF->udpchksum = 0xffff;
- }
-#endif /* UIP_UDP_CHECKSUMS */
-
- BUF->srcport = uip_udp_conn->lport;
- BUF->destport = uip_udp_conn->rport;
-
- BUF->srcipaddr[0] = uip_hostaddr[0];
- BUF->srcipaddr[1] = uip_hostaddr[1];
- BUF->destipaddr[0] = uip_udp_conn->ripaddr[0];
- BUF->destipaddr[1] = uip_udp_conn->ripaddr[1];
-
- uip_appdata = &uip_buf[UIP_LLH_LEN + 40];
- goto ip_send_nolen;
-#endif /* UIP_UDP */
-
- /* TCP input processing. */
- tcp_input:
- UIP_STAT(++uip_stat.tcp.recv);
-
- /* Start of TCP input header processing code. */
-
-#if 1 // FIXME
- if(uip_tcpchksum() != 0xffff) { /* Compute and check the TCP
- checksum. */
- UIP_STAT(++uip_stat.tcp.drop);
- UIP_STAT(++uip_stat.tcp.chkerr);
- UIP_LOG("tcp: bad checksum.");
- goto drop;
- }
-#endif
-
- /* Demultiplex this segment. */
- /* First check any active connections. */
- for(uip_connr = &uip_conns[0]; uip_connr < &uip_conns[UIP_CONNS]; ++uip_connr) {
- if(uip_connr->tcpstateflags != CLOSED &&
- BUF->destport == uip_connr->lport &&
- BUF->srcport == uip_connr->rport &&
- BUF->srcipaddr[0] == uip_connr->ripaddr[0] &&
- BUF->srcipaddr[1] == uip_connr->ripaddr[1]) {
- goto found;
- }
- }
-
- /* If we didn't find and active connection that expected the packet,
- either this packet is an old duplicate, or this is a SYN packet
- destined for a connection in LISTEN. If the SYN flag isn't set,
- it is an old packet and we send a RST. */
- if((BUF->flags & TCP_CTL) != TCP_SYN)
- goto reset;
-
- tmp16 = BUF->destport;
- /* Next, check listening connections. */
- for(c = 0; c < UIP_LISTENPORTS; ++c) {
- if(tmp16 == uip_listenports[c])
- goto found_listen;
- }
-
- /* No matching connection found, so we send a RST packet. */
- UIP_STAT(++uip_stat.tcp.synrst);
- reset:
-
- /* We do not send resets in response to resets. */
- if(BUF->flags & TCP_RST)
- goto drop;
-
- UIP_STAT(++uip_stat.tcp.rst);
-
- BUF->flags = TCP_RST | TCP_ACK;
- uip_len = 40;
- BUF->tcpoffset = 5 << 4;
-
- /* Flip the seqno and ackno fields in the TCP header. */
- c = BUF->seqno[3];
- BUF->seqno[3] = BUF->ackno[3];
- BUF->ackno[3] = c;
-
- c = BUF->seqno[2];
- BUF->seqno[2] = BUF->ackno[2];
- BUF->ackno[2] = c;
-
- c = BUF->seqno[1];
- BUF->seqno[1] = BUF->ackno[1];
- BUF->ackno[1] = c;
-
- c = BUF->seqno[0];
- BUF->seqno[0] = BUF->ackno[0];
- BUF->ackno[0] = c;
-
- /* We also have to increase the sequence number we are
- acknowledging. If the least significant byte overflowed, we need
- to propagate the carry to the other bytes as well. */
- if(++BUF->ackno[3] == 0) {
- if(++BUF->ackno[2] == 0) {
- if(++BUF->ackno[1] == 0) {
- ++BUF->ackno[0];
- }
- }
- }
-
- /* Swap port numbers. */
- tmp16 = BUF->srcport;
- BUF->srcport = BUF->destport;
- BUF->destport = tmp16;
-
- /* Swap IP addresses. */
- tmp16 = BUF->destipaddr[0];
- BUF->destipaddr[0] = BUF->srcipaddr[0];
- BUF->srcipaddr[0] = tmp16;
- tmp16 = BUF->destipaddr[1];
- BUF->destipaddr[1] = BUF->srcipaddr[1];
- BUF->srcipaddr[1] = tmp16;
-
-
- /* And send out the RST packet! */
- goto tcp_send_noconn;
-
- /* This label will be jumped to if we matched the incoming packet
- with a connection in LISTEN. In that case, we should create a new
- connection and send a SYNACK in return. */
- found_listen:
- /* First we check if there are any connections avaliable. Unused
- connections are kept in the same table as used connections, but
- unused ones have the tcpstate set to CLOSED. Also, connections in
- TIME_WAIT are kept track of and we'll use the oldest one if no
- CLOSED connections are found. Thanks to Eddie C. Dost for a very
- nice algorithm for the TIME_WAIT search. */
- uip_connr = 0;
- for(c = 0; c < UIP_CONNS; ++c) {
- if(uip_conns[c].tcpstateflags == CLOSED) {
- uip_connr = &uip_conns[c];
- break;
- }
- if(uip_conns[c].tcpstateflags == TIME_WAIT) {
- if(uip_connr == 0 ||
- uip_conns[c].timer > uip_connr->timer) {
- uip_connr = &uip_conns[c];
- }
- }
- }
-
- if(uip_connr == 0) {
- /* All connections are used already, we drop packet and hope that
- the remote end will retransmit the packet at a time when we
- have more spare connections. */
- UIP_STAT(++uip_stat.tcp.syndrop);
- UIP_LOG("tcp: found no unused connections.");
- goto drop;
- }
- uip_conn = uip_connr;
-
- /* Fill in the necessary fields for the new connection. */
- uip_connr->rto = uip_connr->timer = UIP_RTO;
- uip_connr->sa = 0;
- uip_connr->sv = 4;
- uip_connr->nrtx = 0;
- uip_connr->lport = BUF->destport;
- uip_connr->rport = BUF->srcport;
- uip_connr->ripaddr[0] = BUF->srcipaddr[0];
- uip_connr->ripaddr[1] = BUF->srcipaddr[1];
- uip_connr->tcpstateflags = SYN_RCVD;
-
- uip_connr->snd_nxt[0] = iss[0];
- uip_connr->snd_nxt[1] = iss[1];
- uip_connr->snd_nxt[2] = iss[2];
- uip_connr->snd_nxt[3] = iss[3];
- uip_connr->len = 1;
-
- /* rcv_nxt should be the seqno from the incoming packet + 1. */
- uip_connr->rcv_nxt[3] = BUF->seqno[3];
- uip_connr->rcv_nxt[2] = BUF->seqno[2];
- uip_connr->rcv_nxt[1] = BUF->seqno[1];
- uip_connr->rcv_nxt[0] = BUF->seqno[0];
- uip_add_rcv_nxt(1);
-
- /* Parse the TCP MSS option, if present. */
- if((BUF->tcpoffset & 0xf0) > 0x50) {
- for(c = 0; c < ((BUF->tcpoffset >> 4) - 5) << 2 ;) {
- opt = uip_buf[UIP_TCPIP_HLEN + UIP_LLH_LEN + c];
- if(opt == 0x00) {
- /* End of options. */
- break;
- } else if(opt == 0x01) {
- ++c;
- /* NOP option. */
- } else if(opt == 0x02 &&
- uip_buf[UIP_TCPIP_HLEN + UIP_LLH_LEN + 1 + c] == 0x04) {
- /* An MSS option with the right option length. */
- tmp16 = ((u16_t)uip_buf[UIP_TCPIP_HLEN + UIP_LLH_LEN + 2 + c] << 8) |
- (u16_t)uip_buf[40 + UIP_LLH_LEN + 3 + c];
- uip_connr->initialmss = uip_connr->mss =
- tmp16 > UIP_TCP_MSS? UIP_TCP_MSS: tmp16;
-
- /* And we are done processing options. */
- break;
- } else {
- /* All other options have a length field, so that we easily
- can skip past them. */
- if(uip_buf[UIP_TCPIP_HLEN + UIP_LLH_LEN + 1 + c] == 0) {
- /* If the length field is zero, the options are malformed
- and we don't process them further. */
- break;
- }
- c += uip_buf[UIP_TCPIP_HLEN + UIP_LLH_LEN + 1 + c];
- }
- }
- }
-
- /* Our response will be a SYNACK. */
-#if UIP_ACTIVE_OPEN
- tcp_send_synack:
- BUF->flags = TCP_ACK;
-
- tcp_send_syn:
- BUF->flags |= TCP_SYN;
-#else /* UIP_ACTIVE_OPEN */
- tcp_send_synack:
- BUF->flags = TCP_SYN | TCP_ACK;
-#endif /* UIP_ACTIVE_OPEN */
-
- /* We send out the TCP Maximum Segment Size option with our
- SYNACK. */
- BUF->optdata[0] = 2;
- BUF->optdata[1] = 4;
- BUF->optdata[2] = (UIP_TCP_MSS) / 256;
- BUF->optdata[3] = (UIP_TCP_MSS) & 255;
- uip_len = 44;
- BUF->tcpoffset = 6 << 4;
- goto tcp_send;
-
- /* This label will be jumped to if we found an active connection. */
- found:
- uip_conn = uip_connr;
- uip_flags = 0;
-
- /* We do a very naive form of TCP reset processing; we just accept
- any RST and kill our connection. We should in fact check if the
- sequence number of this reset is wihtin our advertised window
- before we accept the reset. */
- if(BUF->flags & TCP_RST) {
- uip_connr->tcpstateflags = CLOSED;
- UIP_LOG("tcp: got reset, aborting connection.");
- uip_flags = UIP_ABORT;
- UIP_APPCALL();
- goto drop;
- }
- /* Calculated the length of the data, if the application has sent
- any data to us. */
- c = (BUF->tcpoffset >> 4) << 2;
- /* uip_len will contain the length of the actual TCP data. This is
- calculated by subtracing the length of the TCP header (in
- c) and the length of the IP header (20 bytes). */
- uip_len = uip_len - c - 20;
-
- /* First, check if the sequence number of the incoming packet is
- what we're expecting next. If not, we send out an ACK with the
- correct numbers in. */
- if(uip_len > 0 &&
- (BUF->seqno[0] != uip_connr->rcv_nxt[0] ||
- BUF->seqno[1] != uip_connr->rcv_nxt[1] ||
- BUF->seqno[2] != uip_connr->rcv_nxt[2] ||
- BUF->seqno[3] != uip_connr->rcv_nxt[3])) {
- goto tcp_send_ack;
- }
-
- /* Next, check if the incoming segment acknowledges any outstanding
- data. If so, we update the sequence number, reset the length of
- the outstanding data, calculate RTT estimations, and reset the
- retransmission timer. */
- if((BUF->flags & TCP_ACK) && uip_outstanding(uip_connr)) {
- uip_add32(uip_connr->snd_nxt, uip_connr->len);
- if(BUF->ackno[0] == uip_acc32[0] &&
- BUF->ackno[1] == uip_acc32[1] &&
- BUF->ackno[2] == uip_acc32[2] &&
- BUF->ackno[3] == uip_acc32[3]) {
- /* Update sequence number. */
- uip_connr->snd_nxt[0] = uip_acc32[0];
- uip_connr->snd_nxt[1] = uip_acc32[1];
- uip_connr->snd_nxt[2] = uip_acc32[2];
- uip_connr->snd_nxt[3] = uip_acc32[3];
-
-
- /* Do RTT estimation, unless we have done retransmissions. */
- if(uip_connr->nrtx == 0) {
- signed char m;
- m = uip_connr->rto - uip_connr->timer;
- /* This is taken directly from VJs original code in his paper */
- m = m - (uip_connr->sa >> 3);
- uip_connr->sa += m;
- if(m < 0) {
- m = -m;
- }
- m = m - (uip_connr->sv >> 2);
- uip_connr->sv += m;
- uip_connr->rto = (uip_connr->sa >> 3) + uip_connr->sv;
-
- }
- /* Set the acknowledged flag. */
- uip_flags = UIP_ACKDATA;
- /* Reset the retransmission timer. */
- uip_connr->timer = uip_connr->rto;
- }
-
- }
-
- /* Do different things depending on in what state the connection is. */
- switch(uip_connr->tcpstateflags & TS_MASK) {
- /* CLOSED and LISTEN are not handled here. CLOSE_WAIT is not
- implemented, since we force the application to close when the
- peer sends a FIN (hence the application goes directly from
- ESTABLISHED to LAST_ACK). */
- case SYN_RCVD:
- /* In SYN_RCVD we have sent out a SYNACK in response to a SYN, and
- we are waiting for an ACK that acknowledges the data we sent
- out the last time. Therefore, we want to have the UIP_ACKDATA
- flag set. If so, we enter the ESTABLISHED state. */
- if(uip_flags & UIP_ACKDATA) {
- uip_connr->tcpstateflags = ESTABLISHED;
- uip_flags = UIP_CONNECTED;
- uip_connr->len = 0;
- if(uip_len > 0) {
- uip_flags |= UIP_NEWDATA;
- uip_add_rcv_nxt(uip_len);
- }
- uip_slen = 0;
- UIP_APPCALL();
- goto appsend;
- }
- goto drop;
-#if UIP_ACTIVE_OPEN
- case SYN_SENT:
- /* In SYN_SENT, we wait for a SYNACK that is sent in response to
- our SYN. The rcv_nxt is set to sequence number in the SYNACK
- plus one, and we send an ACK. We move into the ESTABLISHED
- state. */
- if((uip_flags & UIP_ACKDATA) &&
- BUF->flags == (TCP_SYN | TCP_ACK)) {
-
- /* Parse the TCP MSS option, if present. */
- if((BUF->tcpoffset & 0xf0) > 0x50) {
- for(c = 0; c < ((BUF->tcpoffset >> 4) - 5) << 2 ;) {
- opt = uip_buf[40 + UIP_LLH_LEN + c];
- if(opt == 0x00) {
- /* End of options. */
- break;
- } else if(opt == 0x01) {
- ++c;
- /* NOP option. */
- } else if(opt == 0x02 &&
- uip_buf[UIP_TCPIP_HLEN + UIP_LLH_LEN + 1 + c] == 0x04) {
- /* An MSS option with the right option length. */
- tmp16 = (uip_buf[UIP_TCPIP_HLEN + UIP_LLH_LEN + 2 + c] << 8) |
- uip_buf[UIP_TCPIP_HLEN + UIP_LLH_LEN + 3 + c];
- uip_connr->initialmss =
- uip_connr->mss = tmp16 > UIP_TCP_MSS? UIP_TCP_MSS: tmp16;
-
- /* And we are done processing options. */
- break;
- } else {
- /* All other options have a length field, so that we easily
- can skip past them. */
- if(uip_buf[UIP_TCPIP_HLEN + UIP_LLH_LEN + 1 + c] == 0) {
- /* If the length field is zero, the options are malformed
- and we don't process them further. */
- break;
- }
- c += uip_buf[UIP_TCPIP_HLEN + UIP_LLH_LEN + 1 + c];
- }
- }
- }
- uip_connr->tcpstateflags = ESTABLISHED;
- uip_connr->rcv_nxt[0] = BUF->seqno[0];
- uip_connr->rcv_nxt[1] = BUF->seqno[1];
- uip_connr->rcv_nxt[2] = BUF->seqno[2];
- uip_connr->rcv_nxt[3] = BUF->seqno[3];
- uip_add_rcv_nxt(1);
- uip_flags = UIP_CONNECTED | UIP_NEWDATA;
- uip_connr->len = 0;
- uip_len = 0;
- uip_slen = 0;
- UIP_APPCALL();
- goto appsend;
- }
- goto reset;
-#endif /* UIP_ACTIVE_OPEN */
-
- case ESTABLISHED:
- /* In the ESTABLISHED state, we call upon the application to feed
- data into the uip_buf. If the UIP_ACKDATA flag is set, the
- application should put new data into the buffer, otherwise we are
- retransmitting an old segment, and the application should put that
- data into the buffer.
-
- If the incoming packet is a FIN, we should close the connection on
- this side as well, and we send out a FIN and enter the LAST_ACK
- state. We require that there is no outstanding data; otherwise the
- sequence numbers will be screwed up. */
-
- if(BUF->flags & TCP_FIN) {
- if(uip_outstanding(uip_connr)) {
- goto drop;
- }
- uip_add_rcv_nxt(1 + uip_len);
- uip_flags = UIP_CLOSE;
- if(uip_len > 0) {
- uip_flags |= UIP_NEWDATA;
- }
- UIP_APPCALL();
- uip_connr->len = 1;
- uip_connr->tcpstateflags = LAST_ACK;
- uip_connr->nrtx = 0;
- tcp_send_finack:
- BUF->flags = TCP_FIN | TCP_ACK;
- goto tcp_send_nodata;
- }
-
- /* Check the URG flag. If this is set, the segment carries urgent
- data that we must pass to the application. */
- if(BUF->flags & TCP_URG) {
-#if UIP_URGDATA > 0
- uip_urglen = (BUF->urgp[0] << 8) | BUF->urgp[1];
- if(uip_urglen > uip_len) {
- /* There is more urgent data in the next segment to come. */
- uip_urglen = uip_len;
- }
- uip_add_rcv_nxt(uip_urglen);
- uip_len -= uip_urglen;
- uip_urgdata = uip_appdata;
- uip_appdata += uip_urglen;
- } else {
- uip_urglen = 0;
-#endif /* UIP_URGDATA > 0 */
- uip_appdata += (BUF->urgp[0] << 8) | BUF->urgp[1];
- uip_len -= (BUF->urgp[0] << 8) | BUF->urgp[1];
- }
-
-
- /* If uip_len > 0 we have TCP data in the packet, and we flag this
- by setting the UIP_NEWDATA flag and update the sequence number
- we acknowledge. If the application has stopped the dataflow
- using uip_stop(), we must not accept any data packets from the
- remote host. */
- if(uip_len > 0 && !(uip_connr->tcpstateflags & UIP_STOPPED)) {
- uip_flags |= UIP_NEWDATA;
- uip_add_rcv_nxt(uip_len);
- }
-
- /* Check if the available buffer space advertised by the other end
- is smaller than the initial MSS for this connection. If so, we
- set the current MSS to the window size to ensure that the
- application does not send more data than the other end can
- handle.
-
- If the remote host advertises a zero window, we set the MSS to
- the initial MSS so that the application will send an entire MSS
- of data. This data will not be acknowledged by the receiver,
- and the application will retransmit it. This is called the
- "persistent timer" and uses the retransmission mechanim.
- */
- tmp16 = ((u16_t)BUF->wnd[0] << 8) + (u16_t)BUF->wnd[1];
- if(tmp16 > uip_connr->initialmss ||
- tmp16 == 0) {
- tmp16 = uip_connr->initialmss;
- }
- uip_connr->mss = tmp16;
-
- /* If this packet constitutes an ACK for outstanding data (flagged
- by the UIP_ACKDATA flag, we should call the application since it
- might want to send more data. If the incoming packet had data
- from the peer (as flagged by the UIP_NEWDATA flag), the
- application must also be notified.
-
- When the application is called, the global variable uip_len
- contains the length of the incoming data. The application can
- access the incoming data through the global pointer
- uip_appdata, which usually points 40 bytes into the uip_buf
- array.
-
- If the application wishes to send any data, this data should be
- put into the uip_appdata and the length of the data should be
- put into uip_len. If the application don't have any data to
- send, uip_len must be set to 0. */
- if(uip_flags & (UIP_NEWDATA | UIP_ACKDATA)) {
- uip_slen = 0;
- UIP_APPCALL();
-
- appsend:
-
- if(uip_flags & UIP_ABORT) {
- uip_slen = 0;
- uip_connr->tcpstateflags = CLOSED;
- BUF->flags = TCP_RST | TCP_ACK;
- goto tcp_send_nodata;
- }
-
- if(uip_flags & UIP_CLOSE) {
- uip_slen = 0;
- uip_connr->len = 1;
- uip_connr->tcpstateflags = FIN_WAIT_1;
- uip_connr->nrtx = 0;
- BUF->flags = TCP_FIN | TCP_ACK;
- goto tcp_send_nodata;
- }
-
- /* If uip_slen > 0, the application has data to be sent. */
- if(uip_slen > 0) {
-
- /* If the connection has acknowledged data, the contents of
- the ->len variable should be discarded. */
- if((uip_flags & UIP_ACKDATA) != 0) {
- uip_connr->len = 0;
- }
-
- /* If the ->len variable is non-zero the connection has
- already data in transit and cannot send anymore right
- now. */
- if(uip_connr->len == 0) {
-
- /* The application cannot send more than what is allowed by
- the mss (the minumum of the MSS and the available
- window). */
- if(uip_slen > uip_connr->mss) {
- uip_slen = uip_connr->mss;
- }
-
- /* Remember how much data we send out now so that we know
- when everything has been acknowledged. */
- uip_connr->len = uip_slen;
- } else {
-
- /* If the application already had unacknowledged data, we
- make sure that the application does not send (i.e.,
- retransmit) out more than it previously sent out. */
- uip_slen = uip_connr->len;
- }
- } else {
- uip_connr->len = 0;
- }
- uip_connr->nrtx = 0;
- apprexmit:
- uip_appdata = uip_sappdata;
-
- /* If the application has data to be sent, or if the incoming
- packet had new data in it, we must send out a packet. */
- if(uip_slen > 0 && uip_connr->len > 0) {
- /* Add the length of the IP and TCP headers. */
- uip_len = uip_connr->len + UIP_TCPIP_HLEN;
- /* We always set the ACK flag in response packets. */
- BUF->flags = TCP_ACK | TCP_PSH;
- /* Send the packet. */
- goto tcp_send_noopts;
- }
- /* If there is no data to send, just send out a pure ACK if
- there is newdata. */
- if(uip_flags & UIP_NEWDATA) {
- uip_len = UIP_TCPIP_HLEN;
- BUF->flags = TCP_ACK;
- goto tcp_send_noopts;
- }
- }
- goto drop;
- case LAST_ACK:
- /* We can close this connection if the peer has acknowledged our
- FIN. This is indicated by the UIP_ACKDATA flag. */
- if(uip_flags & UIP_ACKDATA) {
- uip_connr->tcpstateflags = CLOSED;
- uip_flags = UIP_CLOSE;
- UIP_APPCALL();
- }
- break;
-
- case FIN_WAIT_1:
- /* The application has closed the connection, but the remote host
- hasn't closed its end yet. Thus we do nothing but wait for a
- FIN from the other side. */
- if(uip_len > 0) {
- uip_add_rcv_nxt(uip_len);
- }
- if(BUF->flags & TCP_FIN) {
- if(uip_flags & UIP_ACKDATA) {
- uip_connr->tcpstateflags = TIME_WAIT;
- uip_connr->timer = 0;
- uip_connr->len = 0;
- } else {
- uip_connr->tcpstateflags = CLOSING;
- }
- uip_add_rcv_nxt(1);
- uip_flags = UIP_CLOSE;
- UIP_APPCALL();
- goto tcp_send_ack;
- } else if(uip_flags & UIP_ACKDATA) {
- uip_connr->tcpstateflags = FIN_WAIT_2;
- uip_connr->len = 0;
- goto drop;
- }
- if(uip_len > 0) {
- goto tcp_send_ack;
- }
- goto drop;
-
- case FIN_WAIT_2:
- if(uip_len > 0) {
- uip_add_rcv_nxt(uip_len);
- }
- if(BUF->flags & TCP_FIN) {
- uip_connr->tcpstateflags = TIME_WAIT;
- uip_connr->timer = 0;
- uip_add_rcv_nxt(1);
- uip_flags = UIP_CLOSE;
- UIP_APPCALL();
- goto tcp_send_ack;
- }
- if(uip_len > 0) {
- goto tcp_send_ack;
- }
- goto drop;
-
- case TIME_WAIT:
- goto tcp_send_ack;
-
- case CLOSING:
- if(uip_flags & UIP_ACKDATA) {
- uip_connr->tcpstateflags = TIME_WAIT;
- uip_connr->timer = 0;
- }
- }
- goto drop;
-
-
- /* We jump here when we are ready to send the packet, and just want
- to set the appropriate TCP sequence numbers in the TCP header. */
- tcp_send_ack:
- BUF->flags = TCP_ACK;
- tcp_send_nodata:
- uip_len = 40;
- tcp_send_noopts:
- BUF->tcpoffset = 5 << 4;
- tcp_send:
- /* We're done with the input processing. We are now ready to send a
- reply. Our job is to fill in all the fields of the TCP and IP
- headers before calculating the checksum and finally send the
- packet. */
- BUF->ackno[0] = uip_connr->rcv_nxt[0];
- BUF->ackno[1] = uip_connr->rcv_nxt[1];
- BUF->ackno[2] = uip_connr->rcv_nxt[2];
- BUF->ackno[3] = uip_connr->rcv_nxt[3];
-
- BUF->seqno[0] = uip_connr->snd_nxt[0];
- BUF->seqno[1] = uip_connr->snd_nxt[1];
- BUF->seqno[2] = uip_connr->snd_nxt[2];
- BUF->seqno[3] = uip_connr->snd_nxt[3];
-
- BUF->proto = UIP_PROTO_TCP;
-
- BUF->srcport = uip_connr->lport;
- BUF->destport = uip_connr->rport;
-
- BUF->srcipaddr[0] = uip_hostaddr[0];
- BUF->srcipaddr[1] = uip_hostaddr[1];
- BUF->destipaddr[0] = uip_connr->ripaddr[0];
- BUF->destipaddr[1] = uip_connr->ripaddr[1];
-
-
- if(uip_connr->tcpstateflags & UIP_STOPPED) {
- /* If the connection has issued uip_stop(), we advertise a zero
- window so that the remote host will stop sending data. */
- BUF->wnd[0] = BUF->wnd[1] = 0;
- } else {
- BUF->wnd[0] = ((UIP_RECEIVE_WINDOW) >> 8);
- BUF->wnd[1] = ((UIP_RECEIVE_WINDOW) & 0xff);
- }
-
- tcp_send_noconn:
-
- BUF->len[0] = (uip_len >> 8);
- BUF->len[1] = (uip_len & 0xff);
-
- /* Calculate TCP checksum. */
- BUF->tcpchksum = 0;
- BUF->tcpchksum = ~(uip_tcpchksum());
-
- ip_send_nolen:
-
- BUF->vhl = 0x45;
- BUF->tos = 0;
- BUF->ipoffset[0] = BUF->ipoffset[1] = 0;
- BUF->ttl = UIP_TTL;
- ++ipid;
- BUF->ipid[0] = ipid >> 8;
- BUF->ipid[1] = ipid & 0xff;
-
- /* Calculate IP checksum. */
- BUF->ipchksum = 0;
- BUF->ipchksum = ~(uip_ipchksum());
-
- UIP_STAT(++uip_stat.tcp.sent);
- send:
- UIP_STAT(++uip_stat.ip.sent);
- /* Return and let the caller do the actual transmission. */
- return;
- drop:
- uip_len = 0;
- return;
-}
-/*-----------------------------------------------------------------------------------*/
-u16_t
-htons(u16_t val)
-{
- return HTONS(val);
-}
-/*-----------------------------------------------------------------------------------*/
-/** @} */
diff --git a/FreeRTOS/Demo/uIP_Demo_Rowley_ARM7/uip/uip.h b/FreeRTOS/Demo/uIP_Demo_Rowley_ARM7/uip/uip.h
deleted file mode 100644
index f6367a261..000000000
--- a/FreeRTOS/Demo/uIP_Demo_Rowley_ARM7/uip/uip.h
+++ /dev/null
@@ -1,1060 +0,0 @@
-/**
- * \addtogroup uip
- * @{
- */
-
-/**
- * \file
- * Header file for the uIP TCP/IP stack.
- * \author Adam Dunkels <adam@dunkels.com>
- *
- * The uIP TCP/IP stack header file contains definitions for a number
- * of C macros that are used by uIP programs as well as internal uIP
- * structures, TCP/IP header structures and function declarations.
- *
- */
-
-
-/*
- * Copyright (c) 2001-2003, Adam Dunkels.
- * All rights reserved.
- *
- * 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. The name of the author may not be used to endorse or promote
- * products derived from this software without specific prior
- * written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``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 AUTHOR 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.
- *
- * This file is part of the uIP TCP/IP stack.
- *
- * $Id: uip.h,v 1.36.2.7 2003/10/07 13:47:51 adam Exp $
- *
- */
-
-#ifndef __UIP_H__
-#define __UIP_H__
-
-#include "uipopt.h"
-
-/*-----------------------------------------------------------------------------------*/
-/* First, the functions that should be called from the
- * system. Initialization, the periodic timer and incoming packets are
- * handled by the following three functions.
- */
-
-/**
- * \defgroup uipconffunc uIP configuration functions
- * @{
- *
- * The uIP configuration functions are used for setting run-time
- * parameters in uIP such as IP addresses.
- */
-
-/**
- * Set the IP address of this host.
- *
- * The IP address is represented as a 4-byte array where the first
- * octet of the IP address is put in the first member of the 4-byte
- * array.
- *
- * \param addr A pointer to a 4-byte representation of the IP address.
- *
- * \hideinitializer
- */
-#define uip_sethostaddr(addr) do { uip_hostaddr[0] = addr[0]; \
- uip_hostaddr[1] = addr[1]; } while(0)
-
-/**
- * Get the IP address of this host.
- *
- * The IP address is represented as a 4-byte array where the first
- * octet of the IP address is put in the first member of the 4-byte
- * array.
- *
- * \param addr A pointer to a 4-byte array that will be filled in with
- * the currently configured IP address.
- *
- * \hideinitializer
- */
-#define uip_gethostaddr(addr) do { addr[0] = uip_hostaddr[0]; \
- addr[1] = uip_hostaddr[1]; } while(0)
-
-/** @} */
-
-/**
- * \defgroup uipinit uIP initialization functions
- * @{
- *
- * The uIP initialization functions are used for booting uIP.
- */
-
-/**
- * uIP initialization function.
- *
- * This function should be called at boot up to initilize the uIP
- * TCP/IP stack.
- */
-void uip_init(void);
-
-/** @} */
-
-/**
- * \defgroup uipdevfunc uIP device driver functions
- * @{
- *
- * These functions are used by a network device driver for interacting
- * with uIP.
- */
-
-/**
- * Process an incoming packet.
- *
- * This function should be called when the device driver has received
- * a packet from the network. The packet from the device driver must
- * be present in the uip_buf buffer, and the length of the packet
- * should be placed in the uip_len variable.
- *
- * When the function returns, there may be an outbound packet placed
- * in the uip_buf packet buffer. If so, the uip_len variable is set to
- * the length of the packet. If no packet is to be sent out, the
- * uip_len variable is set to 0.
- *
- * The usual way of calling the function is presented by the source
- * code below.
- \code
- uip_len = devicedriver_poll();
- if(uip_len > 0) {
- uip_input();
- if(uip_len > 0) {
- devicedriver_send();
- }
- }
- \endcode
- *
- * \note If you are writing a uIP device driver that needs ARP
- * (Address Resolution Protocol), e.g., when running uIP over
- * Ethernet, you will need to call the uIP ARP code before calling
- * this function:
- \code
- #define BUF ((struct uip_eth_hdr *)&uip_buf[0])
- uip_len = ethernet_devicedrver_poll();
- if(uip_len > 0) {
- if(BUF->type == HTONS(UIP_ETHTYPE_IP)) {
- uip_arp_ipin();
- uip_input();
- if(uip_len > 0) {
- uip_arp_out();
- ethernet_devicedriver_send();
- }
- } else if(BUF->type == HTONS(UIP_ETHTYPE_ARP)) {
- uip_arp_arpin();
- if(uip_len > 0) {
- ethernet_devicedriver_send();
- }
- }
- \endcode
- *
- * \hideinitializer
- */
-#define uip_input() uip_process(UIP_DATA)
-
-/**
- * Periodic processing for a connection identified by its number.
- *
- * This function does the necessary periodic processing (timers,
- * polling) for a uIP TCP conneciton, and should be called when the
- * periodic uIP timer goes off. It should be called for every
- * connection, regardless of whether they are open of closed.
- *
- * When the function returns, it may have an outbound packet waiting
- * for service in the uIP packet buffer, and if so the uip_len
- * variable is set to a value larger than zero. The device driver
- * should be called to send out the packet.
- *
- * The ususal way of calling the function is through a for() loop like
- * this:
- \code
- for(i = 0; i < UIP_CONNS; ++i) {
- uip_periodic(i);
- if(uip_len > 0) {
- devicedriver_send();
- }
- }
- \endcode
- *
- * \note If you are writing a uIP device driver that needs ARP
- * (Address Resolution Protocol), e.g., when running uIP over
- * Ethernet, you will need to call the uip_arp_out() function before
- * calling the device driver:
- \code
- for(i = 0; i < UIP_CONNS; ++i) {
- uip_periodic(i);
- if(uip_len > 0) {
- uip_arp_out();
- ethernet_devicedriver_send();
- }
- }
- \endcode
- *
- * \param conn The number of the connection which is to be periodically polled.
- *
- * \hideinitializer
- */
-#define uip_periodic(conn) do { uip_conn = &uip_conns[conn]; \
- uip_process(UIP_TIMER); } while (0)
-
-/**
- * Periodic processing for a connection identified by a pointer to its structure.
- *
- * Same as uip_periodic() but takes a pointer to the actual uip_conn
- * struct instead of an integer as its argument. This function can be
- * used to force periodic processing of a specific connection.
- *
- * \param conn A pointer to the uip_conn struct for the connection to
- * be processed.
- *
- * \hideinitializer
- */
-#define uip_periodic_conn(conn) do { uip_conn = conn; \
- uip_process(UIP_TIMER); } while (0)
-
-#if UIP_UDP
-/**
- * Periodic processing for a UDP connection identified by its number.
- *
- * This function is essentially the same as uip_prerioic(), but for
- * UDP connections. It is called in a similar fashion as the
- * uip_periodic() function:
- \code
- for(i = 0; i < UIP_UDP_CONNS; i++) {
- uip_udp_periodic(i);
- if(uip_len > 0) {
- devicedriver_send();
- }
- }
- \endcode
- *
- * \note As for the uip_periodic() function, special care has to be
- * taken when using uIP together with ARP and Ethernet:
- \code
- for(i = 0; i < UIP_UDP_CONNS; i++) {
- uip_udp_periodic(i);
- if(uip_len > 0) {
- uip_arp_out();
- ethernet_devicedriver_send();
- }
- }
- \endcode
- *
- * \param conn The number of the UDP connection to be processed.
- *
- * \hideinitializer
- */
-#define uip_udp_periodic(conn) do { uip_udp_conn = &uip_udp_conns[conn]; \
- uip_process(UIP_UDP_TIMER); } while (0)
-
-/**
- * Periodic processing for a UDP connection identified by a pointer to
- * its structure.
- *
- * Same as uip_udp_periodic() but takes a pointer to the actual
- * uip_conn struct instead of an integer as its argument. This
- * function can be used to force periodic processing of a specific
- * connection.
- *
- * \param conn A pointer to the uip_udp_conn struct for the connection
- * to be processed.
- *
- * \hideinitializer
- */
-#define uip_udp_periodic_conn(conn) do { uip_udp_conn = conn; \
- uip_process(UIP_UDP_TIMER); } while (0)
-
-
-#endif /* UIP_UDP */
-
-/**
- * The uIP packet buffer.
- *
- * The uip_buf array is used to hold incoming and outgoing
- * packets. The device driver should place incoming data into this
- * buffer. When sending data, the device driver should read the link
- * level headers and the TCP/IP headers from this buffer. The size of
- * the link level headers is configured by the UIP_LLH_LEN define.
- *
- * \note The application data need not be placed in this buffer, so
- * the device driver must read it from the place pointed to by the
- * uip_appdata pointer as illustrated by the following example:
- \code
- void
- devicedriver_send(void)
- {
- hwsend(&uip_buf[0], UIP_LLH_LEN);
- hwsend(&uip_buf[UIP_LLH_LEN], 40);
- hwsend(uip_appdata, uip_len - 40 - UIP_LLH_LEN);
- }
- \endcode
- */
-extern u8_t uip_buf[UIP_BUFSIZE+2] __attribute__ ((aligned (4)));
-
-/** @} */
-
-/*-----------------------------------------------------------------------------------*/
-/* Functions that are used by the uIP application program. Opening and
- * closing connections, sending and receiving data, etc. is all
- * handled by the functions below.
-*/
-/**
- * \defgroup uipappfunc uIP application functions
- * @{
- *
- * Functions used by an application running of top of uIP.
- */
-
-/**
- * Start listening to the specified port.
- *
- * \note Since this function expects the port number in network byte
- * order, a conversion using HTONS() or htons() is necessary.
- *
- \code
- uip_listen(HTONS(80));
- \endcode
- *
- * \param port A 16-bit port number in network byte order.
- */
-void uip_listen(u16_t port);
-
-/**
- * Stop listening to the specified port.
- *
- * \note Since this function expects the port number in network byte
- * order, a conversion using HTONS() or htons() is necessary.
- *
- \code
- uip_unlisten(HTONS(80));
- \endcode
- *
- * \param port A 16-bit port number in network byte order.
- */
-void uip_unlisten(u16_t port);
-
-/**
- * Connect to a remote host using TCP.
- *
- * This function is used to start a new connection to the specified
- * port on the specied host. It allocates a new connection identifier,
- * sets the connection to the SYN_SENT state and sets the
- * retransmission timer to 0. This will cause a TCP SYN segment to be
- * sent out the next time this connection is periodically processed,
- * which usually is done within 0.5 seconds after the call to
- * uip_connect().
- *
- * \note This function is avaliable only if support for active open
- * has been configured by defining UIP_ACTIVE_OPEN to 1 in uipopt.h.
- *
- * \note Since this function requires the port number to be in network
- * byte order, a convertion using HTONS() or htons() is necessary.
- *
- \code
- u16_t ipaddr[2];
-
- uip_ipaddr(ipaddr, 192,168,1,2);
- uip_connect(ipaddr, HTONS(80));
- \endcode
- *
- * \param ripaddr A pointer to a 4-byte array representing the IP
- * address of the remote hot.
- *
- * \param port A 16-bit port number in network byte order.
- *
- * \return A pointer to the uIP connection identifier for the new connection,
- * or NULL if no connection could be allocated.
- *
- */
-struct uip_conn *uip_connect(u16_t *ripaddr, u16_t port);
-
-
-
-/**
- * \internal
- *
- * Check if a connection has outstanding (i.e., unacknowledged) data.
- *
- * \param conn A pointer to the uip_conn structure for the connection.
- *
- * \hideinitializer
- */
-#define uip_outstanding(conn) ((conn)->len)
-
-/**
- * Send data on the current connection.
- *
- * This function is used to send out a single segment of TCP
- * data. Only applications that have been invoked by uIP for event
- * processing can send data.
- *
- * The amount of data that actually is sent out after a call to this
- * funcion is determined by the maximum amount of data TCP allows. uIP
- * will automatically crop the data so that only the appropriate
- * amount of data is sent. The function uip_mss() can be used to query
- * uIP for the amount of data that actually will be sent.
- *
- * \note This function does not guarantee that the sent data will
- * arrive at the destination. If the data is lost in the network, the
- * application will be invoked with the uip_rexmit() event being
- * set. The application will then have to resend the data using this
- * function.
- *
- * \param data A pointer to the data which is to be sent.
- *
- * \param len The maximum amount of data bytes to be sent.
- *
- * \hideinitializer
- */
-#define uip_send(data, len) do { uip_sappdata = (data); uip_slen = (len);} while(0)
-
-/**
- * The length of any incoming data that is currently avaliable (if avaliable)
- * in the uip_appdata buffer.
- *
- * The test function uip_data() must first be used to check if there
- * is any data available at all.
- *
- * \hideinitializer
- */
-#define uip_datalen() uip_len
-
-/**
- * The length of any out-of-band data (urgent data) that has arrived
- * on the connection.
- *
- * \note The configuration parameter UIP_URGDATA must be set for this
- * function to be enabled.
- *
- * \hideinitializer
- */
-#define uip_urgdatalen() uip_urglen
-
-/**
- * Close the current connection.
- *
- * This function will close the current connection in a nice way.
- *
- * \hideinitializer
- */
-#define uip_close() (uip_flags = UIP_CLOSE)
-
-/**
- * Abort the current connection.
- *
- * This function will abort (reset) the current connection, and is
- * usually used when an error has occured that prevents using the
- * uip_close() function.
- *
- * \hideinitializer
- */
-#define uip_abort() (uip_flags = UIP_ABORT)
-
-/**
- * Tell the sending host to stop sending data.
- *
- * This function will close our receiver's window so that we stop
- * receiving data for the current connection.
- *
- * \hideinitializer
- */
-#define uip_stop() (uip_conn->tcpstateflags |= UIP_STOPPED)
-
-/**
- * Find out if the current connection has been previously stopped with
- * uip_stop().
- *
- * \hideinitializer
- */
-#define uip_stopped(conn) ((conn)->tcpstateflags & UIP_STOPPED)
-
-/**
- * Restart the current connection, if is has previously been stopped
- * with uip_stop().
- *
- * This function will open the receiver's window again so that we
- * start receiving data for the current connection.
- *
- * \hideinitializer
- */
-#define uip_restart() do { uip_flags |= UIP_NEWDATA; \
- uip_conn->tcpstateflags &= ~UIP_STOPPED; \
- } while(0)
-
-
-/* uIP tests that can be made to determine in what state the current
- connection is, and what the application function should do. */
-
-/**
- * Is new incoming data available?
- *
- * Will reduce to non-zero if there is new data for the application
- * present at the uip_appdata pointer. The size of the data is
- * avaliable through the uip_len variable.
- *
- * \hideinitializer
- */
-#define uip_newdata() (uip_flags & UIP_NEWDATA)
-
-/**
- * Has previously sent data been acknowledged?
- *
- * Will reduce to non-zero if the previously sent data has been
- * acknowledged by the remote host. This means that the application
- * can send new data.
- *
- * \hideinitializer
- */
-#define uip_acked() (uip_flags & UIP_ACKDATA)
-
-/**
- * Has the connection just been connected?
- *
- * Reduces to non-zero if the current connection has been connected to
- * a remote host. This will happen both if the connection has been
- * actively opened (with uip_connect()) or passively opened (with
- * uip_listen()).
- *
- * \hideinitializer
- */
-#define uip_connected() (uip_flags & UIP_CONNECTED)
-
-/**
- * Has the connection been closed by the other end?
- *
- * Is non-zero if the connection has been closed by the remote
- * host. The application may then do the necessary clean-ups.
- *
- * \hideinitializer
- */
-#define uip_closed() (uip_flags & UIP_CLOSE)
-
-/**
- * Has the connection been aborted by the other end?
- *
- * Non-zero if the current connection has been aborted (reset) by the
- * remote host.
- *
- * \hideinitializer
- */
-#define uip_aborted() (uip_flags & UIP_ABORT)
-
-/**
- * Has the connection timed out?
- *
- * Non-zero if the current connection has been aborted due to too many
- * retransmissions.
- *
- * \hideinitializer
- */
-#define uip_timedout() (uip_flags & UIP_TIMEDOUT)
-
-/**
- * Do we need to retransmit previously data?
- *
- * Reduces to non-zero if the previously sent data has been lost in
- * the network, and the application should retransmit it. The
- * application should send the exact same data as it did the last
- * time, using the uip_send() function.
- *
- * \hideinitializer
- */
-#define uip_rexmit() (uip_flags & UIP_REXMIT)
-
-/**
- * Is the connection being polled by uIP?
- *
- * Is non-zero if the reason the application is invoked is that the
- * current connection has been idle for a while and should be
- * polled.
- *
- * The polling event can be used for sending data without having to
- * wait for the remote host to send data.
- *
- * \hideinitializer
- */
-#define uip_poll() (uip_flags & UIP_POLL)
-
-/**
- * Get the initial maxium segment size (MSS) of the current
- * connection.
- *
- * \hideinitializer
- */
-#define uip_initialmss() (uip_conn->initialmss)
-
-/**
- * Get the current maxium segment size that can be sent on the current
- * connection.
- *
- * The current maxiumum segment size that can be sent on the
- * connection is computed from the receiver's window and the MSS of
- * the connection (which also is available by calling
- * uip_initialmss()).
- *
- * \hideinitializer
- */
-#define uip_mss() (uip_conn->mss)
-
-/**
- * Set up a new UDP connection.
- *
- * \param ripaddr A pointer to a 4-byte structure representing the IP
- * address of the remote host.
- *
- * \param rport The remote port number in network byte order.
- *
- * \return The uip_udp_conn structure for the new connection or NULL
- * if no connection could be allocated.
- */
-struct uip_udp_conn *uip_udp_new(u16_t *ripaddr, u16_t rport);
-
-/**
- * Removed a UDP connection.
- *
- * \param conn A pointer to the uip_udp_conn structure for the connection.
- *
- * \hideinitializer
- */
-#define uip_udp_remove(conn) (conn)->lport = 0
-
-/**
- * Send a UDP datagram of length len on the current connection.
- *
- * This function can only be called in response to a UDP event (poll
- * or newdata). The data must be present in the uip_buf buffer, at the
- * place pointed to by the uip_appdata pointer.
- *
- * \param len The length of the data in the uip_buf buffer.
- *
- * \hideinitializer
- */
-#define uip_udp_send(len) uip_slen = (len)
-
-/** @} */
-
-/* uIP convenience and converting functions. */
-
-/**
- * \defgroup uipconvfunc uIP conversion functions
- * @{
- *
- * These functions can be used for converting between different data
- * formats used by uIP.
- */
-
-/**
- * Pack an IP address into a 4-byte array which is used by uIP to
- * represent IP addresses.
- *
- * Example:
- \code
- u16_t ipaddr[2];
-
- uip_ipaddr(&ipaddr, 192,168,1,2);
- \endcode
- *
- * \param addr A pointer to a 4-byte array that will be filled in with
- * the IP addres.
- * \param addr0 The first octet of the IP address.
- * \param addr1 The second octet of the IP address.
- * \param addr2 The third octet of the IP address.
- * \param addr3 The forth octet of the IP address.
- *
- * \hideinitializer
- */
-#define uip_ipaddr(addr, addr0,addr1,addr2,addr3) do { \
- (addr)[0] = HTONS(((addr0) << 8) | (addr1)); \
- (addr)[1] = HTONS(((addr2) << 8) | (addr3)); \
- } while(0)
-
-/**
- * Convert 16-bit quantity from host byte order to network byte order.
- *
- * This macro is primarily used for converting constants from host
- * byte order to network byte order. For converting variables to
- * network byte order, use the htons() function instead.
- *
- * \hideinitializer
- */
-#ifndef HTONS
-# if BYTE_ORDER == BIG_ENDIAN
-# define HTONS(n) (n)
-# else /* BYTE_ORDER == BIG_ENDIAN */
-# define HTONS(n) ((((u16_t)((n) & 0xff)) << 8) | (((n) & 0xff00) >> 8))
-# endif /* BYTE_ORDER == BIG_ENDIAN */
-#endif /* HTONS */
-
-/**
- * Convert 16-bit quantity from host byte order to network byte order.
- *
- * This function is primarily used for converting variables from host
- * byte order to network byte order. For converting constants to
- * network byte order, use the HTONS() macro instead.
- */
-#ifndef htons
-u16_t htons(u16_t val);
-#endif /* htons */
-
-/** @} */
-
-/**
- * Pointer to the application data in the packet buffer.
- *
- * This pointer points to the application data when the application is
- * called. If the application wishes to send data, the application may
- * use this space to write the data into before calling uip_send().
- */
-extern volatile u8_t *uip_appdata;
-extern volatile u8_t *uip_sappdata;
-
-#if UIP_URGDATA > 0
-/* u8_t *uip_urgdata:
- *
- * This pointer points to any urgent data that has been received. Only
- * present if compiled with support for urgent data (UIP_URGDATA).
- */
-extern volatile u8_t *uip_urgdata;
-#endif /* UIP_URGDATA > 0 */
-
-
-/* u[8|16]_t uip_len:
- *
- * When the application is called, uip_len contains the length of any
- * new data that has been received from the remote host. The
- * application should set this variable to the size of any data that
- * the application wishes to send. When the network device driver
- * output function is called, uip_len should contain the length of the
- * outgoing packet.
- */
-extern volatile u16_t uip_len, uip_slen;
-
-#if UIP_URGDATA > 0
-extern volatile u8_t uip_urglen, uip_surglen;
-#endif /* UIP_URGDATA > 0 */
-
-
-/**
- * Representation of a uIP TCP connection.
- *
- * The uip_conn structure is used for identifying a connection. All
- * but one field in the structure are to be considered read-only by an
- * application. The only exception is the appstate field whos purpose
- * is to let the application store application-specific state (e.g.,
- * file pointers) for the connection. The size of this field is
- * configured in the "uipopt.h" header file.
- */
-struct uip_conn {
- u16_t ripaddr[2]; /**< The IP address of the remote host. */
-
- u16_t lport; /**< The local TCP port, in network byte order. */
- u16_t rport; /**< The local remote TCP port, in network byte
- order. */
-
- u8_t rcv_nxt[4]; /**< The sequence number that we expect to
- receive next. */
- u8_t snd_nxt[4]; /**< The sequence number that was last sent by
- us. */
- u16_t len; /**< Length of the data that was previously sent. */
- u16_t mss; /**< Current maximum segment size for the
- connection. */
- u16_t initialmss; /**< Initial maximum segment size for the
- connection. */
- u8_t sa; /**< Retransmission time-out calculation state
- variable. */
- u8_t sv; /**< Retransmission time-out calculation state
- variable. */
- u8_t rto; /**< Retransmission time-out. */
- u8_t tcpstateflags; /**< TCP state and flags. */
- u8_t timer; /**< The retransmission timer. */
- u8_t nrtx; /**< The number of retransmissions for the last
- segment sent. */
-
- /** The application state. */
- u8_t appstate[UIP_APPSTATE_SIZE];
-};
-
-
-/* Pointer to the current connection. */
-extern struct uip_conn *uip_conn;
-/* The array containing all uIP connections. */
-extern struct uip_conn uip_conns[UIP_CONNS];
-/**
- * \addtogroup uiparch
- * @{
- */
-
-/**
- * 4-byte array used for the 32-bit sequence number calculations.
- */
-extern volatile u8_t uip_acc32[4];
-
-/** @} */
-
-
-#if UIP_UDP
-/**
- * Representation of a uIP UDP connection.
- */
-struct uip_udp_conn {
- u16_t ripaddr[2]; /**< The IP address of the remote peer. */
- u16_t lport; /**< The local port number in network byte order. */
- u16_t rport; /**< The remote port number in network byte order. */
-};
-
-extern struct uip_udp_conn *uip_udp_conn;
-extern struct uip_udp_conn uip_udp_conns[UIP_UDP_CONNS];
-#endif /* UIP_UDP */
-
-/**
- * The structure holding the TCP/IP statistics that are gathered if
- * UIP_STATISTICS is set to 1.
- *
- */
-struct uip_stats {
- struct {
- uip_stats_t drop; /**< Number of dropped packets at the IP
- layer. */
- uip_stats_t recv; /**< Number of received packets at the IP
- layer. */
- uip_stats_t sent; /**< Number of sent packets at the IP
- layer. */
- uip_stats_t vhlerr; /**< Number of packets dropped due to wrong
- IP version or header length. */
- uip_stats_t hblenerr; /**< Number of packets dropped due to wrong
- IP length, high byte. */
- uip_stats_t lblenerr; /**< Number of packets dropped due to wrong
- IP length, low byte. */
- uip_stats_t fragerr; /**< Number of packets dropped since they
- were IP fragments. */
- uip_stats_t chkerr; /**< Number of packets dropped due to IP
- checksum errors. */
- uip_stats_t protoerr; /**< Number of packets dropped since they
- were neither ICMP, UDP nor TCP. */
- } ip; /**< IP statistics. */
- struct {
- uip_stats_t drop; /**< Number of dropped ICMP packets. */
- uip_stats_t recv; /**< Number of received ICMP packets. */
- uip_stats_t sent; /**< Number of sent ICMP packets. */
- uip_stats_t typeerr; /**< Number of ICMP packets with a wrong
- type. */
- } icmp; /**< ICMP statistics. */
- struct {
- uip_stats_t drop; /**< Number of dropped TCP segments. */
- uip_stats_t recv; /**< Number of recived TCP segments. */
- uip_stats_t sent; /**< Number of sent TCP segments. */
- uip_stats_t chkerr; /**< Number of TCP segments with a bad
- checksum. */
- uip_stats_t ackerr; /**< Number of TCP segments with a bad ACK
- number. */
- uip_stats_t rst; /**< Number of recevied TCP RST (reset) segments. */
- uip_stats_t rexmit; /**< Number of retransmitted TCP segments. */
- uip_stats_t syndrop; /**< Number of dropped SYNs due to too few
- connections was avaliable. */
- uip_stats_t synrst; /**< Number of SYNs for closed ports,
- triggering a RST. */
- } tcp; /**< TCP statistics. */
-};
-
-/**
- * The uIP TCP/IP statistics.
- *
- * This is the variable in which the uIP TCP/IP statistics are gathered.
- */
-extern struct uip_stats uip_stat;
-
-
-/*-----------------------------------------------------------------------------------*/
-/* All the stuff below this point is internal to uIP and should not be
- * used directly by an application or by a device driver.
- */
-/*-----------------------------------------------------------------------------------*/
-/* u8_t uip_flags:
- *
- * When the application is called, uip_flags will contain the flags
- * that are defined in this file. Please read below for more
- * infomation.
- */
-extern volatile u8_t uip_flags;
-
-/* The following flags may be set in the global variable uip_flags
- before calling the application callback. The UIP_ACKDATA and
- UIP_NEWDATA flags may both be set at the same time, whereas the
- others are mutualy exclusive. Note that these flags should *NOT* be
- accessed directly, but through the uIP functions/macros. */
-
-#define UIP_ACKDATA 1 /* Signifies that the outstanding data was
- acked and the application should send
- out new data instead of retransmitting
- the last data. */
-#define UIP_NEWDATA 2 /* Flags the fact that the peer has sent
- us new data. */
-#define UIP_REXMIT 4 /* Tells the application to retransmit the
- data that was last sent. */
-#define UIP_POLL 8 /* Used for polling the application, to
- check if the application has data that
- it wants to send. */
-#define UIP_CLOSE 16 /* The remote host has closed the
- connection, thus the connection has
- gone away. Or the application signals
- that it wants to close the
- connection. */
-#define UIP_ABORT 32 /* The remote host has aborted the
- connection, thus the connection has
- gone away. Or the application signals
- that it wants to abort the
- connection. */
-#define UIP_CONNECTED 64 /* We have got a connection from a remote
- host and have set up a new connection
- for it, or an active connection has
- been successfully established. */
-
-#define UIP_TIMEDOUT 128 /* The connection has been aborted due to
- too many retransmissions. */
-
-
-/* uip_process(flag):
- *
- * The actual uIP function which does all the work.
- */
-void uip_process(u8_t flag);
-
-/* The following flags are passed as an argument to the uip_process()
- function. They are used to distinguish between the two cases where
- uip_process() is called. It can be called either because we have
- incoming data that should be processed, or because the periodic
- timer has fired. */
-
-#define UIP_DATA 1 /* Tells uIP that there is incoming data in
- the uip_buf buffer. The length of the
- data is stored in the global variable
- uip_len. */
-#define UIP_TIMER 2 /* Tells uIP that the periodic timer has
- fired. */
-#if UIP_UDP
-#define UIP_UDP_TIMER 3
-#endif /* UIP_UDP */
-
-/* The TCP states used in the uip_conn->tcpstateflags. */
-#define CLOSED 0
-#define SYN_RCVD 1
-#define SYN_SENT 2
-#define ESTABLISHED 3
-#define FIN_WAIT_1 4
-#define FIN_WAIT_2 5
-#define CLOSING 6
-#define TIME_WAIT 7
-#define LAST_ACK 8
-#define TS_MASK 15
-
-#define UIP_STOPPED 16
-
-#define UIP_TCPIP_HLEN 40
-
-/* The TCP and IP headers. */
-typedef struct {
- /* IP header. */
- u8_t vhl,
- tos,
- len[2],
- ipid[2],
- ipoffset[2],
- ttl,
- proto;
- u16_t ipchksum;
- u16_t srcipaddr[2],
- destipaddr[2];
-
- /* TCP header. */
- u16_t srcport,
- destport;
- u8_t seqno[4],
- ackno[4],
- tcpoffset,
- flags,
- wnd[2];
- u16_t tcpchksum;
- u8_t urgp[2];
- u8_t optdata[4];
-} uip_tcpip_hdr;
-
-/* The ICMP and IP headers. */
-typedef struct {
- /* IP header. */
- u8_t vhl,
- tos,
- len[2],
- ipid[2],
- ipoffset[2],
- ttl,
- proto;
- u16_t ipchksum;
- u16_t srcipaddr[2],
- destipaddr[2];
- /* ICMP (echo) header. */
- u8_t type, icode;
- u16_t icmpchksum;
- u16_t id, seqno;
-} uip_icmpip_hdr;
-
-
-/* The UDP and IP headers. */
-typedef struct {
- /* IP header. */
- u8_t vhl,
- tos,
- len[2],
- ipid[2],
- ipoffset[2],
- ttl,
- proto;
- u16_t ipchksum;
- u16_t srcipaddr[2],
- destipaddr[2];
-
- /* UDP header. */
- u16_t srcport,
- destport;
- u16_t udplen;
- u16_t udpchksum;
-} uip_udpip_hdr;
-
-#define UIP_PROTO_ICMP 1
-#define UIP_PROTO_TCP 6
-#define UIP_PROTO_UDP 17
-
-#if UIP_FIXEDADDR
-extern const u16_t uip_hostaddr[2];
-#else /* UIP_FIXEDADDR */
-extern u16_t uip_hostaddr[2];
-#endif /* UIP_FIXEDADDR */
-
-#endif /* __UIP_H__ */
-
-
-/** @} */
-
diff --git a/FreeRTOS/Demo/uIP_Demo_Rowley_ARM7/uip/uip_arch.c b/FreeRTOS/Demo/uIP_Demo_Rowley_ARM7/uip/uip_arch.c
deleted file mode 100644
index 4cd08c3c7..000000000
--- a/FreeRTOS/Demo/uIP_Demo_Rowley_ARM7/uip/uip_arch.c
+++ /dev/null
@@ -1,146 +0,0 @@
-/*
- * Copyright (c) 2001, Adam Dunkels.
- * All rights reserved.
- *
- * 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. The name of the author may not be used to endorse or promote
- * products derived from this software without specific prior
- * written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``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 AUTHOR 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.
- *
- * This file is part of the uIP TCP/IP stack.
- *
- * $Id: uip_arch.c,v 1.2.2.1 2003/10/04 22:54:17 adam Exp $
- *
- */
-
-
-#include "uip.h"
-#include "uip_arch.h"
-#include <__cross_studio_io.h>
-
-#define BUF ((uip_tcpip_hdr *)&uip_buf[UIP_LLH_LEN])
-#define IP_PROTO_TCP 6
-
-/*-----------------------------------------------------------------------------------*/
-void
-uip_add32(u8_t *op32, u16_t op16)
-{
-
- uip_acc32[3] = op32[3] + (op16 & 0xff);
- uip_acc32[2] = op32[2] + (op16 >> 8);
- uip_acc32[1] = op32[1];
- uip_acc32[0] = op32[0];
-
- if(uip_acc32[2] < (op16 >> 8)) {
- ++uip_acc32[1];
- if(uip_acc32[1] == 0) {
- ++uip_acc32[0];
- }
- }
-
-
- if(uip_acc32[3] < (op16 & 0xff)) {
- ++uip_acc32[2];
- if(uip_acc32[2] == 0) {
- ++uip_acc32[1];
- if(uip_acc32[1] == 0) {
- ++uip_acc32[0];
- }
- }
- }
-}
-/*-----------------------------------------------------------------------------------*/
-u16_t
-uip_chksum(u16_t *sdata, u16_t len)
-{
- u16_t acc;
-
- for (acc = 0; len > 1; len -= 2) {
- u16_t u = ((unsigned char *)sdata)[0] + (((unsigned char *)sdata)[1] << 8);
- if ((acc += u) < u) {
- /* Overflow, so we add the carry to acc (i.e., increase by
- one). */
- ++acc;
- }
- ++sdata;
- }
-
- /* add up any odd byte */
- if(len == 1) {
- acc += htons(((u16_t)(*(u8_t *)sdata)) << 8);
- if(acc < htons(((u16_t)(*(u8_t *)sdata)) << 8)) {
- ++acc;
- }
- }
-
- return acc;
-}
-/*-----------------------------------------------------------------------------------*/
-u16_t
-uip_ipchksum(void)
-{
- return uip_chksum((u16_t *)&uip_buf[UIP_LLH_LEN], 20);
-}
-/*-----------------------------------------------------------------------------------*/
-u16_t
-uip_tcpchksum(void)
-{
- u16_t hsum, sum;
-
-
- /* Compute the checksum of the TCP header. */
- hsum = uip_chksum((u16_t *)&uip_buf[20 + UIP_LLH_LEN], 20);
-
- /* Compute the checksum of the data in the TCP packet and add it to
- the TCP header checksum. */
- sum = uip_chksum((u16_t *)uip_appdata,
- (u16_t)(((((u16_t)(BUF->len[0]) << 8) + BUF->len[1]) - 40)));
-
- if((sum += hsum) < hsum) {
- ++sum;
- }
-
- if((sum += BUF->srcipaddr[0]) < BUF->srcipaddr[0]) {
- ++sum;
- }
- if((sum += BUF->srcipaddr[1]) < BUF->srcipaddr[1]) {
- ++sum;
- }
- if((sum += BUF->destipaddr[0]) < BUF->destipaddr[0]) {
- ++sum;
- }
- if((sum += BUF->destipaddr[1]) < BUF->destipaddr[1]) {
- ++sum;
- }
- if((sum += (u16_t)htons((u16_t)IP_PROTO_TCP)) < (u16_t)htons((u16_t)IP_PROTO_TCP)) {
- ++sum;
- }
-
- hsum = (u16_t)htons((((u16_t)(BUF->len[0]) << 8) + BUF->len[1]) - 20);
-
- if((sum += hsum) < hsum) {
- ++sum;
- }
-
- return sum;
-}
-/*-----------------------------------------------------------------------------------*/
diff --git a/FreeRTOS/Demo/uIP_Demo_Rowley_ARM7/uip/uip_arch.h b/FreeRTOS/Demo/uIP_Demo_Rowley_ARM7/uip/uip_arch.h
deleted file mode 100644
index b2d133f2e..000000000
--- a/FreeRTOS/Demo/uIP_Demo_Rowley_ARM7/uip/uip_arch.h
+++ /dev/null
@@ -1,130 +0,0 @@
-/**
- * \defgroup uiparch Architecture specific uIP functions
- * @{
- *
- * The functions in the architecture specific module implement the IP
- * check sum and 32-bit additions.
- *
- * The IP checksum calculation is the most computationally expensive
- * operation in the TCP/IP stack and it therefore pays off to
- * implement this in efficient assembler. The purpose of the uip-arch
- * module is to let the checksum functions to be implemented in
- * architecture specific assembler.
- *
- */
-
-/**
- * \file
- * Declarations of architecture specific functions.
- * \author Adam Dunkels <adam@dunkels.com>
- */
-
-/*
- * Copyright (c) 2001, Adam Dunkels.
- * All rights reserved.
- *
- * 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. The name of the author may not be used to endorse or promote
- * products derived from this software without specific prior
- * written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``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 AUTHOR 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.
- *
- * This file is part of the uIP TCP/IP stack.
- *
- * $Id: uip_arch.h,v 1.1.2.2 2003/10/06 15:10:22 adam Exp $
- *
- */
-
-#ifndef __UIP_ARCH_H__
-#define __UIP_ARCH_H__
-
-#include "uip.h"
-
-/**
- * Carry out a 32-bit addition.
- *
- * Because not all architectures for which uIP is intended has native
- * 32-bit arithmetic, uIP uses an external C function for doing the
- * required 32-bit additions in the TCP protocol processing. This
- * function should add the two arguments and place the result in the
- * global variable uip_acc32.
- *
- * \note The 32-bit integer pointed to by the op32 parameter and the
- * result in the uip_acc32 variable are in network byte order (big
- * endian).
- *
- * \param op32 A pointer to a 4-byte array representing a 32-bit
- * integer in network byte order (big endian).
- *
- * \param op16 A 16-bit integer in host byte order.
- */
-void uip_add32(u8_t *op32, u16_t op16);
-
-/**
- * Calculate the Internet checksum over a buffer.
- *
- * The Internet checksum is the one's complement of the one's
- * complement sum of all 16-bit words in the buffer.
- *
- * See RFC1071.
- *
- * \note This function is not called in the current version of uIP,
- * but future versions might make use of it.
- *
- * \param buf A pointer to the buffer over which the checksum is to be
- * computed.
- *
- * \param len The length of the buffer over which the checksum is to
- * be computed.
- *
- * \return The Internet checksum of the buffer.
- */
-u16_t uip_chksum(u16_t *buf, u16_t len);
-
-/**
- * Calculate the IP header checksum of the packet header in uip_buf.
- *
- * The IP header checksum is the Internet checksum of the 20 bytes of
- * the IP header.
- *
- * \return The IP header checksum of the IP header in the uip_buf
- * buffer.
- */
-u16_t uip_ipchksum(void);
-
-/**
- * Calculate the TCP checksum of the packet in uip_buf and uip_appdata.
- *
- * The TCP checksum is the Internet checksum of data contents of the
- * TCP segment, and a pseudo-header as defined in RFC793.
- *
- * \note The uip_appdata pointer that points to the packet data may
- * point anywhere in memory, so it is not possible to simply calculate
- * the Internet checksum of the contents of the uip_buf buffer.
- *
- * \return The TCP checksum of the TCP segment in uip_buf and pointed
- * to by uip_appdata.
- */
-u16_t uip_tcpchksum(void);
-
-/** @} */
-
-#endif /* __UIP_ARCH_H__ */
diff --git a/FreeRTOS/Demo/uIP_Demo_Rowley_ARM7/uip/uip_arp.c b/FreeRTOS/Demo/uIP_Demo_Rowley_ARM7/uip/uip_arp.c
deleted file mode 100644
index f2804df95..000000000
--- a/FreeRTOS/Demo/uIP_Demo_Rowley_ARM7/uip/uip_arp.c
+++ /dev/null
@@ -1,427 +0,0 @@
-/**
- * \addtogroup uip
- * @{
- */
-
-/**
- * \defgroup uiparp uIP Address Resolution Protocol
- * @{
- *
- * The Address Resolution Protocol ARP is used for mapping between IP
- * addresses and link level addresses such as the Ethernet MAC
- * addresses. ARP uses broadcast queries to ask for the link level
- * address of a known IP address and the host which is configured with
- * the IP address for which the query was meant, will respond with its
- * link level address.
- *
- * \note This ARP implementation only supports Ethernet.
- */
-
-/**
- * \file
- * Implementation of the ARP Address Resolution Protocol.
- * \author Adam Dunkels <adam@dunkels.com>
- *
- */
-
-/*
- * Copyright (c) 2001-2003, Adam Dunkels.
- * All rights reserved.
- *
- * 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. The name of the author may not be used to endorse or promote
- * products derived from this software without specific prior
- * written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``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 AUTHOR 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.
- *
- * This file is part of the uIP TCP/IP stack.
- *
- * $Id: uip_arp.c,v 1.7.2.3 2003/10/06 22:42:30 adam Exp $
- *
- */
-
-
-#include "uip_arp.h"
-
-#include <string.h>
-
-struct arp_hdr {
- struct uip_eth_hdr ethhdr;
- u16_t hwtype;
- u16_t protocol;
- u8_t hwlen;
- u8_t protolen;
- u16_t opcode;
- struct uip_eth_addr shwaddr;
- u16_t sipaddr[2];
- struct uip_eth_addr dhwaddr;
- u16_t dipaddr[2];
-};
-
-struct ethip_hdr {
- struct uip_eth_hdr ethhdr;
- /* IP header. */
- u8_t vhl,
- tos,
- len[2],
- ipid[2],
- ipoffset[2],
- ttl,
- proto;
- u16_t ipchksum;
- u16_t srcipaddr[2],
- destipaddr[2];
-};
-
-#define ARP_REQUEST 1
-#define ARP_REPLY 2
-
-#define ARP_HWTYPE_ETH 1
-
-struct arp_entry {
- u16_t ipaddr[2];
- struct uip_eth_addr ethaddr;
- u8_t time;
-};
-
-struct uip_eth_addr uip_ethaddr = {{UIP_ETHADDR0,
- UIP_ETHADDR1,
- UIP_ETHADDR2,
- UIP_ETHADDR3,
- UIP_ETHADDR4,
- UIP_ETHADDR5}};
-
-static struct arp_entry arp_table[UIP_ARPTAB_SIZE];
-static u16_t ipaddr[2];
-static u8_t i, c;
-
-static u8_t arptime;
-static u8_t tmpage;
-
-#define BUF ((struct arp_hdr *)&uip_buf[0])
-#define IPBUF ((struct ethip_hdr *)&uip_buf[0])
-/*-----------------------------------------------------------------------------------*/
-/**
- * Initialize the ARP module.
- *
- */
-/*-----------------------------------------------------------------------------------*/
-void
-uip_arp_init(void)
-{
- for(i = 0; i < UIP_ARPTAB_SIZE; ++i) {
- memset(arp_table[i].ipaddr, 0, 4);
- }
-}
-/*-----------------------------------------------------------------------------------*/
-/**
- * Periodic ARP processing function.
- *
- * This function performs periodic timer processing in the ARP module
- * and should be called at regular intervals. The recommended interval
- * is 10 seconds between the calls.
- *
- */
-/*-----------------------------------------------------------------------------------*/
-void
-uip_arp_timer(void)
-{
- struct arp_entry *tabptr;
-
- ++arptime;
- for(i = 0; i < UIP_ARPTAB_SIZE; ++i) {
- tabptr = &arp_table[i];
- if((tabptr->ipaddr[0] | tabptr->ipaddr[1]) != 0 &&
- arptime - tabptr->time >= UIP_ARP_MAXAGE) {
- memset(tabptr->ipaddr, 0, 4);
- }
- }
-
-}
-/*-----------------------------------------------------------------------------------*/
-static void
-uip_arp_update(u16_t *ipaddr, struct uip_eth_addr *ethaddr)
-{
- register struct arp_entry *tabptr;
- /* Walk through the ARP mapping table and try to find an entry to
- update. If none is found, the IP -> MAC address mapping is
- inserted in the ARP table. */
- for(i = 0; i < UIP_ARPTAB_SIZE; ++i) {
-
- tabptr = &arp_table[i];
- /* Only check those entries that are actually in use. */
- if(tabptr->ipaddr[0] != 0 &&
- tabptr->ipaddr[1] != 0) {
-
- /* Check if the source IP address of the incoming packet matches
- the IP address in this ARP table entry. */
- if(ipaddr[0] == tabptr->ipaddr[0] &&
- ipaddr[1] == tabptr->ipaddr[1]) {
-
- /* An old entry found, update this and return. */
- memcpy(tabptr->ethaddr.addr, ethaddr->addr, 6);
- tabptr->time = arptime;
-
- return;
- }
- }
- }
-
- /* If we get here, no existing ARP table entry was found, so we
- create one. */
-
- /* First, we try to find an unused entry in the ARP table. */
- for(i = 0; i < UIP_ARPTAB_SIZE; ++i) {
- tabptr = &arp_table[i];
- if(tabptr->ipaddr[0] == 0 &&
- tabptr->ipaddr[1] == 0) {
- break;
- }
- }
-
- /* If no unused entry is found, we try to find the oldest entry and
- throw it away. */
- if(i == UIP_ARPTAB_SIZE) {
- tmpage = 0;
- c = 0;
- for(i = 0; i < UIP_ARPTAB_SIZE; ++i) {
- tabptr = &arp_table[i];
- if(arptime - tabptr->time > tmpage) {
- tmpage = arptime - tabptr->time;
- c = i;
- }
- }
- i = c;
- }
-
- /* Now, i is the ARP table entry which we will fill with the new
- information. */
- memcpy(tabptr->ipaddr, ipaddr, 4);
- memcpy(tabptr->ethaddr.addr, ethaddr->addr, 6);
- tabptr->time = arptime;
-}
-/*-----------------------------------------------------------------------------------*/
-/**
- * ARP processing for incoming IP packets
- *
- * This function should be called by the device driver when an IP
- * packet has been received. The function will check if the address is
- * in the ARP cache, and if so the ARP cache entry will be
- * refreshed. If no ARP cache entry was found, a new one is created.
- *
- * This function expects an IP packet with a prepended Ethernet header
- * in the uip_buf[] buffer, and the length of the packet in the global
- * variable uip_len.
- */
-/*-----------------------------------------------------------------------------------*/
-void
-uip_arp_ipin(void)
-{
- uip_len -= sizeof(struct uip_eth_hdr);
-
- /* Only insert/update an entry if the source IP address of the
- incoming IP packet comes from a host on the local network. */
- if((IPBUF->srcipaddr[0] & uip_arp_netmask[0]) !=
- (uip_hostaddr[0] & uip_arp_netmask[0])) {
- return;
- }
- if((IPBUF->srcipaddr[1] & uip_arp_netmask[1]) !=
- (uip_hostaddr[1] & uip_arp_netmask[1])) {
- return;
- }
- uip_arp_update(IPBUF->srcipaddr, &(IPBUF->ethhdr.src));
-
- return;
-}
-/*-----------------------------------------------------------------------------------*/
-/**
- * ARP processing for incoming ARP packets.
- *
- * This function should be called by the device driver when an ARP
- * packet has been received. The function will act differently
- * depending on the ARP packet type: if it is a reply for a request
- * that we previously sent out, the ARP cache will be filled in with
- * the values from the ARP reply. If the incoming ARP packet is an ARP
- * request for our IP address, an ARP reply packet is created and put
- * into the uip_buf[] buffer.
- *
- * When the function returns, the value of the global variable uip_len
- * indicates whether the device driver should send out a packet or
- * not. If uip_len is zero, no packet should be sent. If uip_len is
- * non-zero, it contains the length of the outbound packet that is
- * present in the uip_buf[] buffer.
- *
- * This function expects an ARP packet with a prepended Ethernet
- * header in the uip_buf[] buffer, and the length of the packet in the
- * global variable uip_len.
- */
-/*-----------------------------------------------------------------------------------*/
-typedef struct arp_hdr aht;
-
-void
-uip_arp_arpin(void)
-{
- int ul;
-
- if(uip_len < sizeof(struct arp_hdr)) {
- uip_len = 0;
- return;
- }
-
- uip_len = 0;
-
- switch(BUF->opcode) {
- case HTONS(ARP_REQUEST):
- /* ARP request. If it asked for our address, we send out a
- reply. */
- if(BUF->dipaddr[0] == uip_hostaddr[0] &&
- BUF->dipaddr[1] == uip_hostaddr[1]) {
- /* The reply opcode is 2. */
- BUF->opcode = HTONS(2);
-
- memcpy(BUF->dhwaddr.addr, BUF->shwaddr.addr, 6);
- memcpy(BUF->shwaddr.addr, uip_ethaddr.addr, 6);
- memcpy(BUF->ethhdr.src.addr, uip_ethaddr.addr, 6);
- memcpy(BUF->ethhdr.dest.addr, BUF->dhwaddr.addr, 6);
-
- BUF->dipaddr[0] = BUF->sipaddr[0];
- BUF->dipaddr[1] = BUF->sipaddr[1];
- BUF->sipaddr[0] = uip_hostaddr[0];
- BUF->sipaddr[1] = uip_hostaddr[1];
-
- ul = BUF->hwlen;
- BUF->ethhdr.type = HTONS(UIP_ETHTYPE_ARP);
- uip_len = sizeof(struct arp_hdr);
- }
- break;
- case HTONS(ARP_REPLY):
- /* ARP reply. We insert or update the ARP table if it was meant
- for us. */
- if(BUF->dipaddr[0] == uip_hostaddr[0] &&
- BUF->dipaddr[1] == uip_hostaddr[1]) {
-
- uip_arp_update(BUF->sipaddr, &BUF->shwaddr);
- }
- break;
- }
-
- return;
-}
-/*-----------------------------------------------------------------------------------*/
-/**
- * Prepend Ethernet header to an outbound IP packet and see if we need
- * to send out an ARP request.
- *
- * This function should be called before sending out an IP packet. The
- * function checks the destination IP address of the IP packet to see
- * what Ethernet MAC address that should be used as a destination MAC
- * address on the Ethernet.
- *
- * If the destination IP address is in the local network (determined
- * by logical ANDing of netmask and our IP address), the function
- * checks the ARP cache to see if an entry for the destination IP
- * address is found. If so, an Ethernet header is prepended and the
- * function returns. If no ARP cache entry is found for the
- * destination IP address, the packet in the uip_buf[] is replaced by
- * an ARP request packet for the IP address. The IP packet is dropped
- * and it is assumed that they higher level protocols (e.g., TCP)
- * eventually will retransmit the dropped packet.
- *
- * If the destination IP address is not on the local network, the IP
- * address of the default router is used instead.
- *
- * When the function returns, a packet is present in the uip_buf[]
- * buffer, and the length of the packet is in the global variable
- * uip_len.
- */
-/*-----------------------------------------------------------------------------------*/
-void
-uip_arp_out(void)
-{
- struct arp_entry *tabptr;
- /* Find the destination IP address in the ARP table and construct
- the Ethernet header. If the destination IP addres isn't on the
- local network, we use the default router's IP address instead.
-
- If not ARP table entry is found, we overwrite the original IP
- packet with an ARP request for the IP address. */
-
- /* Check if the destination address is on the local network. */
- if((IPBUF->destipaddr[0] & uip_arp_netmask[0]) !=
- (uip_hostaddr[0] & uip_arp_netmask[0]) ||
- (IPBUF->destipaddr[1] & uip_arp_netmask[1]) !=
- (uip_hostaddr[1] & uip_arp_netmask[1])) {
- /* Destination address was not on the local network, so we need to
- use the default router's IP address instead of the destination
- address when determining the MAC address. */
- ipaddr[0] = uip_arp_draddr[0];
- ipaddr[1] = uip_arp_draddr[1];
- } else {
- /* Else, we use the destination IP address. */
- ipaddr[0] = IPBUF->destipaddr[0];
- ipaddr[1] = IPBUF->destipaddr[1];
- }
-
- for(i = 0; i < UIP_ARPTAB_SIZE; ++i) {
- tabptr = &arp_table[i];
- if(ipaddr[0] == tabptr->ipaddr[0] &&
- ipaddr[1] == tabptr->ipaddr[1])
- break;
- }
-
- if(i == UIP_ARPTAB_SIZE) {
- /* The destination address was not in our ARP table, so we
- overwrite the IP packet with an ARP request. */
-
- memset(BUF->ethhdr.dest.addr, 0xff, 6);
- memset(BUF->dhwaddr.addr, 0x00, 6);
- memcpy(BUF->ethhdr.src.addr, uip_ethaddr.addr, 6);
- memcpy(BUF->shwaddr.addr, uip_ethaddr.addr, 6);
-
- BUF->dipaddr[0] = ipaddr[0];
- BUF->dipaddr[1] = ipaddr[1];
- BUF->sipaddr[0] = uip_hostaddr[0];
- BUF->sipaddr[1] = uip_hostaddr[1];
- BUF->opcode = HTONS(ARP_REQUEST); /* ARP request. */
- BUF->hwtype = HTONS(ARP_HWTYPE_ETH);
- BUF->protocol = HTONS(UIP_ETHTYPE_IP);
- BUF->hwlen = 6;
- BUF->protolen = 4;
- BUF->ethhdr.type = HTONS(UIP_ETHTYPE_ARP);
-
- uip_appdata = &uip_buf[40 + UIP_LLH_LEN];
-
- uip_len = sizeof(struct arp_hdr);
- return;
- }
-
- /* Build an ethernet header. */
- memcpy(IPBUF->ethhdr.dest.addr, tabptr->ethaddr.addr, 6);
- memcpy(IPBUF->ethhdr.src.addr, uip_ethaddr.addr, 6);
-
- IPBUF->ethhdr.type = HTONS(UIP_ETHTYPE_IP);
-
- uip_len += sizeof(struct uip_eth_hdr);
-}
-/*-----------------------------------------------------------------------------------*/
-
-/** @} */
-/** @} */
diff --git a/FreeRTOS/Demo/uIP_Demo_Rowley_ARM7/uip/uip_arp.h b/FreeRTOS/Demo/uIP_Demo_Rowley_ARM7/uip/uip_arp.h
deleted file mode 100644
index bf9049888..000000000
--- a/FreeRTOS/Demo/uIP_Demo_Rowley_ARM7/uip/uip_arp.h
+++ /dev/null
@@ -1,201 +0,0 @@
-/**
- * \addtogroup uip
- * @{
- */
-
-/**
- * \addtogroup uiparp
- * @{
- */
-
-/**
- * \file
- * Macros and definitions for the ARP module.
- * \author Adam Dunkels <adam@dunkels.com>
- */
-
-
-/*
- * Copyright (c) 2001-2003, Adam Dunkels.
- * All rights reserved.
- *
- * 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. The name of the author may not be used to endorse or promote
- * products derived from this software without specific prior
- * written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``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 AUTHOR 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.
- *
- * This file is part of the uIP TCP/IP stack.
- *
- * $Id: uip_arp.h,v 1.3.2.2 2003/10/06 15:10:22 adam Exp $
- *
- */
-
-#ifndef __UIP_ARP_H__
-#define __UIP_ARP_H__
-
-#include "uip.h"
-
-
-/**
- * Representation of a 48-bit Ethernet address.
- */
-struct uip_eth_addr {
- u8_t addr[6];
-} __attribute__ ((packed, aligned (1)));
-
-extern struct uip_eth_addr uip_ethaddr;
-
-/**
- * The Ethernet header.
- */
-struct uip_eth_hdr {
- struct uip_eth_addr dest;
- struct uip_eth_addr src;
- u16_t type;
-} __attribute__ ((packed));
-
-#define UIP_ETHTYPE_ARP 0x0806
-#define UIP_ETHTYPE_IP 0x0800
-#define UIP_ETHTYPE_IP6 0x86dd
-
-
-/* The uip_arp_init() function must be called before any of the other
- ARP functions. */
-void uip_arp_init(void);
-
-/* The uip_arp_ipin() function should be called whenever an IP packet
- arrives from the Ethernet. This function refreshes the ARP table or
- inserts a new mapping if none exists. The function assumes that an
- IP packet with an Ethernet header is present in the uip_buf buffer
- and that the length of the packet is in the uip_len variable. */
-void uip_arp_ipin(void);
-
-/* The uip_arp_arpin() should be called when an ARP packet is received
- by the Ethernet driver. This function also assumes that the
- Ethernet frame is present in the uip_buf buffer. When the
- uip_arp_arpin() function returns, the contents of the uip_buf
- buffer should be sent out on the Ethernet if the uip_len variable
- is > 0. */
-void uip_arp_arpin(void);
-
-/* The uip_arp_out() function should be called when an IP packet
- should be sent out on the Ethernet. This function creates an
- Ethernet header before the IP header in the uip_buf buffer. The
- Ethernet header will have the correct Ethernet MAC destination
- address filled in if an ARP table entry for the destination IP
- address (or the IP address of the default router) is present. If no
- such table entry is found, the IP packet is overwritten with an ARP
- request and we rely on TCP to retransmit the packet that was
- overwritten. In any case, the uip_len variable holds the length of
- the Ethernet frame that should be transmitted. */
-void uip_arp_out(void);
-
-/* The uip_arp_timer() function should be called every ten seconds. It
- is responsible for flushing old entries in the ARP table. */
-void uip_arp_timer(void);
-
-/** @} */
-
-/**
- * \addtogroup uipconffunc
- * @{
- */
-
-/**
- * Set the default router's IP address.
- *
- * \param addr A pointer to a 4-byte array containing the IP address
- * of the default router.
- *
- * \hideinitializer
- */
-#define uip_setdraddr(addr) do { uip_arp_draddr[0] = addr[0]; \
- uip_arp_draddr[1] = addr[1]; } while(0)
-
-/**
- * Set the netmask.
- *
- * \param addr A pointer to a 4-byte array containing the IP address
- * of the netmask.
- *
- * \hideinitializer
- */
-#define uip_setnetmask(addr) do { uip_arp_netmask[0] = addr[0]; \
- uip_arp_netmask[1] = addr[1]; } while(0)
-
-
-/**
- * Get the default router's IP address.
- *
- * \param addr A pointer to a 4-byte array that will be filled in with
- * the IP address of the default router.
- *
- * \hideinitializer
- */
-#define uip_getdraddr(addr) do { addr[0] = uip_arp_draddr[0]; \
- addr[1] = uip_arp_draddr[1]; } while(0)
-
-/**
- * Get the netmask.
- *
- * \param addr A pointer to a 4-byte array that will be filled in with
- * the value of the netmask.
- *
- * \hideinitializer
- */
-#define uip_getnetmask(addr) do { addr[0] = uip_arp_netmask[0]; \
- addr[1] = uip_arp_netmask[1]; } while(0)
-
-
-/**
- * Specifiy the Ethernet MAC address.
- *
- * The ARP code needs to know the MAC address of the Ethernet card in
- * order to be able to respond to ARP queries and to generate working
- * Ethernet headers.
- *
- * \note This macro only specifies the Ethernet MAC address to the ARP
- * code. It cannot be used to change the MAC address of the Ethernet
- * card.
- *
- * \param eaddr A pointer to a struct uip_eth_addr containing the
- * Ethernet MAC address of the Ethernet card.
- *
- * \hideinitializer
- */
-#define uip_setethaddr(eaddr) do {uip_ethaddr.addr[0] = eaddr.addr[0]; \
- uip_ethaddr.addr[1] = eaddr.addr[1];\
- uip_ethaddr.addr[2] = eaddr.addr[2];\
- uip_ethaddr.addr[3] = eaddr.addr[3];\
- uip_ethaddr.addr[4] = eaddr.addr[4];\
- uip_ethaddr.addr[5] = eaddr.addr[5];} while(0)
-
-/** @} */
-
-/**
- * \internal Internal variables that are set using the macros
- * uip_setdraddr and uip_setnetmask.
- */
-extern u16_t uip_arp_draddr[2], uip_arp_netmask[2];
-#endif /* __UIP_ARP_H__ */
-
-
diff --git a/FreeRTOS/Demo/uIP_Demo_Rowley_ARM7/uip/uipopt.h b/FreeRTOS/Demo/uIP_Demo_Rowley_ARM7/uip/uipopt.h
deleted file mode 100644
index 9d274d534..000000000
--- a/FreeRTOS/Demo/uIP_Demo_Rowley_ARM7/uip/uipopt.h
+++ /dev/null
@@ -1,602 +0,0 @@
-/**
- * \defgroup uipopt Configuration options for uIP
- * @{
- *
- * uIP is configured using the per-project configuration file
- * "uipopt.h". This file contains all compile-time options for uIP and
- * should be tweaked to match each specific project. The uIP
- * distribution contains a documented example "uipopt.h" that can be
- * copied and modified for each project.
- */
-
-/**
- * \file
- * Configuration options for uIP.
- * \author Adam Dunkels <adam@dunkels.com>
- *
- * This file is used for tweaking various configuration options for
- * uIP. You should make a copy of this file into one of your project's
- * directories instead of editing this example "uipopt.h" file that
- * comes with the uIP distribution.
- */
-
-/*
- * Copyright (c) 2001-2003, Adam Dunkels.
- * All rights reserved.
- *
- * 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. The name of the author may not be used to endorse or promote
- * products derived from this software without specific prior
- * written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``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 AUTHOR 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.
- *
- * This file is part of the uIP TCP/IP stack.
- *
- * $Id: uipopt.h,v 1.16.2.5 2003/10/07 13:22:51 adam Exp $
- *
- */
-
-#ifndef __UIPOPT_H__
-#define __UIPOPT_H__
-
-/*------------------------------------------------------------------------------*/
-/**
- * \defgroup uipopttypedef uIP type definitions
- * @{
- */
-
-/**
- * The 8-bit unsigned data type.
- *
- * This may have to be tweaked for your particular compiler. "unsigned
- * char" works for most compilers.
- */
-typedef unsigned char u8_t;
-
-/**
- * The 16-bit unsigned data type.
- *
- * This may have to be tweaked for your particular compiler. "unsigned
- * short" works for most compilers.
- */
-typedef unsigned short u16_t;
-
-/**
- * The statistics data type.
- *
- * This datatype determines how high the statistics counters are able
- * to count.
- */
-typedef unsigned short uip_stats_t;
-
-/** @} */
-
-/*------------------------------------------------------------------------------*/
-
-/**
- * \defgroup uipoptstaticconf Static configuration options
- * @{
- *
- * These configuration options can be used for setting the IP address
- * settings statically, but only if UIP_FIXEDADDR is set to 1. The
- * configuration options for a specific node includes IP address,
- * netmask and default router as well as the Ethernet address. The
- * netmask, default router and Ethernet address are appliciable only
- * if uIP should be run over Ethernet.
- *
- * All of these should be changed to suit your project.
-*/
-
-/**
- * Determines if uIP should use a fixed IP address or not.
- *
- * If uIP should use a fixed IP address, the settings are set in the
- * uipopt.h file. If not, the macros uip_sethostaddr(),
- * uip_setdraddr() and uip_setnetmask() should be used instead.
- *
- * \hideinitializer
- */
-#define UIP_FIXEDADDR 1
-
-/**
- * Ping IP address asignment.
- *
- * uIP uses a "ping" packets for setting its own IP address if this
- * option is set. If so, uIP will start with an empty IP address and
- * the destination IP address of the first incoming "ping" (ICMP echo)
- * packet will be used for setting the hosts IP address.
- *
- * \note This works only if UIP_FIXEDADDR is 0.
- *
- * \hideinitializer
- */
-#define UIP_PINGADDRCONF 0
-
-#if 0
-#define UIP_IPADDR0 172U /**< The first octet of the IP address of
- this uIP node, if UIP_FIXEDADDR is
- 1. \hideinitializer */
-#define UIP_IPADDR1 25U /**< The second octet of the IP address of
- this uIP node, if UIP_FIXEDADDR is
- 1. \hideinitializer */
-#define UIP_IPADDR2 218U /**< The third octet of the IP address of
- this uIP node, if UIP_FIXEDADDR is
- 1. \hideinitializer */
-#define UIP_IPADDR3 202U /**< The fourth octet of the IP address of
- this uIP node, if UIP_FIXEDADDR is
- 1. \hideinitializer */
-
-#define UIP_NETMASK0 255 /**< The first octet of the netmask of
- this uIP node, if UIP_FIXEDADDR is
- 1. \hideinitializer */
-#define UIP_NETMASK1 255 /**< The second octet of the netmask of
- this uIP node, if UIP_FIXEDADDR is
- 1. \hideinitializer */
-#define UIP_NETMASK2 255 /**< The third octet of the netmask of
- this uIP node, if UIP_FIXEDADDR is
- 1. \hideinitializer */
-#define UIP_NETMASK3 0 /**< The fourth octet of the netmask of
- this uIP node, if UIP_FIXEDADDR is
- 1. \hideinitializer */
-
-
-#define UIP_DRIPADDR0 192 /**< The first octet of the IP address of
- the default router, if UIP_FIXEDADDR is
- 1. \hideinitializer */
-#define UIP_DRIPADDR1 168 /**< The second octet of the IP address of
- the default router, if UIP_FIXEDADDR is
- 1. \hideinitializer */
-#define UIP_DRIPADDR2 0 /**< The third octet of the IP address of
- the default router, if UIP_FIXEDADDR is
- 1. \hideinitializer */
-#define UIP_DRIPADDR3 1 /**< The fourth octet of the IP address of
- the default router, if UIP_FIXEDADDR is
- 1. \hideinitializer */
-
-#else
-
-#define UIP_IPADDR0 172U /**< The first octet of the IP address of
- this uIP node, if UIP_FIXEDADDR is
- 1. \hideinitializer */
-#define UIP_IPADDR1 25U /**< The second octet of the IP address of
- this uIP node, if UIP_FIXEDADDR is
- 1. \hideinitializer */
-#define UIP_IPADDR2 218U /**< The third octet of the IP address of
- this uIP node, if UIP_FIXEDADDR is
- 1. \hideinitializer */
-#define UIP_IPADDR3 202U /**< The fourth octet of the IP address of
- this uIP node, if UIP_FIXEDADDR is
- 1. \hideinitializer */
-
-#define UIP_NETMASK0 255 /**< The first octet of the netmask of
- this uIP node, if UIP_FIXEDADDR is
- 1. \hideinitializer */
-#define UIP_NETMASK1 255 /**< The second octet of the netmask of
- this uIP node, if UIP_FIXEDADDR is
- 1. \hideinitializer */
-#define UIP_NETMASK2 255 /**< The third octet of the netmask of
- this uIP node, if UIP_FIXEDADDR is
- 1. \hideinitializer */
-#define UIP_NETMASK3 0 /**< The fourth octet of the netmask of
- this uIP node, if UIP_FIXEDADDR is
- 1. \hideinitializer */
-
-#define UIP_DRIPADDR0 172 /**< The first octet of the IP address of
- the default router, if UIP_FIXEDADDR is
- 1. \hideinitializer */
-#define UIP_DRIPADDR1 25 /**< The second octet of the IP address of
- the default router, if UIP_FIXEDADDR is
- 1. \hideinitializer */
-#define UIP_DRIPADDR2 218 /**< The third octet of the IP address of
- the default router, if UIP_FIXEDADDR is
- 1. \hideinitializer */
-#define UIP_DRIPADDR3 3 /**< The fourth octet of the IP address of
- the default router, if UIP_FIXEDADDR is
- 1. \hideinitializer */
-
-#endif
-
-/**
- * Specifies if the uIP ARP module should be compiled with a fixed
- * Ethernet MAC address or not.
- *
- * If this configuration option is 0, the macro uip_setethaddr() can
- * be used to specify the Ethernet address at run-time.
- *
- * \hideinitializer
- */
-#define UIP_FIXEDETHADDR 0
-
-#define UIP_ETHADDR0 0x00 /**< The first octet of the Ethernet
- address if UIP_FIXEDETHADDR is
- 1. \hideinitializer */
-#define UIP_ETHADDR1 0xbd /**< The second octet of the Ethernet
- address if UIP_FIXEDETHADDR is
- 1. \hideinitializer */
-#define UIP_ETHADDR2 0x3b /**< The third octet of the Ethernet
- address if UIP_FIXEDETHADDR is
- 1. \hideinitializer */
-#define UIP_ETHADDR3 0x33 /**< The fourth octet of the Ethernet
- address if UIP_FIXEDETHADDR is
- 1. \hideinitializer */
-#define UIP_ETHADDR4 0x05 /**< The fifth octet of the Ethernet
- address if UIP_FIXEDETHADDR is
- 1. \hideinitializer */
-#define UIP_ETHADDR5 0x71 /**< The sixth octet of the Ethernet
- address if UIP_FIXEDETHADDR is
- 1. \hideinitializer */
-
-/** @} */
-/*------------------------------------------------------------------------------*/
-/**
- * \defgroup uipoptip IP configuration options
- * @{
- *
- */
-/**
- * The IP TTL (time to live) of IP packets sent by uIP.
- *
- * This should normally not be changed.
- */
-#define UIP_TTL 255
-
-/**
- * Turn on support for IP packet reassembly.
- *
- * uIP supports reassembly of fragmented IP packets. This features
- * requires an additonal amount of RAM to hold the reassembly buffer
- * and the reassembly code size is approximately 700 bytes. The
- * reassembly buffer is of the same size as the uip_buf buffer
- * (configured by UIP_BUFSIZE).
- *
- * \note IP packet reassembly is not heavily tested.
- *
- * \hideinitializer
- */
-#define UIP_REASSEMBLY 0
-
-/**
- * The maximum time an IP fragment should wait in the reassembly
- * buffer before it is dropped.
- *
- */
-#define UIP_REASS_MAXAGE 40
-
-/** @} */
-
-/*------------------------------------------------------------------------------*/
-/**
- * \defgroup uipoptudp UDP configuration options
- * @{
- *
- * \note The UDP support in uIP is still not entirely complete; there
- * is no support for sending or receiving broadcast or multicast
- * packets, but it works well enough to support a number of vital
- * applications such as DNS queries, though
- */
-
-/**
- * Toggles wether UDP support should be compiled in or not.
- *
- * \hideinitializer
- */
-#define UIP_UDP 0
-
-/**
- * Toggles if UDP checksums should be used or not.
- *
- * \note Support for UDP checksums is currently not included in uIP,
- * so this option has no function.
- *
- * \hideinitializer
- */
-#define UIP_UDP_CHECKSUMS 0
-
-/**
- * The maximum amount of concurrent UDP connections.
- *
- * \hideinitializer
- */
-#define UIP_UDP_CONNS 2
-
-/**
- * The name of the function that should be called when UDP datagrams arrive.
- *
- * \hideinitializer
- */
-#define UIP_UDP_APPCALL udp_appcall
-
-/** @} */
-/*------------------------------------------------------------------------------*/
-/**
- * \defgroup uipopttcp TCP configuration options
- * @{
- */
-
-/**
- * Determines if support for opening connections from uIP should be
- * compiled in.
- *
- * If the applications that are running on top of uIP for this project
- * do not need to open outgoing TCP connections, this configration
- * option can be turned off to reduce the code size of uIP.
- *
- * \hideinitializer
- */
-#define UIP_ACTIVE_OPEN 1
-
-/**
- * The maximum number of simultaneously open TCP connections.
- *
- * Since the TCP connections are statically allocated, turning this
- * configuration knob down results in less RAM used. Each TCP
- * connection requires approximatly 30 bytes of memory.
- *
- * \hideinitializer
- */
-#define UIP_CONNS 20
-
-/**
- * The maximum number of simultaneously listening TCP ports.
- *
- * Each listening TCP port requires 2 bytes of memory.
- *
- * \hideinitializer
- */
-#define UIP_LISTENPORTS 10
-
-/**
- * The size of the advertised receiver's window.
- *
- * Should be set low (i.e., to the size of the uip_buf buffer) is the
- * application is slow to process incoming data, or high (32768 bytes)
- * if the application processes data quickly.
- *
- * \hideinitializer
- */
-#define UIP_RECEIVE_WINDOW 32768
-
-/**
- * Determines if support for TCP urgent data notification should be
- * compiled in.
- *
- * Urgent data (out-of-band data) is a rarely used TCP feature that
- * very seldom would be required.
- *
- * \hideinitializer
- */
-#define UIP_URGDATA 1
-
-/**
- * The initial retransmission timeout counted in timer pulses.
- *
- * This should not be changed.
- */
-#define UIP_RTO 3
-
-/**
- * The maximum number of times a segment should be retransmitted
- * before the connection should be aborted.
- *
- * This should not be changed.
- */
-#define UIP_MAXRTX 8
-
-/**
- * The maximum number of times a SYN segment should be retransmitted
- * before a connection request should be deemed to have been
- * unsuccessful.
- *
- * This should not need to be changed.
- */
-#define UIP_MAXSYNRTX 3
-
-/**
- * The TCP maximum segment size.
- *
- * This is should not be to set to more than UIP_BUFSIZE - UIP_LLH_LEN - 40.
- */
-#define UIP_TCP_MSS (UIP_BUFSIZE - UIP_LLH_LEN - 40)
-
-/**
- * How long a connection should stay in the TIME_WAIT state.
- *
- * This configiration option has no real implication, and it should be
- * left untouched.
- */
-#define UIP_TIME_WAIT_TIMEOUT 120
-
-
-/** @} */
-/*------------------------------------------------------------------------------*/
-/**
- * \defgroup uipoptarp ARP configuration options
- * @{
- */
-
-/**
- * The size of the ARP table.
- *
- * This option should be set to a larger value if this uIP node will
- * have many connections from the local network.
- *
- * \hideinitializer
- */
-#define UIP_ARPTAB_SIZE 8
-
-/**
- * The maxium age of ARP table entries measured in 10ths of seconds.
- *
- * An UIP_ARP_MAXAGE of 120 corresponds to 20 minutes (BSD
- * default).
- */
-#define UIP_ARP_MAXAGE 120
-
-/** @} */
-
-/*------------------------------------------------------------------------------*/
-
-/**
- * \defgroup uipoptgeneral General configuration options
- * @{
- */
-
-/**
- * The size of the uIP packet buffer.
- *
- * The uIP packet buffer should not be smaller than 60 bytes, and does
- * not need to be larger than 1500 bytes. Lower size results in lower
- * TCP throughput, larger size results in higher TCP throughput.
- *
- * \hideinitializer
- */
-#define UIP_BUFSIZE 2048
-
-
-/**
- * Determines if statistics support should be compiled in.
- *
- * The statistics is useful for debugging and to show the user.
- *
- * \hideinitializer
- */
-#define UIP_STATISTICS 1
-
-/**
- * Determines if logging of certain events should be compiled in.
- *
- * This is useful mostly for debugging. The function uip_log()
- * must be implemented to suit the architecture of the project, if
- * logging is turned on.
- *
- * \hideinitializer
- */
-#define UIP_LOGGING 0
-
-/**
- * Print out a uIP log message.
- *
- * This function must be implemented by the module that uses uIP, and
- * is called by uIP whenever a log message is generated.
- */
-void uip_log(char *msg);
-
-/**
- * The link level header length.
- *
- * This is the offset into the uip_buf where the IP header can be
- * found. For Ethernet, this should be set to 14. For SLIP, this
- * should be set to 0.
- *
- * \hideinitializer
- */
-#define UIP_LLH_LEN 14
-
-
-/** @} */
-/*------------------------------------------------------------------------------*/
-/**
- * \defgroup uipoptcpu CPU architecture configuration
- * @{
- *
- * The CPU architecture configuration is where the endianess of the
- * CPU on which uIP is to be run is specified. Most CPUs today are
- * little endian, and the most notable exception are the Motorolas
- * which are big endian. The BYTE_ORDER macro should be changed to
- * reflect the CPU architecture on which uIP is to be run.
- */
-#ifndef LITTLE_ENDIAN
-#define LITTLE_ENDIAN 3412
-#endif /* LITTLE_ENDIAN */
-#ifndef BIG_ENDIAN
-#define BIG_ENDIAN 1234
-#endif /* BIGE_ENDIAN */
-
-/**
- * The byte order of the CPU architecture on which uIP is to be run.
- *
- * This option can be either BIG_ENDIAN (Motorola byte order) or
- * LITTLE_ENDIAN (Intel byte order).
- *
- * \hideinitializer
- */
-#ifndef BYTE_ORDER
-#define BYTE_ORDER LITTLE_ENDIAN
-#endif /* BYTE_ORDER */
-
-/** @} */
-/*------------------------------------------------------------------------------*/
-
-/**
- * \defgroup uipoptapp Appication specific configurations
- * @{
- *
- * An uIP application is implemented using a single application
- * function that is called by uIP whenever a TCP/IP event occurs. The
- * name of this function must be registered with uIP at compile time
- * using the UIP_APPCALL definition.
- *
- * uIP applications can store the application state within the
- * uip_conn structure by specifying the size of the application
- * structure with the UIP_APPSTATE_SIZE macro.
- *
- * The file containing the definitions must be included in the
- * uipopt.h file.
- *
- * The following example illustrates how this can look.
- \code
-
-void httpd_appcall(void);
-#define UIP_APPCALL httpd_appcall
-
-struct httpd_state {
- u8_t state;
- u16_t count;
- char *dataptr;
- char *script;
-};
-#define UIP_APPSTATE_SIZE (sizeof(struct httpd_state))
- \endcode
- */
-
-/**
- * \var #define UIP_APPCALL
- *
- * The name of the application function that uIP should call in
- * response to TCP/IP events.
- *
- */
-
-/**
- * \var #define UIP_APPSTATE_SIZE
- *
- * The size of the application state that is to be stored in the
- * uip_conn structure.
- */
-/** @} */
-
-/* Include the header file for the application program that should be
- used. If you don't use the example web server, you should change
- this. */
-#include "httpd.h"
-
-
-#endif /* __UIPOPT_H__ */