Professional Documents
Culture Documents
Communications
Tenth Edition
by William Stallings
To transfer data
several tasks
must be
performed:
• Control
information for
Semantics coordination and
error handling
• Speed matching
Timing and sequencing
A Simple Protocol Architecture
Agents involved:
Examples of
• Applications applications include
• Computers file transfer and
• Networks electronic mail
These execute on
computers that
support multiple
simultaneous
applications
Communication Layers
Network address
Network access
Computer B
1 2 t
( ) ( ) or
sp
"to port 2 on computer B" an
Tr
from to data
1 2
k
( ) or
t w ss
e e
"to computer B" N acc
a
dat from to from to data
to A B 1 2
m 2
fro
to 1
m B
fro
A
Communications
Network
fr A
om
Computer B
to
n
B
io
fr 1
at
om
ic
Entity Y p pl
data A
to
2
1 2
da
t
( ) ( ) or
ta
sp
an
from to data Tr
1 2
k
( ) or
t w ss
"this is to me" e e
N acc
from to from to data
A B 1 2
Transport
Transfer of data between
end points. May provide TCP, UDP
error control, flow control,
congestion control, reliable
delivery.
Internet ICMP,
OSPF,
Shield higher layers from
RSVP
details of physical network IPv4, IPv6 ARP
configuration. Provides
routing. May provide QoS,
congestion control.
Network Access/
Data Link
Logical interface to network Ethernet, WiFi, ATM, frame relay
hardware. May be stream or
packet oriented. May
provide reliable delivery.
Physical
Transmission of bit stream;
specifies medium, signal Twisted pair, optical fiber, satellite,
encoding technique, data terrestrial microwave
rate, bandwidth, and
physical connector.
Internet Layer
interconnected
networks
Internet Layer
Uses the
Implemented Internet
in end Protocol (IP)
systems and to provide
routers routing
function
Host-to-Host (Transport) Layer
Transmission
Control Protocol
Application Layer
Contains the logic needed to support the
various user applications
A separate module is needed for each
different type of application that is peculiar
to that application
Host A Host B
App X App Y
App Y App X
Port
1 2 3 2 4 6
Logical connection
(TCP connection)
TCP TCP
Global internet
IP address IP
NAP 1 NAP 2
Network 1 Network 2
Physical Physical
TCP TCP
header segment
IP IP
header datagram
Network Network-level
header packet
Sequence Number
20 octets
Acknowledgement Number
Header
Reserved Flags Window
length
Options + Padding
Bit: 0 16 31
Source Address
Destination Address
Options + Padding
Bit: 0 4 10 12 16 24 31
Bit: 0 4 10 12 16 24 31
Source Address
40 octets
Destination Address
TCP UDP
IP
Physical
Layer
Request Request
Indication Indication
Response
Confirm
Quality of service
Protocols
Communications/networking
Synchronization
Compression
User interface
Database
Operating system
M ics
n
ph
d
io
un
xt
ot
ra
Computer architecture
So
Te
G
MEDIA TYPE
MM e-mail
Collaborative work systems
MM conferencing
Streaming audio/video
VoIP
APPLICATION
Educational systems
• Electronic books with a
multimedia component,
simulation and modeling
applets, and other teaching
support systems
Multimedia Technologies
Sometechnologies that are relevant to the
support of multimedia applications are:
type
(AF_UNIX, AF_INET, AF_INET6)
Type of socket to be opened (stream, datagram,
raw)
Table
protocol Protocol to be used on socket (UDP, TCP, ICMP)
bind( ) Bind a socket to a
port address
sockfd Socket to be bound to the port address
localaddress Socket address to which the socket is bound
addresslength Length of the socket address structure
2.4
listen( ) Listen on a socket sockfd Socket on which the application is to listen
for inbound queuesize Number of inbound requests that can be queued
connections at any time
accept( ) sockfd
Accept an
inbound
Socket on which the connection is to be
accepted Core
connection remoteaddress Remote socket address from which the
connection was initiated
addresslength Length of the socket address structure
Socket
connect( ) sockfd
Connect
outbound to a
Socket on which the connection is to be
opened Functions
server remoteaddress Remote socket address to which the
connection is to be opened
addresslength Length of the socket address structure
send( ) Send and receive sockfd Socket across which the data will be sent or read
recv( )
data on a stream data Data to be sent, or buffer into which the read
read( ) socket (either data will be placed
write( ) send/recv or datalength Length of the data to be written, or amount of
read/write can be data to be read
used)
sendto( ) Send and receive sockfd Socket across which the data will be sent or read
recvfrom( ) data on a data Data to be sent, or buffer into which the read
datagram socket data will be placed (Table can be found
datalength Length of the data to be written, or amount of on page 54 in
data to be read textbook)
close( ) Close a socket sockfd Socket which is to be closed
Server Client
Open communication
socket()
endpoint
Register well-known
bind()
address with system
blocks until
connection Open communication
from client socket() endpoint
connection
accept() creates
establishment Set up connection
a new socket to connect()
to server
serve the new
client request
data (request)
receive() send() Send/receive data
process
request
data (reply)
send() receive() Send/receive data