Overview
As in many other TCP/IP implementations, the
layered protocol design has served as a guide for the design of the
implementation of lwIP. Each protocol is implemented as its own module, with a
few functions acting as entry points into each protocol. Even though the
protocols are implemented separately,
some layer violations are made, as discussed above, in order to improve
performance both in terms of processing speed and memory usage. For example,
when verifying the checksum of an incoming TCP segment and when demultiplexing
a segment, the source and destination IP addresses of the segment has to be
known by the TCP module.
Basic Concepts
From the application's point of view, data
handling in the BSD socket API is done in continuous memory regions. This is
convenient for the application programmer since manipulation of data in
application programs is usually done in such continuous memory chunks. Using
this type of mechanism with lwIP would not be advantageous, since lwIP usually
handles data in buffers where the data is partitioned into smaller chunks of
memory. Thus the data would have to be
copied into a continuous memory area before being passed to the
application. This would waste both processing time and memory since.
UDP Processing
UDP is a simple protocol used for
demultiplexing packets between different processes. The state for each UDP
session is kept in a PCB structure . The UDP PCBs are kept on a linked list
which is searched for a match when a UDP datagram arrives. The UDP PCB
structure contains a pointer to the next PCB in the global linked list of UDP
PCBs. A UDP session is defined by the IP addresses and port numbers of the
end-points and these are stored in the local ip, dest ip, local port and dest
port fields.
Abstract
LWIP is an implementation of the TCP/IP
protocol stack.. Interest for connecting small devices to existing network
infrastructure such as global internet is steadily increasing.
Queuing And
Transmitting Data
Data that is to be sent is divided into
appropriate sized chunks and given sequence numbers by the tcp enqueue()
function. Here, the data is packeted into pbufs and enclosed in a tcp seg
struct The TCP header is build in the pbuf, and filled in with all fields
except the acknowledgment number, ackno, and the advertised window, wnd. These
fields can change during the queuing time of the segment and are therefore set
by tcp output() which does the actual transmission of the segment. After the
segments are built, they are queued on the unsent list in the PCB.
Introduction
Over the last few years, the interest for
connecting computers and computer supported devices to wireless networks has
steadily increased. Computers are becoming more and more seamlessly integrated
with everyday equipment and prices are dropping. At the same time wireless
networking technologies, such as Bluetooth
and IEEE 802.11b WLAN , are emerging. This gives rise to many new
fascinating scenarios in areas such as health care, safety and security,
transportation, and processing industry.
0 comments:
Post a Comment