├── ports ├── win32 │ ├── include │ │ ├── arch │ │ │ ├── epstruct.h │ │ │ ├── bpstruct.h │ │ │ └── perf.h │ │ └── ppp_settings.h │ ├── check │ │ ├── check_stdint.h │ │ ├── unistd.h │ │ ├── stdbool.h │ │ ├── sys │ │ │ └── time.h │ │ ├── config.h │ │ └── time.c │ ├── msvc │ │ ├── makefsdata.vcxproj.filters │ │ ├── lwIP_pcapif.vcxproj.filters │ │ ├── lwIP_unittests.sln │ │ └── lwIP_Test.sln │ ├── pcapif_helper.h │ ├── lwippools.h │ ├── pcapif.h │ ├── readme.txt │ └── mingw │ │ ├── Makefile │ │ └── Common.mk ├── old │ ├── 6502 │ │ ├── README │ │ ├── include │ │ │ └── arch │ │ │ │ ├── cpu.h │ │ │ │ ├── lib.h │ │ │ │ ├── perf.h │ │ │ │ ├── sys_arch.h │ │ │ │ └── cc.h │ │ └── lib_arch.c │ ├── rtxc │ │ ├── netif │ │ │ └── FILES │ │ ├── perf.c │ │ ├── include │ │ │ ├── arch │ │ │ │ ├── lib.h │ │ │ │ ├── cpu.h │ │ │ │ ├── perf.h │ │ │ │ ├── init.h │ │ │ │ ├── sys_arch.h │ │ │ │ └── cc.h │ │ │ └── netif │ │ │ │ ├── sioslipif.h │ │ │ │ └── cs8900if.h │ │ └── lib.c │ ├── ti_c6711 │ │ ├── netif │ │ │ └── ne2kif.c │ │ ├── include │ │ │ ├── netif │ │ │ │ └── ne2kif.h │ │ │ └── arch │ │ │ │ ├── perf.h │ │ │ │ ├── init.h │ │ │ │ └── lib.h │ │ └── FILES │ ├── c16x │ │ ├── include │ │ │ └── arch │ │ │ │ ├── cpu.h │ │ │ │ ├── cc.h │ │ │ │ ├── lib.h │ │ │ │ └── perf.h │ │ ├── FILES │ │ └── perf.c │ ├── ecos │ │ ├── ecos │ │ │ ├── pkgadd.db │ │ │ └── net │ │ │ │ └── lwip_tcpip │ │ │ │ └── current │ │ │ │ └── include │ │ │ │ ├── network.h │ │ │ │ └── arch │ │ │ │ └── sys_arch.h │ │ ├── copy │ │ ├── mkepk │ │ ├── README │ │ └── header │ ├── coldfire │ │ ├── README │ │ ├── perf.c │ │ ├── include │ │ │ ├── arch │ │ │ │ ├── perf.h │ │ │ │ └── errno.h │ │ │ └── netif │ │ │ │ ├── tcpdump.h │ │ │ │ └── 5272fec.h │ │ └── netif │ │ │ └── tcpdump.c │ ├── FILES │ └── v2pro │ │ ├── lib_arch.c │ │ ├── perf.c │ │ └── include │ │ ├── arch │ │ ├── cpu.h │ │ ├── sys_arch.h │ │ └── perf.h │ │ └── netif │ │ └── xemacif.h ├── unix │ ├── check │ │ ├── config.h │ │ └── README │ ├── setup-tapif │ ├── minimal │ │ ├── README │ │ └── Makefile │ ├── port │ │ └── include │ │ │ └── netif │ │ │ ├── list.h │ │ │ ├── pcapif.h │ │ │ ├── sio.h │ │ │ ├── tunif.h │ │ │ ├── dropif.h │ │ │ ├── fifo.h │ │ │ ├── unixif.h │ │ │ ├── tapif.h │ │ │ ├── tcpdump.h │ │ │ └── delif.h │ ├── lib │ │ ├── README │ │ └── Makefile │ ├── unixsim │ │ ├── lwip_hooks.h │ │ └── README │ ├── README │ └── Common.mk └── FILES ├── apps ├── LwipMibCompiler │ ├── example │ │ ├── compile_udp_mib.sh │ │ └── compile_udp_mib.cmd │ ├── SharpSnmpLib │ │ ├── sharpsnmplib.snk │ │ └── Mib │ │ │ ├── Elements │ │ │ ├── Types │ │ │ │ ├── ITypeAssignment.cs │ │ │ │ ├── OpaqueType.cs │ │ │ │ ├── ObjectIdentifierType.cs │ │ │ │ ├── SequenceOf.cs │ │ │ │ ├── BitsType.cs │ │ │ │ ├── IpAddressType.cs │ │ │ │ ├── Macro.cs │ │ │ │ ├── OctetStringType.cs │ │ │ │ ├── Choice.cs │ │ │ │ ├── Sequence.cs │ │ │ │ └── BaseType.cs │ │ │ ├── ITypeReferrer.cs │ │ │ ├── Entities │ │ │ │ ├── ModuleIdentity.cs │ │ │ │ ├── NotificationType.cs │ │ │ │ ├── ObjectGroup.cs │ │ │ │ ├── NotificationGroup.cs │ │ │ │ ├── ModuleCompliance.cs │ │ │ │ ├── ObjectIdentity.cs │ │ │ │ ├── OidValueAssignment.cs │ │ │ │ ├── AgentCapabilities.cs │ │ │ │ ├── EntityBase.cs │ │ │ │ └── IEntity.cs │ │ │ ├── IDeclaration.cs │ │ │ ├── TrapType.cs │ │ │ ├── IElement.cs │ │ │ ├── Exports.cs │ │ │ ├── ImportsFrom.cs │ │ │ └── Imports.cs │ │ │ ├── ISymbolEnumerator.cs │ │ │ ├── Status.cs │ │ │ ├── MaxAccess.cs │ │ │ ├── ObjectIdentifier.cs │ │ │ ├── MibDocument.cs │ │ │ └── ValueRange.cs │ ├── MibViewer │ │ ├── app.config │ │ ├── Properties │ │ │ ├── Settings.settings │ │ │ ├── Settings.Designer.cs │ │ │ └── AssemblyInfo.cs │ │ └── Program.cs │ ├── LwipMibCompiler │ │ ├── app.config │ │ └── Properties │ │ │ └── AssemblyInfo.cs │ ├── Mibs │ │ └── RFC-1215 │ ├── CCodeGeneration │ │ ├── Properties │ │ │ └── AssemblyInfo.cs │ │ ├── CodeElement.cs │ │ ├── PlainText.cs │ │ ├── CFile.cs │ │ ├── Code.cs │ │ └── PP_Macro.cs │ └── LwipSnmpCodeGeneration │ │ └── Properties │ │ └── AssemblyInfo.cs ├── netio │ ├── netio.h │ └── netio.c ├── rtp │ └── rtp.h ├── socket_examples │ └── socket_examples.h ├── httpserver │ ├── httpserver-netconn.h │ └── README ├── chargen │ └── chargen.h ├── ping │ └── ping.h ├── snmp_private_mib │ └── private_mib.h ├── tcpecho_raw │ └── tcpecho_raw.h ├── shell │ └── shell.h ├── udpecho │ └── udpecho.h ├── tcpecho │ └── tcpecho.h └── udpecho_raw │ └── udpecho_raw.h ├── README.md ├── .gitignore └── addons ├── httpd └── fs_example │ └── fs_example.h ├── ipv6_static_routing └── README └── tcp_isn └── tcp_isn.h /ports/win32/include/arch/epstruct.h: -------------------------------------------------------------------------------- 1 | #pragma pack(pop) 2 | -------------------------------------------------------------------------------- /ports/old/6502/README: -------------------------------------------------------------------------------- 1 | The 6502 code is far from complete. 2 | -------------------------------------------------------------------------------- /ports/win32/check/check_stdint.h: -------------------------------------------------------------------------------- 1 | /* deliberateliy empty */ 2 | -------------------------------------------------------------------------------- /ports/win32/include/arch/bpstruct.h: -------------------------------------------------------------------------------- 1 | #pragma pack(push,1) 2 | -------------------------------------------------------------------------------- /ports/old/rtxc/netif/FILES: -------------------------------------------------------------------------------- 1 | sioslipif.c - Implementation of the SLIP protocol on top of a serial line. 2 | -------------------------------------------------------------------------------- /ports/unix/check/config.h: -------------------------------------------------------------------------------- 1 | /* Enable this to simplify debugging */ 2 | /* #define LWIP_UNITTESTS_NOFORK */ 3 | -------------------------------------------------------------------------------- /ports/old/ti_c6711/netif/ne2kif.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/qywx/lwip-contrib/HEAD/ports/old/ti_c6711/netif/ne2kif.c -------------------------------------------------------------------------------- /apps/LwipMibCompiler/example/compile_udp_mib.sh: -------------------------------------------------------------------------------- 1 | ../LwipMibCompiler/bin/Debug/LwipMibCompiler.exe ../Mibs/UDP-MIB ./ ../Mibs/ 2 | -------------------------------------------------------------------------------- /apps/LwipMibCompiler/example/compile_udp_mib.cmd: -------------------------------------------------------------------------------- 1 | ..\LwipMibCompiler\bin\Debug\LwipMibCompiler.exe ..\Mibs\UDP-MIB .\ ..\Mibs\ 2 | -------------------------------------------------------------------------------- /apps/netio/netio.h: -------------------------------------------------------------------------------- 1 | #ifndef LWIP_NETIO_H 2 | #define LWIP_NETIO_H 3 | 4 | void netio_init(void); 5 | 6 | #endif /* LWIP_NETIO_H */ 7 | -------------------------------------------------------------------------------- /ports/old/ti_c6711/include/netif/ne2kif.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/qywx/lwip-contrib/HEAD/ports/old/ti_c6711/include/netif/ne2kif.h -------------------------------------------------------------------------------- /apps/LwipMibCompiler/SharpSnmpLib/sharpsnmplib.snk: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/qywx/lwip-contrib/HEAD/apps/LwipMibCompiler/SharpSnmpLib/sharpsnmplib.snk -------------------------------------------------------------------------------- /ports/old/c16x/include/arch/cpu.h: -------------------------------------------------------------------------------- 1 | #ifndef __CPU_H__ 2 | #define __CPU_H__ 3 | 4 | #define BYTE_ORDER LITTLE_ENDIAN 5 | 6 | #endif /* __CPU_H__ */ 7 | -------------------------------------------------------------------------------- /ports/win32/check/unistd.h: -------------------------------------------------------------------------------- 1 | #ifndef LWIP_UNISTD_H 2 | #define LWIP_UNISTD_H 3 | 4 | /* include io.h for read() and write() */ 5 | #include 6 | 7 | #endif 8 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | LwIP-contib 2 | ============== 3 | LwIP-contib contains example ports and addon applications for LwIP. 4 | Forked from http://git.savannah.gnu.org/cgit/lwip/lwip-contrib.git 5 | -------------------------------------------------------------------------------- /apps/LwipMibCompiler/MibViewer/app.config: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /apps/rtp/rtp.h: -------------------------------------------------------------------------------- 1 | #ifndef LWIP_RTP_H 2 | #define LWIP_RTP_H 3 | 4 | #if LWIP_SOCKET && LWIP_IGMP 5 | void rtp_init(void); 6 | #endif /* LWIP_SOCKET && LWIP_IGMP */ 7 | 8 | #endif /* LWIP_RTP_H */ 9 | -------------------------------------------------------------------------------- /apps/socket_examples/socket_examples.h: -------------------------------------------------------------------------------- 1 | #ifndef LWIP_SOCKET_EXAMPLES_H 2 | #define LWIP_SOCKET_EXAMPLES_H 3 | 4 | void socket_examples_init(void); 5 | 6 | #endif /* LWIP_SOCKET_EXAMPLES_H */ 7 | -------------------------------------------------------------------------------- /ports/win32/check/stdbool.h: -------------------------------------------------------------------------------- 1 | #ifndef MY_STDBOOL_H 2 | #define MY_STDBOOL_H 3 | 4 | typedef int bool; 5 | #define true 1 6 | #define false 0 7 | #define __bool_true_false_are_defined 1 8 | 9 | #endif -------------------------------------------------------------------------------- /apps/LwipMibCompiler/LwipMibCompiler/app.config: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /apps/httpserver/httpserver-netconn.h: -------------------------------------------------------------------------------- 1 | #ifndef LWIP_HTTPSERVER_NETCONN_H 2 | #define LWIP_HTTPSERVER_NETCONN_H 3 | 4 | void http_server_netconn_init(void); 5 | 6 | #endif /* LWIP_HTTPSERVER_NETCONN_H */ 7 | -------------------------------------------------------------------------------- /ports/old/ecos/ecos/pkgadd.db: -------------------------------------------------------------------------------- 1 | package CYGPKG_NET_LWIP { 2 | alias {"lwIP" lwip} 3 | directory net/lwip_tcpip 4 | script cdl/lwip_net.cdl 5 | description "lightweight TCP/IP stack: lwIP" 6 | } 7 | 8 | -------------------------------------------------------------------------------- /apps/LwipMibCompiler/SharpSnmpLib/Mib/Elements/Types/ITypeAssignment.cs: -------------------------------------------------------------------------------- 1 | namespace Lextm.SharpSnmpLib.Mib.Elements.Types 2 | { 3 | public interface ITypeAssignment : IDeclaration 4 | { 5 | } 6 | } 7 | -------------------------------------------------------------------------------- /apps/chargen/chargen.h: -------------------------------------------------------------------------------- 1 | #ifndef LWIP_CHARGEN_H 2 | #define LWIP_CHARGEN_H 3 | 4 | #include "lwip/opt.h" 5 | 6 | #if LWIP_SOCKET 7 | 8 | void chargen_init(void); 9 | 10 | #endif /* LWIP_SOCKET */ 11 | 12 | #endif /* LWIP_CHARGEN_H */ 13 | -------------------------------------------------------------------------------- /apps/LwipMibCompiler/SharpSnmpLib/Mib/ISymbolEnumerator.cs: -------------------------------------------------------------------------------- 1 | using System.Collections.Generic; 2 | 3 | namespace Lextm.SharpSnmpLib.Mib 4 | { 5 | public interface ISymbolEnumerator: IEnumerator 6 | { 7 | bool PutBack(Symbol item); 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /ports/old/ecos/ecos/net/lwip_tcpip/current/include/network.h: -------------------------------------------------------------------------------- 1 | /* network.h for compatibility with the other eCos network stacks */ 2 | 3 | #include /* lwIP stack includes */ 4 | #define LWIP_COMPAT_SOCKETS 1 5 | #include 6 | #include 7 | -------------------------------------------------------------------------------- /apps/LwipMibCompiler/MibViewer/Properties/Settings.settings: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /ports/win32/check/sys/time.h: -------------------------------------------------------------------------------- 1 | #ifndef LWIP_SYS__TIME_H 2 | #define LWIP_SYS__TIME_H 3 | 4 | #include /* time_t */ 5 | 6 | struct timeval { 7 | time_t tv_sec; /* seconds */ 8 | long tv_usec; /* and microseconds */ 9 | }; 10 | int gettimeofday(struct timeval* tp, void* tzp); 11 | 12 | #endif 13 | -------------------------------------------------------------------------------- /apps/LwipMibCompiler/SharpSnmpLib/Mib/Elements/ITypeReferrer.cs: -------------------------------------------------------------------------------- 1 | using Lextm.SharpSnmpLib.Mib.Elements.Types; 2 | 3 | namespace Lextm.SharpSnmpLib.Mib.Elements 4 | { 5 | public interface ITypeReferrer 6 | { 7 | ITypeAssignment ReferredType { get; set; } 8 | ITypeAssignment BaseType { get; } 9 | } 10 | } 11 | -------------------------------------------------------------------------------- /ports/unix/check/README: -------------------------------------------------------------------------------- 1 | 2 | Helper files to run lwIP unit tests on unix-like systems. 3 | 4 | 1. Install the check library, through a package manager or from http://check.sourceforge.net/ 5 | 2. Put the lwip code in a directory called 'lwip' in the same directory as lwip-contrib is 6 | 3. Run `make check` 7 | 4. Make sure all tests pass 8 | 9 | -------------------------------------------------------------------------------- /apps/LwipMibCompiler/SharpSnmpLib/Mib/Elements/Types/OpaqueType.cs: -------------------------------------------------------------------------------- 1 | 2 | namespace Lextm.SharpSnmpLib.Mib.Elements.Types 3 | { 4 | public class OpaqueType : OctetStringType 5 | { 6 | public OpaqueType(IModule module, string name, ISymbolEnumerator symbols) 7 | : base(module, name, symbols) 8 | { 9 | } 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /apps/LwipMibCompiler/SharpSnmpLib/Mib/Status.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Text; 5 | 6 | namespace Lextm.SharpSnmpLib.Mib 7 | { 8 | public enum Status 9 | { 10 | current, 11 | deprecated, 12 | obsolete, 13 | mandatory, 14 | optional 15 | } 16 | 17 | } 18 | -------------------------------------------------------------------------------- /apps/LwipMibCompiler/SharpSnmpLib/Mib/Elements/Types/ObjectIdentifierType.cs: -------------------------------------------------------------------------------- 1 | 2 | namespace Lextm.SharpSnmpLib.Mib.Elements.Types 3 | { 4 | public class ObjectIdentifierType : BaseType 5 | { 6 | public ObjectIdentifierType(IModule module, string name, ISymbolEnumerator symbols) 7 | : base(module, name) 8 | { 9 | } 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /apps/LwipMibCompiler/SharpSnmpLib/Mib/MaxAccess.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Text; 5 | 6 | namespace Lextm.SharpSnmpLib.Mib 7 | { 8 | public enum MaxAccess 9 | { 10 | notAccessible, 11 | accessibleForNotify, 12 | readOnly, 13 | readWrite, 14 | readCreate 15 | } 16 | 17 | } 18 | -------------------------------------------------------------------------------- /apps/LwipMibCompiler/SharpSnmpLib/Mib/Elements/Entities/ModuleIdentity.cs: -------------------------------------------------------------------------------- 1 | namespace Lextm.SharpSnmpLib.Mib.Elements.Entities 2 | { 3 | public sealed class ModuleIdentity : EntityBase 4 | { 5 | public ModuleIdentity(IModule module, SymbolList preAssignSymbols, ISymbolEnumerator symbols) 6 | : base(module, preAssignSymbols, symbols) 7 | { 8 | } 9 | } 10 | } -------------------------------------------------------------------------------- /apps/httpserver/README: -------------------------------------------------------------------------------- 1 | HTTPSERVER 2 | 3 | This is a demonstration of how to make the most basic kind 4 | of server using lWIP. 5 | 6 | * httpserver-raw.c - uses raw TCP calls (coming soon!) 7 | 8 | * httpserver-netconn.c - uses netconn and netbuf API 9 | 10 | This code updates the examples in Adam Dunkel's original 11 | lwIP documentation to match changes in the code since that 12 | PDF release. 13 | -------------------------------------------------------------------------------- /ports/FILES: -------------------------------------------------------------------------------- 1 | unix/ - Architectural files for testing on unix-like systems 2 | (assuming gcc and pthreads). 3 | - Maintained by Kieran Mansley 4 | 5 | msvc6/ - Architectural files for Microsoft Visual C++ 6.0. 6 | - Maintained by Simon Goldschmidt 7 | 8 | old/ - Ports that are no longer actively maintained 9 | -------------------------------------------------------------------------------- /apps/LwipMibCompiler/SharpSnmpLib/Mib/Elements/Entities/NotificationType.cs: -------------------------------------------------------------------------------- 1 | 2 | namespace Lextm.SharpSnmpLib.Mib.Elements.Entities 3 | { 4 | public sealed class NotificationType : EntityBase 5 | { 6 | public NotificationType(IModule module, SymbolList preAssignSymbols, ISymbolEnumerator symbols) 7 | : base(module, preAssignSymbols, symbols) 8 | { 9 | } 10 | } 11 | } -------------------------------------------------------------------------------- /apps/LwipMibCompiler/SharpSnmpLib/Mib/Elements/IDeclaration.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Text; 5 | 6 | namespace Lextm.SharpSnmpLib.Mib.Elements 7 | { 8 | public interface IDeclaration: IElement 9 | { 10 | /// 11 | /// Name. 12 | /// 13 | string Name 14 | { 15 | get; 16 | } 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /ports/win32/include/ppp_settings.h: -------------------------------------------------------------------------------- 1 | #ifdef _MSC_VER 2 | #pragma warning (disable: 4242) /* PPP only: conversion from 'x' to 'y', possible loss of data */ 3 | #pragma warning (disable: 4244) /* PPP only: conversion from 'x' to 'y', possible loss of data (again?) */ 4 | #pragma warning (disable: 4310) /* PPP only: cast truncates constant value */ 5 | #pragma warning (disable: 4706) /* PPP only: assignment within conditional expression */ 6 | #endif /* MSC_VER */ 7 | -------------------------------------------------------------------------------- /apps/ping/ping.h: -------------------------------------------------------------------------------- 1 | #ifndef LWIP_PING_H 2 | #define LWIP_PING_H 3 | 4 | #include "lwip/ip_addr.h" 5 | 6 | /** 7 | * PING_USE_SOCKETS: Set to 1 to use sockets, otherwise the raw api is used 8 | */ 9 | #ifndef PING_USE_SOCKETS 10 | #define PING_USE_SOCKETS LWIP_SOCKET 11 | #endif 12 | 13 | void ping_init(const ip_addr_t* ping_addr); 14 | 15 | #if !PING_USE_SOCKETS 16 | void ping_send_now(void); 17 | #endif /* !PING_USE_SOCKETS */ 18 | 19 | #endif /* LWIP_PING_H */ 20 | -------------------------------------------------------------------------------- /apps/snmp_private_mib/private_mib.h: -------------------------------------------------------------------------------- 1 | /** 2 | * @file 3 | * Exports Private lwIP MIB 4 | */ 5 | 6 | #ifndef LWIP_HDR_PRIVATE_MIB_H 7 | #define LWIP_HDR_PRIVATE_MIB_H 8 | 9 | #include "lwip/apps/snmp_opts.h" 10 | 11 | #include "lwip/apps/snmp_core.h" 12 | 13 | #ifdef __cplusplus 14 | extern "C" { 15 | #endif 16 | 17 | /* export MIB */ 18 | extern const struct snmp_mib mib_private; 19 | 20 | void lwip_privmib_init(void); 21 | 22 | #ifdef __cplusplus 23 | } 24 | #endif 25 | 26 | #endif 27 | -------------------------------------------------------------------------------- /ports/old/ecos/copy: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | #make an ecos epk from CVS lwIP 4 | CURRENT=$EPK/net/lwip_tcpip/current 5 | mkdir -p `dirname $CURRENT/$2` 6 | 7 | #prepend eCos license text to all files but the ones 8 | #in the ppp directory: those have the advertising clause 9 | #type of BSD license which is not compatible with GPL 10 | #or that's what I'be been told and IANAL 11 | if [ "`dirname $1`" != "src/netif/ppp" ]; then 12 | #cat header $LWIP_CVS/$1 > $CURRENT/$2 13 | cp -f $LWIP_CVS/$1 $CURRENT/$2 14 | else 15 | cp -f $LWIP_CVS/$1 $CURRENT/$2 16 | fi 17 | -------------------------------------------------------------------------------- /ports/unix/setup-tapif: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | # Run me using "source setup-tapif" to get exported PRECONFIGURED_TAPIF variable 4 | # Alternatively, add "export PRECONFIGURED_TAPIF=tap0" to ~/.bashrc 5 | 6 | # http://backreference.org/2010/03/26/tuntap-interface-tutorial/ 7 | 8 | # After executing this script, start unixsim/simhost. 9 | # Enter 192.168.0.2 or "http://simhost.local/" (Zeroconf) 10 | # in your webbrowser to see simhost webpage. 11 | 12 | sudo ip tuntap add dev tap0 mode tap user `whoami` 13 | sudo ip link set tap0 up 14 | sudo ip addr add 192.168.0.1/24 dev tap0 15 | export PRECONFIGURED_TAPIF=tap0 16 | -------------------------------------------------------------------------------- /ports/win32/msvc/makefsdata.vcxproj.filters: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | {4FC737F1-C7A5-4376-A066-2A32D752A2FF} 6 | cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx 7 | 8 | 9 | 10 | 11 | Quelldateien 12 | 13 | 14 | -------------------------------------------------------------------------------- /ports/win32/pcapif_helper.h: -------------------------------------------------------------------------------- 1 | #ifndef LWIP_PCAPIF_HELPER_H 2 | #define LWIP_PCAPIF_HELPER_H 3 | 4 | #ifdef __cplusplus 5 | extern "C" { 6 | #endif 7 | 8 | struct pcapifh_linkstate; 9 | 10 | enum pcapifh_link_event { 11 | PCAPIF_LINKEVENT_UNKNOWN, 12 | PCAPIF_LINKEVENT_UP, 13 | PCAPIF_LINKEVENT_DOWN 14 | }; 15 | 16 | struct pcapifh_linkstate* pcapifh_linkstate_init(char *adapter_name); 17 | enum pcapifh_link_event pcapifh_linkstate_get(struct pcapifh_linkstate* state); 18 | void pcapifh_linkstate_close(struct pcapifh_linkstate* state); 19 | 20 | 21 | #ifdef __cplusplus 22 | } 23 | #endif 24 | 25 | #endif /* LWIP_PCAPIF_HELPER_H */ -------------------------------------------------------------------------------- /ports/old/ti_c6711/FILES: -------------------------------------------------------------------------------- 1 | This directory contains architecture and compiler specific stuff for porting lwIP 2 | to the TI TMS320C6711 DSP. It's done on the official C6711 DSK board, in CCS v2.10. 3 | 4 | The sequential API has not been ported; its functions are empties. If someone is 5 | interested in adding a sequential API, please contact the author (see below). 6 | 7 | The ethernet connection was based on an daughtercard design by the author. 8 | Schematic files can be found as part of project "ucos-lwip-c6x" on SourceForge.net 9 | The daughtercard is NE2000 compliant. And the driver supports interrupts. 10 | 11 | 12 | Zeng, Ming 13 | 14 | -------------------------------------------------------------------------------- /ports/unix/minimal/README: -------------------------------------------------------------------------------- 1 | This is an example of a very minimal lwIP project. It runs in a single 2 | thread and runs a single example application - an echo server. The 3 | echo application is implemented using the raw API. Additionally this 4 | raw API example hosts the SNMPv1 agent for development purposes. 5 | 6 | In order to run the demo without root priviledges, you can create a 7 | preconfigured tap device in advance and then run the application with the 8 | interface passed in via an environment variable: 9 | 10 | $ sudo ip tuntap add dev tap0 mode tap user YOUR-USER-NAME 11 | $ sudo ip a a dev tap0 192.168.0.1/24 12 | $ PRECONFIGURED_TAPIF=tap0 ./echop 13 | -------------------------------------------------------------------------------- /ports/unix/port/include/netif/list.h: -------------------------------------------------------------------------------- 1 | 2 | #ifndef LWIP_LIST_H 3 | #define LWIP_LIST_H 4 | 5 | struct elem; 6 | 7 | struct list { 8 | struct elem *first, *last; 9 | int size, elems; 10 | }; 11 | 12 | struct elem { 13 | struct elem *next; 14 | void *data; 15 | }; 16 | 17 | struct list *list_new(int size); 18 | int list_push(struct list *list, void *data); 19 | void *list_pop(struct list *list); 20 | void *list_first(struct list *list); 21 | int list_elems(struct list *list); 22 | void list_delete(struct list *list); 23 | int list_remove(struct list *list, void *elem); 24 | void list_map(struct list *list, void (* func)(void *arg)); 25 | 26 | #endif 27 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | *.o 2 | *.so 3 | *.a 4 | .depend 5 | /ports/unix/unixsim/simhost 6 | /ports/unix/unixsim/simrouter 7 | /ports/unix/unixsim/simnode 8 | /ports/unix/minimal/echop 9 | /ports/win32/msvc/Debug 10 | /ports/win32/lwipcfg_msvc.h 11 | /ports/win32/msvc/Debug unittests 12 | /ports/win32/msvc/Release 13 | /ports/win32/msvc/Release unittests 14 | /ports/win32/msvc/*.user 15 | /ports/win32/msvc/*.ncb 16 | /ports/win32/msvc/*.cache 17 | /ports/win32/msvc/*.suo 18 | /ports/win32/msvc/ipch 19 | /ports/win32/msvc/*.opensdf 20 | /ports/win32/msvc/*.sdf 21 | /ports/unix/check/lwip_unittests 22 | /ports/win32/mingw/*.exe 23 | /ports/win32/mingw/*.map 24 | /ports/win32/mingw/cov-int 25 | -------------------------------------------------------------------------------- /ports/old/c16x/FILES: -------------------------------------------------------------------------------- 1 | This directory contains architecture and compiler specific stuff for porting lwIP 2 | to the C16x and ST10 microcontrollers. The compiler specifics are for Tasking EDE 3 | v7.5r2. 4 | 5 | The sequential API has not been ported; its functions are empties. If someone is 6 | interested in adding a sequential API, please contact the author (see below). 7 | 8 | Besides this, a Cirrus (formerly Crystal Semiconductors) CS8900a Ethernet driver 9 | is included, which assumes a 16-bit data bus configuration. When porting this 10 | driver, note that the CS8900a does not support interrupts in 8-bit mode. 11 | 12 | Leon Woestenberg 13 | 14 | -------------------------------------------------------------------------------- /apps/LwipMibCompiler/SharpSnmpLib/Mib/Elements/Entities/ObjectGroup.cs: -------------------------------------------------------------------------------- 1 | /* 2 | * Created by SharpDevelop. 3 | * User: lextm 4 | * Date: 2008/5/21 5 | * Time: 19:27 6 | * 7 | * To change this template use Tools | Options | Coding | Edit Standard Headers. 8 | */ 9 | 10 | namespace Lextm.SharpSnmpLib.Mib.Elements.Entities 11 | { 12 | /// 13 | /// Description of ObjectGroupNode. 14 | /// 15 | public sealed class ObjectGroup : EntityBase 16 | { 17 | public ObjectGroup(IModule module, SymbolList preAssignSymbols, ISymbolEnumerator symbols) 18 | : base(module, preAssignSymbols, symbols) 19 | { 20 | } 21 | } 22 | } -------------------------------------------------------------------------------- /ports/old/ecos/mkepk: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | #make an ecos epk from CVS lwIP 4 | 5 | if test $EPK"" == "" ; then 6 | echo you must set the EPK environment var to the dir you want the EPK in 7 | exit; 8 | fi 9 | 10 | if test $LWIP_CVS"" == "" ; then 11 | echo you must set the LWIP_CVS environment var to the dir you checked out the lwip module 12 | LWIP_CVS=../../../lwip; 13 | exit; 14 | fi 15 | EPK=$EPK/lwip_epk 16 | 17 | #cleanup 18 | rm -Rf $EPK 19 | 20 | 21 | #copy files from CVS 22 | xargs -n 2 ./copy < files 23 | 24 | #copy ecos specific files 25 | cd ecos && find . ! -path '*CVS*' -a -type f -exec cp --parents {} $EPK \; 26 | #make epk 27 | cd $EPK && tar czf lwip.epk * 28 | 29 | -------------------------------------------------------------------------------- /apps/LwipMibCompiler/SharpSnmpLib/Mib/Elements/Types/SequenceOf.cs: -------------------------------------------------------------------------------- 1 | using System.Collections.Generic; 2 | 3 | namespace Lextm.SharpSnmpLib.Mib.Elements.Types 4 | { 5 | /// 6 | /// The SEQUENCE OF type represents a list of data sets.. 7 | /// 8 | public sealed class SequenceOf : BaseType 9 | { 10 | private string _type; 11 | 12 | public SequenceOf(IModule module, string name, ISymbolEnumerator sym) 13 | : base(module, name) 14 | { 15 | _type = sym.NextNonEOLSymbol().ToString(); 16 | } 17 | 18 | public string Type 19 | { 20 | get { return _type; } 21 | } 22 | } 23 | } -------------------------------------------------------------------------------- /apps/LwipMibCompiler/SharpSnmpLib/Mib/Elements/Entities/NotificationGroup.cs: -------------------------------------------------------------------------------- 1 | /* 2 | * Created by SharpDevelop. 3 | * User: lextm 4 | * Date: 2008/5/21 5 | * Time: 19:34 6 | * 7 | * To change this template use Tools | Options | Coding | Edit Standard Headers. 8 | */ 9 | 10 | namespace Lextm.SharpSnmpLib.Mib.Elements.Entities 11 | { 12 | /// 13 | /// Description of NotificationGroupNode. 14 | /// 15 | public sealed class NotificationGroup : EntityBase 16 | { 17 | public NotificationGroup(IModule module, SymbolList preAssignSymbols, ISymbolEnumerator symbols) 18 | : base(module, preAssignSymbols, symbols) 19 | { 20 | } 21 | } 22 | } -------------------------------------------------------------------------------- /apps/LwipMibCompiler/SharpSnmpLib/Mib/Elements/Entities/ModuleCompliance.cs: -------------------------------------------------------------------------------- 1 | /* 2 | * Created by SharpDevelop. 3 | * User: lextm 4 | * Date: 2008/5/21 5 | * Time: 19:35 6 | * 7 | * To change this template use Tools | Options | Coding | Edit Standard Headers. 8 | */ 9 | 10 | namespace Lextm.SharpSnmpLib.Mib.Elements.Entities 11 | { 12 | /// 13 | /// Description of ModuleComplianceNode. 14 | /// 15 | public sealed class ModuleCompliance : EntityBase 16 | { 17 | public ModuleCompliance(IModule module, SymbolList preAssignSymbols, ISymbolEnumerator symbols) 18 | : base(module, preAssignSymbols, symbols) 19 | { 20 | } 21 | 22 | } 23 | } -------------------------------------------------------------------------------- /apps/LwipMibCompiler/SharpSnmpLib/Mib/Elements/Types/BitsType.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | 4 | namespace Lextm.SharpSnmpLib.Mib.Elements.Types 5 | { 6 | public class BitsType : BaseType 7 | { 8 | private ValueMap _map; 9 | 10 | public BitsType(IModule module, string name, ISymbolEnumerator symbols) 11 | : base(module, name) 12 | { 13 | _map = Lexer.DecodeEnumerations(symbols); 14 | } 15 | 16 | public ValueMap Map 17 | { 18 | get { return _map; } 19 | } 20 | 21 | public string this[int value] 22 | { 23 | get { return _map[value]; } 24 | } 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /ports/win32/lwippools.h: -------------------------------------------------------------------------------- 1 | /* OPTIONAL: Pools to replace heap allocation 2 | * Optional: Pools can be used instead of the heap for mem_malloc. If 3 | * so, these should be defined here, in increasing order according to 4 | * the pool element size. 5 | * 6 | * LWIP_MALLOC_MEMPOOL(number_elements, element_size) 7 | */ 8 | #if MEM_USE_POOLS 9 | LWIP_MALLOC_MEMPOOL_START 10 | LWIP_MALLOC_MEMPOOL(100, 256) 11 | LWIP_MALLOC_MEMPOOL(50, 512) 12 | LWIP_MALLOC_MEMPOOL(20, 1024) 13 | LWIP_MALLOC_MEMPOOL(20, 1536) 14 | LWIP_MALLOC_MEMPOOL_END 15 | #endif /* MEM_USE_POOLS */ 16 | 17 | /* Optional: Your custom pools can go here if you would like to use 18 | * lwIP's memory pools for anything else. 19 | */ 20 | LWIP_MEMPOOL(SYS_MBOX, 22, 100, "SYS_MBOX") 21 | -------------------------------------------------------------------------------- /apps/LwipMibCompiler/SharpSnmpLib/Mib/Elements/Entities/ObjectIdentity.cs: -------------------------------------------------------------------------------- 1 | 2 | namespace Lextm.SharpSnmpLib.Mib.Elements.Entities 3 | { 4 | /// 5 | /// Object identifier node. 6 | /// 7 | public sealed class ObjectIdentity : EntityBase 8 | { 9 | 10 | /// 11 | /// Creates a . 12 | /// 13 | /// Module name 14 | /// Header 15 | /// Lexer 16 | public ObjectIdentity(IModule module, SymbolList preAssignSymbols, ISymbolEnumerator symbols) 17 | : base(module, preAssignSymbols, symbols) 18 | { 19 | } 20 | } 21 | } -------------------------------------------------------------------------------- /apps/LwipMibCompiler/SharpSnmpLib/Mib/Elements/Types/IpAddressType.cs: -------------------------------------------------------------------------------- 1 | 2 | namespace Lextm.SharpSnmpLib.Mib.Elements.Types 3 | { 4 | public class IpAddressType : OctetStringType 5 | { 6 | public IpAddressType(IModule module, string name, ISymbolEnumerator symbols) 7 | : base(module, name, symbols) 8 | { 9 | if (this.Size.Count != 0) 10 | { 11 | throw new MibException("Size definition not allowed for IpAddress type!"); 12 | } 13 | 14 | // IpAddress type is defined as: 15 | // IpAddress ::= 16 | // [APPLICATION 0] 17 | // IMPLICIT OCTET STRING (SIZE (4)) 18 | this.Size.Add(new ValueRange(4, null)); 19 | } 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /ports/win32/check/config.h: -------------------------------------------------------------------------------- 1 | /* config.h for check-0.11.0 on win32 under MSVC/MinGW */ 2 | 3 | #ifdef _MSC_VER 4 | 5 | typedef unsigned int pid_t; 6 | typedef unsigned int uint32_t; 7 | 8 | #define ssize_t size_t 9 | #define snprintf _snprintf 10 | 11 | #define HAVE_DECL_STRDUP 1 12 | #define HAVE_DECL_FILENO 1 13 | #define HAVE_DECL_PUTENV 1 14 | 15 | #define _CRT_SECURE_NO_WARNINGS 16 | 17 | /* disable some warnings */ 18 | #pragma warning (disable: 4090) /* const assigned to non-const */ 19 | #pragma warning (disable: 4996) /* fileno is deprecated */ 20 | 21 | #endif /* _ MSC_VER */ 22 | 23 | 24 | #define LWIP_UNITTESTS_NOFORK 25 | 26 | #include 27 | 28 | typedef unsigned int clockid_t; 29 | typedef unsigned int timer_t; 30 | #define STRUCT_TIMESPEC_DEFINITION_MISSING 31 | -------------------------------------------------------------------------------- /ports/win32/pcapif.h: -------------------------------------------------------------------------------- 1 | #ifndef LWIP_PCAPIF_H 2 | #define LWIP_PCAPIF_H 3 | 4 | #ifdef __cplusplus 5 | extern "C" { 6 | #endif 7 | 8 | #include "lwip/err.h" 9 | 10 | /** Set to 1 to let rx use an own thread (only for NO_SYS==0). 11 | * If set to 0, ethernetif_poll is used to poll for packets. 12 | */ 13 | #ifndef PCAPIF_RX_USE_THREAD 14 | #define PCAPIF_RX_USE_THREAD !NO_SYS 15 | #endif 16 | #if PCAPIF_RX_USE_THREAD && NO_SYS 17 | #error "Can't create a dedicated RX thread with NO_SYS==1" 18 | #endif 19 | 20 | struct netif; 21 | 22 | err_t pcapif_init (struct netif *netif); 23 | void pcapif_shutdown(struct netif *netif); 24 | #if !PCAPIF_RX_USE_THREAD 25 | void pcapif_poll (struct netif *netif); 26 | #endif /* !PCAPIF_RX_USE_THREAD */ 27 | 28 | #ifdef __cplusplus 29 | } 30 | #endif 31 | 32 | #endif /* LWIP_PCAPIF_H */ 33 | -------------------------------------------------------------------------------- /ports/unix/lib/README: -------------------------------------------------------------------------------- 1 | This directory contains an example of how to compile lwIP as a self 2 | initialising shared library on Linux. 3 | 4 | Some brief instructions: 5 | 6 | * Compile the code: 7 | 8 | > make clean all 9 | 10 | This should produce liblwip4unixlib.so. This is the shared library. 11 | 12 | * Link an application against the shared library 13 | 14 | If you're using gcc you can do this by including -llwip4unixlib in 15 | your link command. 16 | 17 | * Run your application 18 | 19 | Ensure that LD_LIBRARY_PATH includes the directory that contains 20 | liblwip4unixlib.so (ie. this directory) 21 | 22 | 23 | 24 | If you are unsure about shared libraries and libraries on linux in 25 | general, you might find this HOWTO useful: 26 | 27 | 28 | 29 | 30 | 31 | Kieran Mansley, October 2002. -------------------------------------------------------------------------------- /ports/old/coldfire/README: -------------------------------------------------------------------------------- 1 | ### README --- c:/cygwin/home/dhaas/work/cfimage/lwip/arch/coldfire/ 2 | 3 | ## 4 | ## Author: dhaas@alum.rpi.edu 5 | 6 | These files are a port of lwip to coldfire (specifically the MCF5272 with 7 | on-board FEC) under the Nucleus OS. Nucleus is pretty generic so it should be 8 | fairly easy to port this to any other embedded OS. Nucleus memory managment 9 | is not used. It is assumed you have a working malloc (which at least 10 | long-word aligns memory). 11 | 12 | The compiler used was Diab 4.3b. You will almost certainly need to change 13 | cc.h for your compiler. 14 | 15 | IMPORTANT NOTE: If you use the fec driver for a different processor which has 16 | a data cache you will need to make sure the buffer descriptors and memory 17 | used for pbufs are not in a cachable area. Otherwise the fec driver is 18 | guarrenteed to malfunction. The 5272 which this was written for does not 19 | support data cache so it did not matter and malloc was used. 20 | 21 | -------------------------------------------------------------------------------- /apps/LwipMibCompiler/SharpSnmpLib/Mib/Elements/Entities/OidValueAssignment.cs: -------------------------------------------------------------------------------- 1 | /* 2 | * Created by SharpDevelop. 3 | * User: lextm 4 | * Date: 2008/5/17 5 | * Time: 20:49 6 | * 7 | * To change this template use Tools | Options | Coding | Edit Standard Headers. 8 | */ 9 | 10 | using System; 11 | 12 | namespace Lextm.SharpSnmpLib.Mib.Elements.Entities 13 | { 14 | /// 15 | /// Object identifier node. 16 | /// 17 | public sealed class OidValueAssignment : EntityBase 18 | { 19 | /// 20 | /// Creates a . 21 | /// 22 | /// Module 23 | /// Name 24 | /// Lexer 25 | public OidValueAssignment(IModule module, SymbolList preAssignSymbols, ISymbolEnumerator symbols) 26 | : base(module, preAssignSymbols, symbols) 27 | { 28 | } 29 | } 30 | } -------------------------------------------------------------------------------- /apps/LwipMibCompiler/Mibs/RFC-1215: -------------------------------------------------------------------------------- 1 | RFC-1215 DEFINITIONS ::= BEGIN 2 | 3 | IMPORTS 4 | ObjectName 5 | FROM RFC1155-SMI; 6 | 7 | TRAP-TYPE MACRO ::= 8 | BEGIN 9 | TYPE NOTATION ::= "ENTERPRISE" value 10 | (enterprise OBJECT IDENTIFIER) 11 | VarPart 12 | DescrPart 13 | ReferPart 14 | VALUE NOTATION ::= value (VALUE INTEGER) 15 | 16 | VarPart ::= 17 | "VARIABLES" "{" VarTypes "}" 18 | | empty 19 | VarTypes ::= 20 | VarType | VarTypes "," VarType 21 | VarType ::= 22 | value (vartype ObjectName) 23 | 24 | DescrPart ::= 25 | "DESCRIPTION" value (description DisplayString) 26 | | empty 27 | 28 | ReferPart ::= 29 | "REFERENCE" value (reference DisplayString) 30 | | empty 31 | 32 | END 33 | 34 | END 35 | -------------------------------------------------------------------------------- /apps/LwipMibCompiler/SharpSnmpLib/Mib/Elements/Types/Macro.cs: -------------------------------------------------------------------------------- 1 | 2 | namespace Lextm.SharpSnmpLib.Mib.Elements.Types 3 | { 4 | public sealed class Macro : ITypeAssignment 5 | { 6 | private IModule _module; 7 | private string _name; 8 | 9 | [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Performance", "CA1804:RemoveUnusedLocals", MessageId = "temp")] 10 | public Macro(IModule module, SymbolList preAssignSymbols, ISymbolEnumerator symbols) 11 | { 12 | _module = module; 13 | _name = preAssignSymbols[0].ToString(); 14 | 15 | while (symbols.NextNonEOLSymbol() != Symbol.Begin) 16 | { 17 | } 18 | 19 | while (symbols.NextNonEOLSymbol() != Symbol.End) 20 | { 21 | } 22 | } 23 | 24 | public IModule Module 25 | { 26 | get { return _module; } 27 | } 28 | 29 | public string Name 30 | { 31 | get { return _name; } 32 | } 33 | } 34 | } -------------------------------------------------------------------------------- /ports/win32/msvc/lwIP_pcapif.vcxproj.filters: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | {0d38b8c3-e694-4572-89b8-fc6e825a092d} 6 | cpp;c;cxx;rc;def;r;odl;idl;hpj;bat 7 | 8 | 9 | {e5ce29d5-319e-4e99-978b-b88e8d6167e4} 10 | 11 | 12 | 13 | 14 | Source Files 15 | 16 | 17 | Source Files 18 | 19 | 20 | 21 | 22 | Header Files 23 | 24 | 25 | Header Files 26 | 27 | 28 | -------------------------------------------------------------------------------- /apps/LwipMibCompiler/SharpSnmpLib/Mib/Elements/Types/OctetStringType.cs: -------------------------------------------------------------------------------- 1 | using System.Collections.Generic; 2 | 3 | namespace Lextm.SharpSnmpLib.Mib.Elements.Types 4 | { 5 | public class OctetStringType : BaseType 6 | { 7 | private ValueRanges _size; 8 | 9 | public OctetStringType(IModule module, string name, ISymbolEnumerator symbols) 10 | : base(module, name) 11 | { 12 | Symbol current = symbols.NextNonEOLSymbol(); 13 | if (current == Symbol.OpenParentheses) 14 | { 15 | symbols.PutBack(current); 16 | _size = Lexer.DecodeRanges(symbols); 17 | current.Assert(_size.IsSizeDeclaration, "SIZE keyword is required for ranges of octet string!"); 18 | } 19 | else 20 | { 21 | symbols.PutBack(current); 22 | _size = new ValueRanges(isSizeDecl: true); 23 | } 24 | } 25 | 26 | public ValueRanges Size 27 | { 28 | get { return _size; } 29 | } 30 | } 31 | } 32 | -------------------------------------------------------------------------------- /apps/LwipMibCompiler/SharpSnmpLib/Mib/Elements/Entities/AgentCapabilities.cs: -------------------------------------------------------------------------------- 1 | /* 2 | * Created by SharpDevelop. 3 | * User: lextm 4 | * Date: 2008/5/31 5 | * Time: 13:18 6 | * 7 | * To change this template use Tools | Options | Coding | Edit Standard Headers. 8 | */ 9 | 10 | namespace Lextm.SharpSnmpLib.Mib.Elements.Entities 11 | { 12 | /// 13 | /// The AGENT-CAPABILITIES construct is used to specify implementation characteristics of an SNMP agent sub-system with respect to object types and events. 14 | /// 15 | public sealed class AgentCapabilities : EntityBase 16 | { 17 | /// 18 | /// Creates an instance. 19 | /// 20 | /// 21 | /// 22 | /// 23 | public AgentCapabilities(IModule module, SymbolList preAssignSymbols, ISymbolEnumerator symbols) 24 | : base(module, preAssignSymbols, symbols) 25 | { 26 | } 27 | 28 | } 29 | } -------------------------------------------------------------------------------- /apps/LwipMibCompiler/SharpSnmpLib/Mib/Elements/Types/Choice.cs: -------------------------------------------------------------------------------- 1 | /* 2 | * Created by SharpDevelop. 3 | * User: lextm 4 | * Date: 2008/5/31 5 | * Time: 11:39 6 | * 7 | * To change this template use Tools | Options | Coding | Edit Standard Headers. 8 | */ 9 | 10 | namespace Lextm.SharpSnmpLib.Mib.Elements.Types 11 | { 12 | /// 13 | /// The CHOICE type represents a list of alternatives.. 14 | /// 15 | public sealed class Choice : BaseType 16 | { 17 | /// 18 | /// Creates a instance. 19 | /// 20 | /// 21 | /// 22 | /// 23 | public Choice(IModule module, string name, ISymbolEnumerator symbols) 24 | : base(module, name) 25 | { 26 | while (symbols.NextNonEOLSymbol() != Symbol.OpenBracket) 27 | { 28 | } 29 | 30 | while (symbols.NextNonEOLSymbol() != Symbol.CloseBracket) 31 | { 32 | } 33 | } 34 | } 35 | } -------------------------------------------------------------------------------- /ports/win32/readme.txt: -------------------------------------------------------------------------------- 1 | lwIP for Win32 2 | 3 | This is an example port of lwIP for Win32. It uses WinPCAP to send & receive packets. 4 | To compile it, use the MSVC projects in the 'msvc' subdir or the Makefile in the 'mingw' subdir. 5 | 6 | For both compilers: 7 | - the lwIP core repository must be in a folder "lwip" next to the "contrib" folder 8 | - you have to set an environment variable PCAP_DIR pointing to the WinPcap Developer's 9 | Pack (containing 'include' and 'lib') 10 | 11 | You also will have to copy the file 'lwipcfg_msvc.h.example' to 12 | 'lwipcfg_msvc.h' and modify to suit your needs (WinPcap adapter number, 13 | IP configuration, applications...). 14 | 15 | Included in the contrib\ports\win32 directory is the network interface driver 16 | using the winpcap library. 17 | 18 | lwIP: http://savannah.nongnu.org/projects/lwip/ 19 | WinPCap: https://www.winpcap.org/devel.htm 20 | Visual C++: http://www.microsoft.com/express/download/ 21 | 22 | To compile the unittests (msvc\lwIP_unittests.sln), download check (tested with v0.11.0) from 23 | https://github.com/libcheck/check/releases/ 24 | and place it in a folder "check" next to the "contrib" folder. 25 | -------------------------------------------------------------------------------- /apps/LwipMibCompiler/MibViewer/Properties/Settings.Designer.cs: -------------------------------------------------------------------------------- 1 | //------------------------------------------------------------------------------ 2 | // 3 | // Dieser Code wurde von einem Tool generiert. 4 | // Laufzeitversion:4.0.30319.225 5 | // 6 | // Änderungen an dieser Datei können falsches Verhalten verursachen und gehen verloren, wenn 7 | // der Code erneut generiert wird. 8 | // 9 | //------------------------------------------------------------------------------ 10 | 11 | namespace LwipMibViewer.Properties { 12 | 13 | 14 | [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] 15 | [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "10.0.0.0")] 16 | internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase { 17 | 18 | private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings()))); 19 | 20 | public static Settings Default { 21 | get { 22 | return defaultInstance; 23 | } 24 | } 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /apps/netio/netio.c: -------------------------------------------------------------------------------- 1 | #include "netio.h" 2 | 3 | #include "lwip/opt.h" 4 | #include "lwip/tcp.h" 5 | 6 | /* See http://www.nwlab.net/art/netio/netio.html to get the netio tool */ 7 | 8 | #if LWIP_TCP && LWIP_CALLBACK_API 9 | static err_t 10 | netio_recv(void *arg, struct tcp_pcb *pcb, struct pbuf *p, err_t err) 11 | { 12 | LWIP_UNUSED_ARG(arg); 13 | 14 | if (err == ERR_OK && p != NULL) { 15 | tcp_recved(pcb, p->tot_len); 16 | pbuf_free(p); 17 | } else { 18 | pbuf_free(p); 19 | } 20 | 21 | if (err == ERR_OK && p == NULL) { 22 | tcp_arg(pcb, NULL); 23 | tcp_sent(pcb, NULL); 24 | tcp_recv(pcb, NULL); 25 | tcp_close(pcb); 26 | } 27 | 28 | return ERR_OK; 29 | } 30 | 31 | static err_t 32 | netio_accept(void *arg, struct tcp_pcb *pcb, err_t err) 33 | { 34 | LWIP_UNUSED_ARG(arg); 35 | LWIP_UNUSED_ARG(err); 36 | 37 | if (pcb != NULL) { 38 | tcp_arg(pcb, NULL); 39 | tcp_sent(pcb, NULL); 40 | tcp_recv(pcb, netio_recv); 41 | } 42 | return ERR_OK; 43 | } 44 | 45 | void 46 | netio_init(void) 47 | { 48 | struct tcp_pcb *pcb; 49 | 50 | pcb = tcp_new_ip_type(IPADDR_TYPE_ANY); 51 | tcp_bind(pcb, IP_ANY_TYPE, 18767); 52 | pcb = tcp_listen(pcb); 53 | tcp_accept(pcb, netio_accept); 54 | } 55 | #endif /* LWIP_TCP && LWIP_CALLBACK_API */ 56 | -------------------------------------------------------------------------------- /apps/LwipMibCompiler/SharpSnmpLib/Mib/Elements/Entities/EntityBase.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | 3 | namespace Lextm.SharpSnmpLib.Mib.Elements.Entities 4 | { 5 | public abstract class EntityBase: IEntity 6 | { 7 | private readonly IModule _module; 8 | private string _parent; 9 | private readonly uint _value; 10 | private readonly string _name; 11 | 12 | public EntityBase(IModule module, SymbolList preAssignSymbols, ISymbolEnumerator symbols) 13 | { 14 | _module = module; 15 | _name = preAssignSymbols[0].ToString(); 16 | 17 | Lexer.ParseOidValue(symbols, out _parent, out _value); 18 | } 19 | 20 | public IModule Module 21 | { 22 | get { return _module; } 23 | } 24 | 25 | public string Parent 26 | { 27 | get { return _parent; } 28 | set { _parent = value; } 29 | } 30 | 31 | public uint Value 32 | { 33 | get { return _value; } 34 | } 35 | 36 | public string Name 37 | { 38 | get { return _name; } 39 | } 40 | 41 | public virtual string Description 42 | { 43 | get { return string.Empty; } 44 | } 45 | } 46 | } 47 | -------------------------------------------------------------------------------- /apps/LwipMibCompiler/SharpSnmpLib/Mib/Elements/TrapType.cs: -------------------------------------------------------------------------------- 1 | /* 2 | * Created by SharpDevelop. 3 | * User: lextm 4 | * Date: 2008/5/31 5 | * Time: 12:20 6 | * 7 | * To change this template use Tools | Options | Coding | Edit Standard Headers. 8 | */ 9 | 10 | namespace Lextm.SharpSnmpLib.Mib.Elements 11 | { 12 | public sealed class TrapType : IDeclaration 13 | { 14 | private readonly IModule _module; 15 | private readonly string _name; 16 | private readonly int _value; 17 | 18 | public TrapType(IModule module, SymbolList preAssignSymbols, ISymbolEnumerator symbols) 19 | { 20 | _module = module; 21 | _name = preAssignSymbols[0].ToString(); 22 | 23 | Symbol valueSymbol = symbols.NextNonEOLSymbol(); 24 | 25 | bool succeeded = int.TryParse(valueSymbol.ToString(), out _value); 26 | valueSymbol.Assert(succeeded, "not a decimal"); 27 | } 28 | 29 | public int Value 30 | { 31 | get { return _value; } 32 | } 33 | 34 | #region IDeclaration Member 35 | 36 | public IModule Module 37 | { 38 | get { return _module; } 39 | } 40 | 41 | public string Name 42 | { 43 | get { return _name; } 44 | } 45 | 46 | #endregion 47 | } 48 | } -------------------------------------------------------------------------------- /apps/LwipMibCompiler/SharpSnmpLib/Mib/Elements/IElement.cs: -------------------------------------------------------------------------------- 1 | // Construct interface. 2 | // Copyright (C) 2008-2010 Malcolm Crowe, Lex Li, and other contributors. 3 | // 4 | // This library is free software; you can redistribute it and/or 5 | // modify it under the terms of the GNU Lesser General Public 6 | // License as published by the Free Software Foundation; either 7 | // version 2.1 of the License, or (at your option) any later version. 8 | // 9 | // This library is distributed in the hope that it will be useful, 10 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 12 | // Lesser General Public License for more details. 13 | // 14 | // You should have received a copy of the GNU Lesser General Public 15 | // License along with this library; if not, write to the Free Software 16 | // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 17 | 18 | namespace Lextm.SharpSnmpLib.Mib.Elements 19 | { 20 | /// 21 | /// Construct interface. 22 | /// 23 | [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Design", "CA1040:AvoidEmptyInterfaces")] 24 | public interface IElement 25 | { 26 | /// 27 | /// Containing module. 28 | /// 29 | IModule Module 30 | { 31 | get; 32 | } 33 | 34 | } 35 | } -------------------------------------------------------------------------------- /ports/old/FILES: -------------------------------------------------------------------------------- 1 | This directory contains ports that are no longer actively maintained. 2 | 3 | 6502/ - Architectural files for the 6502 CPU. 4 | 5 | c16x/ - Architectural files for the C16x/ST10 uC. 6 | Supports lwIP Raw API only. 7 | CS8900a Ethernet driver for 16-bit mode. 8 | 9 | rtxc/ - Architectural files for the RTXC operating system. 10 | 11 | v2pro/ - Architectural files for the Xilinx Virtex-II PRO device with 12 | embedded PowerPC 405 Processor. Supports lwIP Raw API only. 13 | (requires EDK - http://www.xilinx.com/ise/embedded/edk.htm) 14 | 15 | coldfire/ - Architectural files for Motorola Coldfire 5272 CPU running 16 | under Nucleus OS. Supports DMA and ISRs in ethernet driver. 17 | 18 | ti_c6711/ - Architectural files for TI TMS320C6000 DSP running under uC/OS-II. 19 | Supports lwIP Raw API only. 20 | It's done with an 10/100M ethernet daughtercard. 21 | [more info at https://sourceforge.net/projects/ucos-lwip-c6x/] 22 | 23 | 24 | Each subdirectory (may) also include: 25 | 26 | perf.c - Optional file that should be implemented when running 27 | performance tests of lwIP. 28 | 29 | sys.c - Implementation of the operating system emulation layer. 30 | 31 | include/ - Architectural specific header files. 32 | 33 | netif/ - Architectural specific network interfaces. 34 | 35 | -------------------------------------------------------------------------------- /apps/LwipMibCompiler/SharpSnmpLib/Mib/ObjectIdentifier.cs: -------------------------------------------------------------------------------- 1 | using System.Collections.Generic; 2 | using System.Text; 3 | 4 | namespace Lextm.SharpSnmpLib.Mib 5 | { 6 | public class ObjectIdentifier: List> 7 | { 8 | public void Add(string name, uint oid) 9 | { 10 | this.Add(new KeyValuePair(name, oid)); 11 | } 12 | 13 | public void Prepend(string name, uint oid) 14 | { 15 | this.Insert(0, new KeyValuePair(name, oid)); 16 | } 17 | 18 | public void Insert(int index, string name, uint oid) 19 | { 20 | this.Insert(index, new KeyValuePair(name, oid)); 21 | } 22 | 23 | public string GetOidString() 24 | { 25 | StringBuilder result = new StringBuilder(); 26 | 27 | foreach (KeyValuePair level in this) 28 | { 29 | result.Append(level.Value); 30 | result.Append('.'); 31 | } 32 | 33 | if (result.Length > 0) 34 | { 35 | result.Length--; 36 | } 37 | 38 | return result.ToString(); 39 | } 40 | 41 | public uint[] GetOidValues() 42 | { 43 | List result = new List(); 44 | 45 | foreach (KeyValuePair level in this) 46 | { 47 | result.Add(level.Value); 48 | } 49 | 50 | return result.ToArray(); 51 | } 52 | 53 | } 54 | } 55 | -------------------------------------------------------------------------------- /apps/LwipMibCompiler/SharpSnmpLib/Mib/Elements/Exports.cs: -------------------------------------------------------------------------------- 1 | /* 2 | * Created by SharpDevelop. 3 | * User: lextm 4 | * Date: 2008/6/7 5 | * Time: 17:34 6 | * 7 | * To change this template use Tools | Options | Coding | Edit Standard Headers. 8 | */ 9 | 10 | using System.Collections.Generic; 11 | 12 | namespace Lextm.SharpSnmpLib.Mib.Elements 13 | { 14 | /// 15 | /// Description of Exports. 16 | /// 17 | public sealed class Exports: IElement 18 | { 19 | private IModule _module; 20 | private readonly IList _types = new List(); 21 | 22 | public Exports(IModule module, ISymbolEnumerator s) 23 | { 24 | _module = module; 25 | 26 | Symbol previous = null; 27 | Symbol current; 28 | do 29 | { 30 | current = s.NextSymbol(); 31 | 32 | if (current == Symbol.EOL) 33 | { 34 | continue; 35 | } 36 | else if (((current == Symbol.Comma) || (current == Symbol.Semicolon)) && (previous != null)) 37 | { 38 | previous.AssertIsValidIdentifier(); 39 | _types.Add(previous.ToString()); 40 | } 41 | 42 | previous = current; 43 | } 44 | while (current != Symbol.Semicolon); 45 | } 46 | 47 | #region IElement Member 48 | 49 | public IModule Module 50 | { 51 | get { return _module; } 52 | } 53 | 54 | #endregion 55 | } 56 | } -------------------------------------------------------------------------------- /ports/win32/check/time.c: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | #include 4 | #if defined(_MSC_VER) || defined(_MSC_EXTENSIONS) 5 | #define DELTA_EPOCH_IN_MICROSECS 11644473600000000Ui64 6 | #else 7 | #define DELTA_EPOCH_IN_MICROSECS 11644473600000000ULL 8 | #endif 9 | 10 | #include "config.h" 11 | 12 | struct timezone 13 | { 14 | int tz_minuteswest; /* minutes W of Greenwich */ 15 | int tz_dsttime; /* type of dst correction */ 16 | }; 17 | 18 | int gettimeofday(struct timeval *tv, struct timezone *tz) 19 | { 20 | FILETIME ft; 21 | unsigned __int64 tmpres = 0; 22 | static int tzflag; 23 | 24 | if (NULL != tv) 25 | { 26 | GetSystemTimeAsFileTime(&ft); 27 | 28 | tmpres |= ft.dwHighDateTime; 29 | tmpres <<= 32; 30 | tmpres |= ft.dwLowDateTime; 31 | 32 | /*converting file time to unix epoch*/ 33 | tmpres -= DELTA_EPOCH_IN_MICROSECS; 34 | tmpres /= 10; /*convert into microseconds*/ 35 | tv->tv_sec = (long)(tmpres / 1000000UL); 36 | tv->tv_usec = (long)(tmpres % 1000000UL); 37 | } 38 | 39 | if (NULL != tz) 40 | { 41 | if (!tzflag) 42 | { 43 | _tzset(); 44 | tzflag++; 45 | } 46 | tz->tz_minuteswest = _timezone / 60; 47 | tz->tz_dsttime = _daylight; 48 | } 49 | 50 | return 0; 51 | } 52 | 53 | struct tm * 54 | localtime_r(const time_t *timer, struct tm *result) 55 | { 56 | struct tm *local_result; 57 | local_result = localtime (timer); 58 | 59 | if (local_result == NULL || result == NULL) 60 | return NULL; 61 | 62 | memcpy(result, local_result, sizeof (result)); 63 | return result; 64 | } 65 | -------------------------------------------------------------------------------- /apps/LwipMibCompiler/SharpSnmpLib/Mib/Elements/Types/Sequence.cs: -------------------------------------------------------------------------------- 1 | /* 2 | * Created by SharpDevelop. 3 | * User: lextm 4 | * Date: 2008/5/21 5 | * Time: 19:43 6 | * 7 | * To change this template use Tools | Options | Coding | Edit Standard Headers. 8 | */ 9 | 10 | 11 | namespace Lextm.SharpSnmpLib.Mib.Elements.Types 12 | { 13 | /// 14 | /// The SEQUENCE type represents a set of specified types. This is roughtly analogous to a struct in C. 15 | /// 16 | public sealed class Sequence : BaseType 17 | { 18 | /// 19 | /// Creates a instance. 20 | /// 21 | /// The module. 22 | /// The name. 23 | /// The enumerator. 24 | public Sequence(IModule module, string name, ISymbolEnumerator symbols) 25 | : base(module, name) 26 | { 27 | // parse between ( ) 28 | Symbol temp = symbols.NextNonEOLSymbol(); 29 | int bracketSection = 0; 30 | temp.Expect(Symbol.OpenBracket); 31 | bracketSection++; 32 | while (bracketSection > 0) 33 | { 34 | temp = symbols.NextNonEOLSymbol(); 35 | if (temp == Symbol.OpenBracket) 36 | { 37 | bracketSection++; 38 | } 39 | else if (temp == Symbol.CloseBracket) 40 | { 41 | bracketSection--; 42 | } 43 | } 44 | } 45 | } 46 | } -------------------------------------------------------------------------------- /apps/LwipMibCompiler/MibViewer/Properties/AssemblyInfo.cs: -------------------------------------------------------------------------------- 1 | using System.Reflection; 2 | using System.Runtime.CompilerServices; 3 | using System.Runtime.InteropServices; 4 | 5 | // Allgemeine Informationen über eine Assembly werden über die folgenden 6 | // Attribute gesteuert. Ändern Sie diese Attributwerte, um die Informationen zu ändern, 7 | // die mit einer Assembly verknüpft sind. 8 | [assembly: AssemblyTitle("LwipMibViewer")] 9 | [assembly: AssemblyDescription("")] 10 | [assembly: AssemblyConfiguration("")] 11 | [assembly: AssemblyCompany("")] 12 | [assembly: AssemblyProduct("LwipMibViewer")] 13 | [assembly: AssemblyCopyright("Copyright © 2015")] 14 | [assembly: AssemblyTrademark("")] 15 | [assembly: AssemblyCulture("")] 16 | 17 | // Durch Festlegen von ComVisible auf "false" werden die Typen in dieser Assembly unsichtbar 18 | // für COM-Komponenten. Wenn Sie auf einen Typ in dieser Assembly von 19 | // COM zugreifen müssen, legen Sie das ComVisible-Attribut für diesen Typ auf "true" fest. 20 | [assembly: ComVisible(false)] 21 | 22 | // Die folgende GUID bestimmt die ID der Typbibliothek, wenn dieses Projekt für COM verfügbar gemacht wird 23 | [assembly: Guid("7ffbd1c1-1c64-45bb-b243-2400446c649d")] 24 | 25 | // Versionsinformationen für eine Assembly bestehen aus den folgenden vier Werten: 26 | // 27 | // Hauptversion 28 | // Nebenversion 29 | // Buildnummer 30 | // Revision 31 | // 32 | // Sie können alle Werte angeben oder die standardmäßigen Build- und Revisionsnummern 33 | // übernehmen, indem Sie "*" eingeben: 34 | // [assembly: AssemblyVersion("1.0.*")] 35 | [assembly: AssemblyVersion("1.0.0.0")] 36 | [assembly: AssemblyFileVersion("1.0.0.0")] 37 | -------------------------------------------------------------------------------- /apps/LwipMibCompiler/CCodeGeneration/Properties/AssemblyInfo.cs: -------------------------------------------------------------------------------- 1 | using System.Reflection; 2 | using System.Runtime.CompilerServices; 3 | using System.Runtime.InteropServices; 4 | 5 | // Allgemeine Informationen über eine Assembly werden über die folgenden 6 | // Attribute gesteuert. Ändern Sie diese Attributwerte, um die Informationen zu ändern, 7 | // die mit einer Assembly verknüpft sind. 8 | [assembly: AssemblyTitle("CCodeGeneration")] 9 | [assembly: AssemblyDescription("")] 10 | [assembly: AssemblyConfiguration("")] 11 | [assembly: AssemblyCompany("")] 12 | [assembly: AssemblyProduct("CCodeGeneration")] 13 | [assembly: AssemblyCopyright("Copyright © 2015")] 14 | [assembly: AssemblyTrademark("")] 15 | [assembly: AssemblyCulture("")] 16 | 17 | // Durch Festlegen von ComVisible auf "false" werden die Typen in dieser Assembly unsichtbar 18 | // für COM-Komponenten. Wenn Sie auf einen Typ in dieser Assembly von 19 | // COM zugreifen müssen, legen Sie das ComVisible-Attribut für diesen Typ auf "true" fest. 20 | [assembly: ComVisible(false)] 21 | 22 | // Die folgende GUID bestimmt die ID der Typbibliothek, wenn dieses Projekt für COM verfügbar gemacht wird 23 | [assembly: Guid("8f07a0fa-86f4-48a0-97c7-f94fc5c3f103")] 24 | 25 | // Versionsinformationen für eine Assembly bestehen aus den folgenden vier Werten: 26 | // 27 | // Hauptversion 28 | // Nebenversion 29 | // Buildnummer 30 | // Revision 31 | // 32 | // Sie können alle Werte angeben oder die standardmäßigen Build- und Revisionsnummern 33 | // übernehmen, indem Sie "*" eingeben: 34 | // [assembly: AssemblyVersion("1.0.*")] 35 | [assembly: AssemblyVersion("1.0.0.0")] 36 | [assembly: AssemblyFileVersion("1.0.0.0")] 37 | -------------------------------------------------------------------------------- /ports/old/ecos/README: -------------------------------------------------------------------------------- 1 | This part of the lwip-contrib section is the ecos glue 2 | 3 | Check out latest ecos from CVS (>= 19 Jan 2004) so it has the latest io/eth glue for lwip. 4 | 5 | You must have the current lwip sources checked out and the scripts here will hopefully generate 6 | a correct EPK suitable for use with ecos. 7 | 8 | 9 | To make an ecos package: 10 | 11 | Run the mkepk script something like this 12 | 13 | # EPK=/dir/of/epk LWIP_CVS=/dir/of/checked/out/lwip ./mkepk 14 | 15 | This will put the generated EPK in the dir you specify 16 | 17 | 18 | then add that EPK to your package repository and use it 19 | 20 | Build example: 21 | #ecosconfig new edb7xxx kernel 22 | #ecosconfig add lwip 23 | this will default to SLIP connection.If you also 24 | #ecosconfig add net_drivers 25 | you'll be able to configure for ethernet 26 | 27 | In both cases set LWIP_MY_ADDR and LWIP_SERV_ADDR (means host/gateway for eth or host/peer for slip) 28 | #ecosconfig tree 29 | #make tests 30 | and you can try any of the five tests included 31 | 32 | Tests: 33 | udpecho - echo service port 7 on UDP 34 | tcpecho - ditto on TCP 35 | sockets - as tcpecho but written with the socket API not the lwip specific API 36 | https - http server on port 80 written with the raw API 37 | nc_test_slave - a port of the test with the same name in net/common to lwip. Used to compare 38 | lwIP throughput to that of the FreeBSD stack.In this matchup lwIP gets a well deserved 39 | silver medal.Not bad for a newcomer ;) 40 | 41 | 42 | Bugreports (or even better patches) at jani@iv.ro not the lwip or ecos mailing lists!! 43 | Only if you peek into the lwip sources and think you found a bug post to lwip-users. 44 | -------------------------------------------------------------------------------- /apps/LwipMibCompiler/LwipMibCompiler/Properties/AssemblyInfo.cs: -------------------------------------------------------------------------------- 1 | using System.Reflection; 2 | using System.Runtime.CompilerServices; 3 | using System.Runtime.InteropServices; 4 | 5 | // Allgemeine Informationen über eine Assembly werden über die folgenden 6 | // Attribute gesteuert. Ändern Sie diese Attributwerte, um die Informationen zu ändern, 7 | // die mit einer Assembly verknüpft sind. 8 | [assembly: AssemblyTitle("ConsoleApplication28")] 9 | [assembly: AssemblyDescription("")] 10 | [assembly: AssemblyConfiguration("")] 11 | [assembly: AssemblyCompany("")] 12 | [assembly: AssemblyProduct("ConsoleApplication28")] 13 | [assembly: AssemblyCopyright("Copyright © 2015")] 14 | [assembly: AssemblyTrademark("")] 15 | [assembly: AssemblyCulture("")] 16 | 17 | // Durch Festlegen von ComVisible auf "false" werden die Typen in dieser Assembly unsichtbar 18 | // für COM-Komponenten. Wenn Sie auf einen Typ in dieser Assembly von 19 | // COM zugreifen müssen, legen Sie das ComVisible-Attribut für diesen Typ auf "true" fest. 20 | [assembly: ComVisible(false)] 21 | 22 | // Die folgende GUID bestimmt die ID der Typbibliothek, wenn dieses Projekt für COM verfügbar gemacht wird 23 | [assembly: Guid("0abf7541-6a96-43cd-9e24-462e074b2c96")] 24 | 25 | // Versionsinformationen für eine Assembly bestehen aus den folgenden vier Werten: 26 | // 27 | // Hauptversion 28 | // Nebenversion 29 | // Buildnummer 30 | // Revision 31 | // 32 | // Sie können alle Werte angeben oder die standardmäßigen Build- und Revisionsnummern 33 | // übernehmen, indem Sie "*" eingeben: 34 | // [assembly: AssemblyVersion("1.0.*")] 35 | [assembly: AssemblyVersion("1.0.0.0")] 36 | [assembly: AssemblyFileVersion("1.0.0.0")] 37 | -------------------------------------------------------------------------------- /apps/LwipMibCompiler/LwipSnmpCodeGeneration/Properties/AssemblyInfo.cs: -------------------------------------------------------------------------------- 1 | using System.Reflection; 2 | using System.Runtime.CompilerServices; 3 | using System.Runtime.InteropServices; 4 | 5 | // Allgemeine Informationen über eine Assembly werden über die folgenden 6 | // Attribute gesteuert. Ändern Sie diese Attributwerte, um die Informationen zu ändern, 7 | // die mit einer Assembly verknüpft sind. 8 | [assembly: AssemblyTitle("LwipSnmpCodeGeneration")] 9 | [assembly: AssemblyDescription("")] 10 | [assembly: AssemblyConfiguration("")] 11 | [assembly: AssemblyCompany("")] 12 | [assembly: AssemblyProduct("LwipSnmpCodeGeneration")] 13 | [assembly: AssemblyCopyright("Copyright © 2015")] 14 | [assembly: AssemblyTrademark("")] 15 | [assembly: AssemblyCulture("")] 16 | 17 | // Durch Festlegen von ComVisible auf "false" werden die Typen in dieser Assembly unsichtbar 18 | // für COM-Komponenten. Wenn Sie auf einen Typ in dieser Assembly von 19 | // COM zugreifen müssen, legen Sie das ComVisible-Attribut für diesen Typ auf "true" fest. 20 | [assembly: ComVisible(false)] 21 | 22 | // Die folgende GUID bestimmt die ID der Typbibliothek, wenn dieses Projekt für COM verfügbar gemacht wird 23 | [assembly: Guid("8cfbbb8b-dfbb-4dd5-80c9-e07845dd58c9")] 24 | 25 | // Versionsinformationen für eine Assembly bestehen aus den folgenden vier Werten: 26 | // 27 | // Hauptversion 28 | // Nebenversion 29 | // Buildnummer 30 | // Revision 31 | // 32 | // Sie können alle Werte angeben oder die standardmäßigen Build- und Revisionsnummern 33 | // übernehmen, indem Sie "*" eingeben: 34 | // [assembly: AssemblyVersion("1.0.*")] 35 | [assembly: AssemblyVersion("1.0.0.0")] 36 | [assembly: AssemblyFileVersion("1.0.0.0")] 37 | -------------------------------------------------------------------------------- /ports/old/v2pro/lib_arch.c: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2001-2003 Swedish Institute of Computer Science. 3 | * All rights reserved. 4 | * 5 | * Redistribution and use in source and binary forms, with or without 6 | * modification, are permitted provided that the following conditions 7 | * are met: 8 | * 9 | * 1. Redistributions of source code must retain the above copyright notice, 10 | * this list of conditions and the following disclaimer. 11 | * 2. Redistributions in binary form must reproduce the above copyright notice, 12 | * this list of conditions and the following disclaimer in the documentation 13 | * and/or other materials provided with the distribution. 14 | * 3. The name of the author may not be used to endorse or promote products 15 | * derived from this software without specific prior written permission. 16 | * 17 | * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED 18 | * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF 19 | * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO 20 | * EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 21 | * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, 22 | * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; 23 | * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, 24 | * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR 25 | * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF 26 | * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 27 | * 28 | * This file is part of the lwIP TCP/IP stack. 29 | * 30 | * Author: Adam Dunkels 31 | * 32 | */ 33 | 34 | -------------------------------------------------------------------------------- /apps/LwipMibCompiler/SharpSnmpLib/Mib/Elements/Types/BaseType.cs: -------------------------------------------------------------------------------- 1 | 2 | namespace Lextm.SharpSnmpLib.Mib.Elements.Types 3 | { 4 | public abstract class BaseType : ITypeAssignment 5 | { 6 | private IModule _module; 7 | private string _name; 8 | 9 | protected BaseType(IModule module, string name) 10 | { 11 | _module = module; 12 | _name = name; 13 | } 14 | 15 | public virtual IModule Module 16 | { 17 | // differentiate between: 18 | // FddiTimeNano ::= INTEGER (0..2147483647) 19 | // which is an IntegerType which appears under Types in a MibModule and therefore has a name and module 20 | // and 21 | // SYNTAX INTEGER (0..2147483647) 22 | // which is also an IntegerType but not defined as a separate type and therefore has NO name and NO module 23 | get 24 | { 25 | if (!string.IsNullOrEmpty(_name)) 26 | { 27 | return _module; 28 | } 29 | else 30 | { 31 | return null; 32 | } 33 | } 34 | protected set { _module = value; } 35 | } 36 | 37 | public virtual string Name 38 | { 39 | get 40 | { 41 | if (!string.IsNullOrEmpty(_name)) 42 | { 43 | return _name; 44 | } 45 | else 46 | { 47 | return "{ Implicit Base Type }"; 48 | } 49 | } 50 | protected set { _name = value; } 51 | } 52 | 53 | } 54 | } 55 | -------------------------------------------------------------------------------- /apps/LwipMibCompiler/SharpSnmpLib/Mib/MibDocument.cs: -------------------------------------------------------------------------------- 1 | /* 2 | * Created by SharpDevelop. 3 | * User: lextm 4 | * Date: 2008/5/17 5 | * Time: 17:38 6 | * 7 | * To change this template use Tools | Options | Coding | Edit Standard Headers. 8 | */ 9 | 10 | using System.Collections.Generic; 11 | 12 | namespace Lextm.SharpSnmpLib.Mib 13 | { 14 | /// 15 | /// MIB document. 16 | /// 17 | public sealed class MibDocument 18 | { 19 | private readonly List _modules = new List(); 20 | 21 | /// 22 | /// Initializes a new instance of the class. 23 | /// 24 | /// The file. 25 | public MibDocument(string file) 26 | : this(new Lexer(file)) 27 | { 28 | } 29 | 30 | /// 31 | /// Initializes a new instance of the class. 32 | /// 33 | /// The lexer. 34 | public MibDocument(Lexer lexer) 35 | { 36 | ISymbolEnumerator symbols = lexer.GetEnumerator(); 37 | 38 | Symbol current; 39 | while ((current = symbols.NextNonEOLSymbol()) != null) 40 | { 41 | symbols.PutBack(current); 42 | _modules.Add(new MibModule(symbols)); 43 | } 44 | } 45 | 46 | /// 47 | /// containing in this document. 48 | /// 49 | public IList Modules 50 | { 51 | get 52 | { 53 | return _modules; 54 | } 55 | } 56 | } 57 | } -------------------------------------------------------------------------------- /ports/old/c16x/include/arch/cc.h: -------------------------------------------------------------------------------- 1 | #ifndef __CC_H__ 2 | #define __CC_H__ 3 | 4 | /* memset(), memcpy() */ 5 | #include 6 | /* printf() and abort() */ 7 | #include 8 | #include 9 | /* isdigit() */ 10 | #include 11 | 12 | #include "arch/cpu.h" 13 | 14 | typedef unsigned char u8_t; 15 | typedef signed char s8_t; 16 | typedef unsigned short u16_t; 17 | typedef signed short s16_t; 18 | typedef unsigned long u32_t; 19 | typedef signed long s32_t; 20 | 21 | typedef u32_t mem_ptr_t; 22 | 23 | /* Define (sn)printf formatters for these lwIP types */ 24 | #define U16_F "hu" 25 | #define S16_F "hd" 26 | #define X16_F "hx" 27 | #define U32_F "lu" 28 | #define S32_F "ld" 29 | #define X32_F "lx" 30 | 31 | /* LW: Supported in at least >=v7.5 r2, but lwIP worked without the "_packed" attribute already */ 32 | #define PACK_STRUCT_BEGIN _packed 33 | #define PACK_STRUCT_STRUCT 34 | #define PACK_STRUCT_END 35 | #define PACK_STRUCT_FIELD(x) x 36 | 37 | #define LWIP_PLATFORM_BYTESWAP 1 38 | #define LWIP_PLATFORM_HTONS(x) _ror(x,8) 39 | #define LWIP_PLATFORM_HTONL(x) c16x_htonl(x) 40 | 41 | _inline u32_t c16x_htonl(u32_t n) 42 | { 43 | u16_t msw, lsw; 44 | 45 | msw = n >> 16; 46 | msw = _ror(msw,8); 47 | lsw = n; 48 | lsw = _ror(lsw,8); 49 | n = ((u32_t)lsw << 16) | (u32_t)msw; 50 | return n; 51 | } 52 | 53 | #ifdef LWIP_DEBUG 54 | 55 | /* LW: forward declaration */ 56 | void debug_printf(char *format, ...); 57 | void page_printf(char *format, ...); 58 | 59 | /* Plaform specific diagnostic output */ 60 | #define LWIP_PLATFORM_DIAG(x) { debug_printf x; } 61 | #define LWIP_PLATFORM_ASSERT(x) { debug_printf("\fline %d in %s\n", __LINE__, __FILE__); while(1); } 62 | 63 | #endif/* LWIP_DEBUG */ 64 | 65 | #endif /* __CC_H__ */ 66 | -------------------------------------------------------------------------------- /ports/old/rtxc/perf.c: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2001-2003 Swedish Institute of Computer Science. 3 | * All rights reserved. 4 | * 5 | * Redistribution and use in source and binary forms, with or without modification, 6 | * are permitted provided that the following conditions are met: 7 | * 8 | * 1. Redistributions of source code must retain the above copyright notice, 9 | * this list of conditions and the following disclaimer. 10 | * 2. Redistributions in binary form must reproduce the above copyright notice, 11 | * this list of conditions and the following disclaimer in the documentation 12 | * and/or other materials provided with the distribution. 13 | * 3. The name of the author may not be used to endorse or promote products 14 | * derived from this software without specific prior written permission. 15 | * 16 | * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED 17 | * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF 18 | * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT 19 | * SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, 20 | * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT 21 | * OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 22 | * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 23 | * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING 24 | * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY 25 | * OF SUCH DAMAGE. 26 | * 27 | * This file is part of the lwIP TCP/IP stack. 28 | * 29 | * Author: Adam Dunkels 30 | * 31 | */ 32 | 33 | #include "arch/perf.h" 34 | 35 | void 36 | perf_init(char *fname) 37 | { 38 | } 39 | -------------------------------------------------------------------------------- /ports/old/coldfire/perf.c: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2001-2003 Swedish Institute of Computer Science. 3 | * All rights reserved. 4 | * 5 | * Redistribution and use in source and binary forms, with or without modification, 6 | * are permitted provided that the following conditions are met: 7 | * 8 | * 1. Redistributions of source code must retain the above copyright notice, 9 | * this list of conditions and the following disclaimer. 10 | * 2. Redistributions in binary form must reproduce the above copyright notice, 11 | * this list of conditions and the following disclaimer in the documentation 12 | * and/or other materials provided with the distribution. 13 | * 3. The name of the author may not be used to endorse or promote products 14 | * derived from this software without specific prior written permission. 15 | * 16 | * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED 17 | * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF 18 | * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT 19 | * SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, 20 | * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT 21 | * OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 22 | * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 23 | * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING 24 | * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY 25 | * OF SUCH DAMAGE. 26 | * 27 | * This file is part of the lwIP TCP/IP stack. 28 | * 29 | * Author: Adam Dunkels 30 | * 31 | */ 32 | 33 | #include "arch/perf.h" 34 | 35 | void 36 | perf_init(char *fname) 37 | { 38 | } 39 | -------------------------------------------------------------------------------- /apps/tcpecho_raw/tcpecho_raw.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2001-2004 Swedish Institute of Computer Science. 3 | * All rights reserved. 4 | * 5 | * Redistribution and use in source and binary forms, with or without modification, 6 | * are permitted provided that the following conditions are met: 7 | * 8 | * 1. Redistributions of source code must retain the above copyright notice, 9 | * this list of conditions and the following disclaimer. 10 | * 2. Redistributions in binary form must reproduce the above copyright notice, 11 | * this list of conditions and the following disclaimer in the documentation 12 | * and/or other materials provided with the distribution. 13 | * 3. The name of the author may not be used to endorse or promote products 14 | * derived from this software without specific prior written permission. 15 | * 16 | * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED 17 | * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF 18 | * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT 19 | * SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, 20 | * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT 21 | * OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 22 | * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 23 | * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING 24 | * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY 25 | * OF SUCH DAMAGE. 26 | * 27 | * This file is part of the lwIP TCP/IP stack. 28 | * 29 | */ 30 | #ifndef LWIP_TCPECHO_RAW_H 31 | #define LWIP_TCPECHO_RAW_H 32 | 33 | void tcpecho_raw_init(void); 34 | 35 | #endif /* LWIP_TCPECHO_RAW_H */ 36 | -------------------------------------------------------------------------------- /ports/old/ecos/header: -------------------------------------------------------------------------------- 1 | //========================================================================== 2 | //####ECOSGPLCOPYRIGHTBEGIN#### 3 | // ------------------------------------------- 4 | // This file is part of eCos, the Embedded Configurable Operating System. 5 | // Copyright (C) 1998, 1999, 2000, 2001, 2002 Red Hat, Inc. 6 | // 7 | // eCos is free software; you can redistribute it and/or modify it under 8 | // the terms of the GNU General Public License as published by the Free 9 | // Software Foundation; either version 2 or (at your option) any later version. 10 | // 11 | // eCos is distributed in the hope that it will be useful, but WITHOUT ANY 12 | // WARRANTY; without even the implied warranty of MERCHANTABILITY or 13 | // FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License 14 | // for more details. 15 | // 16 | // You should have received a copy of the GNU General Public License along 17 | // with eCos; if not, write to the Free Software Foundation, Inc., 18 | // 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. 19 | // 20 | // As a special exception, if other files instantiate templates or use macros 21 | // or inline functions from this file, or you compile this file and link it 22 | // with other works to produce a work based on this file, this file does not 23 | // by itself cause the resulting work to be covered by the GNU General Public 24 | // License. However the source code for this file must still be made available 25 | // in accordance with section (3) of the GNU General Public License. 26 | // 27 | // This exception does not invalidate any other reasons why a work based on 28 | // this file might be covered by the GNU General Public License. 29 | // ------------------------------------------- 30 | //####ECOSGPLCOPYRIGHTEND#### 31 | //========================================================================== 32 | 33 | -------------------------------------------------------------------------------- /ports/old/v2pro/perf.c: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2001-2003 Swedish Institute of Computer Science. 3 | * All rights reserved. 4 | * 5 | * Redistribution and use in source and binary forms, with or without modification, 6 | * are permitted provided that the following conditions are met: 7 | * 8 | * 1. Redistributions of source code must retain the above copyright notice, 9 | * this list of conditions and the following disclaimer. 10 | * 2. Redistributions in binary form must reproduce the above copyright notice, 11 | * this list of conditions and the following disclaimer in the documentation 12 | * and/or other materials provided with the distribution. 13 | * 3. The name of the author may not be used to endorse or promote products 14 | * derived from this software without specific prior written permission. 15 | * 16 | * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED 17 | * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF 18 | * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT 19 | * SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, 20 | * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT 21 | * OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 22 | * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 23 | * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING 24 | * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY 25 | * OF SUCH DAMAGE. 26 | * 27 | * This file is part of the lwIP TCP/IP stack. 28 | * 29 | * Author: Adam Dunkels 30 | * 31 | */ 32 | 33 | #include "arch/perf.h" 34 | 35 | void 36 | perf_init(char *fname) 37 | { 38 | return; 39 | } 40 | 41 | -------------------------------------------------------------------------------- /apps/LwipMibCompiler/SharpSnmpLib/Mib/Elements/ImportsFrom.cs: -------------------------------------------------------------------------------- 1 | /* 2 | * Created by SharpDevelop. 3 | * User: lextm 4 | * Date: 2008/5/31 5 | * Time: 12:07 6 | * 7 | * To change this template use Tools | Options | Coding | Edit Standard Headers. 8 | */ 9 | 10 | using System.Collections.Generic; 11 | 12 | namespace Lextm.SharpSnmpLib.Mib.Elements 13 | { 14 | public sealed class ImportsFrom 15 | { 16 | private readonly string _module; 17 | private readonly List _types = new List(); 18 | 19 | public ImportsFrom(Symbol last, ISymbolEnumerator symbols) 20 | { 21 | Symbol previous = last; 22 | Symbol current; 23 | while ((current = symbols.NextSymbol()) != Symbol.From) 24 | { 25 | if (current == Symbol.EOL) 26 | { 27 | continue; 28 | } 29 | 30 | if (current == Symbol.Comma) 31 | { 32 | previous.AssertIsValidIdentifier(); 33 | _types.Add(previous.ToString()); 34 | } 35 | 36 | previous = current; 37 | } 38 | 39 | previous.AssertIsValidIdentifier(); 40 | _types.Add(previous.ToString()); 41 | 42 | _module = symbols.NextSymbol().ToString().ToUpperInvariant(); // module names are uppercase 43 | } 44 | 45 | public string Module 46 | { 47 | get { return _module; } 48 | } 49 | 50 | public IList Types 51 | { 52 | get { return _types; } 53 | } 54 | 55 | public override string ToString() 56 | { 57 | return string.Join(", ", _types.ToArray()) + " FROM " + _module; 58 | } 59 | } 60 | } -------------------------------------------------------------------------------- /apps/shell/shell.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2001-2003 Swedish Institute of Computer Science. 3 | * All rights reserved. 4 | * 5 | * Redistribution and use in source and binary forms, with or without modification, 6 | * are permitted provided that the following conditions are met: 7 | * 8 | * 1. Redistributions of source code must retain the above copyright notice, 9 | * this list of conditions and the following disclaimer. 10 | * 2. Redistributions in binary form must reproduce the above copyright notice, 11 | * this list of conditions and the following disclaimer in the documentation 12 | * and/or other materials provided with the distribution. 13 | * 3. The name of the author may not be used to endorse or promote products 14 | * derived from this software without specific prior written permission. 15 | * 16 | * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED 17 | * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF 18 | * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT 19 | * SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, 20 | * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT 21 | * OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 22 | * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 23 | * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING 24 | * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY 25 | * OF SUCH DAMAGE. 26 | * 27 | * This file is part of the lwIP TCP/IP stack. 28 | * 29 | * Author: Adam Dunkels 30 | * 31 | */ 32 | #ifndef LWIP_SHELL_H 33 | #define LWIP_SHELL_H 34 | 35 | void shell_init(void); 36 | 37 | #endif /* LWIP_SHELL_H */ 38 | -------------------------------------------------------------------------------- /apps/udpecho/udpecho.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2001-2003 Swedish Institute of Computer Science. 3 | * All rights reserved. 4 | * 5 | * Redistribution and use in source and binary forms, with or without modification, 6 | * are permitted provided that the following conditions are met: 7 | * 8 | * 1. Redistributions of source code must retain the above copyright notice, 9 | * this list of conditions and the following disclaimer. 10 | * 2. Redistributions in binary form must reproduce the above copyright notice, 11 | * this list of conditions and the following disclaimer in the documentation 12 | * and/or other materials provided with the distribution. 13 | * 3. The name of the author may not be used to endorse or promote products 14 | * derived from this software without specific prior written permission. 15 | * 16 | * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED 17 | * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF 18 | * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT 19 | * SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, 20 | * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT 21 | * OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 22 | * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 23 | * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING 24 | * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY 25 | * OF SUCH DAMAGE. 26 | * 27 | * This file is part of the lwIP TCP/IP stack. 28 | * 29 | * Author: Adam Dunkels 30 | * 31 | */ 32 | #ifndef LWIP_UDPECHO_H 33 | #define LWIP_UDPECHO_H 34 | 35 | void udpecho_init(void); 36 | 37 | #endif /* LWIP_UDPECHO_H */ 38 | -------------------------------------------------------------------------------- /ports/old/rtxc/include/arch/lib.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2001-2003 Swedish Institute of Computer Science. 3 | * All rights reserved. 4 | * 5 | * Redistribution and use in source and binary forms, with or without modification, 6 | * are permitted provided that the following conditions are met: 7 | * 8 | * 1. Redistributions of source code must retain the above copyright notice, 9 | * this list of conditions and the following disclaimer. 10 | * 2. Redistributions in binary form must reproduce the above copyright notice, 11 | * this list of conditions and the following disclaimer in the documentation 12 | * and/or other materials provided with the distribution. 13 | * 3. The name of the author may not be used to endorse or promote products 14 | * derived from this software without specific prior written permission. 15 | * 16 | * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED 17 | * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF 18 | * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT 19 | * SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, 20 | * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT 21 | * OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 22 | * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 23 | * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING 24 | * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY 25 | * OF SUCH DAMAGE. 26 | * 27 | * This file is part of the lwIP TCP/IP stack. 28 | * 29 | * Author: Adam Dunkels 30 | * 31 | */ 32 | #ifndef __LIB_H__ 33 | #define __LIB_H__ 34 | 35 | #include 36 | 37 | 38 | #endif /* __LIB_H__ */ 39 | -------------------------------------------------------------------------------- /apps/tcpecho/tcpecho.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2001-2003 Swedish Institute of Computer Science. 3 | * All rights reserved. 4 | * 5 | * Redistribution and use in source and binary forms, with or without modification, 6 | * are permitted provided that the following conditions are met: 7 | * 8 | * 1. Redistributions of source code must retain the above copyright notice, 9 | * this list of conditions and the following disclaimer. 10 | * 2. Redistributions in binary form must reproduce the above copyright notice, 11 | * this list of conditions and the following disclaimer in the documentation 12 | * and/or other materials provided with the distribution. 13 | * 3. The name of the author may not be used to endorse or promote products 14 | * derived from this software without specific prior written permission. 15 | * 16 | * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED 17 | * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF 18 | * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT 19 | * SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, 20 | * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT 21 | * OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 22 | * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 23 | * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING 24 | * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY 25 | * OF SUCH DAMAGE. 26 | * 27 | * This file is part of the lwIP TCP/IP stack. 28 | * 29 | * Author: Adam Dunkels 30 | * 31 | */ 32 | 33 | #ifndef LWIP_TCPECHO_H 34 | #define LWIP_TCPECHO_H 35 | 36 | void tcpecho_init(void); 37 | 38 | #endif /* LWIP_TCPECHO_H */ 39 | -------------------------------------------------------------------------------- /ports/old/6502/include/arch/cpu.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2001-2003 Swedish Institute of Computer Science. 3 | * All rights reserved. 4 | * 5 | * Redistribution and use in source and binary forms, with or without modification, 6 | * are permitted provided that the following conditions are met: 7 | * 8 | * 1. Redistributions of source code must retain the above copyright notice, 9 | * this list of conditions and the following disclaimer. 10 | * 2. Redistributions in binary form must reproduce the above copyright notice, 11 | * this list of conditions and the following disclaimer in the documentation 12 | * and/or other materials provided with the distribution. 13 | * 3. The name of the author may not be used to endorse or promote products 14 | * derived from this software without specific prior written permission. 15 | * 16 | * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED 17 | * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF 18 | * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT 19 | * SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, 20 | * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT 21 | * OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 22 | * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 23 | * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING 24 | * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY 25 | * OF SUCH DAMAGE. 26 | * 27 | * This file is part of the lwIP TCP/IP stack. 28 | * 29 | * Author: Adam Dunkels 30 | * 31 | */ 32 | #ifndef __CPU_H__ 33 | #define __CPU_H__ 34 | 35 | #define BYTE_ORDER LITTLE_ENDIAN 36 | 37 | #endif /* __CPU_H__ */ 38 | -------------------------------------------------------------------------------- /ports/old/rtxc/include/arch/cpu.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2001-2003 Swedish Institute of Computer Science. 3 | * All rights reserved. 4 | * 5 | * Redistribution and use in source and binary forms, with or without modification, 6 | * are permitted provided that the following conditions are met: 7 | * 8 | * 1. Redistributions of source code must retain the above copyright notice, 9 | * this list of conditions and the following disclaimer. 10 | * 2. Redistributions in binary form must reproduce the above copyright notice, 11 | * this list of conditions and the following disclaimer in the documentation 12 | * and/or other materials provided with the distribution. 13 | * 3. The name of the author may not be used to endorse or promote products 14 | * derived from this software without specific prior written permission. 15 | * 16 | * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED 17 | * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF 18 | * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT 19 | * SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, 20 | * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT 21 | * OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 22 | * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 23 | * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING 24 | * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY 25 | * OF SUCH DAMAGE. 26 | * 27 | * This file is part of the lwIP TCP/IP stack. 28 | * 29 | * Author: Adam Dunkels 30 | * 31 | */ 32 | #ifndef __CPU_H__ 33 | #define __CPU_H__ 34 | 35 | #define BYTE_ORDER LITTLE_ENDIAN 36 | 37 | #endif /* __CPU_H__ */ 38 | -------------------------------------------------------------------------------- /ports/old/v2pro/include/arch/cpu.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2001-2003 Swedish Institute of Computer Science. 3 | * All rights reserved. 4 | * 5 | * Redistribution and use in source and binary forms, with or without 6 | * modification, are permitted provided that the following conditions 7 | * are met: 8 | * 9 | * 1. Redistributions of source code must retain the above copyright notice, 10 | * this list of conditions and the following disclaimer. 11 | * 2. Redistributions in binary form must reproduce the above copyright notice, 12 | * this list of conditions and the following disclaimer in the documentation 13 | * and/or other materials provided with the distribution. 14 | * 3. The name of the author may not be used to endorse or promote products 15 | * derived from this software without specific prior written permission. 16 | * 17 | * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED 18 | * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF 19 | * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO 20 | * EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 21 | * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, 22 | * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; 23 | * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, 24 | * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR 25 | * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF 26 | * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 27 | * 28 | * This file is part of the lwIP TCP/IP stack. 29 | * 30 | * Author: Adam Dunkels 31 | * 32 | */ 33 | 34 | #ifndef __ARCH_CPU_H__ 35 | #define __ARCH_CPU_H__ 36 | 37 | #define BYTE_ORDER BIG_ENDIAN 38 | 39 | #endif /* __ARCH_CPU_H__ */ 40 | -------------------------------------------------------------------------------- /ports/old/v2pro/include/arch/sys_arch.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2001-2003 Swedish Institute of Computer Science. 3 | * All rights reserved. 4 | * 5 | * Redistribution and use in source and binary forms, with or without 6 | * modification, are permitted provided that the following conditions 7 | * are met: 8 | * 9 | * 1. Redistributions of source code must retain the above copyright notice, 10 | * this list of conditions and the following disclaimer. 11 | * 2. Redistributions in binary form must reproduce the above copyright notice, 12 | * this list of conditions and the following disclaimer in the documentation 13 | * and/or other materials provided with the distribution. 14 | * 3. The name of the author may not be used to endorse or promote products 15 | * derived from this software without specific prior written permission. 16 | * 17 | * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED 18 | * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF 19 | * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO 20 | * EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 21 | * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, 22 | * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; 23 | * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, 24 | * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR 25 | * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF 26 | * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 27 | * 28 | * This file is part of the lwIP TCP/IP stack. 29 | * 30 | * Author: Adam Dunkels 31 | * 32 | */ 33 | 34 | #ifndef __SYS_XILINX_V2P_H__ 35 | #define __SYS_XILINX_V2P_H__ 36 | 37 | #define SYS_MBOX_NULL 0 38 | 39 | #endif /* __SYS_XILINX_V2P_H__ */ 40 | -------------------------------------------------------------------------------- /ports/old/6502/include/arch/lib.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2001-2003 Swedish Institute of Computer Science. 3 | * All rights reserved. 4 | * 5 | * Redistribution and use in source and binary forms, with or without modification, 6 | * are permitted provided that the following conditions are met: 7 | * 8 | * 1. Redistributions of source code must retain the above copyright notice, 9 | * this list of conditions and the following disclaimer. 10 | * 2. Redistributions in binary form must reproduce the above copyright notice, 11 | * this list of conditions and the following disclaimer in the documentation 12 | * and/or other materials provided with the distribution. 13 | * 3. The name of the author may not be used to endorse or promote products 14 | * derived from this software without specific prior written permission. 15 | * 16 | * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED 17 | * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF 18 | * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT 19 | * SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, 20 | * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT 21 | * OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 22 | * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 23 | * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING 24 | * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY 25 | * OF SUCH DAMAGE. 26 | * 27 | * This file is part of the lwIP TCP/IP stack. 28 | * 29 | * Author: Adam Dunkels 30 | * 31 | */ 32 | #ifndef __LIB_H__ 33 | #define __LIB_H__ 34 | 35 | int strlen(const char *str); 36 | int strncmp(const char *str1, const char *str2, int len); 37 | 38 | #endif /* __LIB_H__ */ 39 | -------------------------------------------------------------------------------- /ports/unix/port/include/netif/pcapif.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2001-2003 Swedish Institute of Computer Science. 3 | * All rights reserved. 4 | * 5 | * Redistribution and use in source and binary forms, with or without modification, 6 | * are permitted provided that the following conditions are met: 7 | * 8 | * 1. Redistributions of source code must retain the above copyright notice, 9 | * this list of conditions and the following disclaimer. 10 | * 2. Redistributions in binary form must reproduce the above copyright notice, 11 | * this list of conditions and the following disclaimer in the documentation 12 | * and/or other materials provided with the distribution. 13 | * 3. The name of the author may not be used to endorse or promote products 14 | * derived from this software without specific prior written permission. 15 | * 16 | * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED 17 | * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF 18 | * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT 19 | * SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, 20 | * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT 21 | * OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 22 | * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 23 | * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING 24 | * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY 25 | * OF SUCH DAMAGE. 26 | * 27 | * This file is part of the lwIP TCP/IP stack. 28 | * 29 | * Author: Adam Dunkels 30 | * 31 | */ 32 | #ifndef LWIP_PCAPIF_H 33 | #define LWIP_PCAPIF_H 34 | 35 | #include "lwip/netif.h" 36 | 37 | err_t pcapif_init(struct netif *netif); 38 | 39 | #endif /* LWIP_PCAPIF_H */ 40 | -------------------------------------------------------------------------------- /ports/old/6502/include/arch/perf.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2001-2003 Swedish Institute of Computer Science. 3 | * All rights reserved. 4 | * 5 | * Redistribution and use in source and binary forms, with or without modification, 6 | * are permitted provided that the following conditions are met: 7 | * 8 | * 1. Redistributions of source code must retain the above copyright notice, 9 | * this list of conditions and the following disclaimer. 10 | * 2. Redistributions in binary form must reproduce the above copyright notice, 11 | * this list of conditions and the following disclaimer in the documentation 12 | * and/or other materials provided with the distribution. 13 | * 3. The name of the author may not be used to endorse or promote products 14 | * derived from this software without specific prior written permission. 15 | * 16 | * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED 17 | * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF 18 | * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT 19 | * SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, 20 | * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT 21 | * OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 22 | * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 23 | * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING 24 | * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY 25 | * OF SUCH DAMAGE. 26 | * 27 | * This file is part of the lwIP TCP/IP stack. 28 | * 29 | * Author: Adam Dunkels 30 | * 31 | */ 32 | #ifndef __PERF_H__ 33 | #define __PERF_H__ 34 | 35 | #define PERF_START /* null definition */ 36 | #define PERF_STOP(x) /* null definition */ 37 | 38 | #endif /* __PERF_H__ */ 39 | -------------------------------------------------------------------------------- /ports/old/rtxc/include/arch/perf.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2001-2003 Swedish Institute of Computer Science. 3 | * All rights reserved. 4 | * 5 | * Redistribution and use in source and binary forms, with or without modification, 6 | * are permitted provided that the following conditions are met: 7 | * 8 | * 1. Redistributions of source code must retain the above copyright notice, 9 | * this list of conditions and the following disclaimer. 10 | * 2. Redistributions in binary form must reproduce the above copyright notice, 11 | * this list of conditions and the following disclaimer in the documentation 12 | * and/or other materials provided with the distribution. 13 | * 3. The name of the author may not be used to endorse or promote products 14 | * derived from this software without specific prior written permission. 15 | * 16 | * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED 17 | * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF 18 | * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT 19 | * SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, 20 | * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT 21 | * OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 22 | * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 23 | * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING 24 | * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY 25 | * OF SUCH DAMAGE. 26 | * 27 | * This file is part of the lwIP TCP/IP stack. 28 | * 29 | * Author: Adam Dunkels 30 | * 31 | */ 32 | #ifndef __PERF_H__ 33 | #define __PERF_H__ 34 | 35 | #define PERF_START /* null definition */ 36 | #define PERF_STOP(x) /* null definition */ 37 | 38 | #endif /* __PERF_H__ */ 39 | -------------------------------------------------------------------------------- /ports/old/coldfire/include/arch/perf.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2001-2003 Swedish Institute of Computer Science. 3 | * All rights reserved. 4 | * 5 | * Redistribution and use in source and binary forms, with or without modification, 6 | * are permitted provided that the following conditions are met: 7 | * 8 | * 1. Redistributions of source code must retain the above copyright notice, 9 | * this list of conditions and the following disclaimer. 10 | * 2. Redistributions in binary form must reproduce the above copyright notice, 11 | * this list of conditions and the following disclaimer in the documentation 12 | * and/or other materials provided with the distribution. 13 | * 3. The name of the author may not be used to endorse or promote products 14 | * derived from this software without specific prior written permission. 15 | * 16 | * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED 17 | * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF 18 | * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT 19 | * SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, 20 | * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT 21 | * OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 22 | * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 23 | * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING 24 | * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY 25 | * OF SUCH DAMAGE. 26 | * 27 | * This file is part of the lwIP TCP/IP stack. 28 | * 29 | * Author: Adam Dunkels 30 | * 31 | */ 32 | #ifndef __PERF_H__ 33 | #define __PERF_H__ 34 | 35 | #define PERF_START /* null definition */ 36 | #define PERF_STOP(x) /* null definition */ 37 | 38 | #endif /* __PERF_H__ */ 39 | -------------------------------------------------------------------------------- /ports/old/coldfire/include/netif/tcpdump.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2001-2003 Swedish Institute of Computer Science. 3 | * All rights reserved. 4 | * 5 | * Redistribution and use in source and binary forms, with or without modification, 6 | * are permitted provided that the following conditions are met: 7 | * 8 | * 1. Redistributions of source code must retain the above copyright notice, 9 | * this list of conditions and the following disclaimer. 10 | * 2. Redistributions in binary form must reproduce the above copyright notice, 11 | * this list of conditions and the following disclaimer in the documentation 12 | * and/or other materials provided with the distribution. 13 | * 3. The name of the author may not be used to endorse or promote products 14 | * derived from this software without specific prior written permission. 15 | * 16 | * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED 17 | * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF 18 | * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT 19 | * SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, 20 | * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT 21 | * OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 22 | * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 23 | * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING 24 | * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY 25 | * OF SUCH DAMAGE. 26 | * 27 | * This file is part of the lwIP TCP/IP stack. 28 | * 29 | * Author: Adam Dunkels 30 | * 31 | */ 32 | #ifndef __NETIF_TCPDUMP_H__ 33 | #define __NETIF_TCPDUMP_H__ 34 | 35 | #include "lwip/pbuf.h" 36 | 37 | void tcpdump(struct pbuf *p); 38 | 39 | #endif /* __NETIF_TCPDUMP_H__ */ 40 | -------------------------------------------------------------------------------- /addons/httpd/fs_example/fs_example.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2017 Simon Goldschmidt 3 | * All rights reserved. 4 | * 5 | * Redistribution and use in source and binary forms, with or without modification, 6 | * are permitted provided that the following conditions are met: 7 | * 8 | * 1. Redistributions of source code must retain the above copyright notice, 9 | * this list of conditions and the following disclaimer. 10 | * 2. Redistributions in binary form must reproduce the above copyright notice, 11 | * this list of conditions and the following disclaimer in the documentation 12 | * and/or other materials provided with the distribution. 13 | * 3. The name of the author may not be used to endorse or promote products 14 | * derived from this software without specific prior written permission. 15 | * 16 | * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED 17 | * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF 18 | * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT 19 | * SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, 20 | * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT 21 | * OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 22 | * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 23 | * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING 24 | * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY 25 | * OF SUCH DAMAGE. 26 | * 27 | * This file is part of the lwIP TCP/IP stack. 28 | * 29 | * Author: Simon Goldschmidt 30 | * 31 | */ 32 | 33 | #ifndef LWIP_HDR_HTTP_EXAMPLES_FS_EXAMPLE 34 | #define LWIP_HDR_HTTP_EXAMPLES_FS_EXAMPLE 35 | 36 | void fs_ex_init(const char *httpd_root_dir); 37 | 38 | #endif /* LWIP_HDR_HTTP_EXAMPLES_FS_EXAMPLE */ 39 | -------------------------------------------------------------------------------- /apps/LwipMibCompiler/CCodeGeneration/CodeElement.cs: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2001-2004 Swedish Institute of Computer Science. 3 | * All rights reserved. 4 | * 5 | * Redistribution and use in source and binary forms, with or without modification, 6 | * are permitted provided that the following conditions are met: 7 | * 8 | * 1. Redistributions of source code must retain the above copyright notice, 9 | * this list of conditions and the following disclaimer. 10 | * 2. Redistributions in binary form must reproduce the above copyright notice, 11 | * this list of conditions and the following disclaimer in the documentation 12 | * and/or other materials provided with the distribution. 13 | * 3. The name of the author may not be used to endorse or promote products 14 | * derived from this software without specific prior written permission. 15 | * 16 | * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED 17 | * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF 18 | * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT 19 | * SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, 20 | * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT 21 | * OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 22 | * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 23 | * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING 24 | * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY 25 | * OF SUCH DAMAGE. 26 | * 27 | * This file is part of the lwIP TCP/IP stack. 28 | * 29 | * Author: Martin Hentschel 30 | * 31 | */ 32 | 33 | namespace CCodeGeneration 34 | { 35 | public class CodeElement 36 | { 37 | public virtual void GenerateCode(int level, CGenerator generator) 38 | { 39 | } 40 | } 41 | } 42 | -------------------------------------------------------------------------------- /ports/win32/msvc/lwIP_unittests.sln: -------------------------------------------------------------------------------- 1 | Microsoft Visual Studio Solution File, Format Version 11.00 2 | # Visual C++ Express 2010 3 | Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "lwip_unittests", "lwip_unittests.vcxproj", "{6CCABAA4-F86F-4119-AFF8-43C9A4A234C2}" 4 | EndProject 5 | Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "lwIP", "lwIP.vcxproj", "{2CC276FA-B226-49C9-8F82-7FCD5A228E28}" 6 | EndProject 7 | Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libcheck", "libcheck.vcxproj", "{EBB156DC-01BF-47B2-B69C-1A750B6B5F09}" 8 | EndProject 9 | Global 10 | GlobalSection(SolutionConfigurationPlatforms) = preSolution 11 | Debug|Win32 = Debug|Win32 12 | Release|Win32 = Release|Win32 13 | EndGlobalSection 14 | GlobalSection(ProjectConfigurationPlatforms) = postSolution 15 | {6CCABAA4-F86F-4119-AFF8-43C9A4A234C2}.Debug|Win32.ActiveCfg = Debug|Win32 16 | {6CCABAA4-F86F-4119-AFF8-43C9A4A234C2}.Debug|Win32.Build.0 = Debug|Win32 17 | {6CCABAA4-F86F-4119-AFF8-43C9A4A234C2}.Release|Win32.ActiveCfg = Release|Win32 18 | {6CCABAA4-F86F-4119-AFF8-43C9A4A234C2}.Release|Win32.Build.0 = Release|Win32 19 | {2CC276FA-B226-49C9-8F82-7FCD5A228E28}.Debug|Win32.ActiveCfg = Debug unittests|Win32 20 | {2CC276FA-B226-49C9-8F82-7FCD5A228E28}.Debug|Win32.Build.0 = Debug unittests|Win32 21 | {2CC276FA-B226-49C9-8F82-7FCD5A228E28}.Release|Win32.ActiveCfg = Release unittests|Win32 22 | {2CC276FA-B226-49C9-8F82-7FCD5A228E28}.Release|Win32.Build.0 = Release unittests|Win32 23 | {EBB156DC-01BF-47B2-B69C-1A750B6B5F09}.Debug|Win32.ActiveCfg = Debug|Win32 24 | {EBB156DC-01BF-47B2-B69C-1A750B6B5F09}.Debug|Win32.Build.0 = Debug|Win32 25 | {EBB156DC-01BF-47B2-B69C-1A750B6B5F09}.Release|Win32.ActiveCfg = Release|Win32 26 | {EBB156DC-01BF-47B2-B69C-1A750B6B5F09}.Release|Win32.Build.0 = Release|Win32 27 | EndGlobalSection 28 | GlobalSection(SolutionProperties) = preSolution 29 | HideSolutionNode = FALSE 30 | EndGlobalSection 31 | EndGlobal 32 | -------------------------------------------------------------------------------- /ports/old/rtxc/include/netif/sioslipif.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2001-2003 Swedish Institute of Computer Science. 3 | * All rights reserved. 4 | * 5 | * Redistribution and use in source and binary forms, with or without modification, 6 | * are permitted provided that the following conditions are met: 7 | * 8 | * 1. Redistributions of source code must retain the above copyright notice, 9 | * this list of conditions and the following disclaimer. 10 | * 2. Redistributions in binary form must reproduce the above copyright notice, 11 | * this list of conditions and the following disclaimer in the documentation 12 | * and/or other materials provided with the distribution. 13 | * 3. The name of the author may not be used to endorse or promote products 14 | * derived from this software without specific prior written permission. 15 | * 16 | * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED 17 | * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF 18 | * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT 19 | * SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, 20 | * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT 21 | * OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 22 | * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 23 | * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING 24 | * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY 25 | * OF SUCH DAMAGE. 26 | * 27 | * This file is part of the lwIP TCP/IP stack. 28 | * 29 | * Author: Adam Dunkels 30 | * 31 | */ 32 | #ifndef __NETIF_SIOSLIPIF_H__ 33 | #define __NETIF_SIOSLIPIF_H__ 34 | 35 | #include "lwip/netif.h" 36 | 37 | void sioslipif_init(struct netif *); 38 | 39 | #endif /* __NETIF_SIOSLIPIF_H__ */ 40 | -------------------------------------------------------------------------------- /ports/unix/port/include/netif/sio.h: -------------------------------------------------------------------------------- 1 | #ifndef SIO_UNIX_H 2 | #define SIO_UNIX_H 3 | 4 | #include "lwip/sys.h" 5 | #include "lwip/netif.h" 6 | #include "netif/fifo.h" 7 | /*#include "netif/pppif.h"*/ 8 | 9 | struct sio_status_s { 10 | int fd; 11 | fifo_t myfifo; 12 | }; 13 | 14 | /* BAUDRATE is defined in sio.c as it is implementation specific */ 15 | /** Baudrates */ 16 | typedef enum sioBaudrates { 17 | SIO_BAUD_9600, 18 | SIO_BAUD_19200, 19 | SIO_BAUD_38400, 20 | SIO_BAUD_57600, 21 | SIO_BAUD_115200 22 | } sioBaudrates; 23 | 24 | /** 25 | * Poll for a new character from incoming data stream 26 | * @param siostat siostatus struct, contains sio instance data, given by sio_open 27 | * @return char read from input stream, or < 0 if no char was available 28 | */ 29 | s16_t sio_poll(sio_status_t * siostat); 30 | 31 | /** 32 | * Parse incoming characters until a string str is recieved, blocking call 33 | * @param str zero terminated string to expect 34 | * @param siostat siostatus struct, contains sio instance data, given by sio_open 35 | */ 36 | void sio_expect_string(u8_t *str, sio_status_t * siostat); 37 | 38 | /** 39 | * Write a char to output data stream 40 | * @param str pointer to a zero terminated string 41 | * @param siostat siostatus struct, contains sio instance data, given by sio_open 42 | */ 43 | void sio_send_string(u8_t *str, sio_status_t * siostat); 44 | 45 | /** 46 | * Flush outbuffer (send everything in buffer now), useful if some layer below is 47 | * holding on to data, waitng to fill a buffer 48 | * @param siostat siostatus struct, contains sio instance data, given by sio_open 49 | */ 50 | void sio_flush( sio_status_t * siostat ); 51 | 52 | /** 53 | * Change baudrate of port, may close and reopen port 54 | * @param baud new baudrate 55 | * @param siostat siostatus struct, contains sio instance data, given by sio_open 56 | */ 57 | void sio_change_baud( sioBaudrates baud, sio_status_t * siostat ); 58 | 59 | #endif 60 | 61 | -------------------------------------------------------------------------------- /ports/unix/port/include/netif/tunif.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2001-2003 Swedish Institute of Computer Science. 3 | * All rights reserved. 4 | * 5 | * Redistribution and use in source and binary forms, with or without modification, 6 | * are permitted provided that the following conditions are met: 7 | * 8 | * 1. Redistributions of source code must retain the above copyright notice, 9 | * this list of conditions and the following disclaimer. 10 | * 2. Redistributions in binary form must reproduce the above copyright notice, 11 | * this list of conditions and the following disclaimer in the documentation 12 | * and/or other materials provided with the distribution. 13 | * 3. The name of the author may not be used to endorse or promote products 14 | * derived from this software without specific prior written permission. 15 | * 16 | * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED 17 | * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF 18 | * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT 19 | * SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, 20 | * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT 21 | * OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 22 | * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 23 | * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING 24 | * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY 25 | * OF SUCH DAMAGE. 26 | * 27 | * This file is part of the lwIP TCP/IP stack. 28 | * 29 | * Author: Adam Dunkels 30 | * 31 | */ 32 | #ifndef LWIP_TUNIF_H 33 | #define LWIP_TUNIF_H 34 | 35 | #include "lwip/netif.h" 36 | 37 | #include "lwip/pbuf.h" 38 | 39 | err_t tunif_init(struct netif *netif); 40 | 41 | #endif /* LWIP_TUNIF_H */ 42 | -------------------------------------------------------------------------------- /ports/unix/port/include/netif/dropif.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2001-2003 Swedish Institute of Computer Science. 3 | * All rights reserved. 4 | * 5 | * Redistribution and use in source and binary forms, with or without modification, 6 | * are permitted provided that the following conditions are met: 7 | * 8 | * 1. Redistributions of source code must retain the above copyright notice, 9 | * this list of conditions and the following disclaimer. 10 | * 2. Redistributions in binary form must reproduce the above copyright notice, 11 | * this list of conditions and the following disclaimer in the documentation 12 | * and/or other materials provided with the distribution. 13 | * 3. The name of the author may not be used to endorse or promote products 14 | * derived from this software without specific prior written permission. 15 | * 16 | * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED 17 | * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF 18 | * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT 19 | * SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, 20 | * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT 21 | * OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 22 | * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 23 | * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING 24 | * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY 25 | * OF SUCH DAMAGE. 26 | * 27 | * This file is part of the lwIP TCP/IP stack. 28 | * 29 | * Author: Adam Dunkels 30 | * 31 | */ 32 | #ifndef LWIP_DROPIF_H 33 | #define LWIP_DROPIF_H 34 | 35 | #include "lwip/netif.h" 36 | 37 | #include "lwip/pbuf.h" 38 | 39 | err_t dropif_init(struct netif *netif); 40 | 41 | #endif /* LWIP_DROPIF_H */ 42 | -------------------------------------------------------------------------------- /ports/old/6502/include/arch/sys_arch.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2001-2003 Swedish Institute of Computer Science. 3 | * All rights reserved. 4 | * 5 | * Redistribution and use in source and binary forms, with or without modification, 6 | * are permitted provided that the following conditions are met: 7 | * 8 | * 1. Redistributions of source code must retain the above copyright notice, 9 | * this list of conditions and the following disclaimer. 10 | * 2. Redistributions in binary form must reproduce the above copyright notice, 11 | * this list of conditions and the following disclaimer in the documentation 12 | * and/or other materials provided with the distribution. 13 | * 3. The name of the author may not be used to endorse or promote products 14 | * derived from this software without specific prior written permission. 15 | * 16 | * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED 17 | * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF 18 | * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT 19 | * SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, 20 | * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT 21 | * OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 22 | * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 23 | * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING 24 | * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY 25 | * OF SUCH DAMAGE. 26 | * 27 | * This file is part of the lwIP TCP/IP stack. 28 | * 29 | * Author: Adam Dunkels 30 | * 31 | */ 32 | #ifndef __SYS_C64_H__ 33 | #define __SYS_C64_H__ 34 | 35 | #define SYS_MBOX_NULL 0 36 | 37 | typedef int sys_sem_t; 38 | typedef int sys_mbox_t; 39 | typedef int sys_thread_t; 40 | 41 | #endif /* __SYS_C64_H__ */ 42 | -------------------------------------------------------------------------------- /ports/unix/port/include/netif/fifo.h: -------------------------------------------------------------------------------- 1 | #ifndef FIFO_H 2 | #define FIFO_H 3 | 4 | #include "lwip/sys.h" 5 | 6 | /** How many bytes in fifo */ 7 | #define FIFOSIZE 2048 8 | 9 | /** fifo data structure, this one is passed to all fifo functions */ 10 | typedef struct fifo_t { 11 | u8_t data[FIFOSIZE+10]; /* data segment, +10 is a hack probably not needed.. FIXME! */ 12 | int dataslot; /* index to next char to be read */ 13 | int emptyslot; /* index to next empty slot */ 14 | int len; /* len probably not needed, may be calculated from dataslot and emptyslot in conjunction with FIFOSIZE */ 15 | 16 | sys_sem_t sem; /* semaphore protecting simultaneous data manipulation */ 17 | sys_sem_t getSem; /* sepaphore used to signal new data if getWaiting is set */ 18 | u8_t getWaiting; /* flag used to indicate that fifoget is waiting for data. fifoput is suposed to clear */ 19 | /* this flag prior to signaling the getSem semaphore */ 20 | } fifo_t; 21 | 22 | 23 | /** 24 | * Get a character from fifo 25 | * Blocking call. 26 | * @param fifo pointer to fifo data structure 27 | * @return character read from fifo 28 | */ 29 | u8_t fifoGet(fifo_t * fifo); 30 | 31 | /** 32 | * Get a character from fifo 33 | * Non blocking call. 34 | * @param fifo pointer to fifo data structure 35 | * @return character read from fifo, or < zero if non was available 36 | */ 37 | s16_t fifoGetNonBlock(fifo_t * fifo); 38 | 39 | /** 40 | * fifoput is called by the signalhandler when new data has arrived (or some other event is indicated) 41 | * fifoput reads directly from the serialport and is thus highly dependent on unix arch at this moment 42 | * @param fifo pointer to fifo data structure 43 | * @param fd unix file descriptor 44 | */ 45 | void fifoPut(fifo_t * fifo, int fd); 46 | 47 | /** 48 | * fifoinit initiate fifo 49 | * @param fifo pointer to fifo data structure, allocated by the user 50 | */ 51 | void fifoInit(fifo_t * fifo); 52 | 53 | #endif 54 | 55 | -------------------------------------------------------------------------------- /ports/old/coldfire/include/netif/5272fec.h: -------------------------------------------------------------------------------- 1 | /* @(#)5272fec.h 2 | * Copyright (c) 2001-2003 Swedish Institute of Computer Science. 3 | * All rights reserved. 4 | * 5 | * Redistribution and use in source and binary forms, with or without modification, 6 | * are permitted provided that the following conditions are met: 7 | * 8 | * 1. Redistributions of source code must retain the above copyright notice, 9 | * this list of conditions and the following disclaimer. 10 | * 2. Redistributions in binary form must reproduce the above copyright notice, 11 | * this list of conditions and the following disclaimer in the documentation 12 | * and/or other materials provided with the distribution. 13 | * 3. The name of the author may not be used to endorse or promote products 14 | * derived from this software without specific prior written permission. 15 | * 16 | * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED 17 | * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF 18 | * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT 19 | * SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, 20 | * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT 21 | * OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 22 | * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 23 | * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING 24 | * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY 25 | * OF SUCH DAMAGE. 26 | * 27 | * This file is part of the lwIP TCP/IP stack. 28 | * 29 | * Purpose: MCF5272 fec ethernet driver 30 | * 31 | * Author: David Haas 32 | * 33 | */ 34 | 35 | #ifndef _5272FEC_H 36 | #define _5272FEC_H 1 37 | 38 | 39 | err_t 40 | mcf5272fecif_init(struct netif *netif); 41 | 42 | 43 | #endif /* _5272FEC_H */ 44 | 45 | -------------------------------------------------------------------------------- /ports/unix/port/include/netif/unixif.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2001-2003 Swedish Institute of Computer Science. 3 | * All rights reserved. 4 | * 5 | * Redistribution and use in source and binary forms, with or without modification, 6 | * are permitted provided that the following conditions are met: 7 | * 8 | * 1. Redistributions of source code must retain the above copyright notice, 9 | * this list of conditions and the following disclaimer. 10 | * 2. Redistributions in binary form must reproduce the above copyright notice, 11 | * this list of conditions and the following disclaimer in the documentation 12 | * and/or other materials provided with the distribution. 13 | * 3. The name of the author may not be used to endorse or promote products 14 | * derived from this software without specific prior written permission. 15 | * 16 | * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED 17 | * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF 18 | * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT 19 | * SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, 20 | * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT 21 | * OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 22 | * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 23 | * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING 24 | * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY 25 | * OF SUCH DAMAGE. 26 | * 27 | * This file is part of the lwIP TCP/IP stack. 28 | * 29 | * Author: Adam Dunkels 30 | * 31 | */ 32 | #ifndef LWIP_UNIXIF_H 33 | #define LWIP_UNIXIF_H 34 | 35 | #include "lwip/netif.h" 36 | 37 | err_t unixif_init_server(struct netif *netif); 38 | err_t unixif_init_client(struct netif *netif); 39 | 40 | #endif /* LWIP_UNIXIF_H */ 41 | -------------------------------------------------------------------------------- /ports/old/c16x/include/arch/lib.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2001, Swedish Institute of Computer Science. 3 | * All rights reserved. 4 | * 5 | * Redistribution and use in source and binary forms, with or without 6 | * modification, are permitted provided that the following conditions 7 | * are met: 8 | * 1. Redistributions of source code must retain the above copyright 9 | * notice, this list of conditions and the following disclaimer. 10 | * 2. Redistributions in binary form must reproduce the above copyright 11 | * notice, this list of conditions and the following disclaimer in the 12 | * documentation and/or other materials provided with the distribution. 13 | * 3. Neither the name of the Institute nor the names of its contributors 14 | * may be used to endorse or promote products derived from this software 15 | * without specific prior written permission. 16 | * 17 | * THIS SOFTWARE IS PROVIDED BY THE INSTITUTE AND CONTRIBUTORS ``AS IS'' AND 18 | * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 19 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 20 | * ARE DISCLAIMED. IN NO EVENT SHALL THE INSTITUTE OR CONTRIBUTORS BE LIABLE 21 | * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 22 | * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 23 | * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 24 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 25 | * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 26 | * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 27 | * SUCH DAMAGE. 28 | * 29 | * This file is part of the lwIP TCP/IP stack. 30 | * 31 | * Author: Adam Dunkels 32 | * 33 | * $Id: lib.h,v 1.1 2007/06/14 12:33:57 kieranm Exp $ 34 | */ 35 | #ifndef __LIB_H__ 36 | #define __LIB_H__ 37 | 38 | 39 | #endif /* __LIB_H__ */ 40 | -------------------------------------------------------------------------------- /ports/old/rtxc/lib.c: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2001-2003 Swedish Institute of Computer Science. 3 | * All rights reserved. 4 | * 5 | * Redistribution and use in source and binary forms, with or without modification, 6 | * are permitted provided that the following conditions are met: 7 | * 8 | * 1. Redistributions of source code must retain the above copyright notice, 9 | * this list of conditions and the following disclaimer. 10 | * 2. Redistributions in binary form must reproduce the above copyright notice, 11 | * this list of conditions and the following disclaimer in the documentation 12 | * and/or other materials provided with the distribution. 13 | * 3. The name of the author may not be used to endorse or promote products 14 | * derived from this software without specific prior written permission. 15 | * 16 | * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED 17 | * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF 18 | * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT 19 | * SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, 20 | * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT 21 | * OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 22 | * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 23 | * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING 24 | * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY 25 | * OF SUCH DAMAGE. 26 | * 27 | * This file is part of the lwIP TCP/IP stack. 28 | * 29 | * Author: Adam Dunkels 30 | * 31 | */ 32 | 33 | /* These are generic implementations of various library functions used 34 | * throughout the lwIP code. When porting, those should be optimized 35 | * for the particular processor architecture, preferably coded in 36 | * assembler. 37 | */ 38 | 39 | -------------------------------------------------------------------------------- /ports/unix/port/include/netif/tapif.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2001-2003 Swedish Institute of Computer Science. 3 | * All rights reserved. 4 | * 5 | * Redistribution and use in source and binary forms, with or without modification, 6 | * are permitted provided that the following conditions are met: 7 | * 8 | * 1. Redistributions of source code must retain the above copyright notice, 9 | * this list of conditions and the following disclaimer. 10 | * 2. Redistributions in binary form must reproduce the above copyright notice, 11 | * this list of conditions and the following disclaimer in the documentation 12 | * and/or other materials provided with the distribution. 13 | * 3. The name of the author may not be used to endorse or promote products 14 | * derived from this software without specific prior written permission. 15 | * 16 | * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED 17 | * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF 18 | * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT 19 | * SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, 20 | * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT 21 | * OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 22 | * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 23 | * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING 24 | * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY 25 | * OF SUCH DAMAGE. 26 | * 27 | * This file is part of the lwIP TCP/IP stack. 28 | * 29 | * Author: Adam Dunkels 30 | * 31 | */ 32 | #ifndef LWIP_TAPIF_H 33 | #define LWIP_TAPIF_H 34 | 35 | #include "lwip/netif.h" 36 | 37 | err_t tapif_init(struct netif *netif); 38 | #if NO_SYS 39 | int tapif_select(struct netif *netif); 40 | #endif /* NO_SYS */ 41 | 42 | #endif /* LWIP_TAPIF_H */ 43 | -------------------------------------------------------------------------------- /ports/unix/port/include/netif/tcpdump.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2001-2003 Swedish Institute of Computer Science. 3 | * All rights reserved. 4 | * 5 | * Redistribution and use in source and binary forms, with or without modification, 6 | * are permitted provided that the following conditions are met: 7 | * 8 | * 1. Redistributions of source code must retain the above copyright notice, 9 | * this list of conditions and the following disclaimer. 10 | * 2. Redistributions in binary form must reproduce the above copyright notice, 11 | * this list of conditions and the following disclaimer in the documentation 12 | * and/or other materials provided with the distribution. 13 | * 3. The name of the author may not be used to endorse or promote products 14 | * derived from this software without specific prior written permission. 15 | * 16 | * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED 17 | * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF 18 | * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT 19 | * SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, 20 | * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT 21 | * OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 22 | * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 23 | * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING 24 | * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY 25 | * OF SUCH DAMAGE. 26 | * 27 | * This file is part of the lwIP TCP/IP stack. 28 | * 29 | * Author: Adam Dunkels 30 | * 31 | */ 32 | #ifndef LWIP_NETIF_TCPDUMP_H 33 | #define LWIP_NETIF_TCPDUMP_H 34 | 35 | struct pbuf; 36 | struct netif; 37 | 38 | void tcpdump_init(void); 39 | void tcpdump(struct pbuf *p, struct netif *netif); 40 | 41 | #endif /* LWIP_NETIF_TCPDUMP_H */ 42 | -------------------------------------------------------------------------------- /ports/old/6502/lib_arch.c: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2001-2003 Swedish Institute of Computer Science. 3 | * All rights reserved. 4 | * 5 | * Redistribution and use in source and binary forms, with or without modification, 6 | * are permitted provided that the following conditions are met: 7 | * 8 | * 1. Redistributions of source code must retain the above copyright notice, 9 | * this list of conditions and the following disclaimer. 10 | * 2. Redistributions in binary form must reproduce the above copyright notice, 11 | * this list of conditions and the following disclaimer in the documentation 12 | * and/or other materials provided with the distribution. 13 | * 3. The name of the author may not be used to endorse or promote products 14 | * derived from this software without specific prior written permission. 15 | * 16 | * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED 17 | * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF 18 | * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT 19 | * SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, 20 | * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT 21 | * OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 22 | * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 23 | * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING 24 | * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY 25 | * OF SUCH DAMAGE. 26 | * 27 | * This file is part of the lwIP TCP/IP stack. 28 | * 29 | * Author: Adam Dunkels 30 | * 31 | */ 32 | 33 | /* These are generic implementations of various library functions used 34 | * throughout the lwIP code. When porting, those should be optimized 35 | * for the particular processor architecture, preferably coded in 36 | * assembler. 37 | */ 38 | 39 | 40 | -------------------------------------------------------------------------------- /ports/old/v2pro/include/arch/perf.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2001-2003 Swedish Institute of Computer Science. 3 | * All rights reserved. 4 | * 5 | * Redistribution and use in source and binary forms, with or without 6 | * modification, are permitted provided that the following conditions 7 | * are met: 8 | * 9 | * 1. Redistributions of source code must retain the above copyright notice, 10 | * this list of conditions and the following disclaimer. 11 | * 2. Redistributions in binary form must reproduce the above copyright notice, 12 | * this list of conditions and the following disclaimer in the documentation 13 | * and/or other materials provided with the distribution. 14 | * 3. The name of the author may not be used to endorse or promote products 15 | * derived from this software without specific prior written permission. 16 | * 17 | * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED 18 | * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF 19 | * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO 20 | * EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 21 | * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, 22 | * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; 23 | * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, 24 | * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR 25 | * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF 26 | * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 27 | * 28 | * This file is part of the lwIP TCP/IP stack. 29 | * 30 | * Author: Adam Dunkels 31 | * 32 | */ 33 | 34 | #ifndef __ARCH_PERF_H__ 35 | #define __ARCH_PERF_H__ 36 | 37 | #define PERF_START /* null definition */ 38 | #define PERF_STOP(x) /* null definition */ 39 | 40 | void perf_init(char *fname); 41 | 42 | #endif /* __ARCH_PERF_H__ */ 43 | -------------------------------------------------------------------------------- /ports/old/rtxc/include/arch/init.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2001-2003 Swedish Institute of Computer Science. 3 | * All rights reserved. 4 | * 5 | * Redistribution and use in source and binary forms, with or without modification, 6 | * are permitted provided that the following conditions are met: 7 | * 8 | * 1. Redistributions of source code must retain the above copyright notice, 9 | * this list of conditions and the following disclaimer. 10 | * 2. Redistributions in binary form must reproduce the above copyright notice, 11 | * this list of conditions and the following disclaimer in the documentation 12 | * and/or other materials provided with the distribution. 13 | * 3. The name of the author may not be used to endorse or promote products 14 | * derived from this software without specific prior written permission. 15 | * 16 | * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED 17 | * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF 18 | * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT 19 | * SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, 20 | * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT 21 | * OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 22 | * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 23 | * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING 24 | * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY 25 | * OF SUCH DAMAGE. 26 | * 27 | * This file is part of the lwIP TCP/IP stack. 28 | * 29 | * Author: Adam Dunkels 30 | * 31 | */ 32 | #ifndef __ARCH_INIT_H__ 33 | #define __ARCH_INIT_H__ 34 | 35 | #define TCPIP_INIT_DONE(arg) tcpip_init_done(arg) 36 | 37 | void tcpip_init_done(void *); 38 | int wait_for_tcpip_init(void); 39 | 40 | #endif /* __ARCH_INIT_H__ */ 41 | 42 | 43 | 44 | 45 | -------------------------------------------------------------------------------- /ports/unix/port/include/netif/delif.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2001-2003 Swedish Institute of Computer Science. 3 | * All rights reserved. 4 | * 5 | * Redistribution and use in source and binary forms, with or without modification, 6 | * are permitted provided that the following conditions are met: 7 | * 8 | * 1. Redistributions of source code must retain the above copyright notice, 9 | * this list of conditions and the following disclaimer. 10 | * 2. Redistributions in binary form must reproduce the above copyright notice, 11 | * this list of conditions and the following disclaimer in the documentation 12 | * and/or other materials provided with the distribution. 13 | * 3. The name of the author may not be used to endorse or promote products 14 | * derived from this software without specific prior written permission. 15 | * 16 | * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED 17 | * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF 18 | * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT 19 | * SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, 20 | * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT 21 | * OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 22 | * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 23 | * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING 24 | * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY 25 | * OF SUCH DAMAGE. 26 | * 27 | * This file is part of the lwIP TCP/IP stack. 28 | * 29 | * Author: Adam Dunkels 30 | * 31 | */ 32 | #ifndef LWIP_DELIF_H 33 | #define LWIP_DELIF_H 34 | 35 | #include "lwip/netif.h" 36 | 37 | #include "lwip/pbuf.h" 38 | 39 | err_t delif_init(struct netif *netif); 40 | err_t delif_init_thread(struct netif *netif); 41 | 42 | #endif /* LWIP_DELIF_H */ 43 | -------------------------------------------------------------------------------- /ports/old/rtxc/include/netif/cs8900if.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2001-2003 Swedish Institute of Computer Science. 3 | * All rights reserved. 4 | * 5 | * Redistribution and use in source and binary forms, with or without modification, 6 | * are permitted provided that the following conditions are met: 7 | * 8 | * 1. Redistributions of source code must retain the above copyright notice, 9 | * this list of conditions and the following disclaimer. 10 | * 2. Redistributions in binary form must reproduce the above copyright notice, 11 | * this list of conditions and the following disclaimer in the documentation 12 | * and/or other materials provided with the distribution. 13 | * 3. The name of the author may not be used to endorse or promote products 14 | * derived from this software without specific prior written permission. 15 | * 16 | * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED 17 | * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF 18 | * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT 19 | * SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, 20 | * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT 21 | * OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 22 | * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 23 | * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING 24 | * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY 25 | * OF SUCH DAMAGE. 26 | * 27 | * This file is part of the lwIP TCP/IP stack. 28 | * 29 | * Author: Adam Dunkels 30 | * 31 | */ 32 | #ifndef __NETIF_CS8900IF_H__ 33 | #define __NETIF_CS8900IF_H__ 34 | 35 | #include "lwip/netif.h" 36 | 37 | void cs8900if_init(struct netif *); 38 | u8_t cs8900if_poll(struct netif *); 39 | void cs8900if_input(struct netif *); 40 | 41 | #endif /* __NETIF_CS8900IF_H__ */ 42 | -------------------------------------------------------------------------------- /ports/old/c16x/perf.c: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2001, Swedish Institute of Computer Science. 3 | * All rights reserved. 4 | * 5 | * Redistribution and use in source and binary forms, with or without 6 | * modification, are permitted provided that the following conditions 7 | * are met: 8 | * 1. Redistributions of source code must retain the above copyright 9 | * notice, this list of conditions and the following disclaimer. 10 | * 2. Redistributions in binary form must reproduce the above copyright 11 | * notice, this list of conditions and the following disclaimer in the 12 | * documentation and/or other materials provided with the distribution. 13 | * 3. Neither the name of the Institute nor the names of its contributors 14 | * may be used to endorse or promote products derived from this software 15 | * without specific prior written permission. 16 | * 17 | * THIS SOFTWARE IS PROVIDED BY THE INSTITUTE AND CONTRIBUTORS ``AS IS'' AND 18 | * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 19 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 20 | * ARE DISCLAIMED. IN NO EVENT SHALL THE INSTITUTE OR CONTRIBUTORS BE LIABLE 21 | * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 22 | * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 23 | * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 24 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 25 | * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 26 | * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 27 | * SUCH DAMAGE. 28 | * 29 | * This file is part of the lwIP TCP/IP stack. 30 | * 31 | * Author: Adam Dunkels 32 | * 33 | * $Id: perf.c,v 1.1 2007/06/14 12:33:57 kieranm Exp $ 34 | */ 35 | 36 | #include "arch/perf.h" 37 | 38 | void 39 | perf_init(char *fname) 40 | { 41 | if (fname); // LEON: prevent warning 42 | } 43 | -------------------------------------------------------------------------------- /ports/win32/include/arch/perf.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2001, Swedish Institute of Computer Science. 3 | * All rights reserved. 4 | * 5 | * Redistribution and use in source and binary forms, with or without 6 | * modification, are permitted provided that the following conditions 7 | * are met: 8 | * 1. Redistributions of source code must retain the above copyright 9 | * notice, this list of conditions and the following disclaimer. 10 | * 2. Redistributions in binary form must reproduce the above copyright 11 | * notice, this list of conditions and the following disclaimer in the 12 | * documentation and/or other materials provided with the distribution. 13 | * 3. Neither the name of the Institute nor the names of its contributors 14 | * may be used to endorse or promote products derived from this software 15 | * without specific prior written permission. 16 | * 17 | * THIS SOFTWARE IS PROVIDED BY THE INSTITUTE AND CONTRIBUTORS ``AS IS'' AND 18 | * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 19 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 20 | * ARE DISCLAIMED. IN NO EVENT SHALL THE INSTITUTE OR CONTRIBUTORS BE LIABLE 21 | * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 22 | * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 23 | * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 24 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 25 | * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 26 | * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 27 | * SUCH DAMAGE. 28 | * 29 | * This file is part of the lwIP TCP/IP stack. 30 | * 31 | * Author: Adam Dunkels 32 | * 33 | */ 34 | #ifndef LWIP_PERF_H 35 | #define LWIP_PERF_H 36 | 37 | #define PERF_START /* null definition */ 38 | #define PERF_STOP(x) /* null definition */ 39 | 40 | #endif /* LWIP_PERF_H */ 41 | -------------------------------------------------------------------------------- /apps/LwipMibCompiler/SharpSnmpLib/Mib/ValueRange.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | 4 | namespace Lextm.SharpSnmpLib.Mib 5 | { 6 | public class ValueRanges: List 7 | { 8 | public bool IsSizeDeclaration { get; internal set; } 9 | 10 | public ValueRanges(bool isSizeDecl = false) 11 | { 12 | IsSizeDeclaration = isSizeDecl; 13 | } 14 | 15 | public bool Contains(Int64 value) 16 | { 17 | foreach (ValueRange range in this) 18 | { 19 | if (range.Contains(value)) 20 | { 21 | return true; 22 | } 23 | } 24 | 25 | return false; 26 | } 27 | } 28 | 29 | public class ValueRange 30 | { 31 | private readonly Int64 _start; 32 | private readonly Int64? _end; 33 | 34 | public ValueRange(Int64 first, Int64? second) 35 | { 36 | _start = first; 37 | _end = second; 38 | } 39 | 40 | public Int64 Start 41 | { 42 | get { return _start; } 43 | } 44 | 45 | public Int64? End 46 | { 47 | get { return _end; } 48 | } 49 | 50 | public bool IntersectsWith(ValueRange other) 51 | { 52 | if (this._end == null) 53 | { 54 | return other.Contains(this._start); 55 | } 56 | else if (other._end == null) 57 | { 58 | return this.Contains(other._start); 59 | } 60 | 61 | return (this._start <= other.End) && (this._end >= other._start); 62 | } 63 | 64 | public bool Contains(Int64 value) 65 | { 66 | if (_end == null) 67 | { 68 | return value == _start; 69 | } 70 | else 71 | { 72 | return (_start <= value) && (value <= _end); 73 | } 74 | } 75 | } 76 | } 77 | -------------------------------------------------------------------------------- /ports/unix/unixsim/lwip_hooks.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2001-2003 Swedish Institute of Computer Science. 3 | * All rights reserved. 4 | * 5 | * Redistribution and use in source and binary forms, with or without modification, 6 | * are permitted provided that the following conditions are met: 7 | * 8 | * 1. Redistributions of source code must retain the above copyright notice, 9 | * this list of conditions and the following disclaimer. 10 | * 2. Redistributions in binary form must reproduce the above copyright notice, 11 | * this list of conditions and the following disclaimer in the documentation 12 | * and/or other materials provided with the distribution. 13 | * 3. The name of the author may not be used to endorse or promote products 14 | * derived from this software without specific prior written permission. 15 | * 16 | * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED 17 | * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF 18 | * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT 19 | * SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, 20 | * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT 21 | * OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 22 | * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 23 | * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING 24 | * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY 25 | * OF SUCH DAMAGE. 26 | * 27 | * This file is part of the lwIP TCP/IP stack. 28 | * 29 | * Author: Adam Dunkels 30 | * 31 | */ 32 | 33 | #ifndef LWIP_HOOKS_H 34 | #define LWIP_HOOKS_H 35 | 36 | #ifdef __cplusplus 37 | extern "C" { 38 | #endif 39 | 40 | #include "addons/tcp_isn/tcp_isn.h" 41 | 42 | #define LWIP_HOOK_TCP_ISN lwip_hook_tcp_isn 43 | 44 | #ifdef __cplusplus 45 | } 46 | #endif 47 | 48 | #endif /* LWIP_HOOKS_H */ 49 | 50 | -------------------------------------------------------------------------------- /apps/LwipMibCompiler/SharpSnmpLib/Mib/Elements/Entities/IEntity.cs: -------------------------------------------------------------------------------- 1 | // Entity interface. 2 | // Copyright (C) 2008-2010 Malcolm Crowe, Lex Li, and other contributors. 3 | // 4 | // This library is free software; you can redistribute it and/or 5 | // modify it under the terms of the GNU Lesser General Public 6 | // License as published by the Free Software Foundation; either 7 | // version 2.1 of the License, or (at your option) any later version. 8 | // 9 | // This library is distributed in the hope that it will be useful, 10 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 12 | // Lesser General Public License for more details. 13 | // 14 | // You should have received a copy of the GNU Lesser General Public 15 | // License along with this library; if not, write to the Free Software 16 | // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 17 | 18 | /* 19 | * Created by SharpDevelop. 20 | * User: lextm 21 | * Date: 2008/5/19 22 | * Time: 20:10 23 | * 24 | * To change this template use Tools | Options | Coding | Edit Standard Headers. 25 | */ 26 | 27 | using System; 28 | 29 | namespace Lextm.SharpSnmpLib.Mib.Elements.Entities 30 | { 31 | /// 32 | /// Basic interface for all elements building up the MIB tree, thus having an OID as value. 33 | /// 34 | public interface IEntity : IDeclaration 35 | { 36 | /// 37 | /// Parent name. 38 | /// 39 | string Parent 40 | { 41 | get; 42 | set; 43 | } 44 | 45 | /// 46 | /// Value. 47 | /// 48 | uint Value 49 | { 50 | get; 51 | } 52 | 53 | /// 54 | /// Gets the description. 55 | /// 56 | /// The description. 57 | string Description 58 | { 59 | get; 60 | } 61 | } 62 | } -------------------------------------------------------------------------------- /ports/old/rtxc/include/arch/sys_arch.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2001-2003 Swedish Institute of Computer Science. 3 | * All rights reserved. 4 | * 5 | * Redistribution and use in source and binary forms, with or without modification, 6 | * are permitted provided that the following conditions are met: 7 | * 8 | * 1. Redistributions of source code must retain the above copyright notice, 9 | * this list of conditions and the following disclaimer. 10 | * 2. Redistributions in binary form must reproduce the above copyright notice, 11 | * this list of conditions and the following disclaimer in the documentation 12 | * and/or other materials provided with the distribution. 13 | * 3. The name of the author may not be used to endorse or promote products 14 | * derived from this software without specific prior written permission. 15 | * 16 | * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED 17 | * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF 18 | * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT 19 | * SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, 20 | * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT 21 | * OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 22 | * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 23 | * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING 24 | * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY 25 | * OF SUCH DAMAGE. 26 | * 27 | * This file is part of the lwIP TCP/IP stack. 28 | * 29 | * Author: Adam Dunkels 30 | * 31 | */ 32 | #ifndef __SYS_RTXC_H__ 33 | #define __SYS_RTXC_H__ 34 | 35 | #include "rtxcapi.h" 36 | 37 | #define SYS_MBOX_NULL (QUEUE)0 38 | #define SYS_SEM_NULL (SEMA)0 39 | 40 | typedef SEMA sys_sem_t; 41 | typedef QUEUE sys_mbox_t; 42 | typedef TASK sys_thread_t; 43 | 44 | #endif /* __SYS_RTXC_H__ */ 45 | 46 | -------------------------------------------------------------------------------- /apps/udpecho_raw/udpecho_raw.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2016 Stephan Linz , Li-Pro.Net 3 | * All rights reserved. 4 | * 5 | * Based on examples provided by 6 | * Iwan Budi Kusnanto (https://gist.github.com/iwanbk/1399729) 7 | * Juri Haberland (https://lists.gnu.org/archive/html/lwip-users/2007-06/msg00078.html) 8 | * 9 | * Redistribution and use in source and binary forms, with or without modification, 10 | * are permitted provided that the following conditions are met: 11 | * 12 | * 1. Redistributions of source code must retain the above copyright notice, 13 | * this list of conditions and the following disclaimer. 14 | * 2. Redistributions in binary form must reproduce the above copyright notice, 15 | * this list of conditions and the following disclaimer in the documentation 16 | * and/or other materials provided with the distribution. 17 | * 3. The name of the author may not be used to endorse or promote products 18 | * derived from this software without specific prior written permission. 19 | * 20 | * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED 21 | * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF 22 | * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT 23 | * SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, 24 | * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT 25 | * OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 26 | * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 27 | * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING 28 | * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY 29 | * OF SUCH DAMAGE. 30 | * 31 | * This file is part of the lwIP TCP/IP stack. 32 | * 33 | */ 34 | #ifndef LWIP_UDPECHO_RAW_H 35 | #define LWIP_UDPECHO_RAW_H 36 | 37 | void udpecho_raw_init(void); 38 | 39 | #endif /* LWIP_UDPECHO_RAW_H */ 40 | -------------------------------------------------------------------------------- /ports/old/coldfire/include/arch/errno.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2001, Swedish Institute of Computer Science. 3 | * All rights reserved. 4 | * 5 | * Redistribution and use in source and binary forms, with or without 6 | * modification, are permitted provided that the following conditions 7 | * are met: 8 | * 1. Redistributions of source code must retain the above copyright 9 | * notice, this list of conditions and the following disclaimer. 10 | * 2. Redistributions in binary form must reproduce the above copyright 11 | * notice, this list of conditions and the following disclaimer in the 12 | * documentation and/or other materials provided with the distribution. 13 | * 3. Neither the name of the Institute nor the names of its contributors 14 | * may be used to endorse or promote products derived from this software 15 | * without specific prior written permission. 16 | * 17 | * THIS SOFTWARE IS PROVIDED BY THE INSTITUTE AND CONTRIBUTORS ``AS IS'' AND 18 | * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 19 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 20 | * ARE DISCLAIMED. IN NO EVENT SHALL THE INSTITUTE OR CONTRIBUTORS BE LIABLE 21 | * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 22 | * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 23 | * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 24 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 25 | * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 26 | * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 27 | * SUCH DAMAGE. 28 | * 29 | * This file is part of the lwIP TCP/IP stack. 30 | * 31 | * Author: David Haas 32 | * 33 | * $Id: 34 | */ 35 | #ifndef __ERRNO_H__ 36 | #define __ERRNO_H__ 37 | 38 | /* This can be used to test whether errno is implemented */ 39 | #define ERRNO 40 | 41 | #define errno (*sys_arch_errno()) 42 | 43 | 44 | #endif 45 | -------------------------------------------------------------------------------- /ports/old/c16x/include/arch/perf.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2001, Swedish Institute of Computer Science. 3 | * All rights reserved. 4 | * 5 | * Redistribution and use in source and binary forms, with or without 6 | * modification, are permitted provided that the following conditions 7 | * are met: 8 | * 1. Redistributions of source code must retain the above copyright 9 | * notice, this list of conditions and the following disclaimer. 10 | * 2. Redistributions in binary form must reproduce the above copyright 11 | * notice, this list of conditions and the following disclaimer in the 12 | * documentation and/or other materials provided with the distribution. 13 | * 3. Neither the name of the Institute nor the names of its contributors 14 | * may be used to endorse or promote products derived from this software 15 | * without specific prior written permission. 16 | * 17 | * THIS SOFTWARE IS PROVIDED BY THE INSTITUTE AND CONTRIBUTORS ``AS IS'' AND 18 | * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 19 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 20 | * ARE DISCLAIMED. IN NO EVENT SHALL THE INSTITUTE OR CONTRIBUTORS BE LIABLE 21 | * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 22 | * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 23 | * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 24 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 25 | * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 26 | * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 27 | * SUCH DAMAGE. 28 | * 29 | * This file is part of the lwIP TCP/IP stack. 30 | * 31 | * Author: Adam Dunkels 32 | * 33 | * $Id: perf.h,v 1.1 2007/06/14 12:33:57 kieranm Exp $ 34 | */ 35 | #ifndef __PERF_H__ 36 | #define __PERF_H__ 37 | 38 | #define PERF_START /* null definition */ 39 | #define PERF_STOP(x) /* null definition */ 40 | 41 | #endif /* __PERF_H__ */ 42 | -------------------------------------------------------------------------------- /ports/old/ti_c6711/include/arch/perf.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2001, Swedish Institute of Computer Science. 3 | * All rights reserved. 4 | * 5 | * Redistribution and use in source and binary forms, with or without 6 | * modification, are permitted provided that the following conditions 7 | * are met: 8 | * 1. Redistributions of source code must retain the above copyright 9 | * notice, this list of conditions and the following disclaimer. 10 | * 2. Redistributions in binary form must reproduce the above copyright 11 | * notice, this list of conditions and the following disclaimer in the 12 | * documentation and/or other materials provided with the distribution. 13 | * 3. Neither the name of the Institute nor the names of its contributors 14 | * may be used to endorse or promote products derived from this software 15 | * without specific prior written permission. 16 | * 17 | * THIS SOFTWARE IS PROVIDED BY THE INSTITUTE AND CONTRIBUTORS ``AS IS'' AND 18 | * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 19 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 20 | * ARE DISCLAIMED. IN NO EVENT SHALL THE INSTITUTE OR CONTRIBUTORS BE LIABLE 21 | * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 22 | * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 23 | * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 24 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 25 | * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 26 | * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 27 | * SUCH DAMAGE. 28 | * 29 | * This file is part of the lwIP TCP/IP stack. 30 | * 31 | * Author: Adam Dunkels 32 | * 33 | * $Id: perf.h,v 1.1 2007/06/14 12:34:09 kieranm Exp $ 34 | */ 35 | #ifndef __PERF_H__ 36 | #define __PERF_H__ 37 | 38 | #define PERF_START /* null definition */ 39 | #define PERF_STOP(x) /* null definition */ 40 | 41 | #endif /* __PERF_H__ */ 42 | -------------------------------------------------------------------------------- /ports/old/ti_c6711/include/arch/init.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2001, Swedish Institute of Computer Science. 3 | * All rights reserved. 4 | * 5 | * Redistribution and use in source and binary forms, with or without 6 | * modification, are permitted provided that the following conditions 7 | * are met: 8 | * 1. Redistributions of source code must retain the above copyright 9 | * notice, this list of conditions and the following disclaimer. 10 | * 2. Redistributions in binary form must reproduce the above copyright 11 | * notice, this list of conditions and the following disclaimer in the 12 | * documentation and/or other materials provided with the distribution. 13 | * 3. Neither the name of the Institute nor the names of its contributors 14 | * may be used to endorse or promote products derived from this software 15 | * without specific prior written permission. 16 | * 17 | * THIS SOFTWARE IS PROVIDED BY THE INSTITUTE AND CONTRIBUTORS ``AS IS'' AND 18 | * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 19 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 20 | * ARE DISCLAIMED. IN NO EVENT SHALL THE INSTITUTE OR CONTRIBUTORS BE LIABLE 21 | * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 22 | * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 23 | * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 24 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 25 | * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 26 | * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 27 | * SUCH DAMAGE. 28 | * 29 | * This file is part of the lwIP TCP/IP stack. 30 | * 31 | * Author: Adam Dunkels 32 | * 33 | * $Id: init.h,v 1.1 2007/06/14 12:34:09 kieranm Exp $ 34 | */ 35 | #ifndef __ARCH_INIT_H__ 36 | #define __ARCH_INIT_H__ 37 | 38 | #define TCPIP_INIT_DONE(arg) sys_sem_signal(*(sys_sem_t *)arg) 39 | 40 | #endif /* __ARCH_INIT_H__ */ 41 | 42 | 43 | 44 | 45 | -------------------------------------------------------------------------------- /ports/unix/README: -------------------------------------------------------------------------------- 1 | This port contains infrastructure and examples for running lwIP on Unix-like 2 | operating systems (Linux, OpenBSD, cygwin). Much of this is targetted towards 3 | testing lwIP applications. 4 | 5 | * port/sys_arch.c, port/perf.c, port/include/arch/: Generic platform porting, 6 | for both states of NO_SYS. (Mapping debugging to printf, providing 7 | sys_now & co from the system time etc.) 8 | 9 | * check: Runs the unit tests shipped with main lwIP on the Unix port. 10 | 11 | * fuzz: Helper application for fuzzing the lwIP stack 12 | 13 | * port/netif, port/include/netif: Various network interface implementations and 14 | their helpers, some explicitly for Unix infrastructure, some generic (but most 15 | useful on an easy to debug system): 16 | 17 | * delif: Network interface that inserts delay before receiving or sending 18 | packages 19 | 20 | * fifo: Helper for sio 21 | 22 | * list: Helper for unixif 23 | 24 | * pcapif: Network interface that replays packages from a PCAP dump file, and 25 | discards packages sent out from it 26 | 27 | * sio: Mapping Unix character devices to lwIP's sio mechanisms 28 | 29 | * tapif: Network interface that is mapped to a tap interface (Unix user 30 | space layer 2 network device). Uses lwIP threads. 31 | 32 | * tcpdump: Utility functions to dump pbufs into a tcpdump formatted log 33 | file 34 | 35 | * tunif: Network interface that is mapped to a tun interface (Unix user 36 | space layer 3 network device). Uses lwIP threads. 37 | 38 | * unixif: Network interface that allows lwIP Unix programs to "meet" at Unix 39 | socket address and exchange traffic over it. 40 | 41 | * lib: Compiling lwIP as a shared library 42 | 43 | * minimal: Standalone example program that runs in NO_SYS=1 mode. 44 | Contains the mintapif network interface implementation, which is similar to 45 | netif/tapif, but runs without threads. 46 | 47 | Runs an echo server and SNMP. 48 | 49 | * unixsim: Standalone example program that runs in NO_SYS=0 mode. Uses 50 | the tapif network interface. 51 | 52 | Runs an HTTP server. 53 | -------------------------------------------------------------------------------- /ports/old/ti_c6711/include/arch/lib.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2001, Swedish Institute of Computer Science. 3 | * All rights reserved. 4 | * 5 | * Redistribution and use in source and binary forms, with or without 6 | * modification, are permitted provided that the following conditions 7 | * are met: 8 | * 1. Redistributions of source code must retain the above copyright 9 | * notice, this list of conditions and the following disclaimer. 10 | * 2. Redistributions in binary form must reproduce the above copyright 11 | * notice, this list of conditions and the following disclaimer in the 12 | * documentation and/or other materials provided with the distribution. 13 | * 3. Neither the name of the Institute nor the names of its contributors 14 | * may be used to endorse or promote products derived from this software 15 | * without specific prior written permission. 16 | * 17 | * THIS SOFTWARE IS PROVIDED BY THE INSTITUTE AND CONTRIBUTORS ``AS IS'' AND 18 | * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 19 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 20 | * ARE DISCLAIMED. IN NO EVENT SHALL THE INSTITUTE OR CONTRIBUTORS BE LIABLE 21 | * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 22 | * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 23 | * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 24 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 25 | * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 26 | * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 27 | * SUCH DAMAGE. 28 | * 29 | * This file is part of the lwIP TCP/IP stack. 30 | * 31 | * Author: Adam Dunkels 32 | * 33 | * $Id: lib.h,v 1.1 2007/06/14 12:34:09 kieranm Exp $ 34 | */ 35 | #ifndef __LIB_H__ 36 | #define __LIB_H__ 37 | 38 | #include "arch/cc.h" 39 | 40 | u16_t htons(u16_t n); 41 | u16_t ntohs(u16_t n); 42 | u32_t htonl(u32_t n); 43 | u32_t ntohl(u32_t n); 44 | 45 | #endif /* __LIB_H__ */ 46 | -------------------------------------------------------------------------------- /apps/LwipMibCompiler/CCodeGeneration/PlainText.cs: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2001-2004 Swedish Institute of Computer Science. 3 | * All rights reserved. 4 | * 5 | * Redistribution and use in source and binary forms, with or without modification, 6 | * are permitted provided that the following conditions are met: 7 | * 8 | * 1. Redistributions of source code must retain the above copyright notice, 9 | * this list of conditions and the following disclaimer. 10 | * 2. Redistributions in binary form must reproduce the above copyright notice, 11 | * this list of conditions and the following disclaimer in the documentation 12 | * and/or other materials provided with the distribution. 13 | * 3. The name of the author may not be used to endorse or promote products 14 | * derived from this software without specific prior written permission. 15 | * 16 | * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED 17 | * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF 18 | * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT 19 | * SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, 20 | * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT 21 | * OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 22 | * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 23 | * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING 24 | * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY 25 | * OF SUCH DAMAGE. 26 | * 27 | * This file is part of the lwIP TCP/IP stack. 28 | * 29 | * Author: Martin Hentschel 30 | * 31 | */ 32 | 33 | namespace CCodeGeneration 34 | { 35 | public class PlainText : CodeElement 36 | { 37 | public string Value { get; set; } 38 | 39 | public PlainText(string value) 40 | { 41 | this.Value = value; 42 | } 43 | 44 | public override void GenerateCode(int level, CGenerator generator) 45 | { 46 | generator.WriteMultilineString(this.Value); 47 | } 48 | } 49 | } 50 | -------------------------------------------------------------------------------- /ports/unix/lib/Makefile: -------------------------------------------------------------------------------- 1 | # 2 | # Copyright (c) 2001, 2002 Swedish Institute of Computer Science. 3 | # All rights reserved. 4 | # 5 | # Redistribution and use in source and binary forms, with or without modification, 6 | # are permitted provided that the following conditions are met: 7 | # 8 | # 1. Redistributions of source code must retain the above copyright notice, 9 | # this list of conditions and the following disclaimer. 10 | # 2. Redistributions in binary form must reproduce the above copyright notice, 11 | # this list of conditions and the following disclaimer in the documentation 12 | # and/or other materials provided with the distribution. 13 | # 3. The name of the author may not be used to endorse or promote products 14 | # derived from this software without specific prior written permission. 15 | # 16 | # THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED 17 | # WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF 18 | # MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT 19 | # SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, 20 | # EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT 21 | # OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 22 | # INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 23 | # CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING 24 | # IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY 25 | # OF SUCH DAMAGE. 26 | # 27 | # This file is part of the lwIP TCP/IP stack. 28 | # 29 | # Author: Adam Dunkels 30 | # 31 | 32 | UNIXLIB=liblwip.a 33 | 34 | all: $(UNIXLIB) 35 | .PHONY: all 36 | 37 | include ../Common.mk 38 | 39 | CFLAGS+=-fPIC 40 | 41 | clean: 42 | rm -f *.o $(LWIPLIBCOMMON) *.s .depend* *.core core 43 | 44 | depend dep: .depend 45 | 46 | include .depend 47 | 48 | $(UNIXLIB): $(LWIPLIBCOMMON) unixlib.o 49 | $(CC) -g -nostartfiles -shared -o $@ $^ 50 | 51 | .depend: unixlib.c $(LWIPFILES) 52 | $(CCDEP) $(CFLAGS) -MM $^ > .depend || rm -f .depend 53 | -------------------------------------------------------------------------------- /ports/unix/Common.mk: -------------------------------------------------------------------------------- 1 | # 2 | # Copyright (c) 2001, 2002 Swedish Institute of Computer Science. 3 | # All rights reserved. 4 | # 5 | # Redistribution and use in source and binary forms, with or without modification, 6 | # are permitted provided that the following conditions are met: 7 | # 8 | # 1. Redistributions of source code must retain the above copyright notice, 9 | # this list of conditions and the following disclaimer. 10 | # 2. Redistributions in binary form must reproduce the above copyright notice, 11 | # this list of conditions and the following disclaimer in the documentation 12 | # and/or other materials provided with the distribution. 13 | # 3. The name of the author may not be used to endorse or promote products 14 | # derived from this software without specific prior written permission. 15 | # 16 | # THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED 17 | # WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF 18 | # MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT 19 | # SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, 20 | # EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT 21 | # OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 22 | # INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 23 | # CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING 24 | # IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY 25 | # OF SUCH DAMAGE. 26 | # 27 | # This file is part of the lwIP TCP/IP stack. 28 | # 29 | # Author: Adam Dunkels 30 | # 31 | 32 | # Architecture specific files. 33 | LWIPARCH?=$(CONTRIBDIR)/ports/unix/port 34 | SYSARCH?=$(LWIPARCH)/sys_arch.c 35 | ARCHFILES=$(LWIPARCH)/perf.c $(SYSARCH) $(LWIPARCH)/netif/tapif.c $(LWIPARCH)/netif/tunif.c \ 36 | $(LWIPARCH)/netif/unixif.c $(LWIPARCH)/netif/list.c $(LWIPARCH)/netif/tcpdump.c \ 37 | $(LWIPARCH)/netif/delif.c $(LWIPARCH)/netif/sio.c $(LWIPARCH)/netif/fifo.c 38 | 39 | include ../../Common.allports.mk 40 | 41 | LDFLAGS+=-pthread -lutil -lrt 42 | -------------------------------------------------------------------------------- /ports/unix/unixsim/README: -------------------------------------------------------------------------------- 1 | This directory contains an example of how a project using lwIP might 2 | look. It is also the development platform of lwIP, since it can be run 3 | as a user process under FreeBSD or Linux. There are also a number of 4 | example applications (including a simple web server) in the apps/ 5 | directory. 6 | 7 | Some short instructions on how to build and run lwIP on a FreeBSD or 8 | Linux host. For FreeBSD, the tap interface must be enabled in the 9 | kernel configuration and the kernel must be recompiled. The tap 10 | interface is enabled by adding the line "pseudo-device tap" in the 11 | kernel configuration. See Chapter 9 in the FreeBSD handbook for 12 | instructions on how to build a custom FreeBSD kernel. 13 | 14 | For Linux you might need to create a device node with 15 | 16 | > mknod /dev/net/tun c 10 200 17 | 18 | * Compile the code. This must be done by using GNU Make. Under 19 | FreeBSD, GNU Make can be found in the ports collection under 20 | /usr/ports/devel/gmake (type "make install distclean" to 21 | install). Under Linux, GNU Make is the default "make". 22 | 23 | > gmake (FreeBSD) 24 | 25 | > make (Linux) 26 | 27 | * The compilation process produces the executable file "simhost". To 28 | run this, you have to be root. 29 | 30 | > su (Type password for the root account) 31 | # ./simhost 32 | 33 | * The lwIP TCP/IP stack is now running with IP address 34 | 192.168.0.2. Some things that you can try: 35 | 36 | To see the packets that are going to and from the lwIP stack, run 37 | tcpdump: 38 | 39 | # tcpdump -l -n -i tap0 40 | 41 | You can ping lwIP: 42 | 43 | > ping 192.168.0.2 44 | 45 | For a telnet shell, run: 46 | 47 | > telnet 192.168.0.2 48 | 49 | Finally, "simhost" also includes a simple web server; the URL is 50 | of course http://192.168.0.2/. 51 | 52 | * Simhost has some extra features that can be 53 | selected with command line options. 54 | 55 | To enable runtime debug output (project must be build with -DLWIP_DEBUG): 56 | 57 | # ./simhost -d 58 | 59 | To ping any host, e.g. the gateway: 60 | 61 | # ./simhost -p 192.168.0.1 62 | -------------------------------------------------------------------------------- /addons/ipv6_static_routing/README: -------------------------------------------------------------------------------- 1 | A simple routing table implementation for addition, deletion and lookup of IPv6 routes.  2 | 3 | APIs are: 4 | 1) s8_t ip6_add_route_entry(struct ip6_prefix *ip6_prefix, 5 |                             struct netif *netif, 6 |                             ip6_addr_t *gateway, 7 |                             s8_t *index); 8 | 9 | 2) err_t ip6_remove_route_entry(struct ip6_prefix *ip6_prefix); 10 | 11 | 3) s8_t ip6_find_route_entry(ip6_addr_t *ip6_dest_addr); 12 | 13 | 4) struct netif *ip6_static_route(ip6_addr_t *src, ip6_addr_t *dest); 14 | 15 | 5) ip6_addr_t *ip6_get_gateway(struct netif *netif, ip6_addr_t *dest); 16 | 17 | 6) struct ip6_route_entry *ip6_get_route_table(void); 18 | 19 | For route lookup from the table, The LWIP_HOOK_IP6_ROUTE hook in ip6_route(..) of ip6.c 20 | could be assigned to the ip6_static_route() API of this implementation to return the 21 | appropriate netif. 22 | 23 | -- The application can add routes using the API ip6_add_route_entry(..).  24 |    This API adds the ip6 prefix route into the static route table while 25 |    keeping all entries sorted in decreasing order of prefix length. 26 |    Subsequently, a linear search down the list can be performed to retrieve a 27 |    matching route entry for a Longest Prefix Match. 28 |    The prefix length is expected to be at an 8-bit boundary. While this is  29 |    a limitation, it would serve most practical purposes. 30 | 31 | -- The application can remove routes using the API ip6_remove_route_entry(..). 32 | 33 | -- The application can find a route entry for a specific address using the  34 |    ip6_find_route_entry() function which returns the index of the found entry.  35 |    This is used internally by the route lookup function ip6_static_route() API. 36 | 37 | -- To fetch the gateway IPv6 address for a specific destination IPv6  38 |    address and target netif, the application can call ip6_get_gateway(..). 39 | This API could be assigned to the LWIP_HOOK_ND6_GET_GW() if a gateway has 40 | been added as part of the ip6_add_route_entry(). 41 | 42 | -- To fetch a pointer to the head of the table, the application can call  43 |    ip6_get_route_table(). 44 | -------------------------------------------------------------------------------- /apps/LwipMibCompiler/CCodeGeneration/CFile.cs: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2001-2004 Swedish Institute of Computer Science. 3 | * All rights reserved. 4 | * 5 | * Redistribution and use in source and binary forms, with or without modification, 6 | * are permitted provided that the following conditions are met: 7 | * 8 | * 1. Redistributions of source code must retain the above copyright notice, 9 | * this list of conditions and the following disclaimer. 10 | * 2. Redistributions in binary form must reproduce the above copyright notice, 11 | * this list of conditions and the following disclaimer in the documentation 12 | * and/or other materials provided with the distribution. 13 | * 3. The name of the author may not be used to endorse or promote products 14 | * derived from this software without specific prior written permission. 15 | * 16 | * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED 17 | * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF 18 | * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT 19 | * SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, 20 | * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT 21 | * OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 22 | * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 23 | * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING 24 | * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY 25 | * OF SUCH DAMAGE. 26 | * 27 | * This file is part of the lwIP TCP/IP stack. 28 | * 29 | * Author: Martin Hentschel 30 | * 31 | */ 32 | 33 | using System; 34 | 35 | namespace CCodeGeneration 36 | { 37 | public class CFile: CodeContainerBase 38 | { 39 | public CFile() 40 | { 41 | base.IncreaseLevel = false; 42 | } 43 | 44 | public void Save(CGenerator generator) 45 | { 46 | if (generator == null) 47 | { 48 | throw new ArgumentNullException("generator"); 49 | } 50 | 51 | this.GenerateCode(0, generator); 52 | } 53 | } 54 | } 55 | -------------------------------------------------------------------------------- /ports/old/coldfire/netif/tcpdump.c: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2001-2003 Swedish Institute of Computer Science. 3 | * All rights reserved. 4 | * 5 | * Redistribution and use in source and binary forms, with or without modification, 6 | * are permitted provided that the following conditions are met: 7 | * 8 | * 1. Redistributions of source code must retain the above copyright notice, 9 | * this list of conditions and the following disclaimer. 10 | * 2. Redistributions in binary form must reproduce the above copyright notice, 11 | * this list of conditions and the following disclaimer in the documentation 12 | * and/or other materials provided with the distribution. 13 | * 3. The name of the author may not be used to endorse or promote products 14 | * derived from this software without specific prior written permission. 15 | * 16 | * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED 17 | * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF 18 | * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT 19 | * SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, 20 | * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT 21 | * OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 22 | * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 23 | * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING 24 | * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY 25 | * OF SUCH DAMAGE. 26 | * 27 | * This file is part of the lwIP TCP/IP stack. 28 | * 29 | * Author: Adam Dunkels 30 | * 31 | */ 32 | 33 | #include 34 | 35 | #include "netif/tcpdump.h" 36 | #include "lwip/ip.h" 37 | #include "lwip/tcp.h" 38 | #include "lwip/udp.h" 39 | #include "lwip/inet.h" 40 | 41 | /*-----------------------------------------------------------------------------------*/ 42 | void 43 | tcpdump(struct pbuf *p) 44 | { 45 | } 46 | /*-----------------------------------------------------------------------------------*/ 47 | 48 | 49 | 50 | 51 | -------------------------------------------------------------------------------- /apps/LwipMibCompiler/MibViewer/Program.cs: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2001-2004 Swedish Institute of Computer Science. 3 | * All rights reserved. 4 | * 5 | * Redistribution and use in source and binary forms, with or without modification, 6 | * are permitted provided that the following conditions are met: 7 | * 8 | * 1. Redistributions of source code must retain the above copyright notice, 9 | * this list of conditions and the following disclaimer. 10 | * 2. Redistributions in binary form must reproduce the above copyright notice, 11 | * this list of conditions and the following disclaimer in the documentation 12 | * and/or other materials provided with the distribution. 13 | * 3. The name of the author may not be used to endorse or promote products 14 | * derived from this software without specific prior written permission. 15 | * 16 | * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED 17 | * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF 18 | * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT 19 | * SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, 20 | * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT 21 | * OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 22 | * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 23 | * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING 24 | * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY 25 | * OF SUCH DAMAGE. 26 | * 27 | * This file is part of the lwIP TCP/IP stack. 28 | * 29 | * Author: Martin Hentschel 30 | * 31 | */ 32 | 33 | using System; 34 | using System.Windows.Forms; 35 | 36 | namespace LwipMibViewer 37 | { 38 | static class Program 39 | { 40 | /// 41 | /// Der Haupteinstiegspunkt für die Anwendung. 42 | /// 43 | [STAThread] 44 | static void Main() 45 | { 46 | Application.EnableVisualStyles(); 47 | Application.SetCompatibleTextRenderingDefault(false); 48 | Application.Run(new FormMain()); 49 | } 50 | } 51 | } 52 | -------------------------------------------------------------------------------- /addons/tcp_isn/tcp_isn.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2016 The MINIX 3 Project. 3 | * All rights reserved. 4 | * 5 | * Redistribution and use in source and binary forms, with or without modification, 6 | * are permitted provided that the following conditions are met: 7 | * 8 | * 1. Redistributions of source code must retain the above copyright notice, 9 | * this list of conditions and the following disclaimer. 10 | * 2. Redistributions in binary form must reproduce the above copyright notice, 11 | * this list of conditions and the following disclaimer in the documentation 12 | * and/or other materials provided with the distribution. 13 | * 3. The name of the author may not be used to endorse or promote products 14 | * derived from this software without specific prior written permission. 15 | * 16 | * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED 17 | * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF 18 | * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT 19 | * SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, 20 | * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT 21 | * OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 22 | * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 23 | * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING 24 | * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY 25 | * OF SUCH DAMAGE. 26 | * 27 | * Author: David van Moolenbroek 28 | */ 29 | 30 | #ifndef LWIP_HDR_CONTRIB_ADDONS_TCP_ISN_H 31 | #define LWIP_HDR_CONTRIB_ADDONS_TCP_ISN_H 32 | 33 | #include "lwip/opt.h" 34 | #include "lwip/ip_addr.h" 35 | 36 | #ifdef __cplusplus 37 | extern "C" { 38 | #endif 39 | 40 | void lwip_init_tcp_isn(u32_t boot_time, const u8_t *secret_16_bytes); 41 | u32_t lwip_hook_tcp_isn(const ip_addr_t *local_ip, u16_t local_port, 42 | const ip_addr_t *remote_ip, u16_t remote_port); 43 | 44 | #ifdef __cplusplus 45 | } 46 | #endif 47 | 48 | #endif /* LWIP_HDR_CONTRIB_ADDONS_TCP_ISN_H */ 49 | -------------------------------------------------------------------------------- /ports/unix/minimal/Makefile: -------------------------------------------------------------------------------- 1 | # 2 | # Copyright (c) 2001, 2002 Swedish Institute of Computer Science. 3 | # All rights reserved. 4 | # 5 | # Redistribution and use in source and binary forms, with or without modification, 6 | # are permitted provided that the following conditions are met: 7 | # 8 | # 1. Redistributions of source code must retain the above copyright notice, 9 | # this list of conditions and the following disclaimer. 10 | # 2. Redistributions in binary form must reproduce the above copyright notice, 11 | # this list of conditions and the following disclaimer in the documentation 12 | # and/or other materials provided with the distribution. 13 | # 3. The name of the author may not be used to endorse or promote products 14 | # derived from this software without specific prior written permission. 15 | # 16 | # THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED 17 | # WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF 18 | # MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT 19 | # SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, 20 | # EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT 21 | # OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 22 | # INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 23 | # CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING 24 | # IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY 25 | # OF SUCH DAMAGE. 26 | # 27 | # This file is part of the lwIP TCP/IP stack. 28 | # 29 | # Author: Adam Dunkels 30 | # 31 | 32 | all ipv4 compile: echop 33 | .PHONY: all 34 | 35 | include ../Common.mk 36 | 37 | clean: 38 | rm -f *.o $(LWIPLIBCOMMON) $(APPLIB) echop .depend* *.core core 39 | 40 | depend dep: .depend 41 | 42 | include .depend 43 | 44 | .depend: main.c $(LWIPFILES) $(APPFILES) 45 | $(CCDEP) $(CFLAGS) -MM $^ > .depend || rm -f .depend 46 | 47 | echop: .depend $(LWIPLIBCOMMON) $(APPLIB) main.o $(APPFILES) 48 | $(CC) $(CFLAGS) -o echop main.o -Wl,--start-group $(APPLIB) $(LWIPLIBCOMMON) -Wl,--end-group $(LDFLAGS) 49 | -------------------------------------------------------------------------------- /ports/win32/mingw/Makefile: -------------------------------------------------------------------------------- 1 | # 2 | # Copyright (c) 2001, 2002 Swedish Institute of Computer Science. 3 | # All rights reserved. 4 | # 5 | # Redistribution and use in source and binary forms, with or without modification, 6 | # are permitted provided that the following conditions are met: 7 | # 8 | # 1. Redistributions of source code must retain the above copyright notice, 9 | # this list of conditions and the following disclaimer. 10 | # 2. Redistributions in binary form must reproduce the above copyright notice, 11 | # this list of conditions and the following disclaimer in the documentation 12 | # and/or other materials provided with the distribution. 13 | # 3. The name of the author may not be used to endorse or promote products 14 | # derived from this software without specific prior written permission. 15 | # 16 | # THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED 17 | # WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF 18 | # MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT 19 | # SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, 20 | # EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT 21 | # OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 22 | # INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 23 | # CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING 24 | # IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY 25 | # OF SUCH DAMAGE. 26 | # 27 | # This file is part of the lwIP TCP/IP stack. 28 | # 29 | # Author: Adam Dunkels 30 | # 31 | 32 | all ipv4 compile: test 33 | .PHONY: all 34 | 35 | include Common.mk 36 | 37 | clean: 38 | cmd /c del /q *.o $(LWIPLIBCOMMON) $(APPLIB) test.exe *.s .depend* *.map 39 | 40 | depend dep: .depend 41 | 42 | include .depend 43 | 44 | .depend: $(LWIPFILES) $(APPFILES) 45 | $(CCDEP) $(CFLAGS) -MM $^ > .depend || cmd /c del .depend 46 | 47 | test: .depend $(LWIPLIBCOMMON) $(APPLIB) test.o 48 | $(CC) $(CFLAGS) -o test test.o -Wl,--start-group $(APPLIB) $(LWIPLIBCOMMON) -Wl,--end-group $(LDFLAGS) -Xlinker -Map=test.map 49 | -------------------------------------------------------------------------------- /ports/old/ecos/ecos/net/lwip_tcpip/current/include/arch/sys_arch.h: -------------------------------------------------------------------------------- 1 | //========================================================================== 2 | //####ECOSGPLCOPYRIGHTBEGIN#### 3 | // ------------------------------------------- 4 | // This file is part of eCos, the Embedded Configurable Operating System. 5 | // Copyright (C) 1998, 1999, 2000, 2001, 2002 Red Hat, Inc. 6 | // 7 | // eCos is free software; you can redistribute it and/or modify it under 8 | // the terms of the GNU General Public License as published by the Free 9 | // Software Foundation; either version 2 or (at your option) any later version. 10 | // 11 | // eCos is distributed in the hope that it will be useful, but WITHOUT ANY 12 | // WARRANTY; without even the implied warranty of MERCHANTABILITY or 13 | // FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License 14 | // for more details. 15 | // 16 | // You should have received a copy of the GNU General Public License along 17 | // with eCos; if not, write to the Free Software Foundation, Inc., 18 | // 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. 19 | // 20 | // As a special exception, if other files instantiate templates or use macros 21 | // or inline functions from this file, or you compile this file and link it 22 | // with other works to produce a work based on this file, this file does not 23 | // by itself cause the resulting work to be covered by the GNU General Public 24 | // License. However the source code for this file must still be made available 25 | // in accordance with section (3) of the GNU General Public License. 26 | // 27 | // This exception does not invalidate any other reasons why a work based on 28 | // this file might be covered by the GNU General Public License. 29 | // ------------------------------------------- 30 | //####ECOSGPLCOPYRIGHTEND#### 31 | //========================================================================== 32 | 33 | #ifndef __SYS_ECOS_H__ 34 | #define __SYS_ECOS_H__ 35 | 36 | #include 37 | 38 | #define SYS_MBOX_NULL (sys_mbox_t)NULL 39 | #define SYS_SEM_NULL (sys_sem_t)NULL 40 | 41 | typedef cyg_sem_t * sys_sem_t; 42 | typedef cyg_handle_t sys_mbox_t; 43 | typedef cyg_thread * sys_thread_t; 44 | #endif /* __SYS_ECOS_H__ */ 45 | 46 | -------------------------------------------------------------------------------- /apps/LwipMibCompiler/CCodeGeneration/Code.cs: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2001-2004 Swedish Institute of Computer Science. 3 | * All rights reserved. 4 | * 5 | * Redistribution and use in source and binary forms, with or without modification, 6 | * are permitted provided that the following conditions are met: 7 | * 8 | * 1. Redistributions of source code must retain the above copyright notice, 9 | * this list of conditions and the following disclaimer. 10 | * 2. Redistributions in binary form must reproduce the above copyright notice, 11 | * this list of conditions and the following disclaimer in the documentation 12 | * and/or other materials provided with the distribution. 13 | * 3. The name of the author may not be used to endorse or promote products 14 | * derived from this software without specific prior written permission. 15 | * 16 | * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED 17 | * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF 18 | * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT 19 | * SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, 20 | * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT 21 | * OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 22 | * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 23 | * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING 24 | * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY 25 | * OF SUCH DAMAGE. 26 | * 27 | * This file is part of the lwIP TCP/IP stack. 28 | * 29 | * Author: Martin Hentschel 30 | * 31 | */ 32 | 33 | namespace CCodeGeneration 34 | { 35 | public class Code: CodeElement 36 | { 37 | public string Code_ { get; set; } 38 | 39 | public Code() 40 | { 41 | } 42 | 43 | public Code(string code) 44 | { 45 | this.Code_ = code; 46 | } 47 | 48 | public override void GenerateCode(int level, CGenerator generator) 49 | { 50 | generator.IndentLine(level); 51 | generator.WriteMultilineString(this.Code_, level); 52 | generator.WriteNewLine(); 53 | } 54 | 55 | } 56 | } 57 | -------------------------------------------------------------------------------- /apps/LwipMibCompiler/SharpSnmpLib/Mib/Elements/Imports.cs: -------------------------------------------------------------------------------- 1 | /* 2 | * Created by SharpDevelop. 3 | * User: lextm 4 | * Date: 2008/5/31 5 | * Time: 12:07 6 | * 7 | * To change this template use Tools | Options | Coding | Edit Standard Headers. 8 | */ 9 | 10 | using System.Collections.Generic; 11 | 12 | namespace Lextm.SharpSnmpLib.Mib.Elements 13 | { 14 | /// 15 | /// The IMPORTS construct is used to specify items used in the current MIB module which are defined in another MIB module or ASN.1 module. 16 | /// 17 | public sealed class Imports : List, IElement 18 | { 19 | private IModule _module; 20 | 21 | /// 22 | /// Creates an instance. 23 | /// 24 | /// 25 | public Imports(IModule module, ISymbolEnumerator symbols) 26 | { 27 | _module = module; 28 | 29 | Symbol current; 30 | while ((current = symbols.NextSymbol()) != Symbol.Semicolon) 31 | { 32 | if (current == Symbol.EOL) 33 | { 34 | continue; 35 | } 36 | 37 | ImportsFrom imports = new ImportsFrom(current, symbols); 38 | 39 | this.Add(imports); 40 | } 41 | } 42 | 43 | public IList Dependents 44 | { 45 | get 46 | { 47 | List result = new List(); 48 | 49 | foreach (ImportsFrom import in this) 50 | { 51 | result.Add(import.Module); 52 | } 53 | 54 | return result; 55 | } 56 | } 57 | 58 | public ImportsFrom GetImportFromType(string type) 59 | { 60 | foreach (ImportsFrom import in this) 61 | { 62 | if (import.Types.Contains(type)) 63 | { 64 | return import; 65 | } 66 | } 67 | 68 | return null; 69 | } 70 | 71 | #region IElement Member 72 | 73 | public IModule Module 74 | { 75 | get { return _module; } 76 | } 77 | 78 | #endregion 79 | 80 | } 81 | } -------------------------------------------------------------------------------- /ports/old/6502/include/arch/cc.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2001-2003 Swedish Institute of Computer Science. 3 | * All rights reserved. 4 | * 5 | * Redistribution and use in source and binary forms, with or without modification, 6 | * are permitted provided that the following conditions are met: 7 | * 8 | * 1. Redistributions of source code must retain the above copyright notice, 9 | * this list of conditions and the following disclaimer. 10 | * 2. Redistributions in binary form must reproduce the above copyright notice, 11 | * this list of conditions and the following disclaimer in the documentation 12 | * and/or other materials provided with the distribution. 13 | * 3. The name of the author may not be used to endorse or promote products 14 | * derived from this software without specific prior written permission. 15 | * 16 | * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED 17 | * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF 18 | * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT 19 | * SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, 20 | * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT 21 | * OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 22 | * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 23 | * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING 24 | * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY 25 | * OF SUCH DAMAGE. 26 | * 27 | * This file is part of the lwIP TCP/IP stack. 28 | * 29 | * Author: Adam Dunkels 30 | * 31 | */ 32 | #ifndef __CC_H__ 33 | #define __CC_H__ 34 | 35 | typedef unsigned char u8_t; 36 | typedef signed char s8_t; 37 | typedef unsigned short u16_t; 38 | typedef signed short s16_t; 39 | typedef unsigned long u32_t; 40 | typedef signed long s32_t; 41 | 42 | #define U16_F "hu" 43 | #define S16_F "hd" 44 | #define X16_F "hx" 45 | #define U32_F "lu" 46 | #define S32_F "ld" 47 | #define X32_F "lx" 48 | 49 | #define PACK_STRUCT_BEGIN 50 | #define PACK_STRUCT_STRUCT 51 | #define PACK_STRUCT_END 52 | #define PACK_STRUCT_FIELD(x) x 53 | 54 | #endif /* __CC_H__ */ 55 | -------------------------------------------------------------------------------- /ports/old/rtxc/include/arch/cc.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2001-2003 Swedish Institute of Computer Science. 3 | * All rights reserved. 4 | * 5 | * Redistribution and use in source and binary forms, with or without modification, 6 | * are permitted provided that the following conditions are met: 7 | * 8 | * 1. Redistributions of source code must retain the above copyright notice, 9 | * this list of conditions and the following disclaimer. 10 | * 2. Redistributions in binary form must reproduce the above copyright notice, 11 | * this list of conditions and the following disclaimer in the documentation 12 | * and/or other materials provided with the distribution. 13 | * 3. The name of the author may not be used to endorse or promote products 14 | * derived from this software without specific prior written permission. 15 | * 16 | * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED 17 | * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF 18 | * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT 19 | * SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, 20 | * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT 21 | * OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 22 | * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 23 | * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING 24 | * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY 25 | * OF SUCH DAMAGE. 26 | * 27 | * This file is part of the lwIP TCP/IP stack. 28 | * 29 | * Author: Adam Dunkels 30 | * 31 | */ 32 | #ifndef __CC_H__ 33 | #define __CC_H__ 34 | 35 | typedef unsigned char u8_t; 36 | typedef signed char s8_t; 37 | typedef unsigned short u16_t; 38 | typedef signed short s16_t; 39 | typedef unsigned long u32_t; 40 | typedef signed long s32_t; 41 | 42 | #define U16_F "hu" 43 | #define S16_F "hd" 44 | #define X16_F "hx" 45 | #define U32_F "lu" 46 | #define S32_F "ld" 47 | #define X32_F "lx" 48 | 49 | #define PACK_STRUCT_BEGIN 50 | #define PACK_STRUCT_STRUCT 51 | #define PACK_STRUCT_END 52 | #define PACK_STRUCT_FIELD(x) x 53 | 54 | #endif /* __CC_H__ */ 55 | -------------------------------------------------------------------------------- /ports/win32/mingw/Common.mk: -------------------------------------------------------------------------------- 1 | # 2 | # Copyright (c) 2001, 2002 Swedish Institute of Computer Science. 3 | # All rights reserved. 4 | # 5 | # Redistribution and use in source and binary forms, with or without modification, 6 | # are permitted provided that the following conditions are met: 7 | # 8 | # 1. Redistributions of source code must retain the above copyright notice, 9 | # this list of conditions and the following disclaimer. 10 | # 2. Redistributions in binary form must reproduce the above copyright notice, 11 | # this list of conditions and the following disclaimer in the documentation 12 | # and/or other materials provided with the distribution. 13 | # 3. The name of the author may not be used to endorse or promote products 14 | # derived from this software without specific prior written permission. 15 | # 16 | # THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED 17 | # WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF 18 | # MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT 19 | # SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, 20 | # EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT 21 | # OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 22 | # INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 23 | # CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING 24 | # IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY 25 | # OF SUCH DAMAGE. 26 | # 27 | # This file is part of the lwIP TCP/IP stack. 28 | # 29 | # Author: Adam Dunkels 30 | # 31 | 32 | CC=gcc 33 | 34 | # Architecture specific files. 35 | LWIPARCH?=$(CONTRIBDIR)/ports/win32 36 | ARCHFILES=$(LWIPARCH)/sys_arch.c $(LWIPARCH)/test.c $(LWIPARCH)/pcapif.c \ 37 | $(LWIPARCH)/pcapif_helper.c $(LWIPARCH)/sio.c 38 | 39 | include ../../Common.allports.mk 40 | 41 | PCAPDIR=$(PCAP_DIR)/Include 42 | LDFLAGS+=-L$(PCAP_DIR)/lib -lwpcap -lpacket 43 | # -Wno-format: GCC complains about non-standard 64 bit modifier needed for MSVC runtime 44 | CFLAGS+=-I$(PCAPDIR) -Wno-format 45 | 46 | pcapif.o: 47 | $(CC) $(CFLAGS) -Wno-error -Wno-redundant-decls -c $(<:.o=.c) 48 | pcapif_helper.o: 49 | $(CC) $(CFLAGS) -std=c99 -Wno-redundant-decls -c $(<:.o=.c) 50 | -------------------------------------------------------------------------------- /ports/win32/msvc/lwIP_Test.sln: -------------------------------------------------------------------------------- 1 | Microsoft Visual Studio Solution File, Format Version 11.00 2 | # Visual C++ Express 2010 3 | Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "lwIP_Test", "lwIP_Test.vcxproj", "{8CC0CE51-32CF-4585-BFAF-A9343BC5A96D}" 4 | EndProject 5 | Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "lwIP pcapif", "lwIP_pcapif.vcxproj", "{6F44E49E-9F21-4144-91EC-53B92AEF62CE}" 6 | EndProject 7 | Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "lwIP", "lwIP.vcxproj", "{2CC276FA-B226-49C9-8F82-7FCD5A228E28}" 8 | EndProject 9 | Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "makefsdata", "makefsdata.vcxproj", "{0BFC0F21-8E84-4E68-A9E1-CE2A09B72F6D}" 10 | EndProject 11 | Global 12 | GlobalSection(SolutionConfigurationPlatforms) = preSolution 13 | Debug|Win32 = Debug|Win32 14 | Release|Win32 = Release|Win32 15 | EndGlobalSection 16 | GlobalSection(ProjectConfigurationPlatforms) = postSolution 17 | {8CC0CE51-32CF-4585-BFAF-A9343BC5A96D}.Debug|Win32.ActiveCfg = Debug|Win32 18 | {8CC0CE51-32CF-4585-BFAF-A9343BC5A96D}.Debug|Win32.Build.0 = Debug|Win32 19 | {8CC0CE51-32CF-4585-BFAF-A9343BC5A96D}.Release|Win32.ActiveCfg = Release|Win32 20 | {8CC0CE51-32CF-4585-BFAF-A9343BC5A96D}.Release|Win32.Build.0 = Release|Win32 21 | {6F44E49E-9F21-4144-91EC-53B92AEF62CE}.Debug|Win32.ActiveCfg = Debug|Win32 22 | {6F44E49E-9F21-4144-91EC-53B92AEF62CE}.Debug|Win32.Build.0 = Debug|Win32 23 | {6F44E49E-9F21-4144-91EC-53B92AEF62CE}.Release|Win32.ActiveCfg = Release|Win32 24 | {6F44E49E-9F21-4144-91EC-53B92AEF62CE}.Release|Win32.Build.0 = Release|Win32 25 | {2CC276FA-B226-49C9-8F82-7FCD5A228E28}.Debug|Win32.ActiveCfg = Debug|Win32 26 | {2CC276FA-B226-49C9-8F82-7FCD5A228E28}.Debug|Win32.Build.0 = Debug|Win32 27 | {2CC276FA-B226-49C9-8F82-7FCD5A228E28}.Release|Win32.ActiveCfg = Release|Win32 28 | {2CC276FA-B226-49C9-8F82-7FCD5A228E28}.Release|Win32.Build.0 = Release|Win32 29 | {0BFC0F21-8E84-4E68-A9E1-CE2A09B72F6D}.Debug|Win32.ActiveCfg = Debug|Win32 30 | {0BFC0F21-8E84-4E68-A9E1-CE2A09B72F6D}.Debug|Win32.Build.0 = Debug|Win32 31 | {0BFC0F21-8E84-4E68-A9E1-CE2A09B72F6D}.Release|Win32.ActiveCfg = Release|Win32 32 | {0BFC0F21-8E84-4E68-A9E1-CE2A09B72F6D}.Release|Win32.Build.0 = Release|Win32 33 | EndGlobalSection 34 | GlobalSection(SolutionProperties) = preSolution 35 | HideSolutionNode = FALSE 36 | EndGlobalSection 37 | EndGlobal 38 | -------------------------------------------------------------------------------- /ports/old/v2pro/include/netif/xemacif.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2001, 2002, 2003 Xilinx, Inc. 3 | * All rights reserved. 4 | * 5 | * Redistribution and use in source and binary forms, with or without 6 | * modification, are permitted provided that the following conditions 7 | * are met: 8 | * 9 | * 1. Redistributions of source code must retain the above copyright notice, 10 | * this list of conditions and the following disclaimer. 11 | * 2. Redistributions in binary form must reproduce the above copyright notice, 12 | * this list of conditions and the following disclaimer in the documentation 13 | * and/or other materials provided with the distribution. 14 | * 3. The name of the author may not be used to endorse or promote products 15 | * derived from this software without specific prior written permission. 16 | * 17 | * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED 18 | * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF 19 | * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO 20 | * EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 21 | * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, 22 | * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; 23 | * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, 24 | * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR 25 | * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF 26 | * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 27 | * 28 | * This file is part of the lwIP TCP/IP stack. 29 | * 30 | * Author: Chris Borrelli 31 | * 32 | */ 33 | 34 | #ifndef __NETIF_XEMACIF_H__ 35 | #define __NETIF_XEMACIF_H__ 36 | 37 | #include "lwip/netif.h" 38 | #include "netif/etharp.h" 39 | #include "xemac.h" 40 | 41 | void xemacif_setmac(u32_t index, u8_t *addr); 42 | u8_t * xemacif_getmac(u32_t index); 43 | err_t xemacif_init(struct netif *netif); 44 | err_t xemacif_input(void *CallBackRef); 45 | 46 | /** 47 | * This typedef contains configuration information for an xemac instance. 48 | */ 49 | typedef struct 50 | { 51 | Xuint32 DevId; 52 | Xuint32 IntrId; 53 | struct eth_addr ethaddr; 54 | XEmac* instance_ptr; 55 | } XEmacIf_Config; 56 | 57 | #endif /* __NETIF_XEMACIF_H__ */ 58 | -------------------------------------------------------------------------------- /apps/LwipMibCompiler/CCodeGeneration/PP_Macro.cs: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2001-2004 Swedish Institute of Computer Science. 3 | * All rights reserved. 4 | * 5 | * Redistribution and use in source and binary forms, with or without modification, 6 | * are permitted provided that the following conditions are met: 7 | * 8 | * 1. Redistributions of source code must retain the above copyright notice, 9 | * this list of conditions and the following disclaimer. 10 | * 2. Redistributions in binary form must reproduce the above copyright notice, 11 | * this list of conditions and the following disclaimer in the documentation 12 | * and/or other materials provided with the distribution. 13 | * 3. The name of the author may not be used to endorse or promote products 14 | * derived from this software without specific prior written permission. 15 | * 16 | * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED 17 | * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF 18 | * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT 19 | * SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, 20 | * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT 21 | * OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 22 | * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 23 | * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING 24 | * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY 25 | * OF SUCH DAMAGE. 26 | * 27 | * This file is part of the lwIP TCP/IP stack. 28 | * 29 | * Author: Martin Hentschel 30 | * 31 | */ 32 | 33 | namespace CCodeGeneration 34 | { 35 | public class PP_Macro: CodeElement 36 | { 37 | public string Name { get; set; } 38 | public string Value { get; set; } 39 | 40 | public PP_Macro() 41 | { 42 | } 43 | 44 | public PP_Macro(string name, string value) 45 | { 46 | this.Name = name; 47 | this.Value = value; 48 | } 49 | 50 | 51 | public override void GenerateCode(int level, CGenerator generator) 52 | { 53 | // macros are not indented at all 54 | generator.OutputStream.Write("#define " + this.Name + " "); 55 | generator.WriteMultilineString(this.Value); 56 | generator.WriteNewLine(); 57 | } 58 | } 59 | } 60 | --------------------------------------------------------------------------------