Question: The code should be in C language. Partial code is given by the instructor A. Project Description This project will simulate the layered structure of
The code should be in C language.
Partial code is given by the instructor


A. Project Description This project will simulate the layered structure of the computer networks. We will implement a simplified network that consists of two hosts with each host having just two layers, the data link layer and the network layer. The two hosts are connected by a physical wire Host 1 I Host 2 Network Layer 1 Network Layer| Data Link Layer Data Link Layer | Physical Wire The physical wire will be implemented as a server that accepts connection from only two clients. When it receives a frame from a client, it just passes it to the other client. The data link layer connects to the physical wire as a client. At the same time, it acts as a server to accept connection request from one network layer. The network layer accepts messages from the keyboard, wraps them into packets, and sends them to the data link layer. The definition of packet is as follows. typedef struct packet type char nickname[10] char message[256] packet, where nickname is the name of the host who sends the message. In the real network, the nickname is used for routing. In this project, we just use it to identify the host. The data link layer accepts packets from the network layer, wraps them into frames, and sends them to the physical wire. It also receives frames from the physical wire, removes the frame headers, and passes the included packets to the network layer. The definition of frame is as follows typedef struct frame_type f A. Project Description This project will simulate the layered structure of the computer networks. We will implement a simplified network that consists of two hosts with each host having just two layers, the data link layer and the network layer. The two hosts are connected by a physical wire Host 1 I Host 2 Network Layer 1 Network Layer| Data Link Layer Data Link Layer | Physical Wire The physical wire will be implemented as a server that accepts connection from only two clients. When it receives a frame from a client, it just passes it to the other client. The data link layer connects to the physical wire as a client. At the same time, it acts as a server to accept connection request from one network layer. The network layer accepts messages from the keyboard, wraps them into packets, and sends them to the data link layer. The definition of packet is as follows. typedef struct packet type char nickname[10] char message[256] packet, where nickname is the name of the host who sends the message. In the real network, the nickname is used for routing. In this project, we just use it to identify the host. The data link layer accepts packets from the network layer, wraps them into frames, and sends them to the physical wire. It also receives frames from the physical wire, removes the frame headers, and passes the included packets to the network layer. The definition of frame is as follows typedef struct frame_type f
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
