|
by Tracy
Thomas
Start ý Data
Delivery ý Regulating Data ý Pros
and Cons ý Sources and PDF
Itýs difficult for embedded systems programmers
to sift through the wealth of reference material regarding networking
and TCP/IP protocols. Yet, an increasing number of embedded applications
benefit from the addition of networking capability. This article is
a practical guide to the basics of TCP/IP and contains information
that is most often misunderstood by programmers who are new to networking.
THE BASICS
The first point to understand is that
TCP/IP often refers to the family of protocols, which includes TCP
(Transport Control Protocol), UDP (User Datagram Protocol), IP (Internet
Protocol), and some underlying link layers such as Ethernet. Data
sent using the TCP protocol is called a segment, and data sent using
the UDP protocol is referred to as a packet. IP is the network layer
that lies under TCP and UDP. IP provides connectionless packet delivery
to a specified host address, making it unreliable because IP packets
(called datagrams) can be lost, duplicated, or delivered out of order.
The advantage of IP is that a datagram provides a universal method
for delivering data, independent of the underlying network technology.
UDP and TCP sit on top of IP at the transport
layer. Both use port numbers to de-mulitplex data sent to a host.
A port number is specific to an application. The use of multiple port
numbers allows a single host to run multiple networking applications.
Each UDP packet and TCP segment has a source and destination port
number.
The host that waits for incoming connections
is called the server, and the host that initiates a connection is
the client. Servers "listen" to well-known port numbers
for common applications such as FTP (File Transfer Protocol), e-mail,
and HTTP. Clients generally choose a random source port number and
connect to a server at a well-known port. Custom applications should
use a port number greater than 1024, because port numbers less than
1024 are reserved for well-known applications.
NEXT
Circuit Cellar provides up-to-date information for engineers. Visit
www.circuitcellar.com for
more information and additional articles.
For subscription information, call (860) 875-2199, subscribe@circuitcellar.com
or subscribe online.
ýCircuit Cellar, the Magazine for Computer Applications. Posted with
permission. |