Question
Client Starter Code: /* Simple udp client */ #include #include #include #include #include #include #define SERVER 129.120.151.95 #define BUFLEN 512 //Max length of buffer #define
Client Starter Code:
/* Simple udp client */ #include
Server Starter Code:
/* Simple udp server */ #include
1. Create a C-based server that can run on cse02.cse.unt.edu and accepts single client's request using UDP socket 2. Create a C-based client that runs on cse03.cse.unt.edu and connects to the server 3. On the client side, create a UDP segment (as shown in Figure 1) using C structure that has the following fields: o 16-bit source port [Type: unsigned short int] o 16-bit destination port [Type: unsigned short int] o 16-bit length [Type: unsigned short int] o 16-bit checksum (Type: unsigned short int, computed after the header and payload is populated] o 256-byte payload (data) [Type: char] 4. Find the source port, destination port, and length and populate the corresponding fields of the UDP segment 5. Read the input (input.txt) text file (256 bytes) and populate the contents of the text file as the payload of the UDP segment 6. Compute the 16-bit checksum for the entire UDP segment and populate the checksum field and transmit the segment 7. Print on the client console and write to a client.log file the values of source port, destination port, length, checksum, and payload of the segment that is transmitted 8. The server will receive the UDP segment from the client and compute the checksum of the received UDP segment. 1. Create a C-based server that can run on cse02.cse.unt.edu and accepts single client's request using UDP socket 2. Create a C-based client that runs on cse03.cse.unt.edu and connects to the server 3. On the client side, create a UDP segment (as shown in Figure 1) using C structure that has the following fields: o 16-bit source port [Type: unsigned short int] o 16-bit destination port [Type: unsigned short int] o 16-bit length [Type: unsigned short int] o 16-bit checksum (Type: unsigned short int, computed after the header and payload is populated] o 256-byte payload (data) [Type: char] 4. Find the source port, destination port, and length and populate the corresponding fields of the UDP segment 5. Read the input (input.txt) text file (256 bytes) and populate the contents of the text file as the payload of the UDP segment 6. Compute the 16-bit checksum for the entire UDP segment and populate the checksum field and transmit the segment 7. Print on the client console and write to a client.log file the values of source port, destination port, length, checksum, and payload of the segment that is transmitted 8. The server will receive the UDP segment from the client and compute the checksum of the received UDP segment
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started