From 2d60367420f8fefb55d3a03572b664ad54bd4ec0 Mon Sep 17 00:00:00 2001 From: goldsimon Date: Sun, 27 Jan 2008 11:25:15 +0000 Subject: [PATCH] removed old msvc6 port -> included in win32 port now --- ports/msvc6/apps.dsp | 176 ----------- ports/msvc6/include/arch/bpstruct.h | 1 - ports/msvc6/include/arch/cc.h | 81 ------ ports/msvc6/include/arch/epstruct.h | 1 - ports/msvc6/include/arch/perf.h | 40 --- ports/msvc6/include/arch/sys_arch.h | 49 ---- ports/msvc6/lwip4.dsp | 433 ---------------------------- ports/msvc6/lwipcfg_msvc.h.example | 8 - ports/msvc6/lwipopts.h | 328 --------------------- ports/msvc6/pktdrv.c | 268 ----------------- ports/msvc6/pktif.c | 333 --------------------- ports/msvc6/pktif.dsp | 116 -------- ports/msvc6/readme.txt | 35 --- ports/msvc6/sys_arch.c | 404 -------------------------- ports/msvc6/test.c | 310 -------------------- ports/msvc6/test.dsp | 154 ---------- ports/msvc6/test.dsw | 74 ----- 17 files changed, 2811 deletions(-) delete mode 100644 ports/msvc6/apps.dsp delete mode 100644 ports/msvc6/include/arch/bpstruct.h delete mode 100644 ports/msvc6/include/arch/cc.h delete mode 100644 ports/msvc6/include/arch/epstruct.h delete mode 100644 ports/msvc6/include/arch/perf.h delete mode 100644 ports/msvc6/include/arch/sys_arch.h delete mode 100644 ports/msvc6/lwip4.dsp delete mode 100644 ports/msvc6/lwipcfg_msvc.h.example delete mode 100644 ports/msvc6/lwipopts.h delete mode 100644 ports/msvc6/pktdrv.c delete mode 100644 ports/msvc6/pktif.c delete mode 100644 ports/msvc6/pktif.dsp delete mode 100644 ports/msvc6/readme.txt delete mode 100644 ports/msvc6/sys_arch.c delete mode 100644 ports/msvc6/test.c delete mode 100644 ports/msvc6/test.dsp delete mode 100644 ports/msvc6/test.dsw diff --git a/ports/msvc6/apps.dsp b/ports/msvc6/apps.dsp deleted file mode 100644 index 1567420..0000000 --- a/ports/msvc6/apps.dsp +++ /dev/null @@ -1,176 +0,0 @@ -# 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 -# Begin Group "netbios" -# Begin Source File - -SOURCE="..\..\apps\netbios\netbios.c" -# End Source File -# End Group -# Begin Group "ping" -# Begin Source File - -SOURCE="..\..\apps\ping\ping.c" -# End Source File -# End Group -# Begin Group "sntp" -# Begin Source File - -SOURCE="..\..\apps\sntp\sntp.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 -# Begin Group "netbios" -# Begin Source File - -SOURCE="..\..\apps\netbios\netbios.h" -# End Source File -# End Group -# Begin Group "ping" -# Begin Source File - -SOURCE="..\..\apps\sntp\sntp.h" -# End Source File -# End Group -# Begin Group "sntp" -# Begin Source File - -SOURCE="..\..\apps\sntp\sntp.h" -# End Source File -# End Group -# End Group -# End Target -# End Project diff --git a/ports/msvc6/include/arch/bpstruct.h b/ports/msvc6/include/arch/bpstruct.h deleted file mode 100644 index 1d81e3f..0000000 --- a/ports/msvc6/include/arch/bpstruct.h +++ /dev/null @@ -1 +0,0 @@ -#pragma pack(push,1) diff --git a/ports/msvc6/include/arch/cc.h b/ports/msvc6/include/arch/cc.h deleted file mode 100644 index 6289bf6..0000000 --- a/ports/msvc6/include/arch/cc.h +++ /dev/null @@ -1,81 +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 - * - */ -#ifndef __ARCH_CC_H__ -#define __ARCH_CC_H__ - -/* Include some files for defining library routines */ -#include -#include -#include -#include - -/** @todo fix some warnings */ -#pragma warning (disable: 4244) -#pragma warning (disable: 4996) - -#define LWIP_PROVIDE_ERRNO - -/* Define platform endianness */ -#define BYTE_ORDER LITTLE_ENDIAN - -/* Define generic types used in lwIP */ -typedef unsigned char u8_t; -typedef signed char s8_t; -typedef unsigned short u16_t; -typedef signed short s16_t; -typedef unsigned long u32_t; -typedef signed long s32_t; - -typedef u32_t mem_ptr_t; - -/* Define (sn)printf formatters for these lwIP types */ -#define U16_F "hu" -#define S16_F "hd" -#define X16_F "hx" -#define U32_F "lu" -#define S32_F "ld" -#define X32_F "lx" - -/* Compiler hints for byte order */ -#define BYTE_ORDER LITTLE_ENDIAN - -/* Compiler hints for packing structures */ -#define PACK_STRUCT_STRUCT -#define PACK_STRUCT_USE_INCLUDES - -/* Plaform specific diagnostic output */ -#define LWIP_PLATFORM_DIAG(x) do {printf x;} while(0) - -#define LWIP_PLATFORM_ASSERT(x) do {printf("Assertion \"%s\" failed at line %d in %s\n", \ - x, __LINE__, __FILE__); fflush(NULL); abort();} while(0) - -#endif /* __ARCH_CC_H__ */ diff --git a/ports/msvc6/include/arch/epstruct.h b/ports/msvc6/include/arch/epstruct.h deleted file mode 100644 index 65898b5..0000000 --- a/ports/msvc6/include/arch/epstruct.h +++ /dev/null @@ -1 +0,0 @@ -#pragma pack(pop) diff --git a/ports/msvc6/include/arch/perf.h b/ports/msvc6/include/arch/perf.h deleted file mode 100644 index 089faca..0000000 --- a/ports/msvc6/include/arch/perf.h +++ /dev/null @@ -1,40 +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 - * - */ -#ifndef __PERF_H__ -#define __PERF_H__ - -#define PERF_START /* null definition */ -#define PERF_STOP(x) /* null definition */ - -#endif /* __PERF_H__ */ diff --git a/ports/msvc6/include/arch/sys_arch.h b/ports/msvc6/include/arch/sys_arch.h deleted file mode 100644 index 6912918..0000000 --- a/ports/msvc6/include/arch/sys_arch.h +++ /dev/null @@ -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 - * - */ -#ifndef __ARCH_SYS_ARCH_H__ -#define __ARCH_SYS_ARCH_H__ - -typedef u32_t sys_prot_t; - -/* HANDLE is used for sys_sem_t but we won't include windows.h */ -typedef void* sys_sem_t; -#define SYS_SEM_NULL NULL - -struct lwip_mbox; -typedef struct lwip_mbox* sys_mbox_t; -#define SYS_MBOX_NULL NULL - -/* DWORD (thread id) is used for sys_thread_t but we won't include windows.h */ -typedef u32_t sys_thread_t; - -#endif /* __ARCH_SYS_ARCH_H__ */ - diff --git a/ports/msvc6/lwip4.dsp b/ports/msvc6/lwip4.dsp deleted file mode 100644 index d6c1453..0000000 --- a/ports/msvc6/lwip4.dsp +++ /dev/null @@ -1,433 +0,0 @@ -# Microsoft Developer Studio Project File - Name="lwip4" - Package Owner=<4> -# Microsoft Developer Studio Generated Build File, Format Version 6.00 -# ** NICHT BEARBEITEN ** - -# TARGTYPE "Win32 (x86) Static Library" 0x0104 - -CFG=lwip4 - 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 "lwip4.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 "lwip4.mak" CFG="lwip4 - Win32 Debug" -!MESSAGE -!MESSAGE Für die Konfiguration stehen zur Auswahl: -!MESSAGE -!MESSAGE "lwip4 - Win32 Release" (basierend auf "Win32 (x86) Static Library") -!MESSAGE "lwip4 - 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)" == "lwip4 - 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)" == "lwip4 - 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\lwip4_d.lib" - -!ENDIF - -# Begin Target - -# Name "lwip4 - Win32 Release" -# Name "lwip4 - Win32 Debug" -# Begin Group "source" - -# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat" -# Begin Group "arch" -# Begin Source File - -SOURCE=".\sys_arch.c" -# End Source File -# End Group -# Begin Group "api" -# Begin Source File - -SOURCE="$(LWIP_SRC)\api\api_lib.c" -# End Source File -# Begin Source File - -SOURCE="$(LWIP_SRC)\api\api_msg.c" -# End Source File -# Begin Source File - -SOURCE="$(LWIP_SRC)\api\err.c" -# End Source File -# Begin Source File - -SOURCE="$(LWIP_SRC)\api\netbuf.c" -# End Source File -# Begin Source File - -SOURCE="$(LWIP_SRC)\api\netifapi.c" -# End Source File -# Begin Source File - -SOURCE="$(LWIP_SRC)\api\sockets.c" -# End Source File -# Begin Source File - -SOURCE="$(LWIP_SRC)\api\tcpip.c" -# End Source File -# End Group -# Begin Group "core" -# Begin Group "ipv4" -# Begin Source File - -SOURCE="$(LWIP_SRC)\core\ipv4\autoip.c" -# End Source File -# Begin Source File - -SOURCE="$(LWIP_SRC)\core\ipv4\icmp.c" -# End Source File -# Begin Source File - -SOURCE="$(LWIP_SRC)\core\ipv4\igmp.c" -# End Source File -# Begin Source File - -SOURCE="$(LWIP_SRC)\core\ipv4\ip.c" -# End Source File -# Begin Source File - -SOURCE="$(LWIP_SRC)\core\ipv4\inet.c" -# End Source File -# Begin Source File - -SOURCE="$(LWIP_SRC)\core\ipv4\inet_chksum.c" -# End Source File -# Begin Source File - -SOURCE="$(LWIP_SRC)\core\ipv4\ip_addr.c" -# End Source File -# Begin Source File - -SOURCE="$(LWIP_SRC)\core\ipv4\ip_frag.c" -# End Source File -# End Group -# Begin Group "snmp" -# Begin Source File - -SOURCE="$(LWIP_SRC)\core\snmp\asn1_dec.c" -# End Source File -# Begin Source File - -SOURCE="$(LWIP_SRC)\core\snmp\asn1_enc.c" -# End Source File -# Begin Source File - -SOURCE="$(LWIP_SRC)\core\snmp\mib_structs.c" -# End Source File -# Begin Source File - -SOURCE="$(LWIP_SRC)\core\snmp\mib2.c" -# End Source File -# Begin Source File - -SOURCE="$(LWIP_SRC)\core\snmp\msg_in.c" -# End Source File -# Begin Source File - -SOURCE="$(LWIP_SRC)\core\snmp\msg_out.c" -# End Source File -# End Group -# Begin Source File - -SOURCE="$(LWIP_SRC)\core\dhcp.c" -# End Source File -# Begin Source File - -SOURCE="$(LWIP_SRC)\core\dns.c" -# End Source File -# Begin Source File - -SOURCE="$(LWIP_SRC)\core\init.c" -# End Source File -# Begin Source File - -SOURCE="$(LWIP_SRC)\core\mem.c" -# End Source File -# Begin Source File - -SOURCE="$(LWIP_SRC)\core\memp.c" -# End Source File -# Begin Source File - -SOURCE="$(LWIP_SRC)\core\netif.c" -# End Source File -# Begin Source File - -SOURCE="$(LWIP_SRC)\core\pbuf.c" -# End Source File -# Begin Source File - -SOURCE="$(LWIP_SRC)\core\raw.c" -# End Source File -# Begin Source File - -SOURCE="$(LWIP_SRC)\core\stats.c" -# End Source File -# Begin Source File - -SOURCE="$(LWIP_SRC)\core\sys.c" -# End Source File -# Begin Source File - -SOURCE="$(LWIP_SRC)\core\tcp.c" -# End Source File -# Begin Source File - -SOURCE="$(LWIP_SRC)\core\tcp_in.c" -# End Source File -# Begin Source File - -SOURCE="$(LWIP_SRC)\core\tcp_out.c" -# End Source File -# Begin Source File - -SOURCE="$(LWIP_SRC)\core\udp.c" -# End Source File -# End Group -# End Group -# Begin Group "header" - -# PROP Default_Filter "h;hpp;hxx;hm;inl" -# Begin Group "core" -# Begin Group "ipv4" -# Begin Source File - -SOURCE="$(LWIP_SRC)\include\ipv4\lwip\autoip.h" -# End Source File -# Begin Source File - -SOURCE="$(LWIP_SRC)\include\ipv4\lwip\icmp.h" -# End Source File -# Begin Source File - -SOURCE="$(LWIP_SRC)\include\ipv4\lwip\igmp.h" -# End Source File -# Begin Source File - -SOURCE="$(LWIP_SRC)\include\ipv4\lwip\inet.h" -# End Source File -# Begin Source File - -SOURCE="$(LWIP_SRC)\include\ipv4\lwip\inet_chksum.h" -# End Source File -# Begin Source File - -SOURCE="$(LWIP_SRC)\include\ipv4\lwip\ip.h" -# End Source File -# Begin Source File - -SOURCE="$(LWIP_SRC)\include\ipv4\lwip\ip_addr.h" -# End Source File -# Begin Source File - -SOURCE="$(LWIP_SRC)\include\ipv4\lwip\ip_frag.h" -# End Source File -# End Group -# Begin Source File - -SOURCE="$(LWIP_SRC)\include\lwip\api.h" -# End Source File -# Begin Source File - -SOURCE="$(LWIP_SRC)\include\lwip\api_msg.h" -# End Source File -# Begin Source File - -SOURCE="$(LWIP_SRC)\include\lwip\arch.h" -# End Source File -# Begin Source File - -SOURCE="$(LWIP_SRC)\include\lwip\debug.h" -# End Source File -# Begin Source File - -SOURCE="$(LWIP_SRC)\include\lwip\def.h" -# End Source File -# Begin Source File - -SOURCE="$(LWIP_SRC)\include\lwip\dhcp.h" -# End Source File -# Begin Source File - -SOURCE="$(LWIP_SRC)\include\lwip\dns.h" -# End Source File -# Begin Source File - -SOURCE="$(LWIP_SRC)\include\lwip\err.h" -# End Source File -# Begin Source File - -SOURCE="$(LWIP_SRC)\include\lwip\init.h" -# End Source File -# Begin Source File - -SOURCE="$(LWIP_SRC)\include\lwip\mem.h" -# End Source File -# Begin Source File - -SOURCE="$(LWIP_SRC)\include\lwip\memp.h" -# End Source File -# Begin Source File - -SOURCE="$(LWIP_SRC)\include\lwip\memp_std.h" -# End Source File -# Begin Source File - -SOURCE="$(LWIP_SRC)\include\lwip\netbuf.h" -# End Source File -# Begin Source File - -SOURCE="$(LWIP_SRC)\include\lwip\netif.h" -# End Source File -# Begin Source File - -SOURCE="$(LWIP_SRC)\include\lwip\netifapi.h" -# End Source File -# Begin Source File - -SOURCE="$(LWIP_SRC)\include\lwip\opt.h" -# End Source File -# Begin Source File - -SOURCE="$(LWIP_SRC)\include\lwip\pbuf.h" -# End Source File -# Begin Source File - -SOURCE="$(LWIP_SRC)\include\lwip\raw.h" -# End Source File -# Begin Source File - -SOURCE="$(LWIP_SRC)\include\lwip\sio.h" -# End Source File -# Begin Source File - -SOURCE="$(LWIP_SRC)\include\lwip\snmp.h" -# End Source File -# Begin Source File - -SOURCE="$(LWIP_SRC)\include\lwip\snmp_asn1.h" -# End Source File -# Begin Source File - -SOURCE="$(LWIP_SRC)\include\lwip\snmp_msg.h" -# End Source File -# Begin Source File - -SOURCE="$(LWIP_SRC)\include\lwip\snmp_structs.h" -# End Source File -# Begin Source File - -SOURCE="$(LWIP_SRC)\include\lwip\sockets.h" -# End Source File -# Begin Source File - -SOURCE="$(LWIP_SRC)\include\lwip\stats.h" -# End Source File -# Begin Source File - -SOURCE="$(LWIP_SRC)\include\lwip\sys.h" -# End Source File -# Begin Source File - -SOURCE="$(LWIP_SRC)\include\lwip\tcp.h" -# End Source File -# Begin Source File - -SOURCE="$(LWIP_SRC)\include\lwip\tcpip.h" -# End Source File -# Begin Source File - -SOURCE="$(LWIP_SRC)\include\lwip\udp.h" -# End Source File -# End Group - -# Begin Group "arch" -# Begin Source File - -SOURCE=.\include\arch\bpstruct.h -# End Source File -# Begin Source File - -SOURCE=.\include\arch\cc.h -# End Source File -# Begin Source File - -SOURCE=.\include\arch\epstruct.h -# End Source File -# Begin Source File - -SOURCE=.\include\arch\perf.h -# End Source File -# Begin Source File - -SOURCE=.\include\arch\sys_arch.h -# End Source File -# End Group - -# Begin Group "port" -# Begin Source File - -SOURCE=.\lwipopts.h -# End Source File -# Begin Source File - -SOURCE=.\lwipcfg_msvc.h -# End Source File -# End Group - -# End Group -# End Target -# End Project diff --git a/ports/msvc6/lwipcfg_msvc.h.example b/ports/msvc6/lwipcfg_msvc.h.example deleted file mode 100644 index 308d7bf..0000000 --- a/ports/msvc6/lwipcfg_msvc.h.example +++ /dev/null @@ -1,8 +0,0 @@ - -/* configuration for this port */ - -#define PACKET_LIB_ADAPTER_NR 3 - -#define LWIP_PORT_INIT_IPADDR(addr) IP4_ADDR((addr), 192,168,1,200) -#define LWIP_PORT_INIT_GW(addr) IP4_ADDR((addr), 192,168,1,1) -#define LWIP_PORT_INIT_NETMASK(addr) IP4_ADDR((addr), 255,255,255,0) \ No newline at end of file diff --git a/ports/msvc6/lwipopts.h b/ports/msvc6/lwipopts.h deleted file mode 100644 index 3d19820..0000000 --- a/ports/msvc6/lwipopts.h +++ /dev/null @@ -1,328 +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 - * - */ -#ifndef __LWIPOPTS_H__ -#define __LWIPOPTS_H__ - -#define NO_SYS 0 -#define LWIP_SOCKET (NO_SYS==0) -#define LWIP_NETCONN (NO_SYS==0) - -#define LWIP_IGMP 1 -#define LWIP_ICMP 1 -#define LWIP_SNMP 1 - -#define LWIP_DNS 1 - -#define LWIP_HAVE_LOOPIF 1 - -#define LWIP_COMPAT_SOCKETS 1 -#define LWIP_SO_RCVTIMEO 1 -#define LWIP_SO_RCVBUF 1 - -#define LWIP_TCPIP_CORE_LOCKING 0 - -#define LWIP_NETIF_LINK_CALLBACK 1 -#define LWIP_NETIF_STATUS_CALLBACK 1 - -#ifdef LWIP_DEBUG - -#define LWIP_DBG_MIN_LEVEL 0 -#define PPP_DEBUG LWIP_DBG_OFF -#define MEM_DEBUG LWIP_DBG_OFF -#define MEMP_DEBUG LWIP_DBG_OFF -#define PBUF_DEBUG LWIP_DBG_OFF -#define API_LIB_DEBUG LWIP_DBG_OFF -#define API_MSG_DEBUG LWIP_DBG_OFF -#define TCPIP_DEBUG LWIP_DBG_OFF -#define NETIF_DEBUG LWIP_DBG_OFF -#define SOCKETS_DEBUG LWIP_DBG_OFF -#define DNS_DEBUG LWIP_DBG_OFF -#define IP_DEBUG LWIP_DBG_OFF -#define IP_REASS_DEBUG LWIP_DBG_OFF -#define ICMP_DEBUG LWIP_DBG_OFF -#define IGMP_DEBUG LWIP_DBG_OFF -#define UDP_DEBUG LWIP_DBG_OFF -#define TCP_DEBUG LWIP_DBG_OFF -#define TCP_INPUT_DEBUG LWIP_DBG_OFF -#define TCP_OUTPUT_DEBUG LWIP_DBG_OFF -#define TCP_RTO_DEBUG LWIP_DBG_OFF -#define TCP_CWND_DEBUG LWIP_DBG_OFF -#define TCP_WND_DEBUG LWIP_DBG_OFF -#define TCP_FR_DEBUG LWIP_DBG_OFF -#define TCP_QLEN_DEBUG LWIP_DBG_OFF -#define TCP_RST_DEBUG LWIP_DBG_OFF -#endif - -#define LWIP_DBG_TYPES_ON (LWIP_DBG_ON|LWIP_DBG_TRACE|LWIP_DBG_STATE|LWIP_DBG_FRESH|LWIP_DBG_HALT) - - -/* ---------- Memory options ---------- */ -/* MEM_ALIGNMENT: should be set to the alignment of the CPU for which - lwIP is compiled. 4 byte alignment -> define MEM_ALIGNMENT to 4, 2 - byte alignment -> define MEM_ALIGNMENT to 2. */ -/* MSVC port: intel processors don't need 4-byte alignment, - but are faster that way! */ -#define MEM_ALIGNMENT 4 - -/* MEM_SIZE: the size of the heap memory. If the application will send -a lot of data that needs to be copied, this should be set high. */ -#define MEM_SIZE 10240 - -/* MEMP_NUM_PBUF: the number of memp struct pbufs. If the application - sends a lot of data out of ROM (or other static memory), this - should be set high. */ -#define MEMP_NUM_PBUF 16 -/* MEMP_NUM_UDP_PCB: the number of UDP protocol control blocks. One - per active UDP "connection". */ -#define MEMP_NUM_UDP_PCB 4 -/* MEMP_NUM_TCP_PCB: the number of simulatenously active TCP - connections. */ -#define MEMP_NUM_TCP_PCB 5 -/* MEMP_NUM_TCP_PCB_LISTEN: the number of listening TCP - connections. */ -#define MEMP_NUM_TCP_PCB_LISTEN 8 -/* MEMP_NUM_TCP_SEG: the number of simultaneously queued TCP - segments. */ -#define MEMP_NUM_TCP_SEG 16 -/* MEMP_NUM_SYS_TIMEOUT: the number of simulateously active - timeouts. */ -#define MEMP_NUM_SYS_TIMEOUT 10 - -/* The following four are used only with the sequential API and can be - set to 0 if the application only will use the raw API. */ -/* MEMP_NUM_NETBUF: the number of struct netbufs. */ -#define MEMP_NUM_NETBUF 2 -/* MEMP_NUM_NETCONN: the number of struct netconns. */ -#define MEMP_NUM_NETCONN 10 -/* MEMP_NUM_TCPIPMSG: the number of struct tcpip_msg, which is used - for sequential API communication and incoming packets. Used in - src/api/tcpip.c. */ -#define MEMP_NUM_TCPIP_MSG_API 16 -#define MEMP_NUM_TCPIP_MSG_INPKT 16 - - -/* ---------- Pbuf options ---------- */ -/* PBUF_POOL_SIZE: the number of buffers in the pbuf pool. */ -#define PBUF_POOL_SIZE 100 - -/* PBUF_POOL_BUFSIZE: the size of each pbuf in the pbuf pool. */ -#define PBUF_POOL_BUFSIZE 128 - -/* PBUF_LINK_HLEN: the number of bytes that should be allocated for a - link level header. */ -#define PBUF_LINK_HLEN 16 - -/** SYS_LIGHTWEIGHT_PROT - * define SYS_LIGHTWEIGHT_PROT in lwipopts.h if you want inter-task protection - * for certain critical regions during buffer allocation, deallocation and memory - * allocation and deallocation. - */ -#define SYS_LIGHTWEIGHT_PROT (NO_SYS==0) - - -/* ---------- TCP options ---------- */ -#define LWIP_TCP 1 -#define TCP_TTL 255 - -/* Controls if TCP should queue segments that arrive out of - order. Define to 0 if your device is low on memory. */ -#define TCP_QUEUE_OOSEQ 1 - -/* TCP Maximum segment size. */ -#define TCP_MSS 1024 - -/* TCP sender buffer space (bytes). */ -#define TCP_SND_BUF 2048 - -/* TCP sender buffer space (pbufs). This must be at least = 2 * - TCP_SND_BUF/TCP_MSS for things to work. */ -#define TCP_SND_QUEUELEN (4 * TCP_SND_BUF/TCP_MSS) - -/* TCP writable space (bytes). This must be less than or equal - to TCP_SND_BUF. It is the amount of space which must be - available in the tcp snd_buf for select to return writable */ -#define TCP_SNDLOWAT (TCP_SND_BUF/2) - -/* TCP receive window. */ -#define TCP_WND 8096 - -/* Maximum number of retransmissions of data segments. */ -#define TCP_MAXRTX 12 - -/* Maximum number of retransmissions of SYN segments. */ -#define TCP_SYNMAXRTX 4 - - -/* ---------- ARP options ---------- */ -#define LWIP_ARP 1 -#define ARP_TABLE_SIZE 10 -#define ARP_QUEUEING 1 - - -/* ---------- IP options ---------- */ -/* Define IP_FORWARD to 1 if you wish to have the ability to forward - IP packets across network interfaces. If you are going to run lwIP - on a device with only one network interface, define this to 0. */ -#define IP_FORWARD 1 - -/* IP reassembly and segmentation.These are orthogonal even - * if they both deal with IP fragments */ -#define IP_REASSEMBLY 1 -#define IP_REASS_MAX_PBUFS 10 -#define MEMP_NUM_REASSDATA 10 -#define IP_FRAG 1 - - -/* ---------- ICMP options ---------- */ -#define ICMP_TTL 255 - - -/* ---------- DHCP options ---------- */ -/* Define LWIP_DHCP to 1 if you want DHCP configuration of - interfaces. DHCP is not implemented in lwIP 0.5.1, however, so - turning this on does currently not work. */ -#define LWIP_DHCP 0 - -/* 1 if you want to do an ARP check on the offered address - (recommended). */ -#if LWIP_DHCP -#define DHCP_DOES_ARP_CHECK 1 -#endif - - -/* ---------- AUTOIP options ------- */ -#define LWIP_AUTOIP 0 - - -/* ---------- UDP options ---------- */ -#define LWIP_UDP 1 -#define LWIP_UDPLITE 1 -#define UDP_TTL 255 - - -/* ---------- Statistics options ---------- */ - -#define LWIP_STATS 1 -#define LWIP_STATS_DISPLAY 1 - -#if LWIP_STATS -#define LINK_STATS 1 -#define IP_STATS 1 -#define ICMP_STATS 1 -#define IGMP_STATS 1 -#define IPFRAG_STATS 1 -#define UDP_STATS 1 -#define TCP_STATS 1 -#define MEM_STATS 1 -#define MEMP_STATS 1 -#define PBUF_STATS 1 -#define SYS_STATS 1 -#endif /* LWIP_STATS */ - - -/* ---------- PPP options ---------- */ - -#define PPP_SUPPORT 0 /* Set > 0 for PPP */ - -#if PPP_SUPPORT - -#define NUM_PPP 1 /* Max PPP sessions. */ - - -/* Select modules to enable. Ideally these would be set in the makefile but - * we're limited by the command line length so you need to modify the settings - * in this file. - */ -#define PAP_SUPPORT 1 /* Set > 0 for PAP. */ -#define CHAP_SUPPORT 1 /* Set > 0 for CHAP. */ -#define MSCHAP_SUPPORT 0 /* Set > 0 for MSCHAP (NOT FUNCTIONAL!) */ -#define CBCP_SUPPORT 0 /* Set > 0 for CBCP (NOT FUNCTIONAL!) */ -#define CCP_SUPPORT 0 /* Set > 0 for CCP (NOT FUNCTIONAL!) */ -#define VJ_SUPPORT 1 /* Set > 0 for VJ header compression. */ -#define MD5_SUPPORT 1 /* Set > 0 for MD5 (see also CHAP) */ - - -/* - * Timeouts. - */ -#define FSM_DEFTIMEOUT 6 /* Timeout time in seconds */ -#define FSM_DEFMAXTERMREQS 2 /* Maximum Terminate-Request transmissions */ -#define FSM_DEFMAXCONFREQS 10 /* Maximum Configure-Request transmissions */ -#define FSM_DEFMAXNAKLOOPS 5 /* Maximum number of nak loops */ - -#define UPAP_DEFTIMEOUT 6 /* Timeout (seconds) for retransmitting req */ -#define UPAP_DEFREQTIME 30 /* Time to wait for auth-req from peer */ - -#define CHAP_DEFTIMEOUT 6 /* Timeout time in seconds */ -#define CHAP_DEFTRANSMITS 10 /* max # times to send challenge */ - - -/* Interval in seconds between keepalive echo requests, 0 to disable. */ -#if 1 -#define LCP_ECHOINTERVAL 0 -#else -#define LCP_ECHOINTERVAL 10 -#endif - -/* Number of unanswered echo requests before failure. */ -#define LCP_MAXECHOFAILS 3 - -/* Max Xmit idle time (in jiffies) before resend flag char. */ -#define PPP_MAXIDLEFLAG 100 - -/* - * Packet sizes - * - * Note - lcp shouldn't be allowed to negotiate stuff outside these - * limits. See lcp.h in the pppd directory. - * (XXX - these constants should simply be shared by lcp.c instead - * of living in lcp.h) - */ -#define PPP_MTU 1500 /* Default MTU (size of Info field) */ -#if 0 -#define PPP_MAXMTU 65535 - (PPP_HDRLEN + PPP_FCSLEN) -#else -#define PPP_MAXMTU 1500 /* Largest MTU we allow */ -#endif -#define PPP_MINMTU 64 -#define PPP_MRU 1500 /* default MRU = max length of info field */ -#define PPP_MAXMRU 1500 /* Largest MRU we allow */ -#define PPP_DEFMRU 296 /* Try for this */ -#define PPP_MINMRU 128 /* No MRUs below this */ - - -#define MAXNAMELEN 256 /* max length of hostname or name for auth */ -#define MAXSECRETLEN 256 /* max length of password or secret */ - -#endif /* PPP_SUPPORT */ - -#endif /* __LWIPOPTS_H__ */ diff --git a/ports/msvc6/pktdrv.c b/ports/msvc6/pktdrv.c deleted file mode 100644 index 87fc3e4..0000000 --- a/ports/msvc6/pktdrv.c +++ /dev/null @@ -1,268 +0,0 @@ -/* - * Copyright (c) 2001,2002 Florian Schulze. - * 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 authors nor the names of the contributors - * may be used to endorse or promote products derived from this software - * without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE AUTHORS 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 AUTHORS 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. - * - * pktif.c - This file is part of lwIPtest - * - **************************************************************************** - * - * This file is derived from an example in lwIP with the following license: - * - * 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. - * - */ - -#define WIN32_LEAN_AND_MEAN -/* get the windows definitions of the following 4 functions out of the way */ -#include -#include -#include -#include -#include - -/** @todo use the lwip header file */ -#define ETHARP_HWADDR_LEN 6 - -LPADAPTER lpAdapter; -LPPACKET lpPacket; -char buffer[256000]; // buffer to hold the data coming from the driver -unsigned char *cur_packet; -int cur_length; -unsigned char ethaddr[ETHARP_HWADDR_LEN]; - -/*-----------------------------------------------------------------------------------*/ -int init_adapter(int adapter_num, char* mac_addr) -{ - #define Max_Num_Adapter 10 - - void *AdapterList[Max_Num_Adapter]; - - int i; - DWORD dwVersion; - DWORD dwWindowsMajorVersion; - - //unicode strings (winnt) - char AdapterName[8192]; // string that contains a list of the network adapters - char *temp,*temp1; - - //ascii strings (win95) - char AdapterNamea[8192]; // string that contains a list of the network adapters - char *tempa,*temp1a; - - int AdapterNum=0; - ULONG AdapterLength; - - PPACKET_OID_DATA ppacket_oid_data; - - // obtain the name of the adapters installed on this machine - AdapterLength=4096; - - memset(AdapterList,0,sizeof(AdapterList)); - memset(AdapterName,0,sizeof(AdapterName)); - memset(AdapterNamea,0,sizeof(AdapterNamea)); - - i=0; - - // the data returned by PacketGetAdapterNames is different in Win95 and in WinNT. - // We have to check the os on which we are running - dwVersion=GetVersion(); - dwWindowsMajorVersion = (DWORD)(LOBYTE(LOWORD(dwVersion))); - if (!(dwVersion >= 0x80000000 && dwWindowsMajorVersion >= 4)) { - // Windows NT - if (PacketGetAdapterNames((char *)AdapterName,&AdapterLength)==FALSE){ - printf("Unable to retrieve the list of the adapters!\n"); - return -1; - } - temp=AdapterName; - temp1=AdapterName; - while ((*temp!='\0')||(*(temp-1)!='\0')) { - if (*temp=='\0') { - AdapterList[i] = temp1; - temp1=temp+1; - i++; - } - - temp++; - } - - AdapterNum=i; - for (i=0; i= AdapterNum) { - return -1; - } - ppacket_oid_data=malloc(sizeof(PACKET_OID_DATA)+ETHARP_HWADDR_LEN); - lpAdapter=PacketOpenAdapter(AdapterList[adapter_num]); - if (!lpAdapter || (lpAdapter->hFile == INVALID_HANDLE_VALUE)) { - return -1; - } - ppacket_oid_data->Oid=OID_802_3_PERMANENT_ADDRESS; - ppacket_oid_data->Length=ETHARP_HWADDR_LEN; - if (!PacketRequest(lpAdapter,FALSE,ppacket_oid_data)) { - return -1; - } - memcpy(ðaddr,ppacket_oid_data->Data,ETHARP_HWADDR_LEN); - free(ppacket_oid_data); - memcpy(mac_addr, ethaddr, ETHARP_HWADDR_LEN); - printf("MAC: %02X:%02X:%02X:%02X:%02X:%02X\n", ethaddr[0], ethaddr[1], ethaddr[2], ethaddr[3], ethaddr[4], ethaddr[5]); - PacketSetBuff(lpAdapter,512000); - PacketSetReadTimeout(lpAdapter,1); - PacketSetHwFilter(lpAdapter,NDIS_PACKET_TYPE_ALL_LOCAL | NDIS_PACKET_TYPE_PROMISCUOUS); - if ((lpPacket = PacketAllocatePacket())==NULL) { - return (-1); - } - PacketInitPacket(lpPacket,(char*)buffer,256000); - - return 0; -} - -void shutdown_adapter(void) -{ - PacketFreePacket(lpPacket); - PacketCloseAdapter(lpAdapter); -} - -int packet_send(void *buffer, int len) -{ - LPPACKET lpPacket; - - if ((lpPacket = PacketAllocatePacket())==NULL) { - return -1; - } - PacketInitPacket(lpPacket,buffer,len); - if (!PacketSendPacket(lpAdapter,lpPacket,TRUE)) { - return -1; - } - PacketFreePacket(lpPacket); - - return 0; -} - -extern void process_input(void); - -static void ProcessPackets(LPPACKET lpPacket) -{ - ULONG ulLines, ulBytesReceived; - char *base; - char *buf; - u_int off=0; - u_int tlen,tlen1; - struct bpf_hdr *hdr; - - ulBytesReceived = lpPacket->ulBytesReceived; - - buf = lpPacket->Buffer; - - off=0; - - while (offbh_datalen; - cur_length=tlen1; - tlen=hdr->bh_caplen; - off+=hdr->bh_hdrlen; - - ulLines = (tlen + 15) / 16; - if (ulLines > 5) { - ulLines=5; - } - - base =(char*)(buf + off); - cur_packet = base; - off = Packet_WORDALIGN(off + tlen); - - process_input(); - } -} - -void update_adapter(void) -{ - if (PacketReceivePacket(lpAdapter,lpPacket,TRUE)==TRUE) { - ProcessPackets(lpPacket); - } - cur_length=0; - cur_packet=NULL; -} diff --git a/ports/msvc6/pktif.c b/ports/msvc6/pktif.c deleted file mode 100644 index 6f6d111..0000000 --- a/ports/msvc6/pktif.c +++ /dev/null @@ -1,333 +0,0 @@ -/* - * Copyright (c) 2001,2002 Florian Schulze. - * 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 authors nor the names of the contributors - * may be used to endorse or promote products derived from this software - * without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE AUTHORS 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 AUTHORS 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. - * - * pktif.c - This file is part of lwIPtest - * - **************************************************************************** - * - * This file is derived from an example in lwIP with the following license: - * - * 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. - * - */ - -/* get the windows definitions of the following 4 functions out of the way */ -#include -#include - -#include "lwip/debug.h" - -#include "lwip/opt.h" -#include "lwip/def.h" -#include "lwip/mem.h" -#include "lwip/pbuf.h" -#include "lwip/stats.h" -#include "lwip/sys.h" -#include "lwip/ip.h" -#include "lwip/snmp.h" - -#include "netif/etharp.h" - -/* include the port-dependent configuration */ -#include "lwipcfg_msvc.h" - -#undef NETIF_DEBUG -#define NETIF_DEBUG 0 - -/* Define those to better describe your network interface. */ -#define IFNAME0 'p' -#define IFNAME1 'k' - -/* index of the network adapter to use for lwIP */ -#ifndef PACKET_LIB_ADAPTER_NR -#define PACKET_LIB_ADAPTER_NR 0 -#endif - -static struct eth_addr broadcastaddr = {0xff, 0xff, 0xff, 0xff, 0xff, 0xff}; - -/* Forward declarations. */ -static void ethernetif_input(struct netif *netif); - -static struct netif *pktif_netif; - -extern unsigned char ethaddr[ETHARP_HWADDR_LEN]; -extern unsigned char *cur_packet; -extern int cur_length; -extern int init_adapter(int adapter_num, char* mac_addr); -extern int packet_send(void *buffer, int len); - -/*-----------------------------------------------------------------------------------*/ -static void -low_level_init(struct netif *netif) -{ - char mac_addr[ETHARP_HWADDR_LEN]; - - LWIP_DEBUGF(NETIF_DEBUG, ("pktif: eth_addr %02X%02X%02X%02X%02X%02X\n",netif->hwaddr[0],netif->hwaddr[1],netif->hwaddr[2],netif->hwaddr[3],netif->hwaddr[4],netif->hwaddr[5])); - - /* Do whatever else is needed to initialize interface. */ - if (init_adapter(PACKET_LIB_ADAPTER_NR, mac_addr) != 0) { - printf("ERROR initializing network adapter %d!\n", PACKET_LIB_ADAPTER_NR); - return; - } - - /* Prepare MAC addr: increase the last octet so that lwIP netif has a similar but different MAC addr */ - memcpy(&netif->hwaddr, mac_addr, ETHARP_HWADDR_LEN); - netif->hwaddr[ETHARP_HWADDR_LEN - 1]++; - - pktif_netif=netif; -} -/*-----------------------------------------------------------------------------------*/ -/* - * low_level_output(): - * - * Should do the actual transmission of the packet. The packet is - * contained in the pbuf that is passed to the function. This pbuf - * might be chained. - * - */ -/*-----------------------------------------------------------------------------------*/ - -static err_t -low_level_output(struct netif *ethernetif, struct pbuf *p) -{ - struct pbuf *q; - unsigned char buffer[1600]; - unsigned char *ptr; - - /* initiate transfer(); */ - if (p->tot_len >= sizeof(buffer)) { - return ERR_BUF; - } - ptr = buffer; - for(q = p; q != NULL; q = q->next) { - /* Send the data from the pbuf to the interface, one pbuf at a - time. The size of the data in each pbuf is kept in the ->len - variable. */ - /* send data from(q->payload, q->len); */ - LWIP_DEBUGF(NETIF_DEBUG, ("netif: send ptr %p q->payload %p q->len %i q->next %p\n", ptr, q->payload, (int)q->len, q->next)); - memcpy(ptr, q->payload, q->len); - ptr += q->len; - } - - /* signal that packet should be sent(); */ - if (packet_send(buffer, p->tot_len) < 0) { - return ERR_BUF; - } - -#if LINK_STATS - lwip_stats.link.xmit++; -#endif /* LINK_STATS */ - return ERR_OK; -} -/*-----------------------------------------------------------------------------------*/ -/* - * low_level_input(): - * - * Should allocate a pbuf and transfer the bytes of the incoming - * packet from the interface into the pbuf. - * - */ -/*-----------------------------------------------------------------------------------*/ -static struct pbuf * -low_level_input(struct netif *netif) -{ - struct pbuf *p, *q; - int start, length; - struct eth_hdr *ethhdr; - - /* Obtain the size of the packet and put it into the "len" variable. */ - length = cur_length; - if (length<=0) { - return NULL; - } - - ethhdr = (struct eth_hdr*)cur_packet; - /* MAC filter: only let my MAC or broadcast through */ - if ((memcmp(ðhdr->dest, &netif->hwaddr, ETHARP_HWADDR_LEN)) && - (memcmp(ðhdr->dest, &broadcastaddr, ETHARP_HWADDR_LEN))) { - /* acknowledge that packet has been read(); */ - cur_length=0; - return NULL; - } - - /* We allocate a pbuf chain of pbufs from the pool. */ - p = pbuf_alloc(PBUF_LINK, (u16_t)length, PBUF_POOL); - LWIP_DEBUGF(NETIF_DEBUG, ("netif: recv length %i p->tot_len %i\n", length, (int)p->tot_len)); - - if (p != NULL) { - /* We iterate over the pbuf chain until we have read the entire - packet into the pbuf. */ - start=0; - for (q = p; q != NULL; q = q->next) { - /* Read enough bytes to fill this pbuf in the chain. The - available data in the pbuf is given by the q->len - variable. */ - /* read data into(q->payload, q->len); */ - LWIP_DEBUGF(NETIF_DEBUG, ("netif: recv start %i length %i q->payload %p q->len %i q->next %p\n", start, length, q->payload, (int)q->len, q->next)); - memcpy(q->payload, &cur_packet[start], q->len); - start += q->len; - length -= q->len; - if (length<=0) { - break; - } - } - /* acknowledge that packet has been read(); */ - cur_length = 0; -#if LINK_STATS - lwip_stats.link.recv++; -#endif /* LINK_STATS */ - } else { - /* drop packet(); */ - cur_length = 0; -#if LINK_STATS - lwip_stats.link.memerr++; - lwip_stats.link.drop++; -#endif /* LINK_STATS */ - } - - return p; -} - -/*-----------------------------------------------------------------------------------*/ -/* - * ethernetif_input(): - * - * This function should be called when a packet is ready to be read - * from the interface. It uses the function low_level_input() that - * should handle the actual reception of bytes from the network - * interface. - * - */ -/*-----------------------------------------------------------------------------------*/ -static void -ethernetif_input(struct netif *netif) -{ - struct ethernetif *ethernetif; - struct eth_hdr *ethhdr; - struct pbuf *p; - - ethernetif = netif->state; - - /* move received packet into a new pbuf */ - p = low_level_input(netif); - /* no packet could be read, silently ignore this */ - if (p == NULL) { - return; - } - /* points to packet payload, which starts with an Ethernet header */ - ethhdr = p->payload; - - switch (htons(ethhdr->type)) { - /* IP or ARP packet? */ - case ETHTYPE_IP: - case ETHTYPE_ARP: -#if PPPOE_SUPPORT - /* PPPoE packet? */ - case ETHTYPE_PPPOEDISC: - case ETHTYPE_PPPOE: -#endif /* PPPOE_SUPPORT */ - /* full packet send to tcpip_thread to process */ - if (netif->input(p, netif)!=ERR_OK) { - LWIP_DEBUGF(NETIF_DEBUG, ("ethernetif_input: IP input error\n")); - pbuf_free(p); - p = NULL; - } - break; - - default: - pbuf_free(p); - p = NULL; - break; - } -} -/*-----------------------------------------------------------------------------------*/ -/* - * ethernetif_init(): - * - * Should be called at the beginning of the program to set up the - * network interface. It calls the function low_level_init() to do the - * actual setup of the hardware. - * - */ -/*-----------------------------------------------------------------------------------*/ -err_t -ethernetif_init(struct netif *netif) -{ - netif->name[0] = IFNAME0; - netif->name[1] = IFNAME1; - netif->linkoutput = low_level_output; - netif->output = etharp_output; - - netif->mtu = 1500; - netif->flags = NETIF_FLAG_BROADCAST | NETIF_FLAG_ETHARP | NETIF_FLAG_LINK_UP; - netif->hwaddr_len = ETHARP_HWADDR_LEN; - - NETIF_INIT_SNMP(netif, snmp_ifType_ethernet_csmacd, 100000000); - - low_level_init(netif); - - return ERR_OK; -} -/*-----------------------------------------------------------------------------------*/ -/* - * pktif_update(): - * - * Needs to be called periodically to get new packets. This could - * be done inside a thread. - */ -/*-----------------------------------------------------------------------------------*/ -void process_input(void) -{ - ethernetif_input(pktif_netif); -} diff --git a/ports/msvc6/pktif.dsp b/ports/msvc6/pktif.dsp deleted file mode 100644 index 8293397..0000000 --- a/ports/msvc6/pktif.dsp +++ /dev/null @@ -1,116 +0,0 @@ -# Microsoft Developer Studio Project File - Name="pktif" - Package Owner=<4> -# Microsoft Developer Studio Generated Build File, Format Version 6.00 -# ** NICHT BEARBEITEN ** - -# TARGTYPE "Win32 (x86) Static Library" 0x0104 - -CFG=pktif - 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 "pktif.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 "pktif.mak" CFG="pktif - Win32 Debug" -!MESSAGE -!MESSAGE Für die Konfiguration stehen zur Auswahl: -!MESSAGE -!MESSAGE "pktif - Win32 Release" (basierend auf "Win32 (x86) Static Library") -!MESSAGE "pktif - 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)" == "pktif - 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 ".\\" /I "$(PCAP_DIR)\include" /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)" == "pktif - 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 ".\\" /I "$(PCAP_DIR)\include" /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\pktif_d.lib" - -!ENDIF - -# Begin Target - -# Name "pktif - Win32 Release" -# Name "pktif - Win32 Debug" -# Begin Group "Quellcodedateien" - -# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat" -# Begin Source File - -SOURCE="$(LWIP_SRC)\netif\etharp.c" -# End Source File -# Begin Source File - -SOURCE="$(LWIP_SRC)\netif\loopif.c" -# End Source File -# Begin Source File - -SOURCE=.\pktdrv.c -# End Source File -# Begin Source File - -SOURCE=.\pktif.c -# End Source File -# End Group -# Begin Group "Header-Dateien" - -# PROP Default_Filter "h;hpp;hxx;hm;inl" -# Begin Source File - -SOURCE="$(LWIP_SRC)\include\netif\etharp.h" -# End Source File -# Begin Source File - -SOURCE="$(LWIP_SRC)\include\netif\loopif.h" -# End Source File -# End Group -# End Target -# End Project diff --git a/ports/msvc6/readme.txt b/ports/msvc6/readme.txt deleted file mode 100644 index 2890e0a..0000000 --- a/ports/msvc6/readme.txt +++ /dev/null @@ -1,35 +0,0 @@ -lwIP for Win32 - -***WARNING*** -The current CVS code of this port isn't much tested. -***WARNING*** - -This is a quickly hacked port and example project of the lwIP library to -Win32/MSVC. - -It doesn't (yet?) include support for slipif, ppp or pppoe. This is simply -because none of the active developers using this port are using these interfaces -right now. - -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 -- 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 -'lwipcfg_msvc.h' and modify to suit your needs (WinPcap adapter number, -IP configuration). - - -Included in the proj/msvc6 directory is the network interface driver using -the winpcap library. - -There is no more documentation yet. Try to figure it out yourself. - -This is provided as is, it's just a hack to test some stuff, no serious -implementation. - -Florian Schulze (florian.proff.schulze@gmx.net) -Simon Goldschmidt - -lwIP: http://www.sics.se/~adam/lwip/ -WinPCap: http://netgroup-serv.polito.it/winpcap/ diff --git a/ports/msvc6/sys_arch.c b/ports/msvc6/sys_arch.c deleted file mode 100644 index 6a6843f..0000000 --- a/ports/msvc6/sys_arch.c +++ /dev/null @@ -1,404 +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 - * Simon Goldschmidt - * - */ - -#include -#include // sprintf() for task names - -#include -#include - -#include -#include -#include -#include - -/* These functions are used from NO_SYS also, for precise timer triggering */ -LARGE_INTEGER freq, sys_start_time; - -void sys_init_timing() -{ - QueryPerformanceFrequency(&freq); - QueryPerformanceCounter(&sys_start_time); -} - -static LONGLONG sys_get_ms_longlong() -{ - LONGLONG ret; - LARGE_INTEGER now; - QueryPerformanceCounter(&now); - ret = now.QuadPart-sys_start_time.QuadPart; - return (u32_t)(((ret)*1000)/freq.QuadPart); -} - -u32_t sys_now() -{ - return sys_get_ms_longlong(); -} - -#if !NO_SYS - -#define MAX_QUEUE_ENTRIES 100 - -struct threadlist { - struct sys_timeouts timeouts; - DWORD id; - struct threadlist *next; -}; - -struct lwip_mbox { - HANDLE sem; - void* q_mem[MAX_QUEUE_ENTRIES]; - u32_t head, tail; -}; - -struct threadlist *lwip_win32_threads = NULL; -CRITICAL_SECTION critSec; - -void InitSysArchProtect() -{ - InitializeCriticalSection(&critSec); -} -u32_t sys_arch_protect() -{ - EnterCriticalSection(&critSec); - return 0; -} -void sys_arch_unprotect(u32_t pval) -{ - LWIP_UNUSED_ARG(pval); - LeaveCriticalSection(&critSec); -} -void do_sleep(int ms) -{ - Sleep(ms); -} - -void sys_init(void) -{ - sys_init_timing(); - InitSysArchProtect(); -} - -sys_sem_t sys_sem_new(u8_t count) -{ - HANDLE new_sem = NULL; - new_sem = CreateSemaphore(0, count, 100000, 0); - LWIP_ASSERT("Error creating semaphore", new_sem != NULL); - if(new_sem != NULL) { -#if LWIP_STATS - lwip_stats.sys.sem.used++; - LWIP_ASSERT("sys_sem_new() counter overflow", lwip_stats.sys.sem.used != 0 ); - if (lwip_stats.sys.sem.used > lwip_stats.sys.sem.max) { - lwip_stats.sys.sem.max = lwip_stats.sys.sem.used; - } -#endif // LWIP_STATS - return new_sem; - } - - // failed to allocate memory... -#if LWIP_STATS - lwip_stats.sys.sem.err++; -#endif // LWIP_STATS - return SYS_SEM_NULL; -} - -void sys_sem_free(sys_sem_t sem) -{ - // parameter check - LWIP_ASSERT("sem != NULL", sem != NULL); - LWIP_ASSERT("sem != INVALID_HANDLE_VALUE", sem != INVALID_HANDLE_VALUE); - CloseHandle(sem); - -#if LWIP_STATS - lwip_stats.sys.sem.used--; - LWIP_ASSERT("sys_sem_free() closed more than created", lwip_stats.sys.sem.used != (u16_t)-1); -#endif // LWIP_STATS -} - -u32_t sys_arch_sem_wait(sys_sem_t sem, u32_t timeout) -{ - DWORD ret; - LONGLONG starttime, endtime; - LWIP_ASSERT("sem != NULL", sem != NULL); - LWIP_ASSERT("sem != INVALID_HANDLE_VALUE", sem != INVALID_HANDLE_VALUE); - if(!timeout) - { - // wait infinite - starttime = sys_get_ms_longlong(); - ret = WaitForSingleObject(sem, INFINITE); - LWIP_ASSERT("Error waiting for mutex", ret == WAIT_OBJECT_0); - endtime = sys_get_ms_longlong(); - // return the time we waited for the sem - return (u32_t)(endtime - starttime); - } - else - { - int ret; - starttime = sys_get_ms_longlong(); - ret = WaitForSingleObject(sem, timeout); - LWIP_ASSERT("Error waiting for mutex", (ret == WAIT_OBJECT_0) || (ret == WAIT_TIMEOUT)); - if(ret == WAIT_OBJECT_0) - { - endtime = sys_get_ms_longlong(); - // return the time we waited for the sem - return (u32_t)(endtime - starttime); - } - else - { - // timeout - return SYS_ARCH_TIMEOUT; - } - } -} - -void sys_sem_signal(sys_sem_t sem) -{ - DWORD ret; - LWIP_ASSERT("sem != NULL", sem != NULL); - LWIP_ASSERT("sem != INVALID_HANDLE_VALUE", sem != INVALID_HANDLE_VALUE); - ret = ReleaseSemaphore(sem, 1, NULL); - LWIP_ASSERT("Error releasing mutex", ret != 0); -} - -struct sys_timeouts *sys_arch_timeouts(void) -{ - struct sys_timeouts *ret = NULL; - struct threadlist *t, *new_thread; - SYS_ARCH_DECL_PROTECT(lev); - DWORD threadID; - - threadID = GetCurrentThreadId(); - SYS_ARCH_PROTECT(lev); - for(t = lwip_win32_threads; t != NULL; t = t->next) - { - if(t->id == threadID) - { - ret = &(t->timeouts); - SYS_ARCH_UNPROTECT(lev); - return ret; - } - } - new_thread = (struct threadlist*)malloc(sizeof(struct threadlist)); - LWIP_ASSERT("new_thread != NULL", new_thread != NULL); - if(new_thread != NULL) { - OutputDebugString("First call to sys_arch_timoeuts for thread"); - new_thread->next = lwip_win32_threads; - lwip_win32_threads = new_thread; - new_thread->id = threadID; - new_thread->timeouts.next = NULL; - ret = &(new_thread->timeouts); - SYS_ARCH_UNPROTECT(lev); - return ret; - } - SYS_ARCH_UNPROTECT(lev); - LWIP_ASSERT("should not come here", 0); - return 0; -} - -sys_thread_t sys_thread_new(char *name, void (* function)(void *arg), void *arg, int stacksize, int prio) -{ - struct threadlist *new_thread; - HANDLE h; - SYS_ARCH_DECL_PROTECT(lev); - - LWIP_UNUSED_ARG(name); - LWIP_UNUSED_ARG(stacksize); - LWIP_UNUSED_ARG(prio); - - new_thread = (struct threadlist*)malloc(sizeof(struct threadlist)); - LWIP_ASSERT("new_thread != NULL", new_thread != NULL); - if(new_thread != NULL) { - SYS_ARCH_PROTECT(lev); - new_thread->next = lwip_win32_threads; - lwip_win32_threads = new_thread; - new_thread->timeouts.next = NULL; - - h = CreateThread(0, 0, (LPTHREAD_START_ROUTINE)function, arg, 0, &(new_thread->id)); - LWIP_ASSERT("h != 0", h != 0); - LWIP_ASSERT("h != -1", h != INVALID_HANDLE_VALUE); - - SYS_ARCH_UNPROTECT(lev); - return new_thread->id; - } - return 0; -} - -sys_mbox_t sys_mbox_new() -{ - struct lwip_mbox *new_mbox; - new_mbox = (struct lwip_mbox*)malloc(sizeof(struct lwip_mbox)); - LWIP_ASSERT("new_mbox != NULL", new_mbox != NULL); - if(new_mbox == NULL) { -#if LWIP_STATS - lwip_stats.sys.mbox.err++; -#endif // LWIP_STATS - return SYS_SEM_NULL; - } - new_mbox->sem = CreateSemaphore(0, 0, MAX_QUEUE_ENTRIES, 0); - LWIP_ASSERT("Error creating semaphore", new_mbox->sem != NULL); - if(new_mbox->sem == NULL) { -#if LWIP_STATS - lwip_stats.sys.mbox.err++; -#endif // LWIP_STATS - free(new_mbox); - new_mbox = NULL; - return SYS_SEM_NULL; - } - memset(&new_mbox->q_mem, 0, sizeof(u32_t)*MAX_QUEUE_ENTRIES); - new_mbox->head = 0; - new_mbox->tail = 0; -#if LWIP_STATS - lwip_stats.sys.mbox.used++; - LWIP_ASSERT("sys_mbox_new() counter overflow", lwip_stats.sys.mbox.used != 0 ); - if (lwip_stats.sys.mbox.used > lwip_stats.sys.mbox.max) { - lwip_stats.sys.mbox.max = lwip_stats.sys.mbox.used; - } -#endif // LWIP_STATS - return new_mbox; -} - -void sys_mbox_free(sys_mbox_t mbox) -{ - // parameter check - LWIP_ASSERT("sys_mbox_free ", mbox != SYS_MBOX_NULL ); - LWIP_ASSERT("mbox->sem != NULL", mbox->sem != NULL); - LWIP_ASSERT("mbox->sem != INVALID_HANDLE_VALUE", mbox->sem != INVALID_HANDLE_VALUE); - - CloseHandle(mbox->sem); - free(mbox); - -#if LWIP_STATS - lwip_stats.sys.mbox.used--; - LWIP_ASSERT( "sys_mbox_free() ", lwip_stats.sys.mbox.used!= (u16_t)-1 ); -#endif // LWIP_STATS -} - -void sys_mbox_post(sys_mbox_t q, void *msg) -{ - DWORD ret; - SYS_ARCH_DECL_PROTECT(lev); - - // parameter check - LWIP_ASSERT("sys_mbox_free ", q != SYS_MBOX_NULL ); - LWIP_ASSERT("q->sem != NULL", q->sem != NULL); - LWIP_ASSERT("q->sem != INVALID_HANDLE_VALUE", q->sem != INVALID_HANDLE_VALUE); - - //printf("sys_mbox_post(%p %p)\n", q, msg); - - SYS_ARCH_PROTECT(lev); - q->q_mem[q->head] = msg; - (q->head)++; - if (q->head >= MAX_QUEUE_ENTRIES) { - q->head = 0; - } - LWIP_ASSERT("mbox is full!", q->head != q->tail); - ret = ReleaseSemaphore(q->sem, 1, 0); - LWIP_ASSERT("Error releasing sem", ret != 0); - - SYS_ARCH_UNPROTECT(lev); -} - -u32_t sys_arch_mbox_fetch(sys_mbox_t q, void **msg, u32_t timeout) -{ - DWORD ret; - LONGLONG starttime, endtime; - SYS_ARCH_DECL_PROTECT(lev); - - // parameter check - LWIP_ASSERT("sys_mbox_free ", q != SYS_MBOX_NULL ); - LWIP_ASSERT("q->sem != NULL", q->sem != NULL); - LWIP_ASSERT("q->sem != INVALID_HANDLE_VALUE", q->sem != INVALID_HANDLE_VALUE); - - if (timeout == 0) { - timeout = INFINITE; - } - starttime = sys_get_ms_longlong(); - if ((ret = WaitForSingleObject(q->sem, timeout)) == WAIT_OBJECT_0) { - SYS_ARCH_PROTECT(lev); - if(msg != NULL) { - *msg = q->q_mem[q->tail]; - } - //printf("sys_arch_mbox_fetch(%p) -> %p\n", q, msg?*msg:0); - (q->tail)++; - if (q->tail >= MAX_QUEUE_ENTRIES) { - q->tail = 0; - } - SYS_ARCH_UNPROTECT(lev); - endtime = sys_get_ms_longlong(); - return (u32_t)(endtime - starttime); - } - else - { - LWIP_ASSERT("Error waiting for sem", ret == WAIT_TIMEOUT); - if(msg != NULL) { - *msg = NULL; - } - //printf("sys_arch_mbox_fetch(%p) -> timeout\n", q); - return SYS_ARCH_TIMEOUT; - } -} - -u32_t sys_arch_mbox_tryfetch(sys_mbox_t q, void **msg) -{ - DWORD ret; - SYS_ARCH_DECL_PROTECT(lev); - - // parameter check - LWIP_ASSERT("sys_mbox_free ", q != SYS_MBOX_NULL ); - LWIP_ASSERT("q->sem != NULL", q->sem != NULL); - LWIP_ASSERT("q->sem != INVALID_HANDLE_VALUE", q->sem != INVALID_HANDLE_VALUE); - - if ((ret = WaitForSingleObject(q->sem, 0)) == WAIT_OBJECT_0) { - SYS_ARCH_PROTECT(lev); - if(msg != NULL) { - *msg = q->q_mem[q->tail]; - } - //printf("sys_arch_mbox_tryfetch(%p) -> %p\n", q, msg?*msg:0); - (q->tail)++; - if (q->tail >= MAX_QUEUE_ENTRIES) { - q->tail = 0; - } - SYS_ARCH_UNPROTECT(lev); - return 0; - } - else - { - LWIP_ASSERT("Error waiting for sem", ret == WAIT_TIMEOUT); - if(msg != NULL) { - *msg = NULL; - } - //printf("sys_arch_mbox_tryfetch(%p) -> timeout\n", q); - return SYS_ARCH_TIMEOUT; - } -} -#endif /* !NO_SYS */ diff --git a/ports/msvc6/test.c b/ports/msvc6/test.c deleted file mode 100644 index a7ede67..0000000 --- a/ports/msvc6/test.c +++ /dev/null @@ -1,310 +0,0 @@ -/* - * Copyright (c) 2001,2002 Florian Schulze. - * 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 authors nor the names of the contributors - * may be used to endorse or promote products derived from this software - * without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE AUTHORS 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 AUTHORS 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. - * - * test.c - This file is part of lwIP test - * - */ - -/* C runtime includes */ -#include -#include -#include -#include -#include - -/* lwIP core includes */ -#include "lwip/opt.h" - -#include "lwip/debug.h" -#include "lwip/stats.h" -#include "lwip/init.h" -#include "lwip/tcpip.h" - -#include "lwip/tcp.h" -#include "lwip/udp.h" -#include "lwip/dns.h" - -/* lwIP netif includes */ -#include "netif/loopif.h" -#include "netif/etharp.h" - -/* applications includes */ -#include "../../apps/httpserver_raw/httpd.h" -#include "../../apps/netio/netio.h" -#include "../../apps/netbios/netbios.h" -#include "../../apps/ping/ping.h" -#include "../../apps/sntp/sntp.h" - -#if NO_SYS -/* ... then we need information about the timer intervals: */ -#include "lwip/ip_frag.h" -#include "lwip/igmp.h" -#include "lwip/dhcp.h" -#include "lwip/autoip.h" -#endif /* NO_SYS */ - -/* include the port-dependent configuration */ -#include "lwipcfg_msvc.h" - -/* some forward function definitions... */ -err_t ethernetif_init(struct netif *netif); -void shutdown_adapter(void); -void update_adapter(void); - -#if NO_SYS -/* port-defined functions used for timer execution */ -void sys_init_timing(); -u32_t sys_now(); -#endif /* NO_SYS */ - -/* globales variables for netifs */ -/* THE ethernet interface */ -struct netif netif; -#if LWIP_HAVE_LOOPIF -/* THE loopback interface */ -struct netif loop_netif; -#endif /* LWIP_HAVE_LOOPIF */ - - -#if NO_SYS -/* special functions used for NO_SYS=1 only */ -typedef struct _timers_infos { - int timer; - int timer_interval; - void (*timer_func)(void); -}timers_infos; - -static timers_infos timers_table[] = { -#if LWIP_TCP - { 0, TCP_FAST_INTERVAL, tcp_fasttmr}, - { 0, TCP_SLOW_INTERVAL, tcp_slowtmr}, -#endif /* LWIP_TCP */ -#if LWIP_ARP - { 0, ARP_TMR_INTERVAL, etharp_tmr}, -#endif /* LWIP_ARP */ -#if LWIP_DHCP - { 0, DHCP_FINE_TIMER_MSECS, dhcp_fine_tmr}, - { 0, DHCP_COARSE_TIMER_MSECS, dhcp_coarse_tmr}, -#endif /* LWIP_DHCP */ -#if IP_REASSEMBLY - { 0, IP_TMR_INTERVAL, ip_reass_tmr}, -#endif /* IP_REASSEMBLY */ -#if LWIP_AUTOIP - { 0, AUTOIP_TMR_INTERVAL, autoip_tmr}, -#endif /* LWIP_AUTOIP */ -#if LWIP_IGMP - { 0, IGMP_TMR_INTERVAL, igmp_tmr}, -#endif /* LWIP_IGMP */ -#if LWIP_DNS - { 0, DNS_TMR_INTERVAL, dns_tmr}, -#endif /* LWIP_DNS */ -}; - -/* initialize stack when NO_SYS=1 */ -static void -nosys_init() -{ - sys_init_timing(); - lwip_init(); -} - -/* get the current time and see if any timer has expired */ -static void -timers_update() -{ - /* static variables for timer execution, initialized to zero! */ - static int last_time; - - int cur_time, time_diff, idxtimer; - - cur_time = sys_now(); - time_diff = cur_time - last_time; - - /* the '> 0' is an easy wrap-around check: the big gap at - * the wraparound step is simply ignored... */ - if (time_diff > 0) { - last_time = cur_time; - for( idxtimer=0; idxtimer<(sizeof(timers_table)/sizeof(timers_infos)); idxtimer++) { - timers_table[idxtimer].timer += time_diff; - - if (timers_table[idxtimer].timer > timers_table[idxtimer].timer_interval) { - timers_table[idxtimer].timer_func(); - timers_table[idxtimer].timer -= timers_table[idxtimer].timer_interval; - } - } - } -} -#endif /* NO_SYS */ - -/* This function initializes all network interfaces */ -static void -msvc_netif_init() -{ - struct ip_addr ipaddr, netmask, gw; -#if LWIP_HAVE_LOOPIF - struct ip_addr loop_ipaddr, loop_netmask, loop_gw; -#endif /* LWIP_HAVE_LOOPIF */ - - LWIP_PORT_INIT_GW(&gw); - LWIP_PORT_INIT_IPADDR(&ipaddr); - LWIP_PORT_INIT_NETMASK(&netmask); - printf("Starting lwIP, local interface IP is %s\n", inet_ntoa(*(struct in_addr*)&ipaddr)); - -#if NO_SYS -#if LWIP_ARP - netif_set_default(netif_add(&netif, &ipaddr, &netmask, &gw, NULL, ethernetif_init, ethernet_input)); -#else /* LWIP_ARP */ - netif_set_default(netif_add(&netif, &ipaddr, &netmask, &gw, NULL, ethernetif_init, ip_input)); -#endif /* LWIP_ARP */ -#else /* NO_SYS */ - netif_set_default(netif_add(&netif, &ipaddr, &netmask, &gw, NULL, ethernetif_init, tcpip_input)); -#endif /* NO_SYS */ - netif_set_up(&netif); - -#if LWIP_HAVE_LOOPIF - IP4_ADDR(&loop_gw, 127,0,0,1); - IP4_ADDR(&loop_ipaddr, 127,0,0,1); - IP4_ADDR(&loop_netmask, 255,0,0,0); - printf("Starting lwIP, loopback interface IP is %s\n", inet_ntoa(*(struct in_addr*)&loop_ipaddr)); - -#if NO_SYS - netif_add(&loop_netif, &loop_ipaddr, &loop_netmask, &loop_gw, NULL, loopif_init, ip_input); -#else /* NO_SYS */ - netif_add(&loop_netif, &loop_ipaddr, &loop_netmask, &loop_gw, NULL, loopif_init, tcpip_input); -#endif /* NO_SYS */ - netif_set_up(&loop_netif); -#endif /* LWIP_HAVE_LOOPIF */ -} - -void dns_found(const char *name, struct ip_addr *addr, void *arg) -{ printf("%s: %s\n", name, addr?inet_ntoa(*(struct in_addr*)addr):""); -} - -/* This function initializes applications */ -static void -apps_init() -{ -#if LWIP_DNS - char* dnsname="3com.com"; - struct ip_addr dnsresp; - if (dns_gethostbyname(dnsname, &dnsresp, dns_found, 0) == DNS_COMPLETE) { - dns_found(dnsname, &dnsresp, 0); - } -#endif /* LWIP_DNS */ - -#if LWIP_RAW - ping_init(); -#endif /* LWIP_RAW */ - -#if LWIP_UDP - netbios_init(); -#endif /* LWIP_UDP */ - -#if LWIP_TCP - httpd_init(); - netio_init(); -#endif /* LWIP_TCP */ - -#if LWIP_SOCKET - sntp_init(); -#endif /* LWIP_SOCKET */ -} - -/* This function initializes this lwIP test. When NO_SYS=1, this is done in - * the main_loop context (there is no other one), when NO_SYS=0, this is done - * in the tcpip_thread context */ -static void -test_init(void * arg) -{ /* remove compiler warning */ -#if NO_SYS - LWIP_UNUSED_ARG(arg); -#else /* NO_SYS */ - sys_sem_t init_sem; - LWIP_ASSERT("arg != NULL", arg != NULL); - init_sem = (sys_sem_t)arg; -#endif /* NO_SYS */ - - /* init network interfaces */ - msvc_netif_init(); - - /* init apps */ - apps_init(); - -#if !NO_SYS - sys_sem_signal(init_sem); -#endif /* NO_SYS */ -} - -/* This is somewhat different to other ports: we have a main loop here: - * a dedicated task that waits for packets to arrive. This would normally be - * done from interrupt context with embedded hardware, but we don't get an - * interrupt in windows for that :-) */ -void main_loop() -{ -#if !NO_SYS - sys_sem_t init_sem; -#endif /* NO_SYS */ - - /* initialize lwIP stack, network interfaces and applications */ -#if NO_SYS - nosys_init(); - test_init(NULL); -#else /* NO_SYS */ - init_sem = sys_sem_new(0); - tcpip_init(test_init, init_sem); - /* we have to wait for initialization to finish before - * calling update_adapter()! */ - sys_sem_wait(init_sem); - sys_sem_free(init_sem); -#endif /* NO_SYS */ - - /* MAIN LOOP for driver update (and timers if NO_SYS) */ - while (!_kbhit()) { -#if NO_SYS - /* handle timers (already done in tcpip.c when NO_SYS=0) */ - timers_update(); -#endif /* NO_SYS */ - - /* check for packets */ - update_adapter(); - } - - /* release the pcap library... */ - shutdown_adapter(); -} - -int main(void) -{ - /* no stdio-buffering, please! */ - setvbuf(stdout, NULL,_IONBF, 0); - - main_loop(); - - return 0; -} diff --git a/ports/msvc6/test.dsp b/ports/msvc6/test.dsp deleted file mode 100644 index 1d5ac68..0000000 --- a/ports/msvc6/test.dsp +++ /dev/null @@ -1,154 +0,0 @@ -# Microsoft Developer Studio Project File - Name="test" - Package Owner=<4> -# Microsoft Developer Studio Generated Build File, Format Version 6.00 -# ** NICHT BEARBEITEN ** - -# TARGTYPE "Win32 (x86) Console Application" 0x0103 - -CFG=test - 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 "test.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 "test.mak" CFG="test - Win32 Debug" -!MESSAGE -!MESSAGE Für die Konfiguration stehen zur Auswahl: -!MESSAGE -!MESSAGE "test - Win32 Release" (basierend auf "Win32 (x86) Console Application") -!MESSAGE "test - Win32 Debug" (basierend auf "Win32 (x86) Console Application") -!MESSAGE - -# Begin Project -# PROP AllowPerConfigDependencies 0 -# PROP Scc_ProjName "" -# PROP Scc_LocalPath "" -CPP=cl.exe -RSC=rc.exe - -!IF "$(CFG)" == "test - 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 Ignore_Export_Lib 0 -# PROP Target_Dir "" -# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /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 "_CONSOLE" /D "_MBCS" /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 -LINK32=link.exe -# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib /nologo /subsystem:console /machine:I386 -# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib $(PCAP_DIR)\lib\Packet.lib /nologo /subsystem:console /machine:I386 - -!ELSEIF "$(CFG)" == "test - 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 Ignore_Export_Lib 0 -# PROP Target_Dir "" -# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /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 "_CONSOLE" /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 -LINK32=link.exe -# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept -# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib $(PCAP_DIR)\lib\Packet.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept - -!ENDIF - -# Begin Target - -# Name "test - Win32 Release" -# Name "test - Win32 Debug" -# Begin Group "Quellcodedateien" - -# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat" -# Begin Source File - -SOURCE=.\test.c -# End Source File -# End Group -# Begin Group "Header-Dateien" - -# PROP Default_Filter "h;hpp;hxx;hm;inl" -# End Group -# Begin Group "Ressourcendateien" - -# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe" -# End Group -# Begin Source File - -SOURCE=.\Release\lwip4.lib - -!IF "$(CFG)" == "test - Win32 Release" - -!ELSEIF "$(CFG)" == "test - Win32 Debug" - -# PROP Exclude_From_Build 1 - -!ENDIF - -# End Source File -# Begin Source File - -SOURCE=.\Debug\lwip4_d.lib - -!IF "$(CFG)" == "test - Win32 Release" - -# PROP Exclude_From_Build 1 - -!ELSEIF "$(CFG)" == "test - Win32 Debug" - -!ENDIF - -# End Source File -# Begin Source File - -SOURCE=.\Debug\pktif_d.lib - -!IF "$(CFG)" == "test - Win32 Release" - -# PROP Exclude_From_Build 1 - -!ELSEIF "$(CFG)" == "test - Win32 Debug" - -!ENDIF - -# End Source File -# Begin Source File - -SOURCE=.\Release\pktif.lib - -!IF "$(CFG)" == "test - Win32 Release" - -!ELSEIF "$(CFG)" == "test - Win32 Debug" - -# PROP Exclude_From_Build 1 - -!ENDIF - -# End Source File -# End Target -# End Project diff --git a/ports/msvc6/test.dsw b/ports/msvc6/test.dsw deleted file mode 100644 index a54fe9d..0000000 --- a/ports/msvc6/test.dsw +++ /dev/null @@ -1,74 +0,0 @@ -Microsoft Developer Studio Workspace File, Format Version 6.00 -# WARNUNG: DIESE ARBEITSBEREICHSDATEI DARF NICHT BEARBEITET ODER GELÖSCHT WERDEN! - -############################################################################### - -Project: "lwip4"=.\lwip4.dsp - Package Owner=<4> - -Package=<5> -{{{ -}}} - -Package=<4> -{{{ -}}} - -############################################################################### - -Project: "apps"=.\apps.dsp - Package Owner=<4> - -Package=<5> -{{{ -}}} - -Package=<4> -{{{ -}}} - -############################################################################### - -Project: "pktif"=.\pktif.dsp - Package Owner=<4> - -Package=<5> -{{{ -}}} - -Package=<4> -{{{ -}}} - -############################################################################### - -Project: "test"=.\test.dsp - Package Owner=<4> - -Package=<5> -{{{ -}}} - -Package=<4> -{{{ - Begin Project Dependency - Project_Dep_Name lwip4 - End Project Dependency - Begin Project Dependency - Project_Dep_Name apps - End Project Dependency - Begin Project Dependency - Project_Dep_Name pktif - End Project Dependency -}}} - -############################################################################### - -Global: - -Package=<5> -{{{ -}}} - -Package=<3> -{{{ -}}} - -############################################################################### -