What is LWIP?
An implementation of the TCP/IP protocol stack. The focus of the lwIP stack is to reduce memory usage and code size suitable for embedded systems. uses a tailor made API that does not require any data copying.
<Layered model>
APP cant aware of the buffer mechanisms. (e.g. reuse buffers with frequently used data.)
One of Xilinx ML605, SP605, or SP601 Development Boards Xilinx Platform USB Cable RS232 USB Cable A crossover ethernet cable connecting the board to a Windows or Linux host
All protocols reside in a single process thus are separated from the OS kernel.
OS specific function calls and data structures are not used directly in the code. The operating system emulation layer is used. The OS emulation layer provides Timers, process synchronization, message passing mechanisms, and so on.
Packet buffers pbufs LWIPs internal representation of a packet, Designed for the special needs of the minimal stack. Types of pbufs PBUF_RAM, PBUF_ROM, PBUF_POOL A pbuf chain may consist of multiple types of pbufs.
PBUF_RAM pbuf
has the packet data stored in memory managed by the pbuf subsystem. used when an application sends data that is dynamically generated.
PBUF_ROM pbuf
Used when an application sends data that is located in memory managed by the application. The main use is when the data is located in ROM Header that are prepended to the data in a PBUF_ROM pbuf are stored in a PBUF_RAM pbuf.
PBUF_POOL
Consist of fixed size pbufs allocated from a pool of fixed size pbufs. Mainly used by network device drivers since the operation of allocating a single pbuf is fast and is therefore suitable for use in an interrupt handler
Network interfaces
The network interfaces are kept on a global linked list. Reflect the kind of H/W Ex) Bluetooth => bt WLAN => wl The function the device driver should call when a packet has been received. The function in the device driver that transmits a packet on the physical network and it is called by the IP layer when a packet is to be sent.
Points to device driver specific state for the network interface and is set by the device driver.
IP processing(1/3)
Receiving packets
Network device driver calls ip_input() function. Checking IP version, header length Computing the header checksum Checking destination address.
Sending packets
Find the appropriate network interface. All IP header fields are filled. IP header checksum is computed. The source and destination address are passed.
IP processing(2/3)
Forwarding packets
When none of the network interfaces has the same IP address as an incoming packets destination address.
IP processing(3/3)
ICMP processing
This is for ICMP ECHO message. Just swapping the IP destination and source address of the incoming packet.
TCP processing(1/2)
Function to call when a listener has been connected.
Receivers window
Timer for TIME-WAIT state
TCP processing(2/2)
Applications
Echo server Web server TFTP server
Echo Server
A simple program that echoes input that is sent to the program via the network. The socket mode echo server is structured as follows: A main thread listens continually on a specified echo server port. For each connection request,it spawns a separate echo service thread. It then continues listening on the echo port.
Web Server
Reference for a TCP based application. Implements only a subset of the HTTP1.1 protocol. Web sever demonstrates these features: Accessing files residing on a memory file system via HTTP GET commands. Controlling the LED lights on the development board using the HTTP POST command.
Conclusion(1/2)
Lwip is an open source networking stack designed for embedded systems Echo server provides a simple starting point for networking applications Web server application show a more complex TCP based application
Conclusion(2/2)
So applications to measure receive and transmit throughput provide an indication of the maximum possible throughput using lwip with Xilinx adapters.
REFERNCES
1.lwIP A Lightweight TCP/IP Stack CVS Repositories 2. RFC 1350 The TFTP Protocol 3. iperf software 4. XAPP1043 Measuring Treck TCP/IP
THANK YOU!!!!
QUESTIONS??????????