SlideShare a Scribd company logo
1 of 1
Download to read offline
Implement a client server design using a UDP socket and features of TCP in Python.
How do you make a TCP header and parse packets that your receive?
Use SYNbit, FINbit and ACKbit to represent connection establishment and termination aftr 32
packets.
Solution
We can use Socket Module in Python
Create a TCP_IP, TCP_PORT , Create a RAW socket and construct the ip packet where we can
add tcp_flags , tcp_syn, tcp_ack , tcp_fin etc.
Server
1. Create a socket bind the socket to some port
2. Listen and wait for some incoming connection
3. Accept the incoming connection, Read the message and appropriatly respond is send and
accordingly SYN, ACK an FIN bits are updated
Client
1. Create Socket and establish connection using SYN and ACK bits
2. Send data to server
3. Receive data from server

More Related Content

More from arpittradersjdr

The alpha-helix shown below is part of a water-soluble, globular prot.pdf
The alpha-helix shown below is part of a water-soluble, globular prot.pdfThe alpha-helix shown below is part of a water-soluble, globular prot.pdf
The alpha-helix shown below is part of a water-soluble, globular prot.pdfarpittradersjdr
 
Simple squamous epithelium is structured to best provideA. Diffus.pdf
Simple squamous epithelium is structured to best provideA. Diffus.pdfSimple squamous epithelium is structured to best provideA. Diffus.pdf
Simple squamous epithelium is structured to best provideA. Diffus.pdfarpittradersjdr
 
A tower leans at an angle of about 84.7°. The figure shows that 150 .pdf
A tower leans at an angle of about 84.7°. The figure shows that 150 .pdfA tower leans at an angle of about 84.7°. The figure shows that 150 .pdf
A tower leans at an angle of about 84.7°. The figure shows that 150 .pdfarpittradersjdr
 
A sample of 200 people were asked to identify their major source of .pdf
A sample of 200 people were asked to identify their major source of .pdfA sample of 200 people were asked to identify their major source of .pdf
A sample of 200 people were asked to identify their major source of .pdfarpittradersjdr
 
Prolog programming …Using Amzi Prolog, create and test prolog clau.pdf
Prolog programming …Using Amzi Prolog, create and test prolog clau.pdfProlog programming …Using Amzi Prolog, create and test prolog clau.pdf
Prolog programming …Using Amzi Prolog, create and test prolog clau.pdfarpittradersjdr
 
in java Can we create an object of type Interface Explain your answ.pdf
in java Can we create an object of type Interface Explain your answ.pdfin java Can we create an object of type Interface Explain your answ.pdf
in java Can we create an object of type Interface Explain your answ.pdfarpittradersjdr
 
I need help in matlab.The task is echo removing from the signal.Supp.pdf
I need help in matlab.The task is echo removing from the signal.Supp.pdfI need help in matlab.The task is echo removing from the signal.Supp.pdf
I need help in matlab.The task is echo removing from the signal.Supp.pdfarpittradersjdr
 
Human language uses less sounds and is less symbolic than are the co.pdf
Human language  uses less sounds and is less symbolic than are the co.pdfHuman language  uses less sounds and is less symbolic than are the co.pdf
Human language uses less sounds and is less symbolic than are the co.pdfarpittradersjdr
 
How to build a Linked List that can insert any type of data. For exa.pdf
How to build a Linked List that can insert any type of data. For exa.pdfHow to build a Linked List that can insert any type of data. For exa.pdf
How to build a Linked List that can insert any type of data. For exa.pdfarpittradersjdr
 
Genetics homework1. The rut site involved in Rho-dependent termina.pdf
Genetics homework1. The rut site involved in Rho-dependent termina.pdfGenetics homework1. The rut site involved in Rho-dependent termina.pdf
Genetics homework1. The rut site involved in Rho-dependent termina.pdfarpittradersjdr
 
For the segment of code below display the contents of the Array Stack.pdf
For the segment of code below display the contents of the Array Stack.pdfFor the segment of code below display the contents of the Array Stack.pdf
For the segment of code below display the contents of the Array Stack.pdfarpittradersjdr
 
Explain the sources of police subculture. king undercover would affec.pdf
Explain the sources of police subculture. king undercover would affec.pdfExplain the sources of police subculture. king undercover would affec.pdf
Explain the sources of police subculture. king undercover would affec.pdfarpittradersjdr
 
Endocytosis will move substances ________ the cell using ___________.pdf
Endocytosis will move substances ________ the cell using ___________.pdfEndocytosis will move substances ________ the cell using ___________.pdf
Endocytosis will move substances ________ the cell using ___________.pdfarpittradersjdr
 
Cuckoos are birds that practice brood parasitism. Instead of raising.pdf
Cuckoos are birds that practice brood parasitism. Instead of raising.pdfCuckoos are birds that practice brood parasitism. Instead of raising.pdf
Cuckoos are birds that practice brood parasitism. Instead of raising.pdfarpittradersjdr
 
Case Study QuestionsWhat is the Major Problem identified in case .pdf
Case Study QuestionsWhat is the Major Problem identified in case .pdfCase Study QuestionsWhat is the Major Problem identified in case .pdf
Case Study QuestionsWhat is the Major Problem identified in case .pdfarpittradersjdr
 
Consider three hypothetical countries, Kipr, Ispania, and Atlantida, .pdf
Consider three hypothetical countries, Kipr, Ispania, and Atlantida, .pdfConsider three hypothetical countries, Kipr, Ispania, and Atlantida, .pdf
Consider three hypothetical countries, Kipr, Ispania, and Atlantida, .pdfarpittradersjdr
 
Below is the syntax and the encoding. The instruction below computes.pdf
Below is the syntax and the encoding. The instruction below computes.pdfBelow is the syntax and the encoding. The instruction below computes.pdf
Below is the syntax and the encoding. The instruction below computes.pdfarpittradersjdr
 
Answer the following questions with detailed justifications a) What i.pdf
Answer the following questions with detailed justifications a) What i.pdfAnswer the following questions with detailed justifications a) What i.pdf
Answer the following questions with detailed justifications a) What i.pdfarpittradersjdr
 
(1) Access the US Department of Commerce Bureau of Industry and Secu.pdf
(1) Access the US Department of Commerce Bureau of Industry and Secu.pdf(1) Access the US Department of Commerce Bureau of Industry and Secu.pdf
(1) Access the US Department of Commerce Bureau of Industry and Secu.pdfarpittradersjdr
 

More from arpittradersjdr (19)

The alpha-helix shown below is part of a water-soluble, globular prot.pdf
The alpha-helix shown below is part of a water-soluble, globular prot.pdfThe alpha-helix shown below is part of a water-soluble, globular prot.pdf
The alpha-helix shown below is part of a water-soluble, globular prot.pdf
 
Simple squamous epithelium is structured to best provideA. Diffus.pdf
Simple squamous epithelium is structured to best provideA. Diffus.pdfSimple squamous epithelium is structured to best provideA. Diffus.pdf
Simple squamous epithelium is structured to best provideA. Diffus.pdf
 
A tower leans at an angle of about 84.7°. The figure shows that 150 .pdf
A tower leans at an angle of about 84.7°. The figure shows that 150 .pdfA tower leans at an angle of about 84.7°. The figure shows that 150 .pdf
A tower leans at an angle of about 84.7°. The figure shows that 150 .pdf
 
A sample of 200 people were asked to identify their major source of .pdf
A sample of 200 people were asked to identify their major source of .pdfA sample of 200 people were asked to identify their major source of .pdf
A sample of 200 people were asked to identify their major source of .pdf
 
Prolog programming …Using Amzi Prolog, create and test prolog clau.pdf
Prolog programming …Using Amzi Prolog, create and test prolog clau.pdfProlog programming …Using Amzi Prolog, create and test prolog clau.pdf
Prolog programming …Using Amzi Prolog, create and test prolog clau.pdf
 
in java Can we create an object of type Interface Explain your answ.pdf
in java Can we create an object of type Interface Explain your answ.pdfin java Can we create an object of type Interface Explain your answ.pdf
in java Can we create an object of type Interface Explain your answ.pdf
 
I need help in matlab.The task is echo removing from the signal.Supp.pdf
I need help in matlab.The task is echo removing from the signal.Supp.pdfI need help in matlab.The task is echo removing from the signal.Supp.pdf
I need help in matlab.The task is echo removing from the signal.Supp.pdf
 
Human language uses less sounds and is less symbolic than are the co.pdf
Human language  uses less sounds and is less symbolic than are the co.pdfHuman language  uses less sounds and is less symbolic than are the co.pdf
Human language uses less sounds and is less symbolic than are the co.pdf
 
How to build a Linked List that can insert any type of data. For exa.pdf
How to build a Linked List that can insert any type of data. For exa.pdfHow to build a Linked List that can insert any type of data. For exa.pdf
How to build a Linked List that can insert any type of data. For exa.pdf
 
Genetics homework1. The rut site involved in Rho-dependent termina.pdf
Genetics homework1. The rut site involved in Rho-dependent termina.pdfGenetics homework1. The rut site involved in Rho-dependent termina.pdf
Genetics homework1. The rut site involved in Rho-dependent termina.pdf
 
For the segment of code below display the contents of the Array Stack.pdf
For the segment of code below display the contents of the Array Stack.pdfFor the segment of code below display the contents of the Array Stack.pdf
For the segment of code below display the contents of the Array Stack.pdf
 
Explain the sources of police subculture. king undercover would affec.pdf
Explain the sources of police subculture. king undercover would affec.pdfExplain the sources of police subculture. king undercover would affec.pdf
Explain the sources of police subculture. king undercover would affec.pdf
 
Endocytosis will move substances ________ the cell using ___________.pdf
Endocytosis will move substances ________ the cell using ___________.pdfEndocytosis will move substances ________ the cell using ___________.pdf
Endocytosis will move substances ________ the cell using ___________.pdf
 
Cuckoos are birds that practice brood parasitism. Instead of raising.pdf
Cuckoos are birds that practice brood parasitism. Instead of raising.pdfCuckoos are birds that practice brood parasitism. Instead of raising.pdf
Cuckoos are birds that practice brood parasitism. Instead of raising.pdf
 
Case Study QuestionsWhat is the Major Problem identified in case .pdf
Case Study QuestionsWhat is the Major Problem identified in case .pdfCase Study QuestionsWhat is the Major Problem identified in case .pdf
Case Study QuestionsWhat is the Major Problem identified in case .pdf
 
Consider three hypothetical countries, Kipr, Ispania, and Atlantida, .pdf
Consider three hypothetical countries, Kipr, Ispania, and Atlantida, .pdfConsider three hypothetical countries, Kipr, Ispania, and Atlantida, .pdf
Consider three hypothetical countries, Kipr, Ispania, and Atlantida, .pdf
 
Below is the syntax and the encoding. The instruction below computes.pdf
Below is the syntax and the encoding. The instruction below computes.pdfBelow is the syntax and the encoding. The instruction below computes.pdf
Below is the syntax and the encoding. The instruction below computes.pdf
 
Answer the following questions with detailed justifications a) What i.pdf
Answer the following questions with detailed justifications a) What i.pdfAnswer the following questions with detailed justifications a) What i.pdf
Answer the following questions with detailed justifications a) What i.pdf
 
(1) Access the US Department of Commerce Bureau of Industry and Secu.pdf
(1) Access the US Department of Commerce Bureau of Industry and Secu.pdf(1) Access the US Department of Commerce Bureau of Industry and Secu.pdf
(1) Access the US Department of Commerce Bureau of Industry and Secu.pdf
 

Recently uploaded

The basics of sentences session 3pptx.pptx
The basics of sentences session 3pptx.pptxThe basics of sentences session 3pptx.pptx
The basics of sentences session 3pptx.pptxheathfieldcps1
 
This PowerPoint helps students to consider the concept of infinity.
This PowerPoint helps students to consider the concept of infinity.This PowerPoint helps students to consider the concept of infinity.
This PowerPoint helps students to consider the concept of infinity.christianmathematics
 
Measures of Dispersion and Variability: Range, QD, AD and SD
Measures of Dispersion and Variability: Range, QD, AD and SDMeasures of Dispersion and Variability: Range, QD, AD and SD
Measures of Dispersion and Variability: Range, QD, AD and SDThiyagu K
 
On National Teacher Day, meet the 2024-25 Kenan Fellows
On National Teacher Day, meet the 2024-25 Kenan FellowsOn National Teacher Day, meet the 2024-25 Kenan Fellows
On National Teacher Day, meet the 2024-25 Kenan FellowsMebane Rash
 
Class 11th Physics NEET formula sheet pdf
Class 11th Physics NEET formula sheet pdfClass 11th Physics NEET formula sheet pdf
Class 11th Physics NEET formula sheet pdfAyushMahapatra5
 
Basic Civil Engineering first year Notes- Chapter 4 Building.pptx
Basic Civil Engineering first year Notes- Chapter 4 Building.pptxBasic Civil Engineering first year Notes- Chapter 4 Building.pptx
Basic Civil Engineering first year Notes- Chapter 4 Building.pptxDenish Jangid
 
microwave assisted reaction. General introduction
microwave assisted reaction. General introductionmicrowave assisted reaction. General introduction
microwave assisted reaction. General introductionMaksud Ahmed
 
Key note speaker Neum_Admir Softic_ENG.pdf
Key note speaker Neum_Admir Softic_ENG.pdfKey note speaker Neum_Admir Softic_ENG.pdf
Key note speaker Neum_Admir Softic_ENG.pdfAdmir Softic
 
Application orientated numerical on hev.ppt
Application orientated numerical on hev.pptApplication orientated numerical on hev.ppt
Application orientated numerical on hev.pptRamjanShidvankar
 
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...EduSkills OECD
 
1029 - Danh muc Sach Giao Khoa 10 . pdf
1029 -  Danh muc Sach Giao Khoa 10 . pdf1029 -  Danh muc Sach Giao Khoa 10 . pdf
1029 - Danh muc Sach Giao Khoa 10 . pdfQucHHunhnh
 
psychiatric nursing HISTORY COLLECTION .docx
psychiatric  nursing HISTORY  COLLECTION  .docxpsychiatric  nursing HISTORY  COLLECTION  .docx
psychiatric nursing HISTORY COLLECTION .docxPoojaSen20
 
Nutritional Needs Presentation - HLTH 104
Nutritional Needs Presentation - HLTH 104Nutritional Needs Presentation - HLTH 104
Nutritional Needs Presentation - HLTH 104misteraugie
 
Seal of Good Local Governance (SGLG) 2024Final.pptx
Seal of Good Local Governance (SGLG) 2024Final.pptxSeal of Good Local Governance (SGLG) 2024Final.pptx
Seal of Good Local Governance (SGLG) 2024Final.pptxnegromaestrong
 
2024-NATIONAL-LEARNING-CAMP-AND-OTHER.pptx
2024-NATIONAL-LEARNING-CAMP-AND-OTHER.pptx2024-NATIONAL-LEARNING-CAMP-AND-OTHER.pptx
2024-NATIONAL-LEARNING-CAMP-AND-OTHER.pptxMaritesTamaniVerdade
 
General Principles of Intellectual Property: Concepts of Intellectual Proper...
General Principles of Intellectual Property: Concepts of Intellectual  Proper...General Principles of Intellectual Property: Concepts of Intellectual  Proper...
General Principles of Intellectual Property: Concepts of Intellectual Proper...Poonam Aher Patil
 
Unit-IV; Professional Sales Representative (PSR).pptx
Unit-IV; Professional Sales Representative (PSR).pptxUnit-IV; Professional Sales Representative (PSR).pptx
Unit-IV; Professional Sales Representative (PSR).pptxVishalSingh1417
 
Introduction to Nonprofit Accounting: The Basics
Introduction to Nonprofit Accounting: The BasicsIntroduction to Nonprofit Accounting: The Basics
Introduction to Nonprofit Accounting: The BasicsTechSoup
 

Recently uploaded (20)

The basics of sentences session 3pptx.pptx
The basics of sentences session 3pptx.pptxThe basics of sentences session 3pptx.pptx
The basics of sentences session 3pptx.pptx
 
This PowerPoint helps students to consider the concept of infinity.
This PowerPoint helps students to consider the concept of infinity.This PowerPoint helps students to consider the concept of infinity.
This PowerPoint helps students to consider the concept of infinity.
 
Measures of Dispersion and Variability: Range, QD, AD and SD
Measures of Dispersion and Variability: Range, QD, AD and SDMeasures of Dispersion and Variability: Range, QD, AD and SD
Measures of Dispersion and Variability: Range, QD, AD and SD
 
On National Teacher Day, meet the 2024-25 Kenan Fellows
On National Teacher Day, meet the 2024-25 Kenan FellowsOn National Teacher Day, meet the 2024-25 Kenan Fellows
On National Teacher Day, meet the 2024-25 Kenan Fellows
 
Class 11th Physics NEET formula sheet pdf
Class 11th Physics NEET formula sheet pdfClass 11th Physics NEET formula sheet pdf
Class 11th Physics NEET formula sheet pdf
 
Basic Civil Engineering first year Notes- Chapter 4 Building.pptx
Basic Civil Engineering first year Notes- Chapter 4 Building.pptxBasic Civil Engineering first year Notes- Chapter 4 Building.pptx
Basic Civil Engineering first year Notes- Chapter 4 Building.pptx
 
microwave assisted reaction. General introduction
microwave assisted reaction. General introductionmicrowave assisted reaction. General introduction
microwave assisted reaction. General introduction
 
Key note speaker Neum_Admir Softic_ENG.pdf
Key note speaker Neum_Admir Softic_ENG.pdfKey note speaker Neum_Admir Softic_ENG.pdf
Key note speaker Neum_Admir Softic_ENG.pdf
 
Application orientated numerical on hev.ppt
Application orientated numerical on hev.pptApplication orientated numerical on hev.ppt
Application orientated numerical on hev.ppt
 
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
 
Mehran University Newsletter Vol-X, Issue-I, 2024
Mehran University Newsletter Vol-X, Issue-I, 2024Mehran University Newsletter Vol-X, Issue-I, 2024
Mehran University Newsletter Vol-X, Issue-I, 2024
 
1029 - Danh muc Sach Giao Khoa 10 . pdf
1029 -  Danh muc Sach Giao Khoa 10 . pdf1029 -  Danh muc Sach Giao Khoa 10 . pdf
1029 - Danh muc Sach Giao Khoa 10 . pdf
 
Asian American Pacific Islander Month DDSD 2024.pptx
Asian American Pacific Islander Month DDSD 2024.pptxAsian American Pacific Islander Month DDSD 2024.pptx
Asian American Pacific Islander Month DDSD 2024.pptx
 
psychiatric nursing HISTORY COLLECTION .docx
psychiatric  nursing HISTORY  COLLECTION  .docxpsychiatric  nursing HISTORY  COLLECTION  .docx
psychiatric nursing HISTORY COLLECTION .docx
 
Nutritional Needs Presentation - HLTH 104
Nutritional Needs Presentation - HLTH 104Nutritional Needs Presentation - HLTH 104
Nutritional Needs Presentation - HLTH 104
 
Seal of Good Local Governance (SGLG) 2024Final.pptx
Seal of Good Local Governance (SGLG) 2024Final.pptxSeal of Good Local Governance (SGLG) 2024Final.pptx
Seal of Good Local Governance (SGLG) 2024Final.pptx
 
2024-NATIONAL-LEARNING-CAMP-AND-OTHER.pptx
2024-NATIONAL-LEARNING-CAMP-AND-OTHER.pptx2024-NATIONAL-LEARNING-CAMP-AND-OTHER.pptx
2024-NATIONAL-LEARNING-CAMP-AND-OTHER.pptx
 
General Principles of Intellectual Property: Concepts of Intellectual Proper...
General Principles of Intellectual Property: Concepts of Intellectual  Proper...General Principles of Intellectual Property: Concepts of Intellectual  Proper...
General Principles of Intellectual Property: Concepts of Intellectual Proper...
 
Unit-IV; Professional Sales Representative (PSR).pptx
Unit-IV; Professional Sales Representative (PSR).pptxUnit-IV; Professional Sales Representative (PSR).pptx
Unit-IV; Professional Sales Representative (PSR).pptx
 
Introduction to Nonprofit Accounting: The Basics
Introduction to Nonprofit Accounting: The BasicsIntroduction to Nonprofit Accounting: The Basics
Introduction to Nonprofit Accounting: The Basics
 

Implement a client server design using a UDP socket and features of .pdf

  • 1. Implement a client server design using a UDP socket and features of TCP in Python. How do you make a TCP header and parse packets that your receive? Use SYNbit, FINbit and ACKbit to represent connection establishment and termination aftr 32 packets. Solution We can use Socket Module in Python Create a TCP_IP, TCP_PORT , Create a RAW socket and construct the ip packet where we can add tcp_flags , tcp_syn, tcp_ack , tcp_fin etc. Server 1. Create a socket bind the socket to some port 2. Listen and wait for some incoming connection 3. Accept the incoming connection, Read the message and appropriatly respond is send and accordingly SYN, ACK an FIN bits are updated Client 1. Create Socket and establish connection using SYN and ACK bits 2. Send data to server 3. Receive data from server