├── README.txt ├── contrib-1.4.0 ├── apps │ ├── chargen │ │ ├── README │ │ ├── chargen.c │ │ └── chargen.h │ ├── httpserver │ │ ├── README │ │ ├── httpserver-netconn.c │ │ └── httpserver-netconn.h │ ├── httpserver_raw │ │ ├── fs.c │ │ ├── fs.h │ │ ├── fs │ │ │ ├── 404.html │ │ │ ├── img │ │ │ │ └── sics.gif │ │ │ └── index.html │ │ ├── fsdata.c │ │ ├── fsdata.h │ │ ├── httpd.c │ │ ├── httpd.h │ │ ├── httpd_structs.h │ │ └── makefsdata │ │ │ ├── makefsdata │ │ │ ├── makefsdata.c │ │ │ └── readme.txt │ ├── netbios │ │ ├── netbios.c │ │ └── netbios.h │ ├── netio │ │ ├── netio.c │ │ └── netio.h │ ├── ping │ │ ├── ping.c │ │ └── ping.h │ ├── rtp │ │ ├── rtp.c │ │ ├── rtp.h │ │ └── rtpdata.h │ ├── shell │ │ ├── shell.c │ │ └── shell.h │ ├── snmp_private_mib │ │ ├── lwip_prvmib.c │ │ └── private_mib.h │ ├── sntp │ │ ├── sntp.c │ │ └── sntp.h │ ├── socket_examples │ │ ├── socket_examples.c │ │ └── socket_examples.h │ ├── tcpecho │ │ ├── tcpecho.c │ │ └── tcpecho.h │ ├── tcpecho_raw │ │ ├── echo.c │ │ └── echo.h │ └── udpecho │ │ ├── udpecho.c │ │ └── udpecho.h └── ports │ ├── FILES │ ├── old │ ├── 6502 │ │ ├── README │ │ ├── include │ │ │ └── arch │ │ │ │ ├── cc.h │ │ │ │ ├── cpu.h │ │ │ │ ├── lib.h │ │ │ │ ├── perf.h │ │ │ │ └── sys_arch.h │ │ ├── lib_arch.c │ │ └── sys_c64.c │ ├── FILES │ ├── c16x │ │ ├── FILES │ │ ├── include │ │ │ ├── arch │ │ │ │ ├── cc.h │ │ │ │ ├── cpu.h │ │ │ │ ├── lib.h │ │ │ │ └── perf.h │ │ │ └── netif │ │ │ │ └── cs8900if.h │ │ ├── lib.c │ │ ├── netif │ │ │ └── cs8900if.c │ │ └── perf.c │ ├── coldfire │ │ ├── README │ │ ├── include │ │ │ ├── arch │ │ │ │ ├── cc.h │ │ │ │ ├── errno.h │ │ │ │ ├── mcf5272.h │ │ │ │ ├── perf.h │ │ │ │ └── sys_arch.h │ │ │ └── netif │ │ │ │ ├── 5272fec.h │ │ │ │ └── tcpdump.h │ │ ├── netif │ │ │ ├── 5272fec.c │ │ │ └── tcpdump.c │ │ ├── perf.c │ │ ├── proj │ │ │ └── lwipopts.h │ │ └── sys_arch.c │ ├── ecos │ │ ├── README │ │ ├── copy │ │ ├── ecos │ │ │ ├── net │ │ │ │ └── lwip_tcpip │ │ │ │ │ └── current │ │ │ │ │ ├── cdl │ │ │ │ │ └── lwip_net.cdl │ │ │ │ │ ├── include │ │ │ │ │ ├── arch │ │ │ │ │ │ ├── cc.h │ │ │ │ │ │ ├── perf.h │ │ │ │ │ │ └── sys_arch.h │ │ │ │ │ ├── lwipopts.h │ │ │ │ │ └── network.h │ │ │ │ │ ├── src │ │ │ │ │ └── ecos │ │ │ │ │ │ ├── init.c │ │ │ │ │ │ ├── sio.c │ │ │ │ │ │ └── sys_arch.c │ │ │ │ │ └── tests │ │ │ │ │ ├── httpd.c │ │ │ │ │ ├── nc_test_framework.h │ │ │ │ │ ├── nc_test_slave.c │ │ │ │ │ ├── socket.c │ │ │ │ │ ├── sys_timeout.c │ │ │ │ │ ├── tcpecho.c │ │ │ │ │ └── udpecho.c │ │ │ └── pkgadd.db │ │ ├── files │ │ ├── header │ │ └── mkepk │ ├── rtxc │ │ ├── include │ │ │ ├── arch │ │ │ │ ├── cc.h │ │ │ │ ├── cpu.h │ │ │ │ ├── init.h │ │ │ │ ├── lib.h │ │ │ │ ├── perf.h │ │ │ │ └── sys_arch.h │ │ │ └── netif │ │ │ │ ├── cs8900if.h │ │ │ │ └── sioslipif.h │ │ ├── lib.c │ │ ├── netif │ │ │ ├── FILES │ │ │ └── sioslipif.c │ │ ├── perf.c │ │ └── sys_arch.c │ ├── ti_c6711 │ │ ├── FILES │ │ ├── [Note] opt setting of lwIP .txt │ │ ├── include │ │ │ ├── arch │ │ │ │ ├── cc.h │ │ │ │ ├── init.h │ │ │ │ ├── lib.h │ │ │ │ ├── perf.h │ │ │ │ └── sys_arch.h │ │ │ └── netif │ │ │ │ └── ne2kif.h │ │ ├── lib_arch.c │ │ ├── netif │ │ │ └── ne2kif.c │ │ ├── proj │ │ │ ├── lwIP.c │ │ │ └── lwipopts.h │ │ └── sys_arch.c │ └── v2pro │ │ ├── Makefile │ │ ├── include │ │ ├── arch │ │ │ ├── cc.h │ │ │ ├── cpu.h │ │ │ ├── perf.h │ │ │ └── sys_arch.h │ │ └── netif │ │ │ └── xemacif.h │ │ ├── lib_arch.c │ │ ├── lwipopts.h │ │ ├── netif │ │ └── xemacif.c │ │ ├── perf.c │ │ └── sw_services │ │ └── lwip_v1_00_a │ │ ├── data │ │ ├── lwip_v2_1_0.mld │ │ └── lwip_v2_1_0.tcl │ │ └── src │ │ └── Makefile │ ├── unix │ ├── include │ │ ├── arch │ │ │ ├── cc.h │ │ │ ├── perf.h │ │ │ └── sys_arch.h │ │ └── netif │ │ │ ├── delif.h │ │ │ ├── dropif.h │ │ │ ├── fifo.h │ │ │ ├── list.h │ │ │ ├── pcapif.h │ │ │ ├── sio.h │ │ │ ├── tapif.h │ │ │ ├── tcpdump.h │ │ │ ├── tunif.h │ │ │ └── unixif.h │ ├── lwip_chksum.c │ ├── netif │ │ ├── delif.c │ │ ├── fifo.c │ │ ├── list.c │ │ ├── pcapif.c │ │ ├── sio.c │ │ ├── tapif.c │ │ ├── tcpdump.c │ │ ├── tunif.c │ │ └── unixif.c │ ├── perf.c │ ├── proj │ │ ├── lib │ │ │ ├── Makefile │ │ │ ├── README │ │ │ ├── lwipopts.h │ │ │ ├── lwipopts.old │ │ │ └── unixlib.c │ │ ├── minimal │ │ │ ├── Makefile │ │ │ ├── README │ │ │ ├── echo.c │ │ │ ├── echo.h │ │ │ ├── lwipopts.h │ │ │ ├── lwipopts.old │ │ │ ├── main.c │ │ │ ├── mintapif.c │ │ │ ├── mintapif.h │ │ │ ├── timer.c │ │ │ └── timer.h │ │ └── unixsim │ │ │ ├── Makefile │ │ │ ├── README │ │ │ ├── lwipopts.h │ │ │ ├── simhost.c │ │ │ ├── simnode.c │ │ │ └── simrouter.c │ └── sys_arch.c │ └── win32 │ ├── .cvsignore │ ├── check │ ├── config.h │ ├── sys │ │ └── time.h │ ├── time.c │ └── unistd.h │ ├── include │ ├── arch │ │ ├── bpstruct.h │ │ ├── cc.h │ │ ├── epstruct.h │ │ ├── perf.h │ │ └── sys_arch.h │ └── lwipopts.h │ ├── lwipcfg_msvc.h.example │ ├── lwippools.h │ ├── msvc8 │ ├── .cvsignore │ ├── libcheck.vcproj │ ├── lwIP.vcproj │ ├── lwIP_Test.sln │ ├── lwIP_Test.vcproj │ ├── lwIP_pcapif.vcproj │ ├── lwIP_pktif.vcproj │ ├── lwIP_unittests.sln │ ├── lwip_unittests.vcproj │ ├── makefsdata.vcproj │ └── readme.txt │ ├── pcap_helper.c │ ├── pcap_helper.h │ ├── pcapif.c │ ├── pcapif.h │ ├── pcapif_helper.c │ ├── pcapif_helper.h │ ├── pktdrv.c │ ├── pktdrv.h │ ├── pktif.c │ ├── pktif.h │ ├── readme.txt │ ├── sio.c │ ├── sys_arch.c │ └── test.c ├── lwip-1.4.0 ├── CHANGELOG ├── COPYING ├── FILES ├── README ├── UPGRADING ├── doc │ ├── FILES │ ├── contrib.txt │ ├── rawapi.txt │ ├── savannah.txt │ ├── snmp_agent.txt │ └── sys_arch.txt ├── src │ ├── .hgignore │ ├── FILES │ ├── api │ │ ├── api_lib.c │ │ ├── api_msg.c │ │ ├── err.c │ │ ├── netbuf.c │ │ ├── netdb.c │ │ ├── netifapi.c │ │ ├── sockets.c │ │ └── tcpip.c │ ├── core │ │ ├── def.c │ │ ├── dhcp.c │ │ ├── dns.c │ │ ├── init.c │ │ ├── ipv4 │ │ │ ├── autoip.c │ │ │ ├── icmp.c │ │ │ ├── igmp.c │ │ │ ├── inet.c │ │ │ ├── inet_chksum.c │ │ │ ├── ip.c │ │ │ ├── ip_addr.c │ │ │ └── ip_frag.c │ │ ├── ipv6 │ │ │ ├── README │ │ │ ├── icmp6.c │ │ │ ├── inet6.c │ │ │ ├── ip6.c │ │ │ └── ip6_addr.c │ │ ├── mem.c │ │ ├── memp.c │ │ ├── netif.c │ │ ├── pbuf.c │ │ ├── raw.c │ │ ├── snmp │ │ │ ├── asn1_dec.c │ │ │ ├── asn1_enc.c │ │ │ ├── mib2.c │ │ │ ├── mib_structs.c │ │ │ ├── msg_in.c │ │ │ └── msg_out.c │ │ ├── stats.c │ │ ├── sys.c │ │ ├── tcp.c │ │ ├── tcp_in.c │ │ ├── tcp_out.c │ │ ├── timers.c │ │ └── udp.c │ ├── include │ │ ├── ipv4 │ │ │ └── lwip │ │ │ │ ├── autoip.h │ │ │ │ ├── icmp.h │ │ │ │ ├── igmp.h │ │ │ │ ├── inet.h │ │ │ │ ├── inet_chksum.h │ │ │ │ ├── ip.h │ │ │ │ ├── ip_addr.h │ │ │ │ └── ip_frag.h │ │ ├── ipv6 │ │ │ └── lwip │ │ │ │ ├── icmp.h │ │ │ │ ├── inet.h │ │ │ │ ├── ip.h │ │ │ │ └── ip_addr.h │ │ ├── lwip │ │ │ ├── api.h │ │ │ ├── api_msg.h │ │ │ ├── arch.h │ │ │ ├── debug.h │ │ │ ├── def.h │ │ │ ├── dhcp.h │ │ │ ├── dns.h │ │ │ ├── err.h │ │ │ ├── init.h │ │ │ ├── mem.h │ │ │ ├── memp.h │ │ │ ├── memp_std.h │ │ │ ├── netbuf.h │ │ │ ├── netdb.h │ │ │ ├── netif.h │ │ │ ├── netifapi.h │ │ │ ├── opt.h │ │ │ ├── pbuf.h │ │ │ ├── raw.h │ │ │ ├── sio.h │ │ │ ├── snmp.h │ │ │ ├── snmp_asn1.h │ │ │ ├── snmp_msg.h │ │ │ ├── snmp_structs.h │ │ │ ├── sockets.h │ │ │ ├── stats.h │ │ │ ├── sys.h │ │ │ ├── tcp.h │ │ │ ├── tcp_impl.h │ │ │ ├── tcpip.h │ │ │ ├── timers.h │ │ │ └── udp.h │ │ └── netif │ │ │ ├── etharp.h │ │ │ ├── ppp_oe.h │ │ │ └── slipif.h │ └── netif │ │ ├── FILES │ │ ├── etharp.c │ │ ├── ethernetif.c │ │ ├── ppp │ │ ├── auth.c │ │ ├── auth.h │ │ ├── chap.c │ │ ├── chap.h │ │ ├── chpms.c │ │ ├── chpms.h │ │ ├── fsm.c │ │ ├── fsm.h │ │ ├── ipcp.c │ │ ├── ipcp.h │ │ ├── lcp.c │ │ ├── lcp.h │ │ ├── magic.c │ │ ├── magic.h │ │ ├── md5.c │ │ ├── md5.h │ │ ├── pap.c │ │ ├── pap.h │ │ ├── ppp.c │ │ ├── ppp.h │ │ ├── ppp_oe.c │ │ ├── pppdebug.h │ │ ├── randm.c │ │ ├── randm.h │ │ ├── vj.c │ │ └── vj.h │ │ └── slipif.c └── test │ └── unit │ ├── core │ ├── test_mem.c │ └── test_mem.h │ ├── etharp │ ├── test_etharp.c │ └── test_etharp.h │ ├── lwip_check.h │ ├── lwip_unittests.c │ ├── tcp │ ├── tcp_helper.c │ ├── tcp_helper.h │ ├── test_tcp.c │ ├── test_tcp.h │ ├── test_tcp_oos.c │ └── test_tcp_oos.h │ └── udp │ ├── test_udp.c │ └── test_udp.h └── nxpcommon ├── arch ├── Retarget.c ├── cc.h ├── lpc177x_8x │ ├── lpc177x_8x_systick_arch.c │ ├── lpc17_emac.c │ └── lpc17_emac.h ├── lpc18xx_43xx │ ├── lpc18xx_43xx_emac.c │ ├── lpc18xx_43xx_emac.h │ ├── lpc18xx_43xx_mac_regs.h │ └── lpc18xx_43xx_systick_arch.c ├── lpc_arch.h ├── lpc_debug.c ├── perf.h ├── sys_arch.c └── sys_arch.h ├── examples ├── lpc177x_8x │ ├── ea1788 │ │ ├── ea1788_common │ │ │ ├── IAR │ │ │ │ ├── configs │ │ │ │ │ ├── dram.icf │ │ │ │ │ └── flash.icf │ │ │ │ └── startup_ea1788.s │ │ │ ├── ea1788_board.c │ │ │ └── keil │ │ │ │ ├── configs │ │ │ │ ├── DRAM.ini │ │ │ │ ├── DRAM.sct │ │ │ │ ├── FLASH.ini │ │ │ │ ├── FLASH.sct │ │ │ │ ├── IRAM.ini │ │ │ │ └── IRAM.sct │ │ │ │ └── startup_ea1788.s │ │ ├── ea1788_http_freertos │ │ │ ├── keil │ │ │ │ ├── ea1788_http_freertos.uvopt │ │ │ │ └── ea1788_http_freertos.uvproj │ │ │ └── source │ │ │ │ ├── configs │ │ │ │ ├── dram │ │ │ │ │ ├── FreeRTOSConfig.h │ │ │ │ │ ├── lpc_emac_config.h │ │ │ │ │ └── lwipopts.h │ │ │ │ └── flash │ │ │ │ │ ├── FreeRTOSConfig.h │ │ │ │ │ ├── lpc_emac_config.h │ │ │ │ │ └── lwipopts.h │ │ │ │ └── ea1788_http_freertos.c │ │ ├── ea1788_httpraw_sa │ │ │ ├── iar │ │ │ │ ├── ea1788_httpraw_sa.ewd │ │ │ │ ├── ea1788_httpraw_sa.ewp │ │ │ │ ├── ea1788_httpraw_sa.eww │ │ │ │ └── settings │ │ │ │ │ ├── ea1788_httpraw_sa.cspy.bat │ │ │ │ │ ├── ea1788_httpraw_sa.dbgdt │ │ │ │ │ ├── ea1788_httpraw_sa.dni │ │ │ │ │ ├── ea1788_httpraw_sa.wsdt │ │ │ │ │ └── ea1788_httpraw_sa_flash_zc.jlink │ │ │ ├── keil │ │ │ │ ├── ea1788_httpdraw_sa.uvopt │ │ │ │ └── ea1788_httpdraw_sa.uvproj │ │ │ └── source │ │ │ │ ├── configs │ │ │ │ ├── dram │ │ │ │ │ ├── lpc_emac_config.h │ │ │ │ │ └── lwipopts.h │ │ │ │ ├── flash │ │ │ │ │ ├── lpc_emac_config.h │ │ │ │ │ └── lwipopts.h │ │ │ │ └── iram │ │ │ │ │ ├── lpc_emac_config.h │ │ │ │ │ └── lwipopts.h │ │ │ │ └── ea1788_httpraw_sa.c │ │ ├── ea1788_tcpecho_freertos │ │ │ ├── keil │ │ │ │ ├── ea1788_tcpecho_freertos.uvopt │ │ │ │ └── ea1788_tcpecho_freertos.uvproj │ │ │ └── source │ │ │ │ ├── configs │ │ │ │ ├── dram │ │ │ │ │ ├── FreeRTOSConfig.h │ │ │ │ │ ├── lpc_emac_config.h │ │ │ │ │ └── lwipopts.h │ │ │ │ └── flash │ │ │ │ │ ├── FreeRTOSConfig.h │ │ │ │ │ ├── lpc_emac_config.h │ │ │ │ │ └── lwipopts.h │ │ │ │ └── ea1788_tcpecho_freertos.c │ │ └── ea1788_tcpecho_sa │ │ │ ├── iar │ │ │ ├── ea1788_tcpecho_sa.ewd │ │ │ ├── ea1788_tcpecho_sa.ewp │ │ │ ├── ea1788_tcpecho_sa.eww │ │ │ └── settings │ │ │ │ ├── ea1788_tcpecho_sa.cspy.bat │ │ │ │ ├── ea1788_tcpecho_sa.dbgdt │ │ │ │ ├── ea1788_tcpecho_sa.dni │ │ │ │ ├── ea1788_tcpecho_sa.wsdt │ │ │ │ ├── ea1788_tcpecho_sa_dram_zc.jlink │ │ │ │ ├── ea1788_tcpecho_sa_flash_zc.jlink │ │ │ │ └── ea1788_tcpecho_sa_iram_zc.jlink │ │ │ ├── keil │ │ │ ├── ea1788_tcpecho_sa.uvopt │ │ │ └── ea1788_tcpecho_sa.uvproj │ │ │ └── source │ │ │ ├── configs │ │ │ ├── dram │ │ │ │ ├── lpc_emac_config.h │ │ │ │ └── lwipopts.h │ │ │ ├── flash │ │ │ │ ├── lpc_emac_config.h │ │ │ │ └── lwipopts.h │ │ │ └── iram │ │ │ │ ├── lpc_emac_config.h │ │ │ │ └── lwipopts.h │ │ │ └── ea1788_tcpecho_sa.c │ └── lpc177x_8x_common │ │ └── lpc177x_8x_freertos_hooks.c └── lpc18xx_43xx │ ├── lpc18xx_43xx_common │ └── lpc18xx_43xx_freertos_hooks.c │ └── lpc43xx │ └── hitex4350 │ ├── hitex4350_common │ ├── hitex4350_board.c │ └── keil │ │ ├── configs │ │ ├── IRAM.ini │ │ ├── IRAM.sct │ │ ├── flash.ini │ │ ├── flash.sct │ │ ├── spifi64.ini │ │ └── spifi64.sct │ │ └── startup_hitex4350_M4.s │ ├── hitex4350_http_freertos │ ├── keil │ │ ├── hitex4350_http_freertos.uvopt │ │ └── hitex4350_http_freertos.uvproj │ └── source │ │ ├── configs │ │ ├── flash │ │ │ ├── FreeRTOSConfig.h │ │ │ ├── lpc_emac_config.h │ │ │ └── lwipopts.h │ │ ├── iram │ │ │ ├── FreeRTOSConfig.h │ │ │ ├── lpc_emac_config.h │ │ │ └── lwipopts.h │ │ └── spifi64 │ │ │ ├── FreeRTOSConfig.h │ │ │ ├── lpc_emac_config.h │ │ │ └── lwipopts.h │ │ └── hitex4350_http_freertos.c │ ├── hitex4350_httpraw_sa │ ├── keil │ │ ├── hitex4350_http_sa.uvopt │ │ └── hitex4350_http_sa.uvproj │ └── source │ │ ├── configs │ │ ├── flash │ │ │ ├── lpc_emac_config.h │ │ │ └── lwipopts.h │ │ ├── iram │ │ │ ├── lpc_emac_config.h │ │ │ └── lwipopts.h │ │ └── spifi64 │ │ │ ├── lpc_emac_config.h │ │ │ └── lwipopts.h │ │ └── hitex1850_http_sa.c │ ├── hitex4350_tcpecho_freertos │ ├── keil │ │ ├── hitex4350_tcpecho_freertos.uvopt │ │ └── hitex4350_tcpecho_freertos.uvproj │ └── source │ │ ├── configs │ │ ├── flash │ │ │ ├── FreeRTOSConfig.h │ │ │ ├── lpc_emac_config.h │ │ │ └── lwipopts.h │ │ ├── iram │ │ │ ├── FreeRTOSConfig.h │ │ │ ├── lpc_emac_config.h │ │ │ └── lwipopts.h │ │ └── spifi64 │ │ │ ├── FreeRTOSConfig.h │ │ │ ├── lpc_emac_config.h │ │ │ └── lwipopts.h │ │ └── hitex4350_tcpecho_freertos.c │ └── hitex4350_tcpecho_sa │ ├── keil │ ├── hitex4350_tcpecho_sa.uvopt │ └── hitex4350_tcpecho_sa.uvproj │ └── source │ ├── configs │ ├── flash │ │ ├── lpc_emac_config.h │ │ └── lwipopts.h │ ├── iram │ │ ├── lpc_emac_config.h │ │ └── lwipopts.h │ └── spifi64 │ │ ├── lpc_emac_config.h │ │ └── lwipopts.h │ └── hitex1850_tcpecho_sa.c ├── lpc_board.h ├── lpc_lwip_doxygen.h ├── lpc_phy.h ├── lpc_phy_dp83848.c └── lpc_phy_lan8720.c /README.txt: -------------------------------------------------------------------------------- 1 | For information on this port - inbcluding installation and use 2 | instructions, benchmarks, memory requirements, and more, go to 3 | www.lpcware.com at click 4 | on the "projects" tab and then click on the 5 | "LightWeight IP (LWIP) networking stack" project. 6 | -------------------------------------------------------------------------------- /contrib-1.4.0/apps/chargen/README: -------------------------------------------------------------------------------- 1 | 2 | CHARGEN 3 | 4 | This file implements a nice example of handling multiple tcp sockets in a 5 | server environment. Just call chargen_init() from your application after 6 | you have initialized lwip and added your network interfaces. Change the 7 | MAX_SERV option to increase or decrease the number of sessions supported. 8 | 9 | chargen will jam as much data as possible into the output socket, so it 10 | will take up a lot of CPU time. Therefore it will be a good idea to run it 11 | as the lowest possible priority (just ahead of any idle task). 12 | 13 | This is also a good example of how to support multiple sessions in an 14 | embedded system where you might not have fork(). The multiple sessions are 15 | all handled by the same thread and select() is used for demultiplexing. 16 | 17 | No makefile is provided, just add chargen to the makefile for your 18 | application. It is OS and HW independent. 19 | 20 | Once the chargen server is running in your application, go to another system 21 | and open a telnet session to your lwip platform at port 19. You should see an 22 | ASCII pattern start to stream on you screen. 23 | 24 | As an example, lets say that your system running lwip is at IP address 25 | 192.168.10.244 and you have a linux system connected to it at IP address 26 | 192.168.10.59. Issue the following command at a terminal prompt on the linux system: 27 | 28 | telnet 192.168.10.244 19 29 | 30 | You will see a pattern similar to the following on streaming by on your 31 | screen: 32 | 33 | ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{ 34 | BCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{| 35 | CDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|} 36 | DEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~ 37 | EFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~! 38 | FGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~!" 39 | GHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~!"# 40 | HIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~!"#$ 41 | IJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~!"#$% 42 | JKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~!"#$%& 43 | KLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~!"#$%&' 44 | LMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~!"#$%&'( 45 | 46 | It even works from windows: At a dos prompt you can also issue the same 47 | telnet command and you will get a similar (but much slower, at least on W98) 48 | data stream. 49 | 50 | David Haas 51 | 52 | 53 | -------------------------------------------------------------------------------- /contrib-1.4.0/apps/chargen/chargen.h: -------------------------------------------------------------------------------- 1 | #ifndef __CHARGEN_H__ 2 | #define __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 | 13 | #endif /* __CHARGEN_H__ */ 14 | -------------------------------------------------------------------------------- /contrib-1.4.0/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 | -------------------------------------------------------------------------------- /contrib-1.4.0/apps/httpserver/httpserver-netconn.h: -------------------------------------------------------------------------------- 1 | #ifndef __HTTPSERVER_NETCONN_H__ 2 | #define __HTTPSERVER_NETCONN_H__ 3 | 4 | void http_server_netconn_init(); 5 | 6 | #endif /* __HTTPSERVER_NETCONN_H__ */ 7 | -------------------------------------------------------------------------------- /contrib-1.4.0/apps/httpserver_raw/fs/404.html: -------------------------------------------------------------------------------- 1 | 2 | lwIP - A Lightweight TCP/IP Stack 3 | 4 | 5 | 6 | 19 |
7 | SICS logo 9 | 10 |

lwIP - A Lightweight TCP/IP Stack

11 |

404 - Page not found

12 |

13 | Sorry, the page you are requesting was not found on this 14 | server. 15 |

16 |
17 |   18 |
20 | 21 | 22 | -------------------------------------------------------------------------------- /contrib-1.4.0/apps/httpserver_raw/fs/img/sics.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/goertzenator/lwip/01c6f3f219e8690ad697e48d09dfb5f9b08c055f/contrib-1.4.0/apps/httpserver_raw/fs/img/sics.gif -------------------------------------------------------------------------------- /contrib-1.4.0/apps/httpserver_raw/fs/index.html: -------------------------------------------------------------------------------- 1 | 2 | lwIP - A Lightweight TCP/IP Stack 3 | 4 | 5 | 6 | 41 |
7 | SICS logo 9 | 10 |

lwIP - A Lightweight TCP/IP Stack

11 |

12 | The web page you are watching was served by a simple web 13 | server running on top of the lightweight TCP/IP stack lwIP. 15 |

16 |

17 | lwIP is an open source implementation of the TCP/IP 18 | protocol suite that was originally written by Adam Dunkels 19 | of the Swedish Institute of Computer Science but now is 20 | being actively developed by a team of developers 21 | distributed world-wide. Since it's release, lwIP has 22 | spurred a lot of interest and has been ported to several 23 | platforms and operating systems. lwIP can be used either 24 | with or without an underlying OS. 25 |

26 |

27 | The focus of the lwIP TCP/IP implementation is to reduce 28 | the RAM usage while still having a full scale TCP. This 29 | makes lwIP suitable for use in embedded systems with tens 30 | of kilobytes of free RAM and room for around 40 kilobytes 31 | of code ROM. 32 |

33 |

34 | More information about lwIP can be found at the lwIP 35 | homepage at http://www.sics.se/~adam/lwip/. 37 |

38 |
39 |   40 |
42 | 43 | 44 | 45 | -------------------------------------------------------------------------------- /contrib-1.4.0/apps/httpserver_raw/fsdata.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 __FSDATA_H__ 33 | #define __FSDATA_H__ 34 | 35 | #include "lwip/opt.h" 36 | #include "fs.h" 37 | 38 | struct fsdata_file { 39 | const struct fsdata_file *next; 40 | const unsigned char *name; 41 | const unsigned char *data; 42 | int len; 43 | u8_t http_header_included; 44 | #if HTTPD_PRECALCULATED_CHECKSUM 45 | u16_t chksum_count; 46 | const struct fsdata_chksum *chksum; 47 | #endif /* HTTPD_PRECALCULATED_CHECKSUM */ 48 | }; 49 | 50 | #endif /* __FSDATA_H__ */ 51 | -------------------------------------------------------------------------------- /contrib-1.4.0/apps/httpserver_raw/makefsdata/readme.txt: -------------------------------------------------------------------------------- 1 | This directory contains a script ('makefsdata') to create C code suitable for 2 | httpd for given html pages (or other files) in a directory. 3 | 4 | There is also a plain C console application doing the same and extended a bit. 5 | 6 | Usage: htmlgen [targetdir] [-s] [-i]s 7 | targetdir: relative or absolute path to files to convert 8 | switch -s: toggle processing of subdirectories (default is on) 9 | switch -e: exclude HTTP header from file (header is created at runtime, default is on) 10 | switch -11: include HTTP 1.1 header (1.0 is default) 11 | 12 | if targetdir not specified, makefsdata will attempt to 13 | process files in subdirectory 'fs'. 14 | -------------------------------------------------------------------------------- /contrib-1.4.0/apps/netbios/netbios.h: -------------------------------------------------------------------------------- 1 | #ifndef __NETBIOS_H__ 2 | #define __NETBIOS_H__ 3 | 4 | void netbios_init(void); 5 | 6 | #endif /* __NETBIOS_H__ */ 7 | -------------------------------------------------------------------------------- /contrib-1.4.0/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 9 | static err_t netio_recv(void *arg, struct tcp_pcb *pcb, struct pbuf *p, err_t err) 10 | { 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 netio_accept(void *arg, struct tcp_pcb *pcb, err_t err) 32 | { 33 | LWIP_UNUSED_ARG(arg); 34 | LWIP_UNUSED_ARG(err); 35 | 36 | tcp_arg(pcb, NULL); 37 | tcp_sent(pcb, NULL); 38 | tcp_recv(pcb, netio_recv); 39 | return ERR_OK; 40 | } 41 | 42 | void netio_init(void) 43 | { 44 | struct tcp_pcb *pcb; 45 | 46 | pcb = tcp_new(); 47 | tcp_bind(pcb, IP_ADDR_ANY, 18767); 48 | pcb = tcp_listen(pcb); 49 | tcp_accept(pcb, netio_accept); 50 | } 51 | #endif /* LWIP_TCP */ 52 | -------------------------------------------------------------------------------- /contrib-1.4.0/apps/netio/netio.h: -------------------------------------------------------------------------------- 1 | #ifndef __NETIO_H__ 2 | #define __NETIO_H__ 3 | 4 | void netio_init(void); 5 | 6 | #endif /* __NETIO_H__ */ 7 | -------------------------------------------------------------------------------- /contrib-1.4.0/apps/ping/ping.h: -------------------------------------------------------------------------------- 1 | #ifndef __PING_H__ 2 | #define __PING_H__ 3 | 4 | /** 5 | * PING_USE_SOCKETS: Set to 1 to use sockets, otherwise the raw api is used 6 | */ 7 | #ifndef PING_USE_SOCKETS 8 | #define PING_USE_SOCKETS LWIP_SOCKET 9 | #endif 10 | 11 | 12 | void ping_init(void); 13 | 14 | #if !PING_USE_SOCKETS 15 | void ping_send_now(void); 16 | #endif /* !PING_USE_SOCKETS */ 17 | 18 | #endif /* __PING_H__ */ 19 | -------------------------------------------------------------------------------- /contrib-1.4.0/apps/rtp/rtp.h: -------------------------------------------------------------------------------- 1 | #ifndef __RTP_H__ 2 | #define __RTP_H__ 3 | 4 | #if LWIP_SOCKET && LWIP_IGMP 5 | void rtp_init(void); 6 | #endif /* LWIP_SOCKET && LWIP_IGMP */ 7 | 8 | #endif /* __RTP_H__ */ 9 | -------------------------------------------------------------------------------- /contrib-1.4.0/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 __SHELL_H__ 33 | #define __SHELL_H__ 34 | 35 | void shell_init(void); 36 | 37 | #endif /* __SHELL_H__ */ 38 | -------------------------------------------------------------------------------- /contrib-1.4.0/apps/snmp_private_mib/private_mib.h: -------------------------------------------------------------------------------- 1 | /** 2 | * @file 3 | * Exports Private lwIP MIB 4 | */ 5 | 6 | #ifndef __LWIP_PRIVATE_MIB_H__ 7 | #define __LWIP_PRIVATE_MIB_H__ 8 | 9 | #include "arch/cc.h" 10 | #include "lwip/opt.h" 11 | 12 | #if LWIP_SNMP 13 | #include "lwip/snmp_structs.h" 14 | extern const struct mib_array_node mib_private; 15 | 16 | /** @todo remove this?? */ 17 | struct private_msg 18 | { 19 | u8_t dummy; 20 | }; 21 | 22 | void lwip_privmib_init(void); 23 | 24 | #define SNMP_PRIVATE_MIB_INIT() lwip_privmib_init() 25 | 26 | #endif 27 | 28 | #endif 29 | -------------------------------------------------------------------------------- /contrib-1.4.0/apps/sntp/sntp.h: -------------------------------------------------------------------------------- 1 | #ifndef __SNTP_H__ 2 | #define __SNTP_H__ 3 | 4 | void sntp_init(void); 5 | 6 | #endif /* __SNTP_H__ */ 7 | -------------------------------------------------------------------------------- /contrib-1.4.0/apps/socket_examples/socket_examples.h: -------------------------------------------------------------------------------- 1 | #ifndef __SOCKET_EXAMPLES_H__ 2 | #define __SOCKET_EXAMPLES_H__ 3 | 4 | void socket_examples_init(void); 5 | 6 | #endif /* __SOCKET_EXAMPLES_H__ */ 7 | -------------------------------------------------------------------------------- /contrib-1.4.0/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 __TCPECHO_H__ 34 | #define __TCPECHO_H__ 35 | 36 | void tcpecho_init(void); 37 | 38 | #endif /* __TCPECHO_H__ */ 39 | -------------------------------------------------------------------------------- /contrib-1.4.0/apps/tcpecho_raw/echo.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 __ECHO_H__ 31 | #define __ECHO_H__ 32 | 33 | void echo_init(void); 34 | 35 | #endif /* __MINIMAL_ECHO_H */ 36 | -------------------------------------------------------------------------------- /contrib-1.4.0/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 __UDPECHO_H__ 33 | #define __UDPECHO_H__ 34 | 35 | void udpecho_init(void); 36 | 37 | #endif /* __UDPECHO_H__ */ 38 | -------------------------------------------------------------------------------- /contrib-1.4.0/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 | -------------------------------------------------------------------------------- /contrib-1.4.0/ports/old/6502/README: -------------------------------------------------------------------------------- 1 | The 6502 code is far from complete. 2 | -------------------------------------------------------------------------------- /contrib-1.4.0/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 | -------------------------------------------------------------------------------- /contrib-1.4.0/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 | -------------------------------------------------------------------------------- /contrib-1.4.0/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 | -------------------------------------------------------------------------------- /contrib-1.4.0/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 | -------------------------------------------------------------------------------- /contrib-1.4.0/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 | -------------------------------------------------------------------------------- /contrib-1.4.0/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 | -------------------------------------------------------------------------------- /contrib-1.4.0/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 | -------------------------------------------------------------------------------- /contrib-1.4.0/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 | -------------------------------------------------------------------------------- /contrib-1.4.0/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 | -------------------------------------------------------------------------------- /contrib-1.4.0/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 | -------------------------------------------------------------------------------- /contrib-1.4.0/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 | -------------------------------------------------------------------------------- /contrib-1.4.0/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 | -------------------------------------------------------------------------------- /contrib-1.4.0/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 | -------------------------------------------------------------------------------- /contrib-1.4.0/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 | -------------------------------------------------------------------------------- /contrib-1.4.0/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 | -------------------------------------------------------------------------------- /contrib-1.4.0/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 | -------------------------------------------------------------------------------- /contrib-1.4.0/ports/old/coldfire/include/arch/sys_arch.h: -------------------------------------------------------------------------------- 1 | /* @(#)sys_arch.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 | * Author: David Haas 30 | * 31 | */ 32 | 33 | #ifndef _SYS_ARCH_H 34 | #define _SYS_ARCH_H 1 35 | 36 | #include 37 | #include 38 | #include "netif/etharp.h" 39 | 40 | #define SYS_MBOX_NULL NULL 41 | #define SYS_SEM_NULL NULL 42 | 43 | /* sockets needs this definition. include time.h if this is a unix system */ 44 | struct timeval { 45 | long tv_sec; 46 | long tv_usec; 47 | }; 48 | 49 | typedef NU_SEMAPHORE * sys_sem_t; 50 | typedef NU_QUEUE * sys_mbox_t; 51 | typedef NU_TASK * sys_thread_t; 52 | typedef u32_t sys_prot_t; 53 | 54 | /* Functions specific to Coldfire/Nucleus */ 55 | void 56 | sys_setvect(u32_t vector, void (*isr_function)(void), void (*dis_funct)(void)); 57 | void 58 | sys_get_eth_addr(struct eth_addr *eth_addr); 59 | int * 60 | sys_arch_errno(void); 61 | 62 | 63 | #include "arch/errno.h" 64 | 65 | #endif /* _SYS_ARCH_H */ 66 | 67 | -------------------------------------------------------------------------------- /contrib-1.4.0/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 | -------------------------------------------------------------------------------- /contrib-1.4.0/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 | -------------------------------------------------------------------------------- /contrib-1.4.0/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 | -------------------------------------------------------------------------------- /contrib-1.4.0/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 | -------------------------------------------------------------------------------- /contrib-1.4.0/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 | -------------------------------------------------------------------------------- /contrib-1.4.0/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 | -------------------------------------------------------------------------------- /contrib-1.4.0/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 | -------------------------------------------------------------------------------- /contrib-1.4.0/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 | -------------------------------------------------------------------------------- /contrib-1.4.0/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 | -------------------------------------------------------------------------------- /contrib-1.4.0/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 | -------------------------------------------------------------------------------- /contrib-1.4.0/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 | -------------------------------------------------------------------------------- /contrib-1.4.0/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 | -------------------------------------------------------------------------------- /contrib-1.4.0/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 | -------------------------------------------------------------------------------- /contrib-1.4.0/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 | -------------------------------------------------------------------------------- /contrib-1.4.0/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 | -------------------------------------------------------------------------------- /contrib-1.4.0/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 | -------------------------------------------------------------------------------- /contrib-1.4.0/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 | -------------------------------------------------------------------------------- /contrib-1.4.0/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 | -------------------------------------------------------------------------------- /contrib-1.4.0/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 | -------------------------------------------------------------------------------- /contrib-1.4.0/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 | -------------------------------------------------------------------------------- /contrib-1.4.0/ports/old/rtxc/netif/FILES: -------------------------------------------------------------------------------- 1 | sioslipif.c - Implementation of the SLIP protocol on top of a serial line. 2 | -------------------------------------------------------------------------------- /contrib-1.4.0/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 | -------------------------------------------------------------------------------- /contrib-1.4.0/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 | -------------------------------------------------------------------------------- /contrib-1.4.0/ports/old/ti_c6711/[Note] opt setting of lwIP .txt: -------------------------------------------------------------------------------- 1 | [Note]: 2 | 3 | Special options setting of lwIP in this project (for using it with uC/OS-II on TI C6000 DSP) 4 | 5 | ******************************************************************************************* 6 | This port was for project ucos-lwip-c6x (http://gro.clinux.org/projects/ucos-lwip-c6x/). 7 | 8 | For the moment we were writing this note, lwIP v1.1.0 was used in this project. 9 | 10 | This note was written in Jan.22 2005 by zengming99@mails.tsinghua.edu.cn. 11 | ******************************************************************************************* 12 | 13 | Usually, options of lwIP can be set in file "lwipopts.h". 14 | 15 | It was included by "opt.h", amd all options would be set as default value in "opt.h" 16 | if they were not defined in "lwipopts.h". 17 | 18 | Each project should have its own "lwiports.h", and keep "opt.h" as it was. 19 | 20 | In this project, for making lwIP work with uC/OS-II on a 32bits TI DSP, 21 | following options should be set: 22 | ------------------------------------------------------------------------------------ 23 | 24 | 1. Define symbol "LWIP_PROVIDE_ERRNO" in compiler of CodeComposerStudio 25 | 26 | 27 | 2. #define MEM_ALIGNMENT 4 (in "lwipopts.h" ) 28 | #define ETH_PAD_SIZE 2 (in "lwipopts.h" ) 29 | 30 | For the struct align problem on 32bits DSP. 31 | 32 | 33 | 3. #define ARP_QUEUEING 0 (in "lwipopts.h") 34 | 35 | ARP_QUEUEING has a bug in lwIP v1.0.0 with TCP 36 | 37 | 38 | 4. #define LWIP_TASK_MAX 5 (in "sys_arch.h" ) 39 | #define LWIP_START_PRIO 10 (in "sys_arch.h" ) 40 | 41 | #define TCPIP_THREAD_PRIO 5 (in "lwipopts.h" ) 42 | 43 | The default TCPIP_THREAD used priority 5. 44 | 45 | And, 5 lwIP threads were allowed, user defined lwIP thread should have its priority between 10 ~ 14. 46 | 47 | 48 | 5. #define SYS_LIGHTWEIGHT_PROT 1 (in "lwipopts.h" ) 49 | 50 | #define SYS_ARCH_DECL_PROTECT(lev) (in "sys_arch.h" ) 51 | #define SYS_ARCH_PROTECT(lev) OS_ENTER_CRITICAL() (in "sys_arch.h" ) 52 | #define SYS_ARCH_UNPROTECT(lev) OS_EXIT_CRITICAL() (in "sys_arch.h" ) 53 | 54 | These were very important when ethernet driver used intrrupt to check packet 55 | and pBuf function was called in ISR. Or else, uC/OS-II would run away. 56 | 57 | A much better and clean method is to set up a thread for the driver, in ISR 58 | just check packet and post MailBox to the thread. 59 | 60 | 61 | Zeng, Ming 62 | 63 | 2005-01-18 -------------------------------------------------------------------------------- /contrib-1.4.0/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 | -------------------------------------------------------------------------------- /contrib-1.4.0/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 | -------------------------------------------------------------------------------- /contrib-1.4.0/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 | -------------------------------------------------------------------------------- /contrib-1.4.0/ports/old/ti_c6711/include/netif/ne2kif.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/goertzenator/lwip/01c6f3f219e8690ad697e48d09dfb5f9b08c055f/contrib-1.4.0/ports/old/ti_c6711/include/netif/ne2kif.h -------------------------------------------------------------------------------- /contrib-1.4.0/ports/old/ti_c6711/netif/ne2kif.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/goertzenator/lwip/01c6f3f219e8690ad697e48d09dfb5f9b08c055f/contrib-1.4.0/ports/old/ti_c6711/netif/ne2kif.c -------------------------------------------------------------------------------- /contrib-1.4.0/ports/old/v2pro/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 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_CC_H__ 35 | #define __ARCH_CC_H__ 36 | 37 | #define BYTE_ORDER BIG_ENDIAN 38 | 39 | typedef unsigned char u8_t; 40 | typedef signed char s8_t; 41 | typedef unsigned short u16_t; 42 | typedef signed short s16_t; 43 | typedef unsigned long u32_t; 44 | typedef signed long s32_t; 45 | 46 | typedef u32_t mem_ptr_t; 47 | 48 | #define U16_F "hu" 49 | #define S16_F "hd" 50 | #define X16_F "hx" 51 | #define U32_F "lu" 52 | #define S32_F "ld" 53 | #define X32_F "lx" 54 | 55 | #define PACK_STRUCT_FIELD(x) x __attribute__((packed)) 56 | #define PACK_STRUCT_STRUCT __attribute__((packed)) 57 | #define PACK_STRUCT_BEGIN 58 | #define PACK_STRUCT_END 59 | 60 | #endif /* __ARCH_CC_H__ */ 61 | -------------------------------------------------------------------------------- /contrib-1.4.0/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 | -------------------------------------------------------------------------------- /contrib-1.4.0/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 | -------------------------------------------------------------------------------- /contrib-1.4.0/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 | -------------------------------------------------------------------------------- /contrib-1.4.0/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 | -------------------------------------------------------------------------------- /contrib-1.4.0/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 | -------------------------------------------------------------------------------- /contrib-1.4.0/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 | -------------------------------------------------------------------------------- /contrib-1.4.0/ports/unix/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 __ARCH_SYS_ARCH_H__ 33 | #define __ARCH_SYS_ARCH_H__ 34 | 35 | #include 36 | 37 | #define SYS_MBOX_NULL NULL 38 | #define SYS_SEM_NULL NULL 39 | 40 | typedef u32_t sys_prot_t; 41 | 42 | struct sys_sem; 43 | typedef struct sys_sem * sys_sem_t; 44 | #define sys_sem_valid(sem) (((sem) != NULL) && (*(sem) != NULL)) 45 | #define sys_sem_set_invalid(sem) do { if((sem) != NULL) { *(sem) = NULL; }}while(0) 46 | 47 | /* let sys.h use binary semaphores for mutexes */ 48 | #define LWIP_COMPAT_MUTEX 1 49 | 50 | struct sys_mbox; 51 | typedef struct sys_mbox *sys_mbox_t; 52 | #define sys_mbox_valid(mbox) (((mbox) != NULL) && (*(mbox) != NULL)) 53 | #define sys_mbox_set_invalid(mbox) do { if((mbox) != NULL) { *(mbox) = NULL; }}while(0) 54 | 55 | struct sys_thread; 56 | typedef struct sys_thread * sys_thread_t; 57 | 58 | #endif /* __ARCH_SYS_ARCH_H__ */ 59 | 60 | -------------------------------------------------------------------------------- /contrib-1.4.0/ports/unix/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 __DELIF_H__ 33 | #define __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 /* __DELIF_H__ */ 43 | -------------------------------------------------------------------------------- /contrib-1.4.0/ports/unix/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 __DROPIF_H__ 33 | #define __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 /* __DROPIF_H__ */ 42 | -------------------------------------------------------------------------------- /contrib-1.4.0/ports/unix/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 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 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 | -------------------------------------------------------------------------------- /contrib-1.4.0/ports/unix/include/netif/list.h: -------------------------------------------------------------------------------- 1 | 2 | #ifndef __LIST_H__ 3 | #define __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 | -------------------------------------------------------------------------------- /contrib-1.4.0/ports/unix/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 __PCAPIF_H__ 33 | #define __PCAPIF_H__ 34 | 35 | #include "lwip/netif.h" 36 | 37 | err_t pcapif_init(struct netif *netif); 38 | 39 | #endif /* __PCAPIF_H__ */ 40 | -------------------------------------------------------------------------------- /contrib-1.4.0/ports/unix/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 __TAPIF_H__ 33 | #define __TAPIF_H__ 34 | 35 | #include "lwip/netif.h" 36 | 37 | err_t tapif_init(struct netif *netif); 38 | 39 | #endif /* __TAPIF_H__ */ 40 | -------------------------------------------------------------------------------- /contrib-1.4.0/ports/unix/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_init(void); 38 | void tcpdump(struct pbuf *p); 39 | 40 | #endif /* __NETIF_TCPDUMP_H__ */ 41 | -------------------------------------------------------------------------------- /contrib-1.4.0/ports/unix/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 __TUNIF_H__ 33 | #define __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 /* __TUNIF_H__ */ 42 | -------------------------------------------------------------------------------- /contrib-1.4.0/ports/unix/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 __UNIXIF_H__ 33 | #define __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 /* __UNIXIF_H__ */ 41 | -------------------------------------------------------------------------------- /contrib-1.4.0/ports/unix/netif/sio.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/goertzenator/lwip/01c6f3f219e8690ad697e48d09dfb5f9b08c055f/contrib-1.4.0/ports/unix/netif/sio.c -------------------------------------------------------------------------------- /contrib-1.4.0/ports/unix/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 | #include 36 | 37 | static FILE *f; 38 | 39 | void 40 | perf_print(unsigned long c1l, unsigned long c1h, 41 | unsigned long c2l, unsigned long c2h, 42 | char *key) 43 | { 44 | unsigned long sub_ms, sub_ls; 45 | 46 | sub_ms = c2h - c1h; 47 | sub_ls = c2l - c1l; 48 | if (c2l < c1l) sub_ms--; 49 | fprintf(f, "%s: %.8lu%.8lu\n", key, sub_ms, sub_ls); 50 | fflush(NULL); 51 | } 52 | 53 | void 54 | perf_print_times(struct tms *start, struct tms *end, char *key) 55 | { 56 | fprintf(f, "%s: %lu\n", key, end->tms_stime - start->tms_stime); 57 | fflush(NULL); 58 | } 59 | 60 | void 61 | perf_init(char *fname) 62 | { 63 | f = fopen(fname, "w"); 64 | } 65 | 66 | -------------------------------------------------------------------------------- /contrib-1.4.0/ports/unix/proj/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. -------------------------------------------------------------------------------- /contrib-1.4.0/ports/unix/proj/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 | -------------------------------------------------------------------------------- /contrib-1.4.0/ports/unix/proj/minimal/echo.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 __ECHO_H__ 31 | #define __ECHO_H__ 32 | 33 | void echo_init(void); 34 | 35 | #endif /* __MINIMAL_ECHO_H */ 36 | -------------------------------------------------------------------------------- /contrib-1.4.0/ports/unix/proj/minimal/mintapif.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 __MINTAPIF_H__ 33 | #define __MINTAPIF_H__ 34 | 35 | #include "lwip/netif.h" 36 | 37 | enum mintapif_signal { 38 | MINTAPIF_TIMEOUT, 39 | MINTAPIF_PACKET 40 | }; 41 | 42 | err_t mintapif_init(struct netif *netif); 43 | int mintapif_select(struct netif *netif); 44 | 45 | #endif /* __MINTAPIF_H__ */ 46 | -------------------------------------------------------------------------------- /contrib-1.4.0/ports/unix/proj/minimal/timer.h: -------------------------------------------------------------------------------- 1 | #ifndef _TIMER_H_ 2 | #define _TIMER_H_ 3 | 4 | #define TIMER_EVT_ETHARPTMR 0 5 | #define TIMER_EVT_TCPTMR 1 6 | #define TIMER_EVT_IPREASSTMR 2 7 | #define TIMER_NUM 3 8 | 9 | void timer_init(void); 10 | void timer_set_interval(unsigned char tmr, unsigned int interval); 11 | unsigned char timer_testclr_evt(unsigned char tmr); 12 | 13 | #endif 14 | -------------------------------------------------------------------------------- /contrib-1.4.0/ports/unix/proj/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 | -------------------------------------------------------------------------------- /contrib-1.4.0/ports/win32/.cvsignore: -------------------------------------------------------------------------------- 1 | lwipcfg_msvc.h -------------------------------------------------------------------------------- /contrib-1.4.0/ports/win32/check/config.h: -------------------------------------------------------------------------------- 1 | /* config.h for check-0.9.8 on win32 under MSVC */ 2 | 3 | typedef unsigned int pid_t; 4 | typedef unsigned int uint32_t; 5 | 6 | #define ssize_t size_t 7 | #define snprintf _snprintf 8 | 9 | #define HAVE_DECL_STRDUP 1 10 | #define HAVE_DECL_FILENO 1 11 | #define HAVE_DECL_PUTENV 1 12 | 13 | #define _CRT_SECURE_NO_WARNINGS 14 | 15 | /* disable some warnings */ 16 | #pragma warning (disable: 4090) /* const assigned to non-const */ 17 | #pragma warning (disable: 4996) /* fileno is deprecated */ 18 | 19 | #define LWIP_UNITTESTS_NOFORK 20 | 21 | #include 22 | -------------------------------------------------------------------------------- /contrib-1.4.0/ports/win32/check/sys/time.h: -------------------------------------------------------------------------------- 1 | #ifndef __SYS__TIME_H__ 2 | #define __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 | -------------------------------------------------------------------------------- /contrib-1.4.0/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 | -------------------------------------------------------------------------------- /contrib-1.4.0/ports/win32/check/unistd.h: -------------------------------------------------------------------------------- 1 | #ifndef __UNISTD_H__ 2 | #define __UNISTD_H__ 3 | 4 | /* include io.h for read() and write() */ 5 | #include 6 | 7 | #endif 8 | -------------------------------------------------------------------------------- /contrib-1.4.0/ports/win32/include/arch/bpstruct.h: -------------------------------------------------------------------------------- 1 | #pragma pack(push,1) 2 | -------------------------------------------------------------------------------- /contrib-1.4.0/ports/win32/include/arch/epstruct.h: -------------------------------------------------------------------------------- 1 | #pragma pack(pop) 2 | -------------------------------------------------------------------------------- /contrib-1.4.0/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 __PERF_H__ 35 | #define __PERF_H__ 36 | 37 | #define PERF_START /* null definition */ 38 | #define PERF_STOP(x) /* null definition */ 39 | 40 | #endif /* __PERF_H__ */ 41 | -------------------------------------------------------------------------------- /contrib-1.4.0/ports/win32/lwipcfg_msvc.h.example: -------------------------------------------------------------------------------- 1 | /** 2 | * Additional settings for the win32 port. 3 | * Copy this to lwipcfg_msvc.h and make the config changes you need. 4 | */ 5 | 6 | /* configuration for this port */ 7 | #define PPP_USERNAME "Admin" 8 | #define PPP_PASSWORD "pass" 9 | 10 | /** Define this to the index of the windows network adapter to use */ 11 | #define PACKET_LIB_ADAPTER_NR 1 12 | /** Define this to the GUID of the windows network adapter to use 13 | * or NOT define this if you want PACKET_LIB_ADAPTER_NR to be used */ 14 | /*#define PACKET_LIB_ADAPTER_GUID "00000000-0000-0000-0000-000000000000"*/ 15 | /*#define PACKET_LIB_GET_ADAPTER_NETADDRESS(addr) IP4_ADDR((addr), 192,168,1,0)*/ 16 | /*#define PACKET_LIB_QUIET*/ 17 | 18 | #define LWIP_PORT_INIT_IPADDR(addr) IP4_ADDR((addr), 192,168,1,200) 19 | #define LWIP_PORT_INIT_GW(addr) IP4_ADDR((addr), 192,168,1,1) 20 | #define LWIP_PORT_INIT_NETMASK(addr) IP4_ADDR((addr), 255,255,255,0) 21 | 22 | /* remember to change this MAC address to suit your needs! 23 | the last octet will be increased by netif->num for each netif */ 24 | #define LWIP_MAC_ADDR_BASE {0x00,0x01,0x02,0x03,0x04,0x05} 25 | 26 | /* configuration for applications */ 27 | 28 | #define LWIP_CHARGEN_APP 0 29 | #define LWIP_DNS_APP 0 30 | #define LWIP_HTTPD_APP 0 31 | /* Set this to 1 to use the netconn http server, 32 | * otherwise the raw api server will be used. */ 33 | /*#define LWIP_HTTPD_APP_NETCONN */ 34 | #define LWIP_NETBIOS_APP 0 35 | #define LWIP_NETIO_APP 0 36 | #define LWIP_PING_APP 0 37 | #define LWIP_RTP_APP 0 38 | #define LWIP_SHELL_APP 0 39 | #define LWIP_SNTP_APP 0 40 | #define LWIP_SOCKET_EXAMPLES_APP 0 41 | #define LWIP_TCPECHO_APP 0 42 | /* Set this to 1 to use the netconn tcpecho server, 43 | * otherwise the raw api server will be used. */ 44 | /*#define LWIP_TCPECHO_APP_NETCONN */ 45 | #define LWIP_UDPECHO_APP 0 46 | -------------------------------------------------------------------------------- /contrib-1.4.0/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 | -------------------------------------------------------------------------------- /contrib-1.4.0/ports/win32/msvc8/.cvsignore: -------------------------------------------------------------------------------- 1 | Debug 2 | lwIP_Test.ncb 3 | lwIP_Test.suo -------------------------------------------------------------------------------- /contrib-1.4.0/ports/win32/msvc8/lwIP_unittests.sln: -------------------------------------------------------------------------------- 1 | Microsoft Visual Studio Solution File, Format Version 9.00 2 | # Visual Studio 2005 3 | Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "lwIP", "lwIP.vcproj", "{2CC276FA-B226-49C9-8F82-7FCD5A228E28}" 4 | EndProject 5 | Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libcheck", "libcheck.vcproj", "{EBB156DC-01BF-47B2-B69C-1A750B6B5F09}" 6 | EndProject 7 | Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "lwip_unittests", "lwip_unittests.vcproj", "{6CCABAA4-F86F-4119-AFF8-43C9A4A234C2}" 8 | ProjectSection(ProjectDependencies) = postProject 9 | {EBB156DC-01BF-47B2-B69C-1A750B6B5F09} = {EBB156DC-01BF-47B2-B69C-1A750B6B5F09} 10 | {2CC276FA-B226-49C9-8F82-7FCD5A228E28} = {2CC276FA-B226-49C9-8F82-7FCD5A228E28} 11 | EndProjectSection 12 | EndProject 13 | Global 14 | GlobalSection(SolutionConfigurationPlatforms) = preSolution 15 | Debug|Win32 = Debug|Win32 16 | Release|Win32 = Release|Win32 17 | EndGlobalSection 18 | GlobalSection(ProjectConfigurationPlatforms) = postSolution 19 | {2CC276FA-B226-49C9-8F82-7FCD5A228E28}.Debug|Win32.ActiveCfg = Debug|Win32 20 | {2CC276FA-B226-49C9-8F82-7FCD5A228E28}.Debug|Win32.Build.0 = Debug|Win32 21 | {2CC276FA-B226-49C9-8F82-7FCD5A228E28}.Release|Win32.ActiveCfg = Release|Win32 22 | {2CC276FA-B226-49C9-8F82-7FCD5A228E28}.Release|Win32.Build.0 = Release|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 | {6CCABAA4-F86F-4119-AFF8-43C9A4A234C2}.Debug|Win32.ActiveCfg = Debug|Win32 28 | {6CCABAA4-F86F-4119-AFF8-43C9A4A234C2}.Debug|Win32.Build.0 = Debug|Win32 29 | {6CCABAA4-F86F-4119-AFF8-43C9A4A234C2}.Release|Win32.ActiveCfg = Release|Win32 30 | {6CCABAA4-F86F-4119-AFF8-43C9A4A234C2}.Release|Win32.Build.0 = Release|Win32 31 | EndGlobalSection 32 | GlobalSection(SolutionProperties) = preSolution 33 | HideSolutionNode = FALSE 34 | EndGlobalSection 35 | EndGlobal 36 | -------------------------------------------------------------------------------- /contrib-1.4.0/ports/win32/msvc8/readme.txt: -------------------------------------------------------------------------------- 1 | lwIP for Win32 2 | 3 | This is a quickly hacked port and example project of the lwIP library to 4 | Win32/MSVC9. 5 | 6 | It doesn't (yet?) include support for dhcp, autoip, slipif, ppp or pppoe. This 7 | is simply because none of the active developers using this port are using these 8 | interfaces right now. 9 | 10 | To get this compiling, you have to set a couple of environment variables: 11 | - LWIP_DIR: points to the main lwip tree (the folder where is the CHANGELOG file). 12 | - PCAP_DIR: points to the WinPcap Developer's Packs (containing 'include' and 'lib') 13 | 14 | You also will have to copy the file 'lwipcfg_msvc.h.example' to 15 | 'lwipcfg_msvc.h' and modify to suit your needs (WinPcap adapter number, 16 | IP configuration, applications...). 17 | 18 | Note that you also have to set the PCAP_DIR environment variable to point 19 | to the WinPcap Developer's Packs (containing 'include' and 'lib'). 20 | 21 | Included in the contrib\ports\win32 directory is the network interface driver 22 | using the winpcap library. 23 | 24 | lwIP: http://savannah.nongnu.org/projects/lwip/ 25 | WinPCap: http://netgroup-serv.polito.it/winpcap/ 26 | 27 | To compile the unittests, download check (tested with v0.9.8) from 28 | http://sourceforge.net/projects/check/ 29 | and place it in a folder "check" next to the "contrib" folder. -------------------------------------------------------------------------------- /contrib-1.4.0/ports/win32/pcap_helper.c: -------------------------------------------------------------------------------- 1 | #include "pcap_helper.h" 2 | 3 | #define WIN32_LEAN_AND_MEAN 4 | /* get the windows definitions of the following 4 functions out of the way */ 5 | #include 6 | #include 7 | #define HAVE_REMOTE 8 | #include "pcap.h" 9 | 10 | /** Get the index of an adapter by its network address 11 | * 12 | * @param netaddr network address of the adapter (e.g. 192.168.1.0) 13 | * @return index of the adapter or negative on error 14 | */ 15 | int 16 | get_adapter_index_from_addr(struct in_addr *netaddr, char *guid, size_t guid_len) 17 | { 18 | pcap_if_t *alldevs; 19 | pcap_if_t *d; 20 | char errbuf[PCAP_ERRBUF_SIZE+1]; 21 | char source[] = "rpcap://"; 22 | int index = 0; 23 | 24 | memset(guid, 0, guid_len); 25 | memset(errbuf, 0, sizeof(errbuf)); 26 | 27 | /* Retrieve the interfaces list */ 28 | if (pcap_findalldevs_ex(source, NULL, &alldevs, errbuf) == -1) { 29 | printf("Error in pcap_findalldevs: %s\n", errbuf); 30 | return -1; 31 | } 32 | /* Scan the list printing every entry */ 33 | for (d = alldevs; d != NULL; d = d->next, index++) { 34 | pcap_addr_t *a; 35 | for(a = d->addresses; a != NULL; a = a->next) { 36 | if (a->addr->sa_family == AF_INET) { 37 | ULONG a_addr = ((struct sockaddr_in *)a->addr)->sin_addr.s_addr; 38 | ULONG a_netmask = ((struct sockaddr_in *)a->netmask)->sin_addr.s_addr; 39 | ULONG a_netaddr = a_addr & a_netmask; 40 | ULONG addr = (*netaddr).s_addr; 41 | if (a_netaddr == addr) { 42 | int ret = -1; 43 | char name[128]; 44 | char *start, *end; 45 | size_t len = strlen(d->name); 46 | if(len > 127) { 47 | len = 127; 48 | } 49 | memcpy(name, d->name, len); 50 | name[len] = 0; 51 | start = strstr(name, "{"); 52 | if (start != NULL) { 53 | end = strstr(start, "}"); 54 | if (end != NULL) { 55 | size_t len = end - start + 1; 56 | memcpy(guid, start, len); 57 | ret = index; 58 | } 59 | } 60 | pcap_freealldevs(alldevs); 61 | return ret; 62 | } 63 | } 64 | } 65 | } 66 | printf("Network address not found.\n"); 67 | 68 | pcap_freealldevs(alldevs); 69 | return -1; 70 | } 71 | -------------------------------------------------------------------------------- /contrib-1.4.0/ports/win32/pcap_helper.h: -------------------------------------------------------------------------------- 1 | #ifndef __PCAP_HELPER_H__ 2 | #define __PCAP_HELPER_H__ 3 | 4 | #include 5 | 6 | struct in_addr; 7 | 8 | 9 | int get_adapter_index_from_addr(struct in_addr* netaddr, char *guid, size_t guid_len); 10 | 11 | #endif /* __PCAP_HELPER_H__ */ -------------------------------------------------------------------------------- /contrib-1.4.0/ports/win32/pcapif.h: -------------------------------------------------------------------------------- 1 | #ifndef __PKTIF_H__ 2 | #define __PKTIF_H__ 3 | 4 | #include "lwip/err.h" 5 | 6 | /** Set to 1 to let rx use an own thread (only for NO_SYS==0). 7 | * If set to 0, ethernetif_poll is used to poll for packets. 8 | */ 9 | #ifndef PCAPIF_RX_USE_THREAD 10 | #define PCAPIF_RX_USE_THREAD !NO_SYS 11 | #endif 12 | #if PCAPIF_RX_USE_THREAD && NO_SYS 13 | #error "Can't create a dedicated RX thread with NO_SYS==1" 14 | #endif 15 | 16 | struct netif; 17 | 18 | err_t pcapif_init (struct netif *netif); 19 | void pcapif_shutdown(struct netif *netif); 20 | #if !PCAPIF_RX_USE_THREAD 21 | void pcapif_poll (struct netif *netif); 22 | #endif /* !PCAPIF_RX_USE_THREAD */ 23 | 24 | #endif 25 | -------------------------------------------------------------------------------- /contrib-1.4.0/ports/win32/pcapif_helper.h: -------------------------------------------------------------------------------- 1 | #ifndef __PCAPIF_HELPER_H__ 2 | #define __PCAPIF_HELPER_H__ 3 | 4 | 5 | struct pcapifh_linkstate; 6 | 7 | enum pcapifh_link_event { 8 | PCAPIF_LINKEVENT_UNKNOWN, 9 | PCAPIF_LINKEVENT_UP, 10 | PCAPIF_LINKEVENT_DOWN 11 | }; 12 | 13 | struct pcapifh_linkstate* pcapifh_linkstate_init(const char *adapter_name); 14 | enum pcapif_link_event pcapifh_linkstate_get(struct pcapifh_linkstate* state); 15 | void pcapifh_linkstate_close(struct pcapifh_linkstate* state); 16 | 17 | 18 | #endif /* __PCAPIF_HELPER_H__ */ -------------------------------------------------------------------------------- /contrib-1.4.0/ports/win32/pktdrv.h: -------------------------------------------------------------------------------- 1 | #ifndef __PKTDRV_H__ 2 | #define __PKTDRV_H__ 3 | 4 | #ifdef __cplusplus 5 | extern "C" { 6 | #endif 7 | 8 | typedef void (*input_fn)(void *arg, void *packet, int len); 9 | 10 | enum link_adapter_event { 11 | LINKEVENT_UNCHANGED, 12 | LINKEVENT_UP, 13 | LINKEVENT_DOWN 14 | }; 15 | 16 | void* init_adapter (int adapter_num, char *mac_addr, input_fn input, void *arg, enum link_adapter_event *linkstate); 17 | void shutdown_adapter(void *adapter); 18 | int packet_send (void *adapter, void *buffer, int len); 19 | void update_adapter (void *adapter); 20 | enum link_adapter_event link_adapter (void *adapter); 21 | int get_adapter_index(const char* adapter_guid); 22 | 23 | #ifdef __cplusplus 24 | } 25 | #endif 26 | 27 | #endif 28 | -------------------------------------------------------------------------------- /contrib-1.4.0/ports/win32/pktif.h: -------------------------------------------------------------------------------- 1 | #ifndef __PKTIF_H__ 2 | #define __PKTIF_H__ 3 | 4 | #include "lwip/err.h" 5 | #include "lwip/netif.h" 6 | 7 | err_t ethernetif_init (struct netif *netif); 8 | void ethernetif_shutdown(struct netif *netif); 9 | void ethernetif_poll (struct netif *netif); 10 | 11 | #endif 12 | -------------------------------------------------------------------------------- /contrib-1.4.0/ports/win32/readme.txt: -------------------------------------------------------------------------------- 1 | lwIP for Win32 2 | 3 | - MSVC6 compiler, read contrib\ports\win32\msvc6\readme.txt 4 | 5 | - MSVC8 compiler, read contrib\ports\win32\msvc8\readme.txt 6 | 7 | lwIP: http://savannah.nongnu.org/projects/lwip/ 8 | WinPCap: http://netgroup-serv.polito.it/winpcap/ 9 | Visual C++: http://www.microsoft.com/express/download/ 10 | -------------------------------------------------------------------------------- /lwip-1.4.0/CHANGELOG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/goertzenator/lwip/01c6f3f219e8690ad697e48d09dfb5f9b08c055f/lwip-1.4.0/CHANGELOG -------------------------------------------------------------------------------- /lwip-1.4.0/COPYING: -------------------------------------------------------------------------------- 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 | 33 | 34 | -------------------------------------------------------------------------------- /lwip-1.4.0/FILES: -------------------------------------------------------------------------------- 1 | src/ - The source code for the lwIP TCP/IP stack. 2 | doc/ - The documentation for lwIP. 3 | 4 | See also the FILES file in each subdirectory. 5 | -------------------------------------------------------------------------------- /lwip-1.4.0/doc/FILES: -------------------------------------------------------------------------------- 1 | savannah.txt - How to obtain the current development source code. 2 | contrib.txt - How to contribute to lwIP as a developer. 3 | rawapi.txt - The documentation for the core API of lwIP. 4 | Also provides an overview about the other APIs and multithreading. 5 | snmp_agent.txt - The documentation for the lwIP SNMP agent. 6 | sys_arch.txt - The documentation for a system abstraction layer of lwIP. 7 | -------------------------------------------------------------------------------- /lwip-1.4.0/src/.hgignore: -------------------------------------------------------------------------------- 1 | syntax: glob 2 | 3 | *.pyc 4 | *.orig 5 | *.rej 6 | *~ 7 | TAGS 8 | Module.symvers 9 | *.ncb 10 | *.suo 11 | *.bak 12 | *.orig 13 | *.rej 14 | 15 | syntax: regexp 16 | \.\#.+ 17 | [\\/]CVS$ 18 | ^CVS$ 19 | ^build$ 20 | ^install$ 21 | ^logs.build_tree$ 22 | [\\/]bin$ 23 | ^bin$ 24 | [\\/]obj$ 25 | ^obj$ 26 | \.cvsignore 27 | -------------------------------------------------------------------------------- /lwip-1.4.0/src/FILES: -------------------------------------------------------------------------------- 1 | api/ - The code for the high-level wrapper API. Not needed if 2 | you use the lowel-level call-back/raw API. 3 | 4 | core/ - The core of the TPC/IP stack; protocol implementations, 5 | memory and buffer management, and the low-level raw API. 6 | 7 | include/ - lwIP include files. 8 | 9 | netif/ - Generic network interface device drivers are kept here, 10 | as well as the ARP module. 11 | 12 | For more information on the various subdirectories, check the FILES 13 | file in each directory. 14 | -------------------------------------------------------------------------------- /lwip-1.4.0/src/core/ipv4/inet.c: -------------------------------------------------------------------------------- 1 | /** 2 | * @file 3 | * Functions common to all TCP/IPv4 modules, such as the byte order functions. 4 | * 5 | */ 6 | 7 | /* 8 | * Copyright (c) 2001-2004 Swedish Institute of Computer Science. 9 | * All rights reserved. 10 | * 11 | * Redistribution and use in source and binary forms, with or without modification, 12 | * are permitted provided that the following conditions are met: 13 | * 14 | * 1. Redistributions of source code must retain the above copyright notice, 15 | * this list of conditions and the following disclaimer. 16 | * 2. Redistributions in binary form must reproduce the above copyright notice, 17 | * this list of conditions and the following disclaimer in the documentation 18 | * and/or other materials provided with the distribution. 19 | * 3. The name of the author may not be used to endorse or promote products 20 | * derived from this software without specific prior written permission. 21 | * 22 | * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED 23 | * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF 24 | * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT 25 | * SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, 26 | * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT 27 | * OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 28 | * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 29 | * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING 30 | * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY 31 | * OF SUCH DAMAGE. 32 | * 33 | * This file is part of the lwIP TCP/IP stack. 34 | * 35 | * Author: Adam Dunkels 36 | * 37 | */ 38 | 39 | #include "lwip/opt.h" 40 | 41 | #include "lwip/inet.h" 42 | 43 | -------------------------------------------------------------------------------- /lwip-1.4.0/src/core/ipv6/README: -------------------------------------------------------------------------------- 1 | IPv6 support in lwIP is very experimental. 2 | -------------------------------------------------------------------------------- /lwip-1.4.0/src/core/sys.c: -------------------------------------------------------------------------------- 1 | /** 2 | * @file 3 | * lwIP Operating System abstraction 4 | * 5 | */ 6 | 7 | /* 8 | * Copyright (c) 2001-2004 Swedish Institute of Computer Science. 9 | * All rights reserved. 10 | * 11 | * Redistribution and use in source and binary forms, with or without modification, 12 | * are permitted provided that the following conditions are met: 13 | * 14 | * 1. Redistributions of source code must retain the above copyright notice, 15 | * this list of conditions and the following disclaimer. 16 | * 2. Redistributions in binary form must reproduce the above copyright notice, 17 | * this list of conditions and the following disclaimer in the documentation 18 | * and/or other materials provided with the distribution. 19 | * 3. The name of the author may not be used to endorse or promote products 20 | * derived from this software without specific prior written permission. 21 | * 22 | * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED 23 | * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF 24 | * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT 25 | * SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, 26 | * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT 27 | * OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 28 | * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 29 | * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING 30 | * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY 31 | * OF SUCH DAMAGE. 32 | * 33 | * This file is part of the lwIP TCP/IP stack. 34 | * 35 | * Author: Adam Dunkels 36 | * 37 | */ 38 | 39 | #include "lwip/opt.h" 40 | 41 | #include "lwip/sys.h" 42 | 43 | /* Most of the functions defined in sys.h must be implemented in the 44 | * architecture-dependent file sys_arch.c */ 45 | 46 | #if !NO_SYS 47 | 48 | /** 49 | * Sleep for some ms. Timeouts are NOT processed while sleeping. 50 | * 51 | * @param ms number of milliseconds to sleep 52 | */ 53 | void 54 | sys_msleep(u32_t ms) 55 | { 56 | if (ms > 0) { 57 | sys_sem_t delaysem; 58 | err_t err = sys_sem_new(&delaysem, 0); 59 | if (err == ERR_OK) { 60 | sys_arch_sem_wait(&delaysem, ms); 61 | sys_sem_free(&delaysem); 62 | } 63 | } 64 | } 65 | 66 | #endif /* !NO_SYS */ 67 | -------------------------------------------------------------------------------- /lwip-1.4.0/src/include/ipv6/lwip/inet.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 | * Author: Adam Dunkels 30 | * 31 | */ 32 | #ifndef __LWIP_INET_H__ 33 | #define __LWIP_INET_H__ 34 | 35 | #include "lwip/opt.h" 36 | #include "lwip/pbuf.h" 37 | #include "lwip/ip_addr.h" 38 | 39 | #ifdef __cplusplus 40 | extern "C" { 41 | #endif 42 | 43 | u16_t inet_chksum(void *data, u16_t len); 44 | u16_t inet_chksum_pbuf(struct pbuf *p); 45 | u16_t inet_chksum_pseudo(struct pbuf *p, 46 | struct ip_addr *src, struct ip_addr *dest, 47 | u8_t proto, u32_t proto_len); 48 | 49 | u32_t inet_addr(const char *cp); 50 | s8_t inet_aton(const char *cp, struct in_addr *addr); 51 | 52 | #ifndef _MACHINE_ENDIAN_H_ 53 | #ifndef _NETINET_IN_H 54 | #ifndef _LINUX_BYTEORDER_GENERIC_H 55 | u16_t htons(u16_t n); 56 | u16_t ntohs(u16_t n); 57 | u32_t htonl(u32_t n); 58 | u32_t ntohl(u32_t n); 59 | #endif /* _LINUX_BYTEORDER_GENERIC_H */ 60 | #endif /* _NETINET_IN_H */ 61 | #endif /* _MACHINE_ENDIAN_H_ */ 62 | 63 | #ifdef __cplusplus 64 | } 65 | #endif 66 | 67 | #endif /* __LWIP_INET_H__ */ 68 | 69 | -------------------------------------------------------------------------------- /lwip-1.4.0/src/include/netif/slipif.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 __NETIF_SLIPIF_H__ 35 | #define __NETIF_SLIPIF_H__ 36 | 37 | #include "lwip/netif.h" 38 | 39 | #ifdef __cplusplus 40 | extern "C" { 41 | #endif 42 | 43 | err_t slipif_init(struct netif * netif); 44 | void slipif_poll(struct netif *netif); 45 | 46 | #ifdef __cplusplus 47 | } 48 | #endif 49 | 50 | #endif 51 | 52 | -------------------------------------------------------------------------------- /lwip-1.4.0/src/netif/FILES: -------------------------------------------------------------------------------- 1 | This directory contains generic network interface device drivers that 2 | do not contain any hardware or architecture specific code. The files 3 | are: 4 | 5 | etharp.c 6 | Implements the ARP (Address Resolution Protocol) over 7 | Ethernet. The code in this file should be used together with 8 | Ethernet device drivers. Note that this module has been 9 | largely made Ethernet independent so you should be able to 10 | adapt this for other link layers (such as Firewire). 11 | 12 | ethernetif.c 13 | An example of how an Ethernet device driver could look. This 14 | file can be used as a "skeleton" for developing new Ethernet 15 | network device drivers. It uses the etharp.c ARP code. 16 | 17 | loopif.c 18 | A "loopback" network interface driver. It requires configuration 19 | through the define LWIP_LOOPIF_MULTITHREADING (see opt.h). 20 | 21 | slipif.c 22 | A generic implementation of the SLIP (Serial Line IP) 23 | protocol. It requires a sio (serial I/O) module to work. 24 | 25 | ppp/ Point-to-Point Protocol stack 26 | The PPP stack has been ported from ucip (http://ucip.sourceforge.net). 27 | It matches quite well to pppd 2.3.1 (http://ppp.samba.org), although 28 | compared to that, it has some modifications for embedded systems and 29 | the source code has been reordered a bit. -------------------------------------------------------------------------------- /lwip-1.4.0/test/unit/core/test_mem.c: -------------------------------------------------------------------------------- 1 | #include "test_mem.h" 2 | 3 | #include "lwip/mem.h" 4 | #include "lwip/stats.h" 5 | 6 | #if !LWIP_STATS || !MEM_STATS 7 | #error "This tests needs MEM-statistics enabled" 8 | #endif 9 | #if LWIP_DNS 10 | /*#error "This test needs DNS turned off (as it mallocs on init)"*/ 11 | #endif 12 | 13 | /* Setups/teardown functions */ 14 | 15 | static void 16 | mem_setup(void) 17 | { 18 | } 19 | 20 | static void 21 | mem_teardown(void) 22 | { 23 | } 24 | 25 | 26 | /* Test functions */ 27 | 28 | /** Call mem_malloc, mem_free and mem_trim and check stats */ 29 | START_TEST(test_mem_one) 30 | { 31 | #define SIZE1 16 32 | #define SIZE1_2 12 33 | #define SIZE2 16 34 | void *p1, *p2; 35 | mem_size_t s1, s2; 36 | LWIP_UNUSED_ARG(_i); 37 | 38 | #if LWIP_DNS 39 | fail("This test needs DNS turned off (as it mallocs on init)"); 40 | #endif 41 | 42 | fail_unless(lwip_stats.mem.used == 0); 43 | 44 | p1 = mem_malloc(SIZE1); 45 | fail_unless(p1 != NULL); 46 | fail_unless(lwip_stats.mem.used >= SIZE1); 47 | s1 = lwip_stats.mem.used; 48 | 49 | p2 = mem_malloc(SIZE2); 50 | fail_unless(p2 != NULL); 51 | fail_unless(lwip_stats.mem.used >= SIZE2 + s1); 52 | s2 = lwip_stats.mem.used; 53 | 54 | mem_trim(p1, SIZE1_2); 55 | 56 | mem_free(p2); 57 | fail_unless(lwip_stats.mem.used <= s2 - SIZE2); 58 | 59 | mem_free(p1); 60 | fail_unless(lwip_stats.mem.used == 0); 61 | } 62 | END_TEST 63 | 64 | 65 | /** Create the suite including all tests for this module */ 66 | Suite * 67 | mem_suite(void) 68 | { 69 | TFun tests[] = { 70 | test_mem_one, 71 | }; 72 | return create_suite("MEM", tests, sizeof(tests)/sizeof(TFun), mem_setup, mem_teardown); 73 | } 74 | -------------------------------------------------------------------------------- /lwip-1.4.0/test/unit/core/test_mem.h: -------------------------------------------------------------------------------- 1 | #ifndef __TEST_MEM_H__ 2 | #define __TEST_MEM_H__ 3 | 4 | #include "../lwip_check.h" 5 | 6 | Suite *mem_suite(void); 7 | 8 | #endif 9 | -------------------------------------------------------------------------------- /lwip-1.4.0/test/unit/etharp/test_etharp.h: -------------------------------------------------------------------------------- 1 | #ifndef __TEST_ETHARP_H__ 2 | #define __TEST_ETHARP_H__ 3 | 4 | #include "../lwip_check.h" 5 | 6 | Suite* etharp_suite(void); 7 | 8 | #endif 9 | -------------------------------------------------------------------------------- /lwip-1.4.0/test/unit/lwip_check.h: -------------------------------------------------------------------------------- 1 | #ifndef __LWIP_CHECK_H__ 2 | #define __LWIP_CHECK_H__ 3 | 4 | /* Common header file for lwIP unit tests using the check framework */ 5 | 6 | #include 7 | #include 8 | #include 9 | 10 | #define FAIL_RET() do { fail(); return; } while(0) 11 | #define EXPECT(x) fail_unless(x) 12 | #define EXPECT_RET(x) do { fail_unless(x); if(!(x)) { return; }} while(0) 13 | #define EXPECT_RETX(x, y) do { fail_unless(x); if(!(x)) { return y; }} while(0) 14 | #define EXPECT_RETNULL(x) EXPECT_RETX(x, NULL) 15 | 16 | /** typedef for a function returning a test suite */ 17 | typedef Suite* (suite_getter_fn)(void); 18 | 19 | /** Create a test suite */ 20 | static Suite* create_suite(const char* name, TFun *tests, size_t num_tests, SFun setup, SFun teardown) 21 | { 22 | size_t i; 23 | Suite *s = suite_create(name); 24 | 25 | for(i = 0; i < num_tests; i++) { 26 | /* Core test case */ 27 | TCase *tc_core = tcase_create("Core"); 28 | if ((setup != NULL) || (teardown != NULL)) { 29 | tcase_add_checked_fixture(tc_core, setup, teardown); 30 | } 31 | tcase_add_test(tc_core, tests[i]); 32 | suite_add_tcase(s, tc_core); 33 | } 34 | return s; 35 | } 36 | 37 | #endif /* __LWIP_CHECK_H__ */ 38 | -------------------------------------------------------------------------------- /lwip-1.4.0/test/unit/lwip_unittests.c: -------------------------------------------------------------------------------- 1 | #include "lwip_check.h" 2 | 3 | #include "udp/test_udp.h" 4 | #include "tcp/test_tcp.h" 5 | #include "tcp/test_tcp_oos.h" 6 | #include "core/test_mem.h" 7 | #include "etharp/test_etharp.h" 8 | 9 | #include "lwip/init.h" 10 | 11 | 12 | int main() 13 | { 14 | int number_failed; 15 | SRunner *sr; 16 | size_t i; 17 | suite_getter_fn* suites[] = { 18 | udp_suite, 19 | tcp_suite, 20 | tcp_oos_suite, 21 | mem_suite, 22 | etharp_suite, 23 | }; 24 | size_t num = sizeof(suites)/sizeof(void*); 25 | LWIP_ASSERT("No suites defined", num > 0); 26 | 27 | lwip_init(); 28 | 29 | sr = srunner_create((suites[0])()); 30 | for(i = 1; i < num; i++) { 31 | srunner_add_suite(sr, ((suite_getter_fn*)suites[i])()); 32 | } 33 | 34 | #ifdef LWIP_UNITTESTS_NOFORK 35 | srunner_set_fork_status(sr, CK_NOFORK); 36 | #endif 37 | #ifdef LWIP_UNITTESTS_FORK 38 | srunner_set_fork_status(sr, CK_FORK); 39 | #endif 40 | 41 | srunner_run_all(sr, CK_NORMAL); 42 | number_failed = srunner_ntests_failed(sr); 43 | srunner_free(sr); 44 | return (number_failed == 0) ? EXIT_SUCCESS : EXIT_FAILURE; 45 | } 46 | 47 | -------------------------------------------------------------------------------- /lwip-1.4.0/test/unit/tcp/tcp_helper.h: -------------------------------------------------------------------------------- 1 | #ifndef __TCP_HELPER_H__ 2 | #define __TCP_HELPER_H__ 3 | 4 | #include "../lwip_check.h" 5 | #include "lwip/arch.h" 6 | #include "lwip/tcp.h" 7 | 8 | /* counters used for test_tcp_counters_* callback functions */ 9 | struct test_tcp_counters { 10 | u32_t recv_calls; 11 | u32_t recved_bytes; 12 | u32_t recv_calls_after_close; 13 | u32_t recved_bytes_after_close; 14 | u32_t close_calls; 15 | u32_t err_calls; 16 | err_t last_err; 17 | char* expected_data; 18 | u32_t expected_data_len; 19 | }; 20 | 21 | /* Helper functions */ 22 | void tcp_remove_all(void); 23 | 24 | struct pbuf* tcp_create_segment(ip_addr_t* src_ip, ip_addr_t* dst_ip, 25 | u16_t src_port, u16_t dst_port, void* data, size_t data_len, 26 | u32_t seqno, u32_t ackno, u8_t headerflags); 27 | struct pbuf* tcp_create_rx_segment(struct tcp_pcb* pcb, void* data, size_t data_len, 28 | u32_t seqno_offset, u32_t ackno_offset, u8_t headerflags); 29 | void tcp_set_state(struct tcp_pcb* pcb, enum tcp_state state, ip_addr_t* local_ip, 30 | ip_addr_t* remote_ip, u16_t local_port, u16_t remote_port); 31 | void test_tcp_counters_err(void* arg, err_t err); 32 | err_t test_tcp_counters_recv(void* arg, struct tcp_pcb* pcb, struct pbuf* p, err_t err); 33 | 34 | struct tcp_pcb* test_tcp_new_counters_pcb(struct test_tcp_counters* counters); 35 | 36 | void test_tcp_input(struct pbuf *p, struct netif *inp); 37 | 38 | #endif 39 | -------------------------------------------------------------------------------- /lwip-1.4.0/test/unit/tcp/test_tcp.h: -------------------------------------------------------------------------------- 1 | #ifndef __TEST_TCP_H__ 2 | #define __TEST_TCP_H__ 3 | 4 | #include "../lwip_check.h" 5 | 6 | Suite *tcp_suite(void); 7 | 8 | #endif 9 | -------------------------------------------------------------------------------- /lwip-1.4.0/test/unit/tcp/test_tcp_oos.h: -------------------------------------------------------------------------------- 1 | #ifndef __TEST_TCP_OOS_H__ 2 | #define __TEST_TCP_OOS_H__ 3 | 4 | #include "../lwip_check.h" 5 | 6 | Suite *tcp_oos_suite(void); 7 | 8 | #endif 9 | -------------------------------------------------------------------------------- /lwip-1.4.0/test/unit/udp/test_udp.c: -------------------------------------------------------------------------------- 1 | #include "test_udp.h" 2 | 3 | #include "lwip/udp.h" 4 | #include "lwip/stats.h" 5 | 6 | #if !LWIP_STATS || !UDP_STATS || !MEMP_STATS 7 | #error "This tests needs UDP- and MEMP-statistics enabled" 8 | #endif 9 | 10 | /* Helper functions */ 11 | static void 12 | udp_remove_all(void) 13 | { 14 | struct udp_pcb *pcb = udp_pcbs; 15 | struct udp_pcb *pcb2; 16 | 17 | while(pcb != NULL) { 18 | pcb2 = pcb; 19 | pcb = pcb->next; 20 | udp_remove(pcb2); 21 | } 22 | fail_unless(lwip_stats.memp[MEMP_UDP_PCB].used == 0); 23 | } 24 | 25 | /* Setups/teardown functions */ 26 | 27 | static void 28 | udp_setup(void) 29 | { 30 | udp_remove_all(); 31 | } 32 | 33 | static void 34 | udp_teardown(void) 35 | { 36 | udp_remove_all(); 37 | } 38 | 39 | 40 | /* Test functions */ 41 | 42 | START_TEST(test_udp_new_remove) 43 | { 44 | struct udp_pcb* pcb; 45 | LWIP_UNUSED_ARG(_i); 46 | 47 | fail_unless(lwip_stats.memp[MEMP_UDP_PCB].used == 0); 48 | 49 | pcb = udp_new(); 50 | fail_unless(pcb != NULL); 51 | if (pcb != NULL) { 52 | fail_unless(lwip_stats.memp[MEMP_UDP_PCB].used == 1); 53 | udp_remove(pcb); 54 | fail_unless(lwip_stats.memp[MEMP_UDP_PCB].used == 0); 55 | } 56 | } 57 | END_TEST 58 | 59 | 60 | /** Create the suite including all tests for this module */ 61 | Suite * 62 | udp_suite(void) 63 | { 64 | TFun tests[] = { 65 | test_udp_new_remove, 66 | }; 67 | return create_suite("UDP", tests, sizeof(tests)/sizeof(TFun), udp_setup, udp_teardown); 68 | } 69 | -------------------------------------------------------------------------------- /lwip-1.4.0/test/unit/udp/test_udp.h: -------------------------------------------------------------------------------- 1 | #ifndef __TEST_UDP_H__ 2 | #define __TEST_UDP_H__ 3 | 4 | #include "../lwip_check.h" 5 | 6 | Suite* udp_suite(void); 7 | 8 | #endif 9 | -------------------------------------------------------------------------------- /nxpcommon/arch/lpc177x_8x/lpc17_emac.h: -------------------------------------------------------------------------------- 1 | /********************************************************************** 2 | * $Id$ lpc17_emac.h 2011-11-20 3 | *//** 4 | * @file lpc17_emac.h 5 | * @brief LPC17 ethernet driver header file for LWIP 6 | * @version 1.0 7 | * @date 20. Nov. 2011 8 | * @author NXP MCU SW Application Team 9 | * 10 | * Copyright(C) 2011, NXP Semiconductor 11 | * All rights reserved. 12 | * 13 | *********************************************************************** 14 | * Software that is described herein is for illustrative purposes only 15 | * which provides customers with programming information regarding the 16 | * products. This software is supplied "AS IS" without any warranties. 17 | * NXP Semiconductors assumes no responsibility or liability for the 18 | * use of the software, conveys no license or title under any patent, 19 | * copyright, or mask work right to the product. NXP Semiconductors 20 | * reserves the right to make changes in the software without 21 | * notification. NXP Semiconductors also make no representation or 22 | * warranty that such application will be suitable for the specified 23 | * use without further testing or modification. 24 | **********************************************************************/ 25 | 26 | #ifndef __LPC17_EMAC_H 27 | #define __LPC17_EMAC_H 28 | 29 | #include "lwip/opt.h" 30 | #include "lwip/netif.h" 31 | 32 | #ifdef __cplusplus 33 | extern "C" 34 | { 35 | #endif 36 | 37 | /* These functions are only visible when not using an RTOS */ 38 | #if NO_SYS == 1 39 | void lpc_enetif_input(struct netif *netif); 40 | s32_t lpc_tx_ready(struct netif *netif); 41 | s32_t lpc_rx_queue(struct netif *netif); 42 | void lpc_tx_reclaim(struct netif *netif); 43 | #endif 44 | 45 | err_t lpc_enetif_init(struct netif *netif); 46 | 47 | #ifdef __cplusplus 48 | } 49 | #endif 50 | 51 | #endif /* __LPC17_EMAC_H */ 52 | -------------------------------------------------------------------------------- /nxpcommon/arch/lpc18xx_43xx/lpc18xx_43xx_emac.h: -------------------------------------------------------------------------------- 1 | /********************************************************************** 2 | * $Id$ lpc18xx_43xx_emac.h 2011-11-20 3 | *//** 4 | * @file lpc18xx_43xx_emac.h 5 | * @brief LPC18xx/43xx ethernet driver header file for LWIP 6 | * @version 1.0 7 | * @date 20. Nov. 2011 8 | * @author NXP MCU SW Application Team 9 | * 10 | * Copyright(C) 2011, NXP Semiconductor 11 | * All rights reserved. 12 | * 13 | *********************************************************************** 14 | * Software that is described herein is for illustrative purposes only 15 | * which provides customers with programming information regarding the 16 | * products. This software is supplied "AS IS" without any warranties. 17 | * NXP Semiconductors assumes no responsibility or liability for the 18 | * use of the software, conveys no license or title under any patent, 19 | * copyright, or mask work right to the product. NXP Semiconductors 20 | * reserves the right to make changes in the software without 21 | * notification. NXP Semiconductors also make no representation or 22 | * warranty that such application will be suitable for the specified 23 | * use without further testing or modification. 24 | **********************************************************************/ 25 | 26 | #ifndef __LPC18XX_43XX_EMAC_H 27 | #define __LPC18XX_43XX_EMAC_H 28 | 29 | #include "lwip/opt.h" 30 | #include "lwip/netif.h" 31 | 32 | #ifdef __cplusplus 33 | extern "C" 34 | { 35 | #endif 36 | 37 | /* These functions are only visible when not using an RTOS */ 38 | #if NO_SYS == 1 39 | void lpc_enetif_input(struct netif *netif); 40 | s32_t lpc_tx_ready(struct netif *netif); 41 | s32_t lpc_rx_queue(struct netif *netif); 42 | void lpc_tx_reclaim(struct netif *netif); 43 | #endif 44 | 45 | err_t lpc_enetif_init(struct netif *netif); 46 | 47 | #ifdef __cplusplus 48 | } 49 | #endif 50 | 51 | #endif /* __LPC18XX_43XX_EMAC_H */ 52 | -------------------------------------------------------------------------------- /nxpcommon/arch/lpc18xx_43xx/lpc18xx_43xx_mac_regs.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/goertzenator/lwip/01c6f3f219e8690ad697e48d09dfb5f9b08c055f/nxpcommon/arch/lpc18xx_43xx/lpc18xx_43xx_mac_regs.h -------------------------------------------------------------------------------- /nxpcommon/arch/lpc_debug.c: -------------------------------------------------------------------------------- 1 | /********************************************************************** 2 | * $Id$ lpc_debug.c 2011-11-20 3 | *//** 4 | * @file lpc_debug.c 5 | * @brief LWIP debug re-direction 6 | * @version 1.0 7 | * @date 20. Nov. 2011 8 | * @author NXP MCU SW Application Team 9 | * 10 | * Copyright(C) 2011, NXP Semiconductor 11 | * All rights reserved. 12 | * 13 | *********************************************************************** 14 | * Software that is described herein is for illustrative purposes only 15 | * which provides customers with programming information regarding the 16 | * products. This software is supplied "AS IS" without any warranties. 17 | * NXP Semiconductors assumes no responsibility or liability for the 18 | * use of the software, conveys no license or title under any patent, 19 | * copyright, or mask work right to the product. NXP Semiconductors 20 | * reserves the right to make changes in the software without 21 | * notification. NXP Semiconductors also make no representation or 22 | * warranty that such application will be suitable for the specified 23 | * use without further testing or modification. 24 | **********************************************************************/ 25 | 26 | #include "lwip/opt.h" 27 | #include "lpc_board.h" 28 | 29 | /** @ingroup lwip_lpc_debug 30 | * @{ 31 | */ 32 | 33 | #ifdef LWIP_DEBUG 34 | 35 | /** \brief Displays an error message on assertion 36 | 37 | This function will display an error message on an assertion 38 | to the debug output. 39 | 40 | \param[in] msg Error message to display 41 | \param[in] line Line number in file with error 42 | \param[in] file Filename with error 43 | */ 44 | void assert_printf(char *msg, int line, char *file) 45 | { 46 | if (msg) { 47 | LWIP_DEBUGF(LWIP_DBG_ON, ("%s:%d in file %s\n", msg, line, file)); 48 | while (1) { 49 | /* Fast LED flash */ 50 | led_set(0); 51 | msDelay(100); 52 | led_set(1); 53 | msDelay(100); 54 | } 55 | } 56 | } 57 | 58 | #endif /* LWIP_DEBUG */ 59 | 60 | /** 61 | * @} 62 | */ 63 | 64 | /* --------------------------------- End Of File ------------------------------ */ 65 | -------------------------------------------------------------------------------- /nxpcommon/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 | -------------------------------------------------------------------------------- /nxpcommon/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 __ARCH_SYS_ARCH_H__ 33 | #define __ARCH_SYS_ARCH_H__ 34 | 35 | #include "lwip/opt.h" 36 | 37 | #if NO_SYS == 0 38 | #include "FreeRTOS.h" 39 | #include "task.h" 40 | #include "queue.h" 41 | #include "semphr.h" 42 | 43 | #define SYS_MBOX_NULL ( ( xQueueHandle ) NULL ) 44 | #define SYS_SEM_NULL ( ( xSemaphoreHandle ) NULL ) 45 | #define SYS_DEFAULT_THREAD_STACK_DEPTH configMINIMAL_STACK_SIZE 46 | 47 | typedef xSemaphoreHandle sys_sem_t; 48 | typedef xSemaphoreHandle sys_mutex_t; 49 | typedef xQueueHandle sys_mbox_t; 50 | typedef xTaskHandle sys_thread_t; 51 | typedef int sys_prot_t; 52 | 53 | #define sys_mbox_valid( x ) ( ( ( *x ) == NULL) ? pdFALSE : pdTRUE ) 54 | #define sys_mbox_set_invalid( x ) ( ( *x ) = NULL ) 55 | #define sys_sem_valid( x ) ( ( ( *x ) == NULL) ? pdFALSE : pdTRUE ) 56 | #define sys_sem_set_invalid( x ) ( ( *x ) = NULL ) 57 | #endif 58 | 59 | #endif /* __ARCH_SYS_ARCH_H__ */ 60 | -------------------------------------------------------------------------------- /nxpcommon/examples/lpc177x_8x/ea1788/ea1788_common/IAR/configs/dram.icf: -------------------------------------------------------------------------------- 1 | /*###ICF### Section handled by ICF editor, don't touch! ****/ 2 | /*-Editor annotation file-*/ 3 | /* IcfEditorFile="$TOOLKIT_DIR$\config\ide\IcfEditor\cortex_v1_0.xml" */ 4 | /*-Specials-*/ 5 | define symbol __ICFEDIT_intvec_start__ = 0x00000000; 6 | /*-Memory Regions-*/ 7 | define symbol __ICFEDIT_region_ROM_start__ = 0x00000000; 8 | define symbol __ICFEDIT_region_ROM_end__ = 0x0007FFFF; 9 | define symbol __ICFEDIT_region_RAM_start__ = 0x10000000; 10 | define symbol __ICFEDIT_region_RAM_end__ = 0x1000FFFF; 11 | /*-Sizes-*/ 12 | define symbol __ICFEDIT_size_cstack__ = 0x400; 13 | define symbol __ICFEDIT_size_heap__ = 0x400; 14 | /**** End of ICF editor section. ###ICF###*/ 15 | 16 | 17 | define memory mem with size = 4G; 18 | define region ROM_region = mem:[from __ICFEDIT_region_ROM_start__ to __ICFEDIT_region_ROM_end__]; 19 | define region RAM_region = mem:[from __ICFEDIT_region_RAM_start__ to __ICFEDIT_region_RAM_end__]; 20 | define region PRAM_region = mem:[from 0x20000000 to 0x20007FFF]; 21 | define region DRAM_region = mem:[from 0xA0000000 to 0xA1FFFFFF]; 22 | 23 | define block CSTACK with alignment = 8, size = __ICFEDIT_size_cstack__ { }; 24 | define block HEAP with alignment = 8, size = __ICFEDIT_size_heap__ { }; 25 | 26 | initialize by copy { readwrite }; 27 | //initialize by copy with packing = none { section __DLIB_PERTHREAD }; // Required in a multi-threaded application 28 | do not initialize { section .noinit }; 29 | 30 | place at address mem:__ICFEDIT_intvec_start__ { readonly section .intvec }; 31 | 32 | place in ROM_region { readonly }; 33 | place in RAM_region { readwrite, 34 | block CSTACK, block HEAP }; 35 | place in DRAM_region { readwrite object lpc17_emac_zcbuffs.o, readwrite object mem.o, 36 | readwrite object memp.o }; 37 | -------------------------------------------------------------------------------- /nxpcommon/examples/lpc177x_8x/ea1788/ea1788_common/IAR/configs/flash.icf: -------------------------------------------------------------------------------- 1 | /*###ICF### Section handled by ICF editor, don't touch! ****/ 2 | /*-Editor annotation file-*/ 3 | /* IcfEditorFile="$TOOLKIT_DIR$\config\ide\IcfEditor\cortex_v1_0.xml" */ 4 | /*-Specials-*/ 5 | define symbol __ICFEDIT_intvec_start__ = 0x00000000; 6 | /*-Memory Regions-*/ 7 | define symbol __ICFEDIT_region_ROM_start__ = 0x00000000; 8 | define symbol __ICFEDIT_region_ROM_end__ = 0x0007FFFF; 9 | define symbol __ICFEDIT_region_RAM_start__ = 0x10000000; 10 | define symbol __ICFEDIT_region_RAM_end__ = 0x1000FFFF; 11 | /*-Sizes-*/ 12 | define symbol __ICFEDIT_size_cstack__ = 0x400; 13 | define symbol __ICFEDIT_size_heap__ = 0x400; 14 | /**** End of ICF editor section. ###ICF###*/ 15 | 16 | 17 | define memory mem with size = 4G; 18 | define region ROM_region = mem:[from __ICFEDIT_region_ROM_start__ to __ICFEDIT_region_ROM_end__]; 19 | define region RAM_region = mem:[from __ICFEDIT_region_RAM_start__ to __ICFEDIT_region_RAM_end__]; 20 | define region PRAM_region = mem:[from 0x20000000 to 0x20007FFF]; 21 | define region DRAM_region = mem:[from 0xA0000000 to 0xA1FFFFFF]; 22 | 23 | define block CSTACK with alignment = 8, size = __ICFEDIT_size_cstack__ { }; 24 | define block HEAP with alignment = 8, size = __ICFEDIT_size_heap__ { }; 25 | 26 | initialize by copy { readwrite }; 27 | //initialize by copy with packing = none { section __DLIB_PERTHREAD }; // Required in a multi-threaded application 28 | do not initialize { section .noinit }; 29 | 30 | place at address mem:__ICFEDIT_intvec_start__ { readonly section .intvec }; 31 | 32 | place in ROM_region { readonly }; 33 | place in RAM_region { readwrite, 34 | block CSTACK, block HEAP }; 35 | place in PRAM_region { readwrite object lpc17_emac_zcbuffs.o, readwrite object mem.o, 36 | readwrite object memp.o }; 37 | -------------------------------------------------------------------------------- /nxpcommon/examples/lpc177x_8x/ea1788/ea1788_common/keil/configs/DRAM.ini: -------------------------------------------------------------------------------- 1 | /******************************************************************************/ 2 | /* RAM.INI: RAM Initialization File */ 3 | /******************************************************************************/ 4 | // <<< Use Configuration Wizard in Context Menu >>> // 5 | /******************************************************************************/ 6 | /* This file is part of the uVision/ARM development tools. */ 7 | /* Copyright (c) 2005-2008 Keil Software. All rights reserved. */ 8 | /* This software may only be used under the terms of a valid, current, */ 9 | /* end user licence from KEIL for a compatible version of KEIL software */ 10 | /* development tools. Nothing else gives you the right to use this software. */ 11 | /******************************************************************************/ 12 | 13 | FUNC void Setup (void) { 14 | SP = _RDWORD(0x00000000); // Setup Stack Pointer 15 | PC = _RDWORD(0x00000004); // Setup Program Counter 16 | _WDWORD(0xE000ED08, 0x00000000); // Setup Vector Table Offset Register 17 | } 18 | 19 | Setup(); // Setup for Running 20 | -------------------------------------------------------------------------------- /nxpcommon/examples/lpc177x_8x/ea1788/ea1788_common/keil/configs/DRAM.sct: -------------------------------------------------------------------------------- 1 | ;------------------------------------------------------------------------------------- 2 | ; Keil scatter loading file 3 | ;------------------------------------------------------------------------------------- 4 | 5 | ; Load region is in internal FLASH, 256KBytes 6 | FLASH 0x00000000 0x40000 { 7 | ; All code and RO data in in FLASH 8 | ER_RO 0x00000000 0x10000 { 9 | startup_ea1788.o (RESET, +FIRST) 10 | *.o (+RO) 11 | } 12 | 13 | ; All non-DMA related RW/ZI data is in internal IRAM 14 | ISRAM 0x10000000 0x10000 { 15 | *.o (+RW) 16 | *.o (+ZI) 17 | } 18 | 19 | ; DMA buffers need to be located in peripheral RAM, but not pbufs 20 | PIRAM 0xA0000000 0x10000000 { 21 | lpc17_emac.o (+RW, +ZI) 22 | mem.o (+RW, +ZI) 23 | memp.o (+RW, +ZI) 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /nxpcommon/examples/lpc177x_8x/ea1788/ea1788_common/keil/configs/FLASH.ini: -------------------------------------------------------------------------------- 1 | /******************************************************************************/ 2 | /* FLASH.INI: FLASH Initialization File */ 3 | /******************************************************************************/ 4 | // <<< Use Configuration Wizard in Context Menu >>> // 5 | /******************************************************************************/ 6 | /* This file is part of the uVision/ARM development tools. */ 7 | /* Copyright (c) 2005-2008 Keil Software. All rights reserved. */ 8 | /* This software may only be used under the terms of a valid, current, */ 9 | /* end user licence from KEIL for a compatible version of KEIL software */ 10 | /* development tools. Nothing else gives you the right to use this software. */ 11 | /******************************************************************************/ 12 | 13 | FUNC void Setup (void) { 14 | SP = _RDWORD(0x00000000); // Setup Stack Pointer 15 | PC = _RDWORD(0x00000004); // Setup Program Counter 16 | _WDWORD(0xE000ED08, 0x00000000); // Setup Vector Table Offset Register 17 | } 18 | 19 | Setup(); // Setup for Running -------------------------------------------------------------------------------- /nxpcommon/examples/lpc177x_8x/ea1788/ea1788_common/keil/configs/FLASH.sct: -------------------------------------------------------------------------------- 1 | ;------------------------------------------------------------------------------------- 2 | ; Keil scatter loading file 3 | ;------------------------------------------------------------------------------------- 4 | 5 | ; Load region is in internal FLASH, 256KBytes 6 | FLASH 0x00000000 0x40000 { 7 | ; All code and RO data in in FLASH 8 | ER_RO 0x00000000 0x10000 { 9 | startup_ea1788.o (RESET, +FIRST) 10 | *.o (+RO) 11 | } 12 | 13 | ; All non-DMA related RW/ZI data is in internal IRAM 14 | ISRAM 0x10000000 0x10000 { 15 | *.o (+RW) 16 | *.o (+ZI) 17 | } 18 | 19 | ; DMA buffers need to be located in peripheral RAM, but not pbufs 20 | PIRAM 0x20000000 0x8000 { 21 | lpc17_emac.o (+RW, +ZI) 22 | mem.o (+RW, +ZI) 23 | memp.o (+RW, +ZI) 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /nxpcommon/examples/lpc177x_8x/ea1788/ea1788_common/keil/configs/IRAM.ini: -------------------------------------------------------------------------------- 1 | /******************************************************************************/ 2 | /* RAM.INI: RAM Initialization File */ 3 | /******************************************************************************/ 4 | // <<< Use Configuration Wizard in Context Menu >>> // 5 | /******************************************************************************/ 6 | /* This file is part of the uVision/ARM development tools. */ 7 | /* Copyright (c) 2005-2008 Keil Software. All rights reserved. */ 8 | /* This software may only be used under the terms of a valid, current, */ 9 | /* end user licence from KEIL for a compatible version of KEIL software */ 10 | /* development tools. Nothing else gives you the right to use this software. */ 11 | /******************************************************************************/ 12 | 13 | FUNC void Setup (void) { 14 | SP = _RDWORD(0x10000000); // Setup Stack Pointer 15 | PC = _RDWORD(0x10000004); // Setup Program Counter 16 | _WDWORD(0xE000ED08, 0x10000000); // Setup Vector Table Offset Register 17 | } 18 | 19 | Setup(); // Setup for Running 20 | 21 | -------------------------------------------------------------------------------- /nxpcommon/examples/lpc177x_8x/ea1788/ea1788_common/keil/configs/IRAM.sct: -------------------------------------------------------------------------------- 1 | ;------------------------------------------------------------------------------------- 2 | ; Keil scatter loading file 3 | ;------------------------------------------------------------------------------------- 4 | 5 | ; Load region is in internal IRAM, 64KBytes 6 | ISRAM 0x10000000 0x10000 { 7 | ; All code, RO data, and non-DMA related RW/ZI data is in internal IRAM 8 | ER_RO 0x10000000 0x10000 { 9 | startup_ea1788.o (RESET, +FIRST) 10 | *.o (+RO) 11 | *.o (+RW) 12 | *.o (+ZI) 13 | } 14 | 15 | ; DMA buffers need to be located in peripheral RAM, but not pbufs 16 | PIRAM 0x20000000 0x8000 { 17 | lpc17_emac.o (+RW, +ZI) 18 | mem.o (+RW, +ZI) 19 | memp.o (+RW, +ZI) 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /nxpcommon/examples/lpc177x_8x/ea1788/ea1788_httpraw_sa/iar/ea1788_httpraw_sa.eww: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | $WS_DIR$\ea1788_httpraw_sa.ewp 6 | 7 | 8 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /nxpcommon/examples/lpc177x_8x/ea1788/ea1788_httpraw_sa/iar/settings/ea1788_httpraw_sa.cspy.bat: -------------------------------------------------------------------------------- 1 | @REM This batch file has been generated by the IAR Embedded Workbench 2 | @REM C-SPY Debugger, as an aid to preparing a command line for running 3 | @REM the cspybat command line utility using the appropriate settings. 4 | @REM 5 | @REM You can launch cspybat by typing the name of this batch file followed 6 | @REM by the name of the debug file (usually an ELF/DWARF or UBROF file). 7 | @REM Note that this file is generated every time a new debug session 8 | @REM is initialized, so you may want to move or rename the file before 9 | @REM making changes. 10 | @REM 11 | 12 | 13 | "C:\Program Files (x86)\IAR Systems\Embedded Workbench 6.0\common\bin\cspybat" "C:\Program Files (x86)\IAR Systems\Embedded Workbench 6.0\arm\bin\armproc.dll" "C:\Program Files (x86)\IAR Systems\Embedded Workbench 6.0\arm\bin\armjlink.dll" %1 --plugin "C:\Program Files (x86)\IAR Systems\Embedded Workbench 6.0\arm\bin\armbat.dll" --flash_loader "C:\Program Files (x86)\IAR Systems\Embedded Workbench 6.0\arm\config\flashloader\NXP\FlashNXPLPC256K_7x_8x_Cortex.board" --backend -B "--endian=little" "--cpu=Cortex-M3" "--fpu=None" "--drv_verify_download" "--semihosting=none" "--drv_communication=USB0" "--jlink_speed=auto" "--jlink_initial_speed=32" "--jlink_reset_strategy=0,0" "--drv_catch_exceptions=0x000" "--drv_swo_clock_setup=72000000,0,2000000" 14 | 15 | 16 | -------------------------------------------------------------------------------- /nxpcommon/examples/lpc177x_8x/ea1788/ea1788_httpraw_sa/iar/settings/ea1788_httpraw_sa.dni: -------------------------------------------------------------------------------- 1 | [Stack] 2 | FillEnabled=0 3 | OverflowWarningsEnabled=1 4 | WarningThreshold=90 5 | SpWarningsEnabled=1 6 | WarnLogOnly=1 7 | UseTrigger=1 8 | TriggerName=main 9 | LimitSize=0 10 | ByteLimit=50 11 | [DebugChecksum] 12 | Checksum=1024357110 13 | [Exceptions] 14 | StopOnUncaught=_ 0 15 | StopOnThrow=_ 0 16 | [CallStack] 17 | ShowArgs=0 18 | [Disassembly] 19 | MixedMode=1 20 | [Log file] 21 | LoggingEnabled=_ 0 22 | LogFile=_ "" 23 | Category=_ 0 24 | [TermIOLog] 25 | LoggingEnabled=_ 0 26 | LogFile=_ "" 27 | [CallStackLog] 28 | Enabled=0 29 | [DriverProfiling] 30 | Enabled=0 31 | Mode=0 32 | Graph=0 33 | Symbiont=0 34 | Exclusions= 35 | [Disassemble mode] 36 | mode=0 37 | [Breakpoints2] 38 | Count=0 39 | [Aliases] 40 | Count=0 41 | SuppressDialog=0 42 | -------------------------------------------------------------------------------- /nxpcommon/examples/lpc177x_8x/ea1788/ea1788_httpraw_sa/iar/settings/ea1788_httpraw_sa_flash_zc.jlink: -------------------------------------------------------------------------------- 1 | [BREAKPOINTS] 2 | ShowInfoWin = 1 3 | EnableFlashBP = 2 4 | BPDuringExecution = 0 5 | [CFI] 6 | CFISize = 0x00 7 | CFIAddr = 0x00 8 | [CPU] 9 | OverrideMemMap = 0 10 | AllowSimulation = 1 11 | ScriptFile="" 12 | [FLASH] 13 | MinNumBytesFlashDL = 0 14 | SkipProgOnCRCMatch = 1 15 | VerifyDownload = 1 16 | AllowCaching = 1 17 | EnableFlashDL = 2 18 | Override = 0 19 | Device="AD7160" 20 | [GENERAL] 21 | WorkRAMSize = 0x00 22 | WorkRAMAddr = 0x00 23 | [SWO] 24 | SWOLogFile="" 25 | [MEM] 26 | RdOverrideOrMask = 0x00 27 | RdOverrideAndMask = 0xFFFFFFFF 28 | RdOverrideAddr = 0xFFFFFFFF 29 | WrOverrideOrMask = 0x00 30 | WrOverrideAndMask = 0xFFFFFFFF 31 | WrOverrideAddr = 0xFFFFFFFF 32 | -------------------------------------------------------------------------------- /nxpcommon/examples/lpc177x_8x/ea1788/ea1788_tcpecho_sa/iar/ea1788_tcpecho_sa.eww: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | $WS_DIR$\ea1788_tcpecho_sa.ewp 6 | 7 | 8 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /nxpcommon/examples/lpc177x_8x/ea1788/ea1788_tcpecho_sa/iar/settings/ea1788_tcpecho_sa.cspy.bat: -------------------------------------------------------------------------------- 1 | @REM This batch file has been generated by the IAR Embedded Workbench 2 | @REM C-SPY Debugger, as an aid to preparing a command line for running 3 | @REM the cspybat command line utility using the appropriate settings. 4 | @REM 5 | @REM You can launch cspybat by typing the name of this batch file followed 6 | @REM by the name of the debug file (usually an ELF/DWARF or UBROF file). 7 | @REM Note that this file is generated every time a new debug session 8 | @REM is initialized, so you may want to move or rename the file before 9 | @REM making changes. 10 | @REM 11 | 12 | 13 | "C:\Program Files (x86)\IAR Systems\Embedded Workbench 6.0\common\bin\cspybat" "C:\Program Files (x86)\IAR Systems\Embedded Workbench 6.0\arm\bin\armproc.dll" "C:\Program Files (x86)\IAR Systems\Embedded Workbench 6.0\arm\bin\armjlink.dll" %1 --plugin "C:\Program Files (x86)\IAR Systems\Embedded Workbench 6.0\arm\bin\armbat.dll" --flash_loader "C:\Program Files (x86)\IAR Systems\Embedded Workbench 6.0\arm\config\flashloader\NXP\FlashNXPLPC256K_7x_8x_Cortex.board" --backend -B "--endian=little" "--cpu=Cortex-M3" "--fpu=None" "--drv_verify_download" "--semihosting=none" "--drv_communication=USB0" "--jlink_speed=auto" "--jlink_initial_speed=32" "--jlink_reset_strategy=0,0" "--drv_catch_exceptions=0x000" "--drv_swo_clock_setup=72000000,0,2000000" 14 | 15 | 16 | -------------------------------------------------------------------------------- /nxpcommon/examples/lpc177x_8x/ea1788/ea1788_tcpecho_sa/iar/settings/ea1788_tcpecho_sa.dni: -------------------------------------------------------------------------------- 1 | [Stack] 2 | FillEnabled=0 3 | OverflowWarningsEnabled=1 4 | WarningThreshold=90 5 | SpWarningsEnabled=1 6 | WarnLogOnly=1 7 | UseTrigger=1 8 | TriggerName=main 9 | LimitSize=0 10 | ByteLimit=50 11 | [InterruptLog] 12 | LogEnabled=0 13 | SumEnabled=0 14 | GraphEnabled=0 15 | ShowTimeLog=1 16 | ShowTimeSum=1 17 | SumSortOrder=0 18 | [Interrupts] 19 | Enabled=1 20 | [MemoryMap] 21 | Enabled=0 22 | Base=0 23 | UseAuto=0 24 | TypeViolation=1 25 | UnspecRange=1 26 | ActionState=1 27 | [Trace1] 28 | Enabled=0 29 | ShowSource=1 30 | [DebugChecksum] 31 | Checksum=-555747126 32 | [Exceptions] 33 | StopOnUncaught=_ 0 34 | StopOnThrow=_ 0 35 | [CallStack] 36 | ShowArgs=0 37 | [Disassembly] 38 | MixedMode=1 39 | [Log file] 40 | LoggingEnabled=_ 0 41 | LogFile=_ "" 42 | Category=_ 0 43 | [TermIOLog] 44 | LoggingEnabled=_ 0 45 | LogFile=_ "" 46 | [CallStackLog] 47 | Enabled=0 48 | [DriverProfiling] 49 | Enabled=0 50 | Mode=0 51 | Graph=0 52 | Symbiont=0 53 | Exclusions= 54 | [Disassemble mode] 55 | mode=0 56 | [Breakpoints2] 57 | Count=0 58 | [Aliases] 59 | Count=0 60 | SuppressDialog=0 61 | -------------------------------------------------------------------------------- /nxpcommon/examples/lpc177x_8x/ea1788/ea1788_tcpecho_sa/iar/settings/ea1788_tcpecho_sa_dram_zc.jlink: -------------------------------------------------------------------------------- 1 | [BREAKPOINTS] 2 | ShowInfoWin = 1 3 | EnableFlashBP = 2 4 | BPDuringExecution = 0 5 | [CFI] 6 | CFISize = 0x00 7 | CFIAddr = 0x00 8 | [CPU] 9 | OverrideMemMap = 0 10 | AllowSimulation = 1 11 | ScriptFile="" 12 | [FLASH] 13 | MinNumBytesFlashDL = 0 14 | SkipProgOnCRCMatch = 1 15 | VerifyDownload = 1 16 | AllowCaching = 1 17 | EnableFlashDL = 2 18 | Override = 0 19 | Device="AD7160" 20 | [GENERAL] 21 | WorkRAMSize = 0x00 22 | WorkRAMAddr = 0x00 23 | [SWO] 24 | SWOLogFile="" 25 | [MEM] 26 | RdOverrideOrMask = 0x00 27 | RdOverrideAndMask = 0xFFFFFFFF 28 | RdOverrideAddr = 0xFFFFFFFF 29 | WrOverrideOrMask = 0x00 30 | WrOverrideAndMask = 0xFFFFFFFF 31 | WrOverrideAddr = 0xFFFFFFFF 32 | -------------------------------------------------------------------------------- /nxpcommon/examples/lpc177x_8x/ea1788/ea1788_tcpecho_sa/iar/settings/ea1788_tcpecho_sa_flash_zc.jlink: -------------------------------------------------------------------------------- 1 | [BREAKPOINTS] 2 | ShowInfoWin = 1 3 | EnableFlashBP = 2 4 | BPDuringExecution = 0 5 | [CFI] 6 | CFISize = 0x00 7 | CFIAddr = 0x00 8 | [CPU] 9 | OverrideMemMap = 0 10 | AllowSimulation = 1 11 | ScriptFile="" 12 | [FLASH] 13 | MinNumBytesFlashDL = 0 14 | SkipProgOnCRCMatch = 1 15 | VerifyDownload = 1 16 | AllowCaching = 1 17 | EnableFlashDL = 2 18 | Override = 0 19 | Device="AD7160" 20 | [GENERAL] 21 | WorkRAMSize = 0x00 22 | WorkRAMAddr = 0x00 23 | [SWO] 24 | SWOLogFile="" 25 | [MEM] 26 | RdOverrideOrMask = 0x00 27 | RdOverrideAndMask = 0xFFFFFFFF 28 | RdOverrideAddr = 0xFFFFFFFF 29 | WrOverrideOrMask = 0x00 30 | WrOverrideAndMask = 0xFFFFFFFF 31 | WrOverrideAddr = 0xFFFFFFFF 32 | -------------------------------------------------------------------------------- /nxpcommon/examples/lpc177x_8x/ea1788/ea1788_tcpecho_sa/iar/settings/ea1788_tcpecho_sa_iram_zc.jlink: -------------------------------------------------------------------------------- 1 | [BREAKPOINTS] 2 | ShowInfoWin = 1 3 | EnableFlashBP = 2 4 | BPDuringExecution = 0 5 | [CFI] 6 | CFISize = 0x00 7 | CFIAddr = 0x00 8 | [CPU] 9 | OverrideMemMap = 0 10 | AllowSimulation = 1 11 | ScriptFile="" 12 | [FLASH] 13 | MinNumBytesFlashDL = 0 14 | SkipProgOnCRCMatch = 1 15 | VerifyDownload = 1 16 | AllowCaching = 1 17 | EnableFlashDL = 2 18 | Override = 0 19 | Device="AD7160" 20 | [GENERAL] 21 | WorkRAMSize = 0x00 22 | WorkRAMAddr = 0x00 23 | [SWO] 24 | SWOLogFile="" 25 | [MEM] 26 | RdOverrideOrMask = 0x00 27 | RdOverrideAndMask = 0xFFFFFFFF 28 | RdOverrideAddr = 0xFFFFFFFF 29 | WrOverrideOrMask = 0x00 30 | WrOverrideAndMask = 0xFFFFFFFF 31 | WrOverrideAddr = 0xFFFFFFFF 32 | -------------------------------------------------------------------------------- /nxpcommon/examples/lpc18xx_43xx/lpc43xx/hitex4350/hitex4350_common/keil/configs/IRAM.ini: -------------------------------------------------------------------------------- 1 | 2 | FUNC void Setup (unsigned int region) { 3 | region &= 0xFFFF0000; 4 | SP = _RDWORD(region); // Setup Stack Pointer 5 | PC = _RDWORD(region + 4); // Setup Program Counter 6 | _WDWORD(0xE000ED08, region); // Setup Vector Table Offset Register 7 | } 8 | 9 | Setup(0x10000000); // Get ready to execute image in SRAM or whatever region it is in 10 | -------------------------------------------------------------------------------- /nxpcommon/examples/lpc18xx_43xx/lpc43xx/hitex4350/hitex4350_common/keil/configs/IRAM.sct: -------------------------------------------------------------------------------- 1 | ;------------------------------------------------------------------------------------- 2 | ; Keil scatter loading file 3 | ;------------------------------------------------------------------------------------- 4 | 5 | ; Load region is in IRAM 6 | FLASH 0x10000000 0x20000 { 7 | ; All code and RO data in IRAM 8 | ER_RO 0x10000000 0x20000 { 9 | startup_hitex4350_m4.o (RESET, +FIRST) 10 | *.o (+RO) 11 | *.o (+RW) 12 | *.o (+ZI) 13 | memp.o (+RW, +ZI) 14 | } 15 | 16 | ; DMA buffers need to be located in peripheral RAM, but not pbufs 17 | PIRAM 0x10080000 0x00012000 { 18 | mem.o (+RW, +ZI) 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /nxpcommon/examples/lpc18xx_43xx/lpc43xx/hitex4350/hitex4350_common/keil/configs/flash.ini: -------------------------------------------------------------------------------- 1 | 2 | FUNC void Setup (unsigned int region) { 3 | region &= 0xFFFF0000; 4 | SP = _RDWORD(region); // Setup Stack Pointer 5 | PC = _RDWORD(region + 4); // Setup Program Counter 6 | _WDWORD(0xE000ED08, region); // Setup Vector Table Offset Register 7 | } 8 | 9 | Setup(0x1C000000); // Get ready to execute image in SRAM or whatever region it is in 10 | -------------------------------------------------------------------------------- /nxpcommon/examples/lpc18xx_43xx/lpc43xx/hitex4350/hitex4350_common/keil/configs/flash.sct: -------------------------------------------------------------------------------- 1 | ;------------------------------------------------------------------------------------- 2 | ; Keil scatter loading file 3 | ;------------------------------------------------------------------------------------- 4 | 5 | ; Load region is in FLASH 6 | FLASH 0x1C000000 0x400000 { 7 | ; All code and RO data in SPI FLASH 8 | ER_RO 0x1C000000 0x400000 { 9 | startup_hitex4350_m4.o (RESET, +FIRST) 10 | *.o (+RO) 11 | } 12 | 13 | ; IRAM for data 14 | ER_RW 0x10000000 0x20000 { 15 | *.o (+RW) 16 | *.o (+ZI) 17 | memp.o (+RW, +ZI) 18 | } 19 | 20 | ; DMA buffers need to be located in peripheral RAM, but not pbufs 21 | PIRAM 0x10080000 0x00012000 { 22 | mem.o (+RW, +ZI) 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /nxpcommon/examples/lpc18xx_43xx/lpc43xx/hitex4350/hitex4350_common/keil/configs/spifi64.ini: -------------------------------------------------------------------------------- 1 | 2 | FUNC void Setup (unsigned int region) { 3 | region &= 0xFFFF0000; 4 | SP = _RDWORD(region); // Setup Stack Pointer 5 | PC = _RDWORD(region + 4); // Setup Program Counter 6 | _WDWORD(0xE000ED08, region); // Setup Vector Table Offset Register 7 | } 8 | 9 | LOAD "__spifi_64mb\\hitex4350_tcpecho_sa.axf" INCREMENTAL 10 | Setup(0x14000000); // Get ready to execute image in SRAM or whatever region it is in 11 | g,main 12 | -------------------------------------------------------------------------------- /nxpcommon/examples/lpc18xx_43xx/lpc43xx/hitex4350/hitex4350_common/keil/configs/spifi64.sct: -------------------------------------------------------------------------------- 1 | ;------------------------------------------------------------------------------------- 2 | ; Keil scatter loading file 3 | ;------------------------------------------------------------------------------------- 4 | 5 | ; Load region is in SPI FLASH 6 | FLASH 0x14000000 0x100000 { 7 | ; All code and RO data in SPI FLASH 8 | ER_RO 0x14000000 0x100000 { 9 | startup_hitex4350_m4.o (RESET, +FIRST) 10 | *.o (+RO) 11 | } 12 | 13 | ; IRAM for data 14 | ER_RW 0x10000000 0x20000 { 15 | *.o (+RW) 16 | *.o (+ZI) 17 | memp.o (+RW, +ZI) 18 | } 19 | 20 | ; DMA buffers need to be located in peripheral RAM, but not pbufs 21 | PIRAM 0x10080000 0x00012000 { 22 | mem.o (+RW, +ZI) 23 | } 24 | } 25 | --------------------------------------------------------------------------------