opentcp_mcf5282

所属分类:嵌入式/单片机/硬件编程
开发工具:C/C++
文件大小:437KB
下载次数:5
上传日期:2008-07-22 12:51:56
上 传 者finelei2002
说明:  opentcp_mcf5282原代码,请需要的朋友下载
(opentcp_mcf5282 the original code, please download the Friend in need)

文件列表:
opentcp_mcf5282 (0, 2004-04-12)
opentcp_mcf5282\Documentation.txt (119, 2004-04-12)
opentcp_mcf5282\License.txt (2512, 2004-03-25)
opentcp_mcf5282\obj (0, 2004-03-24)
opentcp_mcf5282\obj\opentcp_mcf5282 (220560, 2004-03-24)
opentcp_mcf5282\obj\opentcp_mcf5282.S19 (199612, 2004-03-24)
opentcp_mcf5282\obj\opentcp_mcf5282.xMAP (18645, 2004-03-24)
opentcp_mcf5282\obj\vssver.scc (80, 2004-03-24)
opentcp_mcf5282\opentcp_mcf5282.mcp (34526, 2004-03-24)
opentcp_mcf5282\opentcp_mcf5282_Data (0, 2004-03-24)
opentcp_mcf5282\opentcp_mcf5282_Data\CWSettingsWindows.stg (3698, 2004-03-24)
opentcp_mcf5282\opentcp_mcf5282_Data\opentcp_mcf5282 (0, 2004-03-24)
opentcp_mcf5282\opentcp_mcf5282_Data\opentcp_mcf5282\TargetDataWindows.tdt (794420, 2004-03-24)
opentcp_mcf5282\opentcp_mcf5282_Data\opentcp_mcf5282\vssver.scc (48, 2004-03-24)
opentcp_mcf5282\opentcp_mcf5282_Data\vssver.scc (48, 2004-03-24)
opentcp_mcf5282\pe_debugger (0, 2004-03-24)
opentcp_mcf5282\pe_debugger\m5282evb_pne.cfg (1361, 2004-03-24)
opentcp_mcf5282\pe_debugger\vssver.scc (48, 2004-03-24)
opentcp_mcf5282\src (0, 2004-04-12)
opentcp_mcf5282\src\5282LITE.ld (1707, 2004-03-24)
opentcp_mcf5282\src\5282run.gdb (11633, 2004-03-24)
opentcp_mcf5282\src\codewarrior (0, 2004-03-24)
opentcp_mcf5282\src\codewarrior\m5282evb_pne.cfg (1361, 2004-03-24)
opentcp_mcf5282\src\codewarrior\mwerks.h (554, 2004-03-24)
opentcp_mcf5282\src\codewarrior\sdram.lcf (1672, 2004-03-24)
opentcp_mcf5282\src\codewarrior\vssver.scc (80, 2004-03-24)
opentcp_mcf5282\src\common (0, 2004-04-12)
opentcp_mcf5282\src\common\alloc.c (2406, 2004-03-24)
opentcp_mcf5282\src\common\io.c (2237, 2004-03-24)
opentcp_mcf5282\src\common\io.h (749, 2004-03-24)
opentcp_mcf5282\src\common\m5282evb.h (1892, 2004-03-24)
opentcp_mcf5282\src\common\Makefile (832, 2004-03-24)
opentcp_mcf5282\src\common\mcf5282.h (114801, 2004-03-24)
opentcp_mcf5282\src\common\mcf5282_lo.S (1787, 2004-03-24)
opentcp_mcf5282\src\common\mcf5xxx.h (5914, 2004-03-24)
opentcp_mcf5282\src\common\mcf5xxx.S (5892, 2004-03-24)
opentcp_mcf5282\src\common\printf.c (12198, 2004-03-24)
opentcp_mcf5282\src\common\stdlib.c (6801, 2004-03-24)
opentcp_mcf5282\src\common\stdlib.h (1111, 2004-03-24)
opentcp_mcf5282\src\common\sysinit.c (8070, 2004-03-24)
... ...

/********************************************************************************************** readme.txt OpenTCP port for MCF5282 Jari Lahti Viola Systems Ltd. (c) 2004 15.3.2004 INTRODUCTION ------------ The OpenTCP is a protocol stack designed especially for low resource 8/16/32 bit embedded single-chip microcontrollers. The stack contains optimized implementations of most common core protocols of TCP/IP family such as ARP, IP, ICMP, UDP, TCP and also some of the application protocols including HTTP server, IP firewall, POP3 and SMTP clients, BOOTP client and TFTP server. The network interface is used thru abstraction layer macros enabling the use of virtually any physical and link-level protocols. Sample ethernet drivers are provided for e.g. NE2000 compatible ethernet chips. PORTS ----- OpenTCP has been ported by OpenTCP user's community to many processor architectures and Ethernet chips including -Fujitsu MB90F553 (NE2000 Ethernet) -Motorola MCF5282 (internal ethernet) -Renesans -8052 PORT FOR MCF5282 ---------------- The port for Motorola MCF5282 was done by using the FEC (Fast Ethernet Controller) driver code from Motorola. The abstraction and integration of FEC and OpenTCP code is done on separate abstraction layer implemented in eth_stub.c PROCESSOR RELATED ------------------- int_handlers.c -implementation of interrupt handling -programmable interrupt driver 0 is used to call irqhandler_timer() function on timers.c on every millisecond in order to keep OpenTCP internal timers running -fec rx interrupt is used to call fec_handler(NIF *nif) function on fec.c in order to process incoming ethernet packets vectors.s -binding interrupt requests to c code of int_handlers.c DRIVER FILES ------------ eth.h -Internal definitions of Motorola FEC driver fec.c -Actual driver of MCF5282 internal Ethernet chip including initialisation, tx, rx etc. nbuf.c -Implementation of MCF5282 internal FEC RX and TX buffers nif.c -API for fec.c and nbuf.c implementing the user's view of network interface DRIVER GLUE CODE (ABSTRACTION) ------------------------------ eth_stub.c -Binds together the nif.c API and OpenTCP internal API in a way requiring not changes to actual OpenTCP code opentcp.h -API for few simple OpenTCP helper functions -Processor/system related bindings like defining the OpenTCP netwok macros to use the eth_stub.h functions -The main include file including other common OpenTCP header files COMMON INCLUDE FILES ------------------ datatypes.h -Data type definitions for OpenTCP internal use (UINT8, UINT16 etc.) debug.h -defines does the OpenTCP output the debug information -defines the debug out function opentcp.h -API for few simple OpenTCP helper functions -Processor/system related bindings like defining the OpenTCP netwok macros to use the eth_stub.h functions -The main include file including other common OpenTCP header files tcp_ip.h -Protocol constants, structures and API for core protocols -Compile-time definitions for the number of UDP and TCP sockets generated timers.h -API for OpenTCP internal timers -General time definitions (number of timers generated, timer tick) COMMON CODE FILES ------------------ opentcp.c -Implementation of simple OpenTCP helper functions (toupper, strlen, bufsearch) -Implementation of OpenTCP internal network interface -Implementation of OpenTCP internal TX buffer timers.c -Implementation of timer API -a timer function called by interrupt decreasing the active timers IP -- ip.c -implementation of IP protocol -implementation of IP tx & rx structure passing headers ICMP ---- icmp.c -icmp processing ("PING") ARP --- arp.c -implementation of ARP protocol (reply to ARP request, generate ARP request, ARP cache) arp.h -ARP definitions (number of ARP cache entries, ARP management timeout, ARP enty time-to-live..) UDP --- udp.c -implementation of UDP protocol -implementation of UDP socket pool -implementation of UDP rx structure passing header TCP --- tcp.c -implementation of TCP protocol and state machine -implementation of TCP socket pool -implementation of TCP rx structure passing header BOOTP ----- bootp.c -implementation of bootstrap protocol for getting IP address from bootp/dhcp server bootp.h -bootp definitions FIREWALL -------- firewall.c -simple IP firewall TFTP ---- tftps.c -implementation of TFTP (Trivial File Transfer Protocol) server tftps.h -definitions of TFTP server HTTP ---- http.c -implementation of simple HTTP 1.0 server http.h -hppt server definitions (number of sessions) SMTP ---- smtp_client.c -implementation of simple mail transfer protocol client smtp_client.h -smtp definitions and callback function prototypes smtp_callbacks.c -smtp protocol callback functions (define your own functionality) POP3 ---- pop3_client.c -implementation of post office protocol 3 client pop3_client.h -pop3 definitions and callback function prototypes pop3c_callbacks.c -pop3 protocol callback functions (define your own functionality) OPERATION --------- -passing information between protocol layers is based on structures -applications construct the data to be sent on common tx buffer -The main program firstly initializes the processor, interrupts, ethernet driver and required OpenTCP protocols and user applications. -in main loop the Ethernet interface is polled for incoming packets *if there is incoming packet the link layer protocol is detected (ARP or IP) by parsing the information of packet to otcp_rxframe structure *APR packet is directed for arp.c *IP packet is directed for ip.c and information of IP packet is parsed to ReceivedIPPacket structure *The IP packet is further directed to ICMP, UDP or TCP layers *ICMP is handled internally by the stack *UDP and TCP layers further call user callbacks functions to inform e.g. arriving connection, incoming data, ack, errors, closing connection *when the packet is processed it is deleted from network rx buffer -main loop also call common core protocol 'run' functions *arp is polled for timeouts and retransmissions *tcp is polled for timeouts and retransmissions *tcp may also call user callback fucntions informing errors and regeneration of data -other user applications and protocols 'run' functions are called ***********************************************************************************************/

近期下载者

相关文件


收藏者