opentcp_mcf523x
所属分类:TCP/IP协议栈
开发工具:C/C++
文件大小:1092KB
下载次数:12
上传日期:2008-07-22 12:47:43
上 传 者:
finelei2002
说明: opentcp_mcf523x源代码,请需要的朋友下载
(opentcp_mcf523x source code, please download the Friend in need)
文件列表:
opentcp_mcf523x (0, 2004-09-10)
opentcp_mcf523x\.typeAttributes.dict (0, 2004-09-10)
opentcp_mcf523x\Documentation.txt (119, 2004-04-15)
opentcp_mcf523x\Flash_BCC.xml (1630, 2004-09-02)
opentcp_mcf523x\Flash_EVB.xml (1627, 2004-09-02)
opentcp_mcf523x\License.txt (2512, 2004-04-15)
opentcp_mcf523x\obj (0, 2004-09-10)
opentcp_mcf523x\obj\OpenTCP_mcf523x_RAM (214500, 2004-09-02)
opentcp_mcf523x\obj\OpenTCP_mcf523x_RAM.S19 (192076, 2004-09-02)
opentcp_mcf523x\obj\OpenTCP_mcf523x_RAM.xMAP (18567, 2004-09-02)
opentcp_mcf523x\obj\OpenTCP_mcf523x_ROM (214844, 2004-09-02)
opentcp_mcf523x\obj\OpenTCP_mcf523x_ROM.S19 (192124, 2004-09-02)
opentcp_mcf523x\obj\OpenTCP_mcf523x_ROM.xMAP (19120, 2004-09-02)
opentcp_mcf523x\opentcp_mcf523x.mcp (67451, 2004-09-02)
opentcp_mcf523x\opentcp_mcf523x_Data (0, 2004-09-10)
opentcp_mcf523x\opentcp_mcf523x_Data\CWSettingsWindows.stg (5722, 2004-09-02)
opentcp_mcf523x\opentcp_mcf523x_Data\OpenTCP_mcf523x_RAM (0, 2004-09-10)
opentcp_mcf523x\opentcp_mcf523x_Data\OpenTCP_mcf523x_RAM\TargetDataWindows.tdt (775754, 2004-09-02)
opentcp_mcf523x\opentcp_mcf523x_Data\OpenTCP_mcf523x_ROM (0, 2004-09-10)
opentcp_mcf523x\opentcp_mcf523x_Data\OpenTCP_mcf523x_ROM\TargetDataWindows.tdt (775754, 2004-09-02)
opentcp_mcf523x\pe_debugger (0, 2004-09-10)
opentcp_mcf523x\pe_debugger\m523xevb_pne.cfg (3221, 2004-08-07)
opentcp_mcf523x\src (0, 2004-09-10)
opentcp_mcf523x\src\523x_BCC.ld (1707, 2004-04-15)
opentcp_mcf523x\src\codewarrior (0, 2004-09-10)
opentcp_mcf523x\src\codewarrior\mwerks.h (554, 2004-04-15)
opentcp_mcf523x\src\codewarrior\rom.lcf (3635, 2004-09-02)
opentcp_mcf523x\src\codewarrior\sdram.lcf (1672, 2004-04-15)
opentcp_mcf523x\src\common (0, 2004-09-10)
opentcp_mcf523x\src\common\523x (0, 2004-09-10)
opentcp_mcf523x\src\common\523x\Headers (0, 2004-09-10)
opentcp_mcf523x\src\common\523x\Headers\m523xevb.h (3500, 2004-09-02)
opentcp_mcf523x\src\common\523x\Headers\mcf523x.h (2572, 2004-08-07)
opentcp_mcf523x\src\common\523x\Headers\mcf523x_can.h (25025, 2004-08-07)
opentcp_mcf523x\src\common\523x\Headers\mcf523x_ccm.h (3384, 2004-08-07)
opentcp_mcf523x\src\common\523x\Headers\mcf523x_cfm.h (3569, 2004-08-07)
opentcp_mcf523x\src\common\523x\Headers\mcf523x_cs.h (6083, 2004-08-07)
opentcp_mcf523x\src\common\523x\Headers\mcf523x_eport.h (5219, 2004-08-07)
opentcp_mcf523x\src\common\523x\Headers\mcf523x_etpu.h (29215, 2004-08-07)
opentcp_mcf523x\src\common\523x\Headers\mcf523x_fec.h (13062, 2004-08-07)
... ...
/**********************************************************************************************
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
***********************************************************************************************/
近期下载者:
相关文件:
收藏者: