mirror of
https://github.com/ep00ch/lwip-contrib-mac.git
synced 2024-08-28 03:29:01 +00:00
Added a project for the apps, removed the old app files from the msvc6 directory.
This commit is contained in:
parent
f4ee2b9712
commit
1d7b5a1c9a
140
ports/msvc6/apps.dsp
Normal file
140
ports/msvc6/apps.dsp
Normal file
@ -0,0 +1,140 @@
|
|||||||
|
# Microsoft Developer Studio Project File - Name="apps" - Package Owner=<4>
|
||||||
|
# Microsoft Developer Studio Generated Build File, Format Version 6.00
|
||||||
|
# ** NICHT BEARBEITEN **
|
||||||
|
|
||||||
|
# TARGTYPE "Win32 (x86) Static Library" 0x0104
|
||||||
|
|
||||||
|
CFG=apps - Win32 Debug
|
||||||
|
!MESSAGE Dies ist kein gültiges Makefile. Zum Erstellen dieses Projekts mit NMAKE
|
||||||
|
!MESSAGE verwenden Sie den Befehl "Makefile exportieren" und führen Sie den Befehl
|
||||||
|
!MESSAGE
|
||||||
|
!MESSAGE NMAKE /f "apps.mak".
|
||||||
|
!MESSAGE
|
||||||
|
!MESSAGE Sie können beim Ausführen von NMAKE eine Konfiguration angeben
|
||||||
|
!MESSAGE durch Definieren des Makros CFG in der Befehlszeile. Zum Beispiel:
|
||||||
|
!MESSAGE
|
||||||
|
!MESSAGE NMAKE /f "apps.mak" CFG="apps - Win32 Debug"
|
||||||
|
!MESSAGE
|
||||||
|
!MESSAGE Für die Konfiguration stehen zur Auswahl:
|
||||||
|
!MESSAGE
|
||||||
|
!MESSAGE "apps - Win32 Release" (basierend auf "Win32 (x86) Static Library")
|
||||||
|
!MESSAGE "apps - Win32 Debug" (basierend auf "Win32 (x86) Static Library")
|
||||||
|
!MESSAGE
|
||||||
|
|
||||||
|
# Begin Project
|
||||||
|
# PROP AllowPerConfigDependencies 0
|
||||||
|
# PROP Scc_ProjName ""
|
||||||
|
# PROP Scc_LocalPath ""
|
||||||
|
CPP=cl.exe
|
||||||
|
RSC=rc.exe
|
||||||
|
|
||||||
|
!IF "$(CFG)" == "apps - Win32 Release"
|
||||||
|
|
||||||
|
# PROP BASE Use_MFC 0
|
||||||
|
# PROP BASE Use_Debug_Libraries 0
|
||||||
|
# PROP BASE Output_Dir "Release"
|
||||||
|
# PROP BASE Intermediate_Dir "Release"
|
||||||
|
# PROP BASE Target_Dir ""
|
||||||
|
# PROP Use_MFC 0
|
||||||
|
# PROP Use_Debug_Libraries 0
|
||||||
|
# PROP Output_Dir "Release"
|
||||||
|
# PROP Intermediate_Dir "Release"
|
||||||
|
# PROP Target_Dir ""
|
||||||
|
# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_MBCS" /D "_LIB" /YX /FD /c
|
||||||
|
# ADD CPP /nologo /W3 /GX /O2 /I "$(LWIP_SRC)\include" /I "$(LWIP_SRC)\include\ipv4" /I ".\include" /I ".\\" /D "WIN32" /D "NDEBUG" /D "_MBCS" /D "_LIB" /YX /FD /c
|
||||||
|
# ADD BASE RSC /l 0x407 /d "NDEBUG"
|
||||||
|
# ADD RSC /l 0x407 /d "NDEBUG"
|
||||||
|
BSC32=bscmake.exe
|
||||||
|
# ADD BASE BSC32 /nologo
|
||||||
|
# ADD BSC32 /nologo
|
||||||
|
LIB32=link.exe -lib
|
||||||
|
# ADD BASE LIB32 /nologo
|
||||||
|
# ADD LIB32 /nologo
|
||||||
|
|
||||||
|
!ELSEIF "$(CFG)" == "apps - Win32 Debug"
|
||||||
|
|
||||||
|
# PROP BASE Use_MFC 0
|
||||||
|
# PROP BASE Use_Debug_Libraries 1
|
||||||
|
# PROP BASE Output_Dir "Debug"
|
||||||
|
# PROP BASE Intermediate_Dir "Debug"
|
||||||
|
# PROP BASE Target_Dir ""
|
||||||
|
# PROP Use_MFC 0
|
||||||
|
# PROP Use_Debug_Libraries 1
|
||||||
|
# PROP Output_Dir "Debug"
|
||||||
|
# PROP Intermediate_Dir "Debug"
|
||||||
|
# PROP Target_Dir ""
|
||||||
|
# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_MBCS" /D "_LIB" /YX /FD /GZ /c
|
||||||
|
# ADD CPP /nologo /W3 /Gm /GX /ZI /Od /I "$(LWIP_SRC)\include" /I "$(LWIP_SRC)\include\ipv4" /I ".\include" /I ".\\" /D "_LIB" /D "WIN32" /D "_DEBUG" /D "_MBCS" /D "LWIP_DEBUG" /YX /FD /GZ /c
|
||||||
|
# ADD BASE RSC /l 0x407 /d "_DEBUG"
|
||||||
|
# ADD RSC /l 0x407 /d "_DEBUG"
|
||||||
|
BSC32=bscmake.exe
|
||||||
|
# ADD BASE BSC32 /nologo
|
||||||
|
# ADD BSC32 /nologo
|
||||||
|
LIB32=link.exe -lib
|
||||||
|
# ADD BASE LIB32 /nologo
|
||||||
|
# ADD LIB32 /nologo /out:"Debug\apps_d.lib"
|
||||||
|
|
||||||
|
!ENDIF
|
||||||
|
|
||||||
|
# Begin Target
|
||||||
|
|
||||||
|
# Name "apps - Win32 Release"
|
||||||
|
# Name "apps - Win32 Debug"
|
||||||
|
# Begin Group "source"
|
||||||
|
|
||||||
|
# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat"
|
||||||
|
# Begin Group "chargen"
|
||||||
|
# Begin Source File
|
||||||
|
|
||||||
|
SOURCE="..\..\apps\chargen\chargen.c"
|
||||||
|
# End Source File
|
||||||
|
# End Group
|
||||||
|
# Begin Group "httpserver"
|
||||||
|
# Begin Source File
|
||||||
|
|
||||||
|
SOURCE="..\..\apps\httpserver\httpserver-netconn.c"
|
||||||
|
# End Source File
|
||||||
|
# End Group
|
||||||
|
# Begin Group "httpserver_raw"
|
||||||
|
# Begin Source File
|
||||||
|
|
||||||
|
SOURCE="..\..\apps\httpserver_raw\fs.c"
|
||||||
|
# End Source File
|
||||||
|
# Begin Source File
|
||||||
|
|
||||||
|
SOURCE="..\..\apps\httpserver_raw\httpd.c"
|
||||||
|
# End Source File
|
||||||
|
# End Group
|
||||||
|
# Begin Group "netio"
|
||||||
|
# Begin Source File
|
||||||
|
|
||||||
|
SOURCE="..\..\apps\netio\netio.c"
|
||||||
|
# End Source File
|
||||||
|
# End Group
|
||||||
|
# End Group
|
||||||
|
# Begin Group "header"
|
||||||
|
|
||||||
|
# PROP Default_Filter "h;hpp;hxx;hm;inl"
|
||||||
|
# Begin Group "httpserver_raw"
|
||||||
|
# Begin Source File
|
||||||
|
|
||||||
|
SOURCE="..\..\apps\httpserver_raw\fs.h"
|
||||||
|
# End Source File
|
||||||
|
# Begin Source File
|
||||||
|
|
||||||
|
SOURCE="..\..\apps\httpserver_raw\fsdata.h"
|
||||||
|
# End Source File
|
||||||
|
# Begin Source File
|
||||||
|
|
||||||
|
SOURCE="..\..\apps\httpserver_raw\httpd.h"
|
||||||
|
# End Source File
|
||||||
|
# End Group
|
||||||
|
# Begin Group "netio"
|
||||||
|
# Begin Source File
|
||||||
|
|
||||||
|
SOURCE="..\..\apps\netio\netio.h"
|
||||||
|
# End Source File
|
||||||
|
# End Group
|
||||||
|
# End Group
|
||||||
|
# End Target
|
||||||
|
# End Project
|
@ -1,57 +0,0 @@
|
|||||||
/*
|
|
||||||
* Copyright (c) 2001-2003 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. 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 lwIP TCP/IP stack.
|
|
||||||
*
|
|
||||||
* Author: Adam Dunkels <adam@sics.se>
|
|
||||||
*
|
|
||||||
*/
|
|
||||||
#include "lwip/def.h"
|
|
||||||
#include "fs.h"
|
|
||||||
#include "fsdata.h"
|
|
||||||
#include "fsdata.c"
|
|
||||||
|
|
||||||
/*-----------------------------------------------------------------------------------*/
|
|
||||||
|
|
||||||
|
|
||||||
/*-----------------------------------------------------------------------------------*/
|
|
||||||
int
|
|
||||||
fs_open(char *name, struct fs_file *file)
|
|
||||||
{
|
|
||||||
struct fsdata_file_noconst *f;
|
|
||||||
|
|
||||||
for(f = (struct fsdata_file_noconst *)FS_ROOT;
|
|
||||||
f != NULL;
|
|
||||||
f = (struct fsdata_file_noconst *)f->next) {
|
|
||||||
if (!strcmp(name, (char *)f->name)) {
|
|
||||||
file->data = (char *)f->data;
|
|
||||||
file->len = f->len;
|
|
||||||
return 1;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
/*-----------------------------------------------------------------------------------*/
|
|
@ -1,44 +0,0 @@
|
|||||||
/*
|
|
||||||
* Copyright (c) 2001-2003 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. 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 lwIP TCP/IP stack.
|
|
||||||
*
|
|
||||||
* Author: Adam Dunkels <adam@sics.se>
|
|
||||||
*
|
|
||||||
*/
|
|
||||||
#ifndef __FS_H__
|
|
||||||
#define __FS_H__
|
|
||||||
|
|
||||||
struct fs_file {
|
|
||||||
char *data;
|
|
||||||
int len;
|
|
||||||
};
|
|
||||||
|
|
||||||
/* file must be allocated by caller and will be filled in
|
|
||||||
by the function. */
|
|
||||||
int fs_open(char *name, struct fs_file *file);
|
|
||||||
|
|
||||||
#endif /* __FS_H__ */
|
|
@ -1,334 +0,0 @@
|
|||||||
static const unsigned char data_img_sics_gif[] = {
|
|
||||||
/* /img/sics.gif */
|
|
||||||
0x2f, 0x69, 0x6d, 0x67, 0x2f, 0x73, 0x69, 0x63, 0x73, 0x2e, 0x67, 0x69, 0x66, 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, 0x6c, 0x77, 0x49, 0x50, 0x2f,
|
|
||||||
0x70, 0x72, 0x65, 0x2d, 0x30, 0x2e, 0x36, 0x20, 0x28, 0x68,
|
|
||||||
0x74, 0x74, 0x70, 0x3a, 0x2f, 0x2f, 0x77, 0x77, 0x77, 0x2e,
|
|
||||||
0x73, 0x69, 0x63, 0x73, 0x2e, 0x73, 0x65, 0x2f, 0x7e, 0x61,
|
|
||||||
0x64, 0x61, 0x6d, 0x2f, 0x6c, 0x77, 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, 0x67, 0x69, 0x66, 0xd, 0xa, 0xd, 0xa, 0x47,
|
|
||||||
0x49, 0x46, 0x38, 0x39, 0x61, 0x46, 00, 0x22, 00, 0xa5,
|
|
||||||
00, 00, 0xd9, 0x2b, 0x39, 0x6a, 0x6a, 0x6a, 0xbf, 0xbf,
|
|
||||||
0xbf, 0x93, 0x93, 0x93, 0xf, 0xf, 0xf, 0xb0, 0xb0, 0xb0,
|
|
||||||
0xa6, 0xa6, 0xa6, 0x80, 0x80, 0x80, 0x76, 0x76, 0x76, 0x1e,
|
|
||||||
0x1e, 0x1e, 0x9d, 0x9d, 0x9d, 0x2e, 0x2e, 0x2e, 0x49, 0x49,
|
|
||||||
0x49, 0x54, 0x54, 0x54, 0x8a, 0x8a, 0x8a, 0x60, 0x60, 0x60,
|
|
||||||
0xc6, 0xa6, 0x99, 0xbd, 0xb5, 0xb2, 0xc2, 0xab, 0xa1, 0xd9,
|
|
||||||
0x41, 0x40, 0xd5, 0x67, 0x55, 0xc0, 0xb0, 0xaa, 0xd5, 0x5e,
|
|
||||||
0x4e, 0xd6, 0x50, 0x45, 0xcc, 0x93, 0x7d, 0xc8, 0xa1, 0x90,
|
|
||||||
0xce, 0x8b, 0x76, 0xd2, 0x7b, 0x65, 0xd1, 0x84, 0x6d, 0xc9,
|
|
||||||
0x99, 0x86, 0x3a, 0x3a, 0x3a, 00, 00, 00, 0xb8, 0xb8,
|
|
||||||
0xb8, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
|
|
||||||
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
|
|
||||||
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
|
|
||||||
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
|
|
||||||
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
|
|
||||||
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
|
|
||||||
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
|
|
||||||
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
|
|
||||||
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
|
|
||||||
0xff, 0xff, 0xff, 0xff, 0x2c, 00, 00, 00, 00, 0x46,
|
|
||||||
00, 0x22, 00, 00, 0x6, 0xfe, 0x40, 0x90, 0x70, 0x48,
|
|
||||||
0x2c, 0x1a, 0x8f, 0xc8, 0xa4, 0x72, 0xc9, 0x6c, 0x3a, 0x9f,
|
|
||||||
0xd0, 0xa8, 0x74, 0x4a, 0xad, 0x5a, 0xaf, 0xd8, 0xac, 0x76,
|
|
||||||
0xa9, 0x40, 0x4, 0xbe, 0x83, 0xe2, 0x60, 0x3c, 0x50, 0x20,
|
|
||||||
0xd, 0x8e, 0x6f, 00, 0x31, 0x28, 0x1c, 0xd, 0x7, 0xb5,
|
|
||||||
0xc3, 0x60, 0x75, 0x24, 0x3e, 0xf8, 0xfc, 0x87, 0x11, 0x6,
|
|
||||||
0xe9, 0x3d, 0x46, 0x7, 0xb, 0x7a, 0x7a, 0x7c, 0x43, 0x6,
|
|
||||||
0x1e, 0x84, 0x78, 0xb, 0x7, 0x6e, 0x51, 0x1, 0x8a, 0x84,
|
|
||||||
0x8, 0x7e, 0x79, 0x80, 0x87, 0x89, 0x91, 0x7a, 0x93, 0xa,
|
|
||||||
0x4, 0x99, 0x78, 0x96, 0x4f, 0x3, 0x9e, 0x79, 0x1, 0x94,
|
|
||||||
0x9f, 0x43, 0x9c, 0xa3, 0xa4, 0x5, 0x77, 0xa3, 0xa0, 0x4e,
|
|
||||||
0x98, 0x79, 0xb, 0x1e, 0x83, 0xa4, 0xa6, 0x1f, 0x96, 0x5,
|
|
||||||
0x9d, 0xaa, 0x78, 0x1, 0x7, 0x84, 0x4, 0x1e, 0x1e, 0xbb,
|
|
||||||
0xb8, 0x51, 0x84, 0xe, 0x43, 0x5, 0x7, 0x77, 0xa5, 0x7f,
|
|
||||||
0x42, 0xb1, 0xb2, 0x1, 0x63, 0x8, 0xd, 0xbb, 0x1, 0xc,
|
|
||||||
0x7a, 0xd, 0x44, 0xe, 0xd8, 0xaf, 0x4c, 0x5, 0x7a, 0x4,
|
|
||||||
0x47, 0x7, 0x7, 0xb7, 0x80, 0xa2, 0xe1, 0x7d, 0x44, 0x5,
|
|
||||||
0x1, 0x4, 0x1, 0xd0, 0xea, 0x87, 0x93, 0x4f, 0xe0, 0x9a,
|
|
||||||
0x49, 0xce, 0xd8, 0x79, 0x4, 0x66, 0x20, 0x15, 0x10, 0x10,
|
|
||||||
0x11, 0x92, 0x29, 0x80, 0xb6, 0xc0, 0x91, 0x15, 0x45, 0x1e,
|
|
||||||
0x90, 0x19, 0x71, 0x46, 0xa8, 0x5c, 0x4, 0xe, 00, 0x22,
|
|
||||||
0x4e, 0xe8, 0x40, 0x24, 0x9f, 0x3e, 0x4, 0x6, 0xa7, 0x58,
|
|
||||||
0xd4, 0x93, 0xa0, 0x1c, 0x91, 0x3f, 0xe8, 0xf0, 0x88, 0x3,
|
|
||||||
0xb1, 0x21, 0xa2, 0x49, 00, 0x19, 0x86, 0xfc, 0x52, 0x44,
|
|
||||||
0xe0, 0x1, 0x9d, 0x29, 0x21, 0x15, 0x25, 0x50, 0xf7, 0x67,
|
|
||||||
0x25, 0x1e, 0x6, 0xfd, 0x4e, 0x9a, 0xb4, 0x90, 0xac, 0x15,
|
|
||||||
0xfa, 0xcb, 0x52, 0x53, 0x1e, 0x8c, 0xf2, 0xf8, 0x7, 0x92,
|
|
||||||
0x2d, 0x8, 0x3a, 0x4d, 0x12, 0x49, 0x95, 0x49, 0xdb, 0x14,
|
|
||||||
0x4, 0xc4, 0x14, 0x85, 0x29, 0xaa, 0xe7, 0x1, 0x8, 0xa4,
|
|
||||||
0x49, 0x1, 0x14, 0x51, 0xe0, 0x53, 0x91, 0xd5, 0x29, 0x6,
|
|
||||||
0x1a, 0x64, 0x2, 0xf4, 0xc7, 0x81, 0x9e, 0x5, 0x20, 0x22,
|
|
||||||
0x64, 0xa5, 0x30, 0xae, 0xab, 0x9e, 0x97, 0x53, 0xd8, 0xb9,
|
|
||||||
0xfd, 0x50, 0xef, 0x93, 0x2, 0x42, 0x74, 0x34, 0xe8, 0x9c,
|
|
||||||
0x20, 0x21, 0xc9, 0x1, 0x68, 0x78, 0xe6, 0x55, 0x29, 0x20,
|
|
||||||
0x56, 0x4f, 0x4c, 0x40, 0x51, 0x71, 0x82, 0xc0, 0x70, 0x21,
|
|
||||||
0x22, 0x85, 0xbe, 0x4b, 0x1c, 0x44, 0x5, 0xea, 0xa4, 0x1,
|
|
||||||
0xbf, 0x22, 0xb5, 0xf0, 0x1c, 0x6, 0x51, 0x38, 0x8f, 0xe0,
|
|
||||||
0x22, 0xec, 0x18, 0xac, 0x39, 0x22, 0xd4, 0xd6, 0x93, 0x44,
|
|
||||||
0x1, 0x32, 0x82, 0xc8, 0xfc, 0x61, 0xb3, 0x1, 0x45, 0xc,
|
|
||||||
0x2e, 0x83, 0x30, 0xd0, 0xe, 0x17, 0x24, 0xf, 0x70, 0x85,
|
|
||||||
0x94, 0xee, 0x5, 0x5, 0x53, 0x4b, 0x32, 0x1b, 0x3f, 0x98,
|
|
||||||
0xd3, 0x1d, 0x29, 0x81, 0xb0, 0xae, 0x1e, 0x8c, 0x7e, 0x68,
|
|
||||||
0xe0, 0x60, 0x5a, 0x54, 0x8f, 0xb0, 0x78, 0x69, 0x73, 0x6,
|
|
||||||
0xa2, 00, 0x6b, 0x57, 0xca, 0x3d, 0x11, 0x50, 0xbd, 0x4,
|
|
||||||
0x30, 0x4b, 0x3a, 0xd4, 0xab, 0x5f, 0x1f, 0x9b, 0x3d, 0x13,
|
|
||||||
0x74, 0x27, 0x88, 0x3c, 0x25, 0xe0, 0x17, 0xbe, 0x7a, 0x79,
|
|
||||||
0x45, 0xd, 0xc, 0xb0, 0x8b, 0xda, 0x90, 0xca, 0x80, 0x6,
|
|
||||||
0x5d, 0x17, 0x60, 0x1c, 0x22, 0x4c, 0xd8, 0x57, 0x22, 0x6,
|
|
||||||
0x20, 00, 0x98, 0x7, 0x8, 0xe4, 0x56, 0x80, 0x80, 0x1c,
|
|
||||||
0xc5, 0xb7, 0xc5, 0x82, 0xc, 0x36, 0xe8, 0xe0, 0x83, 0x10,
|
|
||||||
0x46, 0x28, 0xe1, 0x84, 0x14, 0x56, 0x68, 0xa1, 0x10, 0x41,
|
|
||||||
00, 00, 0x3b, };
|
|
||||||
|
|
||||||
static const unsigned 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, 0x6c, 0x77, 0x49,
|
|
||||||
0x50, 0x2f, 0x70, 0x72, 0x65, 0x2d, 0x30, 0x2e, 0x36, 0x20,
|
|
||||||
0x28, 0x68, 0x74, 0x74, 0x70, 0x3a, 0x2f, 0x2f, 0x77, 0x77,
|
|
||||||
0x77, 0x2e, 0x73, 0x69, 0x63, 0x73, 0x2e, 0x73, 0x65, 0x2f,
|
|
||||||
0x7e, 0x61, 0x64, 0x61, 0x6d, 0x2f, 0x6c, 0x77, 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, 0x6c, 0x77, 0x49, 0x50, 0x20, 0x2d, 0x20, 0x41, 0x20,
|
|
||||||
0x4c, 0x69, 0x67, 0x68, 0x74, 0x77, 0x65, 0x69, 0x67, 0x68,
|
|
||||||
0x74, 0x20, 0x54, 0x43, 0x50, 0x2f, 0x49, 0x50, 0x20, 0x53,
|
|
||||||
0x74, 0x61, 0x63, 0x6b, 0x3c, 0x2f, 0x74, 0x69, 0x74, 0x6c,
|
|
||||||
0x65, 0x3e, 0x3c, 0x2f, 0x68, 0x65, 0x61, 0x64, 0x3e, 0xa,
|
|
||||||
0x3c, 0x62, 0x6f, 0x64, 0x79, 0x20, 0x62, 0x67, 0x63, 0x6f,
|
|
||||||
0x6c, 0x6f, 0x72, 0x3d, 0x22, 0x77, 0x68, 0x69, 0x74, 0x65,
|
|
||||||
0x22, 0x20, 0x74, 0x65, 0x78, 0x74, 0x3d, 0x22, 0x62, 0x6c,
|
|
||||||
0x61, 0x63, 0x6b, 0x22, 0x3e, 0xa, 0xa, 0x20, 0x20, 0x20,
|
|
||||||
0x20, 0x3c, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x20, 0x77, 0x69,
|
|
||||||
0x64, 0x74, 0x68, 0x3d, 0x22, 0x31, 0x30, 0x30, 0x25, 0x22,
|
|
||||||
0x3e, 0xa, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x3c, 0x74,
|
|
||||||
0x72, 0x20, 0x76, 0x61, 0x6c, 0x69, 0x67, 0x6e, 0x3d, 0x22,
|
|
||||||
0x74, 0x6f, 0x70, 0x22, 0x3e, 0x3c, 0x74, 0x64, 0x20, 0x77,
|
|
||||||
0x69, 0x64, 0x74, 0x68, 0x3d, 0x22, 0x38, 0x30, 0x22, 0x3e,
|
|
||||||
0x9, 0x20, 0x20, 0xa, 0x9, 0x20, 0x20, 0x3c, 0x61, 0x20,
|
|
||||||
0x68, 0x72, 0x65, 0x66, 0x3d, 0x22, 0x68, 0x74, 0x74, 0x70,
|
|
||||||
0x3a, 0x2f, 0x2f, 0x77, 0x77, 0x77, 0x2e, 0x73, 0x69, 0x63,
|
|
||||||
0x73, 0x2e, 0x73, 0x65, 0x2f, 0x22, 0x3e, 0x3c, 0x69, 0x6d,
|
|
||||||
0x67, 0x20, 0x73, 0x72, 0x63, 0x3d, 0x22, 0x69, 0x6d, 0x67,
|
|
||||||
0x2f, 0x73, 0x69, 0x63, 0x73, 0x2e, 0x67, 0x69, 0x66, 0x22,
|
|
||||||
0xa, 0x9, 0x20, 0x20, 0x62, 0x6f, 0x72, 0x64, 0x65, 0x72,
|
|
||||||
0x3d, 0x22, 0x30, 0x22, 0x20, 0x61, 0x6c, 0x74, 0x3d, 0x22,
|
|
||||||
0x53, 0x49, 0x43, 0x53, 0x20, 0x6c, 0x6f, 0x67, 0x6f, 0x22,
|
|
||||||
0x20, 0x74, 0x69, 0x74, 0x6c, 0x65, 0x3d, 0x22, 0x53, 0x49,
|
|
||||||
0x43, 0x53, 0x20, 0x6c, 0x6f, 0x67, 0x6f, 0x22, 0x3e, 0x3c,
|
|
||||||
0x2f, 0x61, 0x3e, 0xa, 0x9, 0x3c, 0x2f, 0x74, 0x64, 0x3e,
|
|
||||||
0x3c, 0x74, 0x64, 0x20, 0x77, 0x69, 0x64, 0x74, 0x68, 0x3d,
|
|
||||||
0x22, 0x35, 0x30, 0x30, 0x22, 0x3e, 0x9, 0x20, 0x20, 0xa,
|
|
||||||
0x9, 0x20, 0x20, 0x3c, 0x68, 0x31, 0x3e, 0x6c, 0x77, 0x49,
|
|
||||||
0x50, 0x20, 0x2d, 0x20, 0x41, 0x20, 0x4c, 0x69, 0x67, 0x68,
|
|
||||||
0x74, 0x77, 0x65, 0x69, 0x67, 0x68, 0x74, 0x20, 0x54, 0x43,
|
|
||||||
0x50, 0x2f, 0x49, 0x50, 0x20, 0x53, 0x74, 0x61, 0x63, 0x6b,
|
|
||||||
0x3c, 0x2f, 0x68, 0x31, 0x3e, 0xa, 0x9, 0x20, 0x20, 0x3c,
|
|
||||||
0x68, 0x32, 0x3e, 0x34, 0x30, 0x34, 0x20, 0x2d, 0x20, 0x50,
|
|
||||||
0x61, 0x67, 0x65, 0x20, 0x6e, 0x6f, 0x74, 0x20, 0x66, 0x6f,
|
|
||||||
0x75, 0x6e, 0x64, 0x3c, 0x2f, 0x68, 0x32, 0x3e, 0xa, 0x9,
|
|
||||||
0x20, 0x20, 0x3c, 0x70, 0x3e, 0xa, 0x9, 0x20, 0x20, 0x20,
|
|
||||||
0x20, 0x53, 0x6f, 0x72, 0x72, 0x79, 0x2c, 0x20, 0x74, 0x68,
|
|
||||||
0x65, 0x20, 0x70, 0x61, 0x67, 0x65, 0x20, 0x79, 0x6f, 0x75,
|
|
||||||
0x20, 0x61, 0x72, 0x65, 0x20, 0x72, 0x65, 0x71, 0x75, 0x65,
|
|
||||||
0x73, 0x74, 0x69, 0x6e, 0x67, 0x20, 0x77, 0x61, 0x73, 0x20,
|
|
||||||
0x6e, 0x6f, 0x74, 0x20, 0x66, 0x6f, 0x75, 0x6e, 0x64, 0x20,
|
|
||||||
0x6f, 0x6e, 0x20, 0x74, 0x68, 0x69, 0x73, 0xa, 0x9, 0x20,
|
|
||||||
0x20, 0x20, 0x20, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x2e,
|
|
||||||
0x20, 0xa, 0x9, 0x20, 0x20, 0x3c, 0x2f, 0x70, 0x3e, 0xa,
|
|
||||||
0x9, 0x3c, 0x2f, 0x74, 0x64, 0x3e, 0x3c, 0x74, 0x64, 0x3e,
|
|
||||||
0xa, 0x9, 0x20, 0x20, 0x26, 0x6e, 0x62, 0x73, 0x70, 0x3b,
|
|
||||||
0xa, 0x9, 0x3c, 0x2f, 0x74, 0x64, 0x3e, 0x3c, 0x2f, 0x74,
|
|
||||||
0x72, 0x3e, 0xa, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 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 unsigned 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, 0x6c, 0x77, 0x49, 0x50, 0x2f,
|
|
||||||
0x70, 0x72, 0x65, 0x2d, 0x30, 0x2e, 0x36, 0x20, 0x28, 0x68,
|
|
||||||
0x74, 0x74, 0x70, 0x3a, 0x2f, 0x2f, 0x77, 0x77, 0x77, 0x2e,
|
|
||||||
0x73, 0x69, 0x63, 0x73, 0x2e, 0x73, 0x65, 0x2f, 0x7e, 0x61,
|
|
||||||
0x64, 0x61, 0x6d, 0x2f, 0x6c, 0x77, 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, 0x6c,
|
|
||||||
0x77, 0x49, 0x50, 0x20, 0x2d, 0x20, 0x41, 0x20, 0x4c, 0x69,
|
|
||||||
0x67, 0x68, 0x74, 0x77, 0x65, 0x69, 0x67, 0x68, 0x74, 0x20,
|
|
||||||
0x54, 0x43, 0x50, 0x2f, 0x49, 0x50, 0x20, 0x53, 0x74, 0x61,
|
|
||||||
0x63, 0x6b, 0x3c, 0x2f, 0x74, 0x69, 0x74, 0x6c, 0x65, 0x3e,
|
|
||||||
0x3c, 0x2f, 0x68, 0x65, 0x61, 0x64, 0x3e, 0xa, 0x3c, 0x62,
|
|
||||||
0x6f, 0x64, 0x79, 0x20, 0x62, 0x67, 0x63, 0x6f, 0x6c, 0x6f,
|
|
||||||
0x72, 0x3d, 0x22, 0x77, 0x68, 0x69, 0x74, 0x65, 0x22, 0x20,
|
|
||||||
0x74, 0x65, 0x78, 0x74, 0x3d, 0x22, 0x62, 0x6c, 0x61, 0x63,
|
|
||||||
0x6b, 0x22, 0x3e, 0xa, 0xa, 0x20, 0x20, 0x20, 0x20, 0x3c,
|
|
||||||
0x74, 0x61, 0x62, 0x6c, 0x65, 0x20, 0x77, 0x69, 0x64, 0x74,
|
|
||||||
0x68, 0x3d, 0x22, 0x31, 0x30, 0x30, 0x25, 0x22, 0x3e, 0xa,
|
|
||||||
0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x3c, 0x74, 0x72, 0x20,
|
|
||||||
0x76, 0x61, 0x6c, 0x69, 0x67, 0x6e, 0x3d, 0x22, 0x74, 0x6f,
|
|
||||||
0x70, 0x22, 0x3e, 0x3c, 0x74, 0x64, 0x20, 0x77, 0x69, 0x64,
|
|
||||||
0x74, 0x68, 0x3d, 0x22, 0x38, 0x30, 0x22, 0x3e, 0x9, 0x20,
|
|
||||||
0x20, 0xa, 0x9, 0x20, 0x20, 0x3c, 0x61, 0x20, 0x68, 0x72,
|
|
||||||
0x65, 0x66, 0x3d, 0x22, 0x68, 0x74, 0x74, 0x70, 0x3a, 0x2f,
|
|
||||||
0x2f, 0x77, 0x77, 0x77, 0x2e, 0x73, 0x69, 0x63, 0x73, 0x2e,
|
|
||||||
0x73, 0x65, 0x2f, 0x22, 0x3e, 0x3c, 0x69, 0x6d, 0x67, 0x20,
|
|
||||||
0x73, 0x72, 0x63, 0x3d, 0x22, 0x69, 0x6d, 0x67, 0x2f, 0x73,
|
|
||||||
0x69, 0x63, 0x73, 0x2e, 0x67, 0x69, 0x66, 0x22, 0xa, 0x9,
|
|
||||||
0x20, 0x20, 0x62, 0x6f, 0x72, 0x64, 0x65, 0x72, 0x3d, 0x22,
|
|
||||||
0x30, 0x22, 0x20, 0x61, 0x6c, 0x74, 0x3d, 0x22, 0x53, 0x49,
|
|
||||||
0x43, 0x53, 0x20, 0x6c, 0x6f, 0x67, 0x6f, 0x22, 0x20, 0x74,
|
|
||||||
0x69, 0x74, 0x6c, 0x65, 0x3d, 0x22, 0x53, 0x49, 0x43, 0x53,
|
|
||||||
0x20, 0x6c, 0x6f, 0x67, 0x6f, 0x22, 0x3e, 0x3c, 0x2f, 0x61,
|
|
||||||
0x3e, 0xa, 0x9, 0x3c, 0x2f, 0x74, 0x64, 0x3e, 0x3c, 0x74,
|
|
||||||
0x64, 0x20, 0x77, 0x69, 0x64, 0x74, 0x68, 0x3d, 0x22, 0x35,
|
|
||||||
0x30, 0x30, 0x22, 0x3e, 0x9, 0x20, 0x20, 0xa, 0x9, 0x20,
|
|
||||||
0x20, 0x3c, 0x68, 0x31, 0x3e, 0x6c, 0x77, 0x49, 0x50, 0x20,
|
|
||||||
0x2d, 0x20, 0x41, 0x20, 0x4c, 0x69, 0x67, 0x68, 0x74, 0x77,
|
|
||||||
0x65, 0x69, 0x67, 0x68, 0x74, 0x20, 0x54, 0x43, 0x50, 0x2f,
|
|
||||||
0x49, 0x50, 0x20, 0x53, 0x74, 0x61, 0x63, 0x6b, 0x3c, 0x2f,
|
|
||||||
0x68, 0x31, 0x3e, 0xa, 0x9, 0x20, 0x20, 0x3c, 0x70, 0x3e,
|
|
||||||
0xa, 0x9, 0x20, 0x20, 0x20, 0x20, 0x54, 0x68, 0x65, 0x20,
|
|
||||||
0x77, 0x65, 0x62, 0x20, 0x70, 0x61, 0x67, 0x65, 0x20, 0x79,
|
|
||||||
0x6f, 0x75, 0x20, 0x61, 0x72, 0x65, 0x20, 0x77, 0x61, 0x74,
|
|
||||||
0x63, 0x68, 0x69, 0x6e, 0x67, 0x20, 0x77, 0x61, 0x73, 0x20,
|
|
||||||
0x73, 0x65, 0x72, 0x76, 0x65, 0x64, 0x20, 0x62, 0x79, 0x20,
|
|
||||||
0x61, 0x20, 0x73, 0x69, 0x6d, 0x70, 0x6c, 0x65, 0x20, 0x77,
|
|
||||||
0x65, 0x62, 0xa, 0x9, 0x20, 0x20, 0x20, 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, 0x20, 0x74, 0x68, 0x65, 0x20, 0x6c, 0x69, 0x67,
|
|
||||||
0x68, 0x74, 0x77, 0x65, 0x69, 0x67, 0x68, 0x74, 0x20, 0x54,
|
|
||||||
0x43, 0x50, 0x2f, 0x49, 0x50, 0x20, 0x73, 0x74, 0x61, 0x63,
|
|
||||||
0x6b, 0x20, 0x3c, 0x61, 0xa, 0x9, 0x20, 0x20, 0x20, 0x20,
|
|
||||||
0x68, 0x72, 0x65, 0x66, 0x3d, 0x22, 0x68, 0x74, 0x74, 0x70,
|
|
||||||
0x3a, 0x2f, 0x2f, 0x77, 0x77, 0x77, 0x2e, 0x73, 0x69, 0x63,
|
|
||||||
0x73, 0x2e, 0x73, 0x65, 0x2f, 0x7e, 0x61, 0x64, 0x61, 0x6d,
|
|
||||||
0x2f, 0x6c, 0x77, 0x69, 0x70, 0x2f, 0x22, 0x3e, 0x6c, 0x77,
|
|
||||||
0x49, 0x50, 0x3c, 0x2f, 0x61, 0x3e, 0x2e, 0xa, 0x9, 0x20,
|
|
||||||
0x20, 0x3c, 0x2f, 0x70, 0x3e, 0xa, 0x9, 0x20, 0x20, 0x3c,
|
|
||||||
0x70, 0x3e, 0xa, 0x9, 0x20, 0x20, 0x20, 0x20, 0x6c, 0x77,
|
|
||||||
0x49, 0x50, 0x20, 0x69, 0x73, 0x20, 0x61, 0x6e, 0x20, 0x6f,
|
|
||||||
0x70, 0x65, 0x6e, 0x20, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65,
|
|
||||||
0x20, 0x69, 0x6d, 0x70, 0x6c, 0x65, 0x6d, 0x65, 0x6e, 0x74,
|
|
||||||
0x61, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x6f, 0x66, 0x20, 0x74,
|
|
||||||
0x68, 0x65, 0x20, 0x54, 0x43, 0x50, 0x2f, 0x49, 0x50, 0xa,
|
|
||||||
0x9, 0x20, 0x20, 0x20, 0x20, 0x70, 0x72, 0x6f, 0x74, 0x6f,
|
|
||||||
0x63, 0x6f, 0x6c, 0x20, 0x73, 0x75, 0x69, 0x74, 0x65, 0x20,
|
|
||||||
0x74, 0x68, 0x61, 0x74, 0x20, 0x77, 0x61, 0x73, 0x20, 0x6f,
|
|
||||||
0x72, 0x69, 0x67, 0x69, 0x6e, 0x61, 0x6c, 0x6c, 0x79, 0x20,
|
|
||||||
0x77, 0x72, 0x69, 0x74, 0x74, 0x65, 0x6e, 0x20, 0x62, 0x79,
|
|
||||||
0x20, 0x41, 0x64, 0x61, 0x6d, 0x20, 0x44, 0x75, 0x6e, 0x6b,
|
|
||||||
0x65, 0x6c, 0x73, 0xa, 0x9, 0x20, 0x20, 0x20, 0x20, 0x6f,
|
|
||||||
0x66, 0x20, 0x74, 0x68, 0x65, 0x20, 0x53, 0x77, 0x65, 0x64,
|
|
||||||
0x69, 0x73, 0x68, 0x20, 0x49, 0x6e, 0x73, 0x74, 0x69, 0x74,
|
|
||||||
0x75, 0x74, 0x65, 0x20, 0x6f, 0x66, 0x20, 0x43, 0x6f, 0x6d,
|
|
||||||
0x70, 0x75, 0x74, 0x65, 0x72, 0x20, 0x53, 0x63, 0x69, 0x65,
|
|
||||||
0x6e, 0x63, 0x65, 0x20, 0x62, 0x75, 0x74, 0x20, 0x6e, 0x6f,
|
|
||||||
0x77, 0x20, 0x69, 0x73, 0xa, 0x9, 0x20, 0x20, 0x20, 0x20,
|
|
||||||
0x62, 0x65, 0x69, 0x6e, 0x67, 0x20, 0x61, 0x63, 0x74, 0x69,
|
|
||||||
0x76, 0x65, 0x6c, 0x79, 0x20, 0x64, 0x65, 0x76, 0x65, 0x6c,
|
|
||||||
0x6f, 0x70, 0x65, 0x64, 0x20, 0x62, 0x79, 0x20, 0x61, 0x20,
|
|
||||||
0x74, 0x65, 0x61, 0x6d, 0x20, 0x6f, 0x66, 0x20, 0x64, 0x65,
|
|
||||||
0x76, 0x65, 0x6c, 0x6f, 0x70, 0x65, 0x72, 0x73, 0xa, 0x9,
|
|
||||||
0x20, 0x20, 0x20, 0x20, 0x64, 0x69, 0x73, 0x74, 0x72, 0x69,
|
|
||||||
0x62, 0x75, 0x74, 0x65, 0x64, 0x20, 0x77, 0x6f, 0x72, 0x6c,
|
|
||||||
0x64, 0x2d, 0x77, 0x69, 0x64, 0x65, 0x2e, 0x20, 0x53, 0x69,
|
|
||||||
0x6e, 0x63, 0x65, 0x20, 0x69, 0x74, 0x27, 0x73, 0x20, 0x72,
|
|
||||||
0x65, 0x6c, 0x65, 0x61, 0x73, 0x65, 0x2c, 0x20, 0x6c, 0x77,
|
|
||||||
0x49, 0x50, 0x20, 0x68, 0x61, 0x73, 0xa, 0x9, 0x20, 0x20,
|
|
||||||
0x20, 0x20, 0x73, 0x70, 0x75, 0x72, 0x72, 0x65, 0x64, 0x20,
|
|
||||||
0x61, 0x20, 0x6c, 0x6f, 0x74, 0x20, 0x6f, 0x66, 0x20, 0x69,
|
|
||||||
0x6e, 0x74, 0x65, 0x72, 0x65, 0x73, 0x74, 0x20, 0x61, 0x6e,
|
|
||||||
0x64, 0x20, 0x68, 0x61, 0x73, 0x20, 0x62, 0x65, 0x65, 0x6e,
|
|
||||||
0x20, 0x70, 0x6f, 0x72, 0x74, 0x65, 0x64, 0x20, 0x74, 0x6f,
|
|
||||||
0x20, 0x73, 0x65, 0x76, 0x65, 0x72, 0x61, 0x6c, 0xa, 0x9,
|
|
||||||
0x20, 0x20, 0x20, 0x20, 0x70, 0x6c, 0x61, 0x74, 0x66, 0x6f,
|
|
||||||
0x72, 0x6d, 0x73, 0x20, 0x61, 0x6e, 0x64, 0x20, 0x6f, 0x70,
|
|
||||||
0x65, 0x72, 0x61, 0x74, 0x69, 0x6e, 0x67, 0x20, 0x73, 0x79,
|
|
||||||
0x73, 0x74, 0x65, 0x6d, 0x73, 0x2e, 0x20, 0x6c, 0x77, 0x49,
|
|
||||||
0x50, 0x20, 0x63, 0x61, 0x6e, 0x20, 0x62, 0x65, 0x20, 0x75,
|
|
||||||
0x73, 0x65, 0x64, 0x20, 0x65, 0x69, 0x74, 0x68, 0x65, 0x72,
|
|
||||||
0xa, 0x9, 0x20, 0x20, 0x20, 0x20, 0x77, 0x69, 0x74, 0x68,
|
|
||||||
0x20, 0x6f, 0x72, 0x20, 0x77, 0x69, 0x74, 0x68, 0x6f, 0x75,
|
|
||||||
0x74, 0x20, 0x61, 0x6e, 0x20, 0x75, 0x6e, 0x64, 0x65, 0x72,
|
|
||||||
0x6c, 0x79, 0x69, 0x6e, 0x67, 0x20, 0x4f, 0x53, 0x2e, 0xa,
|
|
||||||
0x9, 0x20, 0x20, 0x3c, 0x2f, 0x70, 0x3e, 0xa, 0x9, 0x20,
|
|
||||||
0x20, 0x3c, 0x70, 0x3e, 0xa, 0x9, 0x20, 0x20, 0x20, 0x20,
|
|
||||||
0x54, 0x68, 0x65, 0x20, 0x66, 0x6f, 0x63, 0x75, 0x73, 0x20,
|
|
||||||
0x6f, 0x66, 0x20, 0x74, 0x68, 0x65, 0x20, 0x6c, 0x77, 0x49,
|
|
||||||
0x50, 0x20, 0x54, 0x43, 0x50, 0x2f, 0x49, 0x50, 0x20, 0x69,
|
|
||||||
0x6d, 0x70, 0x6c, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x61, 0x74,
|
|
||||||
0x69, 0x6f, 0x6e, 0x20, 0x69, 0x73, 0x20, 0x74, 0x6f, 0x20,
|
|
||||||
0x72, 0x65, 0x64, 0x75, 0x63, 0x65, 0xa, 0x9, 0x20, 0x20,
|
|
||||||
0x20, 0x20, 0x74, 0x68, 0x65, 0x20, 0x52, 0x41, 0x4d, 0x20,
|
|
||||||
0x75, 0x73, 0x61, 0x67, 0x65, 0x20, 0x77, 0x68, 0x69, 0x6c,
|
|
||||||
0x65, 0x20, 0x73, 0x74, 0x69, 0x6c, 0x6c, 0x20, 0x68, 0x61,
|
|
||||||
0x76, 0x69, 0x6e, 0x67, 0x20, 0x61, 0x20, 0x66, 0x75, 0x6c,
|
|
||||||
0x6c, 0x20, 0x73, 0x63, 0x61, 0x6c, 0x65, 0x20, 0x54, 0x43,
|
|
||||||
0x50, 0x2e, 0x20, 0x54, 0x68, 0x69, 0x73, 0xa, 0x9, 0x20,
|
|
||||||
0x20, 0x20, 0x20, 0x6d, 0x61, 0x6b, 0x65, 0x73, 0x20, 0x6c,
|
|
||||||
0x77, 0x49, 0x50, 0x20, 0x73, 0x75, 0x69, 0x74, 0x61, 0x62,
|
|
||||||
0x6c, 0x65, 0x20, 0x66, 0x6f, 0x72, 0x20, 0x75, 0x73, 0x65,
|
|
||||||
0x20, 0x69, 0x6e, 0x20, 0x65, 0x6d, 0x62, 0x65, 0x64, 0x64,
|
|
||||||
0x65, 0x64, 0x20, 0x73, 0x79, 0x73, 0x74, 0x65, 0x6d, 0x73,
|
|
||||||
0x20, 0x77, 0x69, 0x74, 0x68, 0x20, 0x74, 0x65, 0x6e, 0x73,
|
|
||||||
0xa, 0x9, 0x20, 0x20, 0x20, 0x20, 0x6f, 0x66, 0x20, 0x6b,
|
|
||||||
0x69, 0x6c, 0x6f, 0x62, 0x79, 0x74, 0x65, 0x73, 0x20, 0x6f,
|
|
||||||
0x66, 0x20, 0x66, 0x72, 0x65, 0x65, 0x20, 0x52, 0x41, 0x4d,
|
|
||||||
0x20, 0x61, 0x6e, 0x64, 0x20, 0x72, 0x6f, 0x6f, 0x6d, 0x20,
|
|
||||||
0x66, 0x6f, 0x72, 0x20, 0x61, 0x72, 0x6f, 0x75, 0x6e, 0x64,
|
|
||||||
0x20, 0x34, 0x30, 0x20, 0x6b, 0x69, 0x6c, 0x6f, 0x62, 0x79,
|
|
||||||
0x74, 0x65, 0x73, 0xa, 0x9, 0x20, 0x20, 0x20, 0x20, 0x6f,
|
|
||||||
0x66, 0x20, 0x63, 0x6f, 0x64, 0x65, 0x20, 0x52, 0x4f, 0x4d,
|
|
||||||
0x2e, 0xa, 0x9, 0x20, 0x20, 0x3c, 0x2f, 0x70, 0x3e, 0xa,
|
|
||||||
0x9, 0x20, 0x20, 0x3c, 0x70, 0x3e, 0xa, 0x9, 0x20, 0x20,
|
|
||||||
0x20, 0x20, 0x4d, 0x6f, 0x72, 0x65, 0x20, 0x69, 0x6e, 0x66,
|
|
||||||
0x6f, 0x72, 0x6d, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x61,
|
|
||||||
0x62, 0x6f, 0x75, 0x74, 0x20, 0x6c, 0x77, 0x49, 0x50, 0x20,
|
|
||||||
0x63, 0x61, 0x6e, 0x20, 0x62, 0x65, 0x20, 0x66, 0x6f, 0x75,
|
|
||||||
0x6e, 0x64, 0x20, 0x61, 0x74, 0x20, 0x74, 0x68, 0x65, 0x20,
|
|
||||||
0x6c, 0x77, 0x49, 0x50, 0xa, 0x9, 0x20, 0x20, 0x20, 0x20,
|
|
||||||
0x68, 0x6f, 0x6d, 0x65, 0x70, 0x61, 0x67, 0x65, 0x20, 0x61,
|
|
||||||
0x74, 0x20, 0x3c, 0x61, 0xa, 0x9, 0x20, 0x20, 0x20, 0x20,
|
|
||||||
0x68, 0x72, 0x65, 0x66, 0x3d, 0x22, 0x68, 0x74, 0x74, 0x70,
|
|
||||||
0x3a, 0x2f, 0x2f, 0x77, 0x77, 0x77, 0x2e, 0x73, 0x69, 0x63,
|
|
||||||
0x73, 0x2e, 0x73, 0x65, 0x2f, 0x7e, 0x61, 0x64, 0x61, 0x6d,
|
|
||||||
0x2f, 0x6c, 0x77, 0x69, 0x70, 0x2f, 0x22, 0x3e, 0x68, 0x74,
|
|
||||||
0x74, 0x70, 0x3a, 0x2f, 0x2f, 0x77, 0x77, 0x77, 0x2e, 0x73,
|
|
||||||
0x69, 0x63, 0x73, 0x2e, 0x73, 0x65, 0x2f, 0x7e, 0x61, 0x64,
|
|
||||||
0x61, 0x6d, 0x2f, 0x6c, 0x77, 0x69, 0x70, 0x2f, 0x3c, 0x2f,
|
|
||||||
0x61, 0x3e, 0x2e, 0xa, 0x9, 0x20, 0x20, 0x3c, 0x2f, 0x70,
|
|
||||||
0x3e, 0xa, 0x9, 0x3c, 0x2f, 0x74, 0x64, 0x3e, 0x3c, 0x74,
|
|
||||||
0x64, 0x3e, 0xa, 0x9, 0x20, 0x20, 0x26, 0x6e, 0x62, 0x73,
|
|
||||||
0x70, 0x3b, 0xa, 0x9, 0x3c, 0x2f, 0x74, 0x64, 0x3e, 0x3c,
|
|
||||||
0x2f, 0x74, 0x72, 0x3e, 0xa, 0x20, 0x20, 0x20, 0x20, 0x20,
|
|
||||||
0x20, 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, 0xa, };
|
|
||||||
|
|
||||||
const struct fsdata_file file_img_sics_gif[] = {{NULL, data_img_sics_gif, data_img_sics_gif + 14, sizeof(data_img_sics_gif) - 14}};
|
|
||||||
|
|
||||||
const struct fsdata_file file_404_html[] = {{file_img_sics_gif, data_404_html, data_404_html + 10, sizeof(data_404_html) - 10}};
|
|
||||||
|
|
||||||
const struct fsdata_file file_index_html[] = {{file_404_html, data_index_html, data_index_html + 12, sizeof(data_index_html) - 12}};
|
|
||||||
|
|
||||||
#define FS_ROOT file_index_html
|
|
||||||
|
|
||||||
#define FS_NUMFILES 3
|
|
@ -1,49 +0,0 @@
|
|||||||
/*
|
|
||||||
* Copyright (c) 2001-2003 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. 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 lwIP TCP/IP stack.
|
|
||||||
*
|
|
||||||
* Author: Adam Dunkels <adam@sics.se>
|
|
||||||
*
|
|
||||||
*/
|
|
||||||
#ifndef __FSDATA_H__
|
|
||||||
#define __FSDATA_H__
|
|
||||||
|
|
||||||
struct fsdata_file {
|
|
||||||
const struct fsdata_file *next;
|
|
||||||
const unsigned char *name;
|
|
||||||
const unsigned char *data;
|
|
||||||
const int len;
|
|
||||||
};
|
|
||||||
|
|
||||||
struct fsdata_file_noconst {
|
|
||||||
struct fsdata_file *next;
|
|
||||||
unsigned char *name;
|
|
||||||
unsigned char *data;
|
|
||||||
int len;
|
|
||||||
};
|
|
||||||
|
|
||||||
#endif /* __FSDATA_H__ */
|
|
@ -1,244 +0,0 @@
|
|||||||
/*
|
|
||||||
* Copyright (c) 2001-2003 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. 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 lwIP TCP/IP stack.
|
|
||||||
*
|
|
||||||
* Author: Adam Dunkels <adam@sics.se>
|
|
||||||
*
|
|
||||||
*/
|
|
||||||
|
|
||||||
#include "lwip/debug.h"
|
|
||||||
|
|
||||||
#include "lwip/stats.h"
|
|
||||||
|
|
||||||
#include "httpd.h"
|
|
||||||
|
|
||||||
#include "lwip/tcp.h"
|
|
||||||
|
|
||||||
#include "fs.h"
|
|
||||||
|
|
||||||
struct http_state {
|
|
||||||
char *file;
|
|
||||||
u16_t left;
|
|
||||||
u8_t retries;
|
|
||||||
};
|
|
||||||
|
|
||||||
/*-----------------------------------------------------------------------------------*/
|
|
||||||
static void
|
|
||||||
conn_err(void *arg, err_t err)
|
|
||||||
{
|
|
||||||
struct http_state *hs;
|
|
||||||
|
|
||||||
hs = arg;
|
|
||||||
mem_free(hs);
|
|
||||||
}
|
|
||||||
/*-----------------------------------------------------------------------------------*/
|
|
||||||
static void
|
|
||||||
close_conn(struct tcp_pcb *pcb, struct http_state *hs)
|
|
||||||
{
|
|
||||||
tcp_arg(pcb, NULL);
|
|
||||||
tcp_sent(pcb, NULL);
|
|
||||||
tcp_recv(pcb, NULL);
|
|
||||||
mem_free(hs);
|
|
||||||
tcp_close(pcb);
|
|
||||||
}
|
|
||||||
/*-----------------------------------------------------------------------------------*/
|
|
||||||
static void
|
|
||||||
send_data(struct tcp_pcb *pcb, struct http_state *hs)
|
|
||||||
{
|
|
||||||
err_t err;
|
|
||||||
u16_t len;
|
|
||||||
|
|
||||||
/* We cannot send more data than space available in the send
|
|
||||||
buffer. */
|
|
||||||
if (tcp_sndbuf(pcb) < hs->left) {
|
|
||||||
len = tcp_sndbuf(pcb);
|
|
||||||
} else {
|
|
||||||
len = hs->left;
|
|
||||||
}
|
|
||||||
|
|
||||||
do {
|
|
||||||
err = tcp_write(pcb, hs->file, len, 0);
|
|
||||||
if (err == ERR_MEM) {
|
|
||||||
len /= 2;
|
|
||||||
}
|
|
||||||
} while (err == ERR_MEM && len > 1);
|
|
||||||
|
|
||||||
if (err == ERR_OK) {
|
|
||||||
hs->file += len;
|
|
||||||
hs->left -= len;
|
|
||||||
/* } else {
|
|
||||||
printf("send_data: error %s len %d %d\n", lwip_strerr(err), len, tcp_sndbuf(pcb));*/
|
|
||||||
}
|
|
||||||
}
|
|
||||||
/*-----------------------------------------------------------------------------------*/
|
|
||||||
static err_t
|
|
||||||
http_poll(void *arg, struct tcp_pcb *pcb)
|
|
||||||
{
|
|
||||||
struct http_state *hs;
|
|
||||||
|
|
||||||
hs = arg;
|
|
||||||
|
|
||||||
/* printf("Polll\n");*/
|
|
||||||
if (hs == NULL) {
|
|
||||||
/* printf("Null, close\n");*/
|
|
||||||
tcp_abort(pcb);
|
|
||||||
return ERR_ABRT;
|
|
||||||
} else {
|
|
||||||
++hs->retries;
|
|
||||||
if (hs->retries == 4) {
|
|
||||||
tcp_abort(pcb);
|
|
||||||
return ERR_ABRT;
|
|
||||||
}
|
|
||||||
send_data(pcb, hs);
|
|
||||||
}
|
|
||||||
|
|
||||||
return ERR_OK;
|
|
||||||
}
|
|
||||||
/*-----------------------------------------------------------------------------------*/
|
|
||||||
static err_t
|
|
||||||
http_sent(void *arg, struct tcp_pcb *pcb, u16_t len)
|
|
||||||
{
|
|
||||||
struct http_state *hs;
|
|
||||||
|
|
||||||
hs = arg;
|
|
||||||
|
|
||||||
hs->retries = 0;
|
|
||||||
|
|
||||||
if (hs->left > 0) {
|
|
||||||
send_data(pcb, hs);
|
|
||||||
} else {
|
|
||||||
close_conn(pcb, hs);
|
|
||||||
}
|
|
||||||
|
|
||||||
return ERR_OK;
|
|
||||||
}
|
|
||||||
/*-----------------------------------------------------------------------------------*/
|
|
||||||
static err_t
|
|
||||||
http_recv(void *arg, struct tcp_pcb *pcb, struct pbuf *p, err_t err)
|
|
||||||
{
|
|
||||||
int i;
|
|
||||||
char *data;
|
|
||||||
struct fs_file file;
|
|
||||||
struct http_state *hs;
|
|
||||||
|
|
||||||
hs = arg;
|
|
||||||
|
|
||||||
if (err == ERR_OK && p != NULL) {
|
|
||||||
|
|
||||||
/* Inform TCP that we have taken the data. */
|
|
||||||
tcp_recved(pcb, p->tot_len);
|
|
||||||
|
|
||||||
if (hs->file == NULL) {
|
|
||||||
data = p->payload;
|
|
||||||
|
|
||||||
if (strncmp(data, "GET ", 4) == 0) {
|
|
||||||
for(i = 0; i < 40; i++) {
|
|
||||||
if (((char *)data + 4)[i] == ' ' ||
|
|
||||||
((char *)data + 4)[i] == '\r' ||
|
|
||||||
((char *)data + 4)[i] == '\n') {
|
|
||||||
((char *)data + 4)[i] = 0;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
if (*(char *)(data + 4) == '/' &&
|
|
||||||
*(char *)(data + 5) == 0) {
|
|
||||||
fs_open("/index.html", &file);
|
|
||||||
} else if (!fs_open((char *)data + 4, &file)) {
|
|
||||||
fs_open("/404.html", &file);
|
|
||||||
}
|
|
||||||
hs->file = file.data;
|
|
||||||
hs->left = file.len;
|
|
||||||
/* printf("data %p len %ld\n", hs->file, hs->left);*/
|
|
||||||
|
|
||||||
pbuf_free(p);
|
|
||||||
send_data(pcb, hs);
|
|
||||||
|
|
||||||
/* Tell TCP that we wish be to informed of data that has been
|
|
||||||
successfully sent by a call to the http_sent() function. */
|
|
||||||
tcp_sent(pcb, http_sent);
|
|
||||||
} else {
|
|
||||||
pbuf_free(p);
|
|
||||||
close_conn(pcb, hs);
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
pbuf_free(p);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
if (err == ERR_OK && p == NULL) {
|
|
||||||
close_conn(pcb, hs);
|
|
||||||
}
|
|
||||||
return ERR_OK;
|
|
||||||
}
|
|
||||||
/*-----------------------------------------------------------------------------------*/
|
|
||||||
static err_t
|
|
||||||
http_accept(void *arg, struct tcp_pcb *pcb, err_t err)
|
|
||||||
{
|
|
||||||
struct http_state *hs;
|
|
||||||
|
|
||||||
tcp_setprio(pcb, TCP_PRIO_MIN);
|
|
||||||
|
|
||||||
/* Allocate memory for the structure that holds the state of the
|
|
||||||
connection. */
|
|
||||||
hs = mem_malloc(sizeof(struct http_state));
|
|
||||||
|
|
||||||
if (hs == NULL) {
|
|
||||||
printf("http_accept: Out of memory\n");
|
|
||||||
return ERR_MEM;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Initialize the structure. */
|
|
||||||
hs->file = NULL;
|
|
||||||
hs->left = 0;
|
|
||||||
hs->retries = 0;
|
|
||||||
|
|
||||||
/* Tell TCP that this is the structure we wish to be passed for our
|
|
||||||
callbacks. */
|
|
||||||
tcp_arg(pcb, hs);
|
|
||||||
|
|
||||||
/* Tell TCP that we wish to be informed of incoming data by a call
|
|
||||||
to the http_recv() function. */
|
|
||||||
tcp_recv(pcb, http_recv);
|
|
||||||
|
|
||||||
tcp_err(pcb, conn_err);
|
|
||||||
|
|
||||||
tcp_poll(pcb, http_poll, 4);
|
|
||||||
return ERR_OK;
|
|
||||||
}
|
|
||||||
/*-----------------------------------------------------------------------------------*/
|
|
||||||
void
|
|
||||||
httpd_init(void)
|
|
||||||
{
|
|
||||||
struct tcp_pcb *pcb;
|
|
||||||
|
|
||||||
pcb = tcp_new();
|
|
||||||
tcp_bind(pcb, IP_ADDR_ANY, 80);
|
|
||||||
pcb = tcp_listen(pcb);
|
|
||||||
tcp_accept(pcb, http_accept);
|
|
||||||
}
|
|
||||||
/*-----------------------------------------------------------------------------------*/
|
|
||||||
|
|
@ -1,37 +0,0 @@
|
|||||||
/*
|
|
||||||
* Copyright (c) 2001-2003 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. 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 lwIP TCP/IP stack.
|
|
||||||
*
|
|
||||||
* Author: Adam Dunkels <adam@sics.se>
|
|
||||||
*
|
|
||||||
*/
|
|
||||||
#ifndef __HTTPD_H__
|
|
||||||
#define __HTTPD_H__
|
|
||||||
|
|
||||||
void httpd_init(void);
|
|
||||||
|
|
||||||
#endif /* __HTTPD_H__ */
|
|
@ -9,7 +9,6 @@ Win32/MSVC.
|
|||||||
|
|
||||||
To get this compiling, you have to set a couple of environment variables:
|
To get this compiling, you have to set a couple of environment variables:
|
||||||
- LWIP_SRC: points to the src subdirectory in the main lwip tree
|
- LWIP_SRC: points to the src subdirectory in the main lwip tree
|
||||||
- CONTRIB_APPS: points to the apps subdirectory of the contrib module
|
|
||||||
- PCAP_DIR: points to the WinPcap Developer's Packs (containing 'include' and 'lib')
|
- PCAP_DIR: points to the WinPcap Developer's Packs (containing 'include' and 'lib')
|
||||||
|
|
||||||
You also will have to copy the file 'lwipcfg_msvc.h.example' to
|
You also will have to copy the file 'lwipcfg_msvc.h.example' to
|
||||||
|
@ -48,11 +48,11 @@
|
|||||||
#include "lwip/udp.h"
|
#include "lwip/udp.h"
|
||||||
|
|
||||||
#include "netif/loopif.h"
|
#include "netif/loopif.h"
|
||||||
|
|
||||||
#include "httpserver_raw/httpd.h"
|
|
||||||
#include "netio/netio.h"
|
|
||||||
#include "netif/etharp.h"
|
#include "netif/etharp.h"
|
||||||
|
|
||||||
|
#include "../../apps/httpserver_raw/httpd.h"
|
||||||
|
#include "../../apps/netio/netio.h"
|
||||||
|
|
||||||
#if NO_SYS
|
#if NO_SYS
|
||||||
/* ... then we need information about the timer intervals: */
|
/* ... then we need information about the timer intervals: */
|
||||||
#include "lwip/ip_frag.h"
|
#include "lwip/ip_frag.h"
|
||||||
|
@ -15,6 +15,18 @@ Package=<4>
|
|||||||
|
|
||||||
###############################################################################
|
###############################################################################
|
||||||
|
|
||||||
|
Project: "apps"=.\apps.dsp - Package Owner=<4>
|
||||||
|
|
||||||
|
Package=<5>
|
||||||
|
{{{
|
||||||
|
}}}
|
||||||
|
|
||||||
|
Package=<4>
|
||||||
|
{{{
|
||||||
|
}}}
|
||||||
|
|
||||||
|
###############################################################################
|
||||||
|
|
||||||
Project: "pktif"=.\pktif.dsp - Package Owner=<4>
|
Project: "pktif"=.\pktif.dsp - Package Owner=<4>
|
||||||
|
|
||||||
Package=<5>
|
Package=<5>
|
||||||
@ -39,6 +51,9 @@ Package=<4>
|
|||||||
Project_Dep_Name lwip4
|
Project_Dep_Name lwip4
|
||||||
End Project Dependency
|
End Project Dependency
|
||||||
Begin Project Dependency
|
Begin Project Dependency
|
||||||
|
Project_Dep_Name apps
|
||||||
|
End Project Dependency
|
||||||
|
Begin Project Dependency
|
||||||
Project_Dep_Name pktif
|
Project_Dep_Name pktif
|
||||||
End Project Dependency
|
End Project Dependency
|
||||||
}}}
|
}}}
|
||||||
|
Loading…
Reference in New Issue
Block a user