Case Study Tcp-Ip
Case Study Tcp-Ip
1/25/2015 J.SUDARSHANREDDY
1. Specifications
TCP/IP Stack
In TCP/IP suite of protocols,
application layer transfers the
data with appropriate header
words to transport layer.
1/25/2015 J.SUDARSHANREDDY
TCP/IP Stack
UDP is connection-less protocol for
datagram transfer of total size including
headers of less than 216 Byte.
TCP is connection oriented protocol, in
which data of unlimited size can be
transferred in multiple sequences to the
internet layer
At internet layer, the IP protocol is used and
IP packets are formed, each packet with an
IP header transfers to the network through
network driver subsystem.
1/25/2015 J.SUDARSHANREDDY
TCP/IP stack
Outputs
TCP or UDP Byte stream to
destination socket
1/25/2015 J.SUDARSHANREDDY
Functions of the system
1/25/2015 J.SUDARSHANREDDY
3. Classes and Objects
Tasks and their scheduling sequence in TCP/IP
Stack
transmitting subsystem
1/25/2015 J.SUDARSHANREDDY
Classes for TCP or UDP byte tream on TCP/IP
network:
Task_TCP is an abstract class
1/25/2015 J.SUDARSHANREDDY
task objects
1. Task_StrCheck,
2. Task_OutStream,
3. Task_TCPSegment or
Task_UDPDatagram,
4. Task_IPPktStream
5. Task_NetworkDrv.
1/25/2015 J.SUDARSHANREDDY
Object task_OutStreamAppl
1/25/2015 J.SUDARSHANREDDY
4. Class diagrams
Class diagram for sending TCP/IP stacka
1/25/2015 J.SUDARSHANREDDY
5. Hardware architecture
Hardware
TCP stack will run on same hardware as for
the system which is networked with other
system.
Only additional hardware needed is memory
for codes, data and queue for data streams,
packets and sockets.
A single TCP packet or UDP datagram is of
maximum 216 bytes.
2 MB (512 × 216 bytes) RAM can be taken
as additional memory requirement
1/25/2015 J.SUDARSHANREDDY
6. Modeling of State diagram for of TCP/IP
stack tasks
State diagram for synchronization of TCP/IP
stack tasks- Part 1
1/25/2015 J.SUDARSHANREDDY
State diagram for synchronization of TCP/IP
stack tasks- Part 2
1/25/2015 J.SUDARSHANREDDY
7. Software architecture
Software architecture TCP/IP Stack
1/25/2015 J.SUDARSHANREDDY
8. Multiple tasks and their synchronization model
Multiple tasks and their synchronization model
using
semaphores and mailbox messages
1/25/2015 J.SUDARSHANREDDY
9. Tasks and their priority, action and IPCs
Priority─ 120
Action─ Get a string from the application
IPC pending: ─
IPC posted: SemFlag1
1/25/2015 J.SUDARSHANREDDY
Transmission Control (Transport)
Task_TCPSegment
Priority ─ 122
Action─ Insert TCP header to the stream
IPC pending: SemTCPFlag,
SemMKey1, QStreamInputID
IPC posted: QStreamInputID and
SemMKey1
1/25/2015 J.SUDARSHANREDDY
Transmission Control (Transport)
Task_UDPDatagram
Priority ─ 122
Action─ Insert UDP header to the
stream sent as a datagram
IPC pending: SemUDPFlag,
SemMKey1, QStreamInputID
IPC posted: QStreamInputID, SemMKey1
1/25/2015 J.SUDARSHANREDDY
internet (network) layer
Task_IPPktStream
Priority ─ 124
Action─ Form the packets of
maximum 216 bytes
IPC pending: SemMKey1,
QStreamInputID
IPC posted: SemMKey1, SemPktFlag,
QPktInputID
1/25/2015 J.SUDARSHANREDDY
Task_NetworkDrv
Priority ─ 124
Action─ Send the packets as the
frames
IPC pending: SemPktFlag,
QPktInputID, SemMKey1
IPC posted: SemFinishFlag, SemFlag2
1/25/2015 J.SUDARSHANREDDY
10.Coding using VxWorks RTOS IPCfunctions
1/25/2015 J.SUDARSHANREDDY
We learnt