Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Write a simple HTTP client and a separate HTTP server application in C using the POSIX socket libraries. As soon as the client connects, the

image text in transcribed

Write a simple HTTP client and a separate HTTP server application in C using the POSIX socket libraries. As soon as the client connects, the client will send 20 bytes of the TCP header simulating the 3-way handshake, the server should respond to it and finally the client completes the handshake . You must use the P . DO NOT implement the server handling multiple requests at the same time OSIX socket functions (multi-threading) Implement reasonable output messages that show the raw bytes of the header plus each header field in human readable format - e.g.etc port numbers should be integers, You will need the following fields in the fake" TCP header: 1. Source TCP port number - Use a C function call to get this 2. Destination TCP port number - The real port you are connecting to 3. Sequence number -Create a random Initial Sequence Number 4. Acknowledgment number - You should use the appropriate value 5. TCP data offset Make it all zeros for now 6. Reserved data - Make it all zeros for now 7. Control flags flags should be set correctly for the 3-way handshake 8. Window size Use a reasonable default value e.g. 17520 bytes 9. TCP checksum - Make it all ffffs for now 10. Urgent pointer - Make it all zeros Write a simple HTTP client and a separate HTTP server application in C using the POSIX socket libraries. As soon as the client connects, the client will send 20 bytes of the TCP header simulating the 3-way handshake, the server should respond to it and finally the client completes the handshake . You must use the P . DO NOT implement the server handling multiple requests at the same time OSIX socket functions (multi-threading) Implement reasonable output messages that show the raw bytes of the header plus each header field in human readable format - e.g.etc port numbers should be integers, You will need the following fields in the fake" TCP header: 1. Source TCP port number - Use a C function call to get this 2. Destination TCP port number - The real port you are connecting to 3. Sequence number -Create a random Initial Sequence Number 4. Acknowledgment number - You should use the appropriate value 5. TCP data offset Make it all zeros for now 6. Reserved data - Make it all zeros for now 7. Control flags flags should be set correctly for the 3-way handshake 8. Window size Use a reasonable default value e.g. 17520 bytes 9. TCP checksum - Make it all ffffs for now 10. Urgent pointer - Make it all zeros

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Machine Learning And Knowledge Discovery In Databases European Conference Ecml Pkdd 2015 Porto Portugal September 7 11 2015 Proceedings Part 3 Lnai 9286

Authors: Albert Bifet ,Michael May ,Bianca Zadrozny ,Ricard Gavalda ,Dino Pedreschi ,Francesco Bonchi ,Jaime Cardoso ,Myra Spiliopoulou

1st Edition

3319234609, 978-3319234601

More Books

Students also viewed these Databases questions