Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

The duration of a time slot is crucial for the Ethernet and should be large enou

ID: 3634247 • Letter: T

Question

The duration of a time slot is crucial for the Ethernet and should be large enough to prevent a station from mistakenly thinking that its frame has been safely sent out.


2.6 Inter-machine Communications
The socket system calls are capable of providing inter-machine communications. You
can use either TCP or UDP APIs to implement the project.

3 Controlling the Simulation Using Events
In order for us to be able to create different communication scenarios, we need to control the progress of the simulation. As stated before, simulation input data les are used for this purpose. Each SP has an associated simulation data file that will read only by that process. The simulation file is real simple. Here are several sample lines that could be in the simulation file for station 1:
Frame 1, To Station 3
Frame 2, To Station 4
Frame 3, To Station 3
Frame 4, To Station 2
4 Simulation Result
The result of the simulation is the log of activities that occur in the various stations and
the CBP. An SP records the following kind of information in a separate le:

1. Send part 1 of frame 1 to Station 3"
2. Send part 2 of frame 1 to Station 3"
3. A collision informed, wait for 1 time slot"
4. Send part 1 of frame 1 to Station 3"
5. A collision informed, wait for 3 time slot"
A CBP records the following kind of information:
1. Receive part 1 of frame 1 from Station 1, to Station 3"
2. Receive part 2 of frame 1 from Station 1, to Station 3"
3. Transfer part 1 of frame 1 from Station 1, to Station 3"
4. Receive part 1 of frame 1 from Station 2, to Station 4"
5. Inform Station 1, Station 2, a collision"

5 Project Report
Your project report must include the following:
(1) Program files
-The program must contain a le that provides itemized description about what
your have implemented and what you have not been able to complete. For each
implemented feature in your project, a brief description about the method you
use. For instance, how have you implemented the interrupts?
-The whole program must be well-commented. For instance, important functions
must be concisely commented about the parameters needed, the main duty
performed, values returned, and etc.
The whole program must be self-compilable. Be sure to include all les needed to
compile your program.
(2) A README file that clearly describes how to compile and test your program.
(3) Simulation results. Please supply your input and corresponding output. Your project
may be tested using your own input and may also be tested using my own input data.
Your les can be in a zip or tar format. But Windows RAR le format is not
accepted!

Explanation / Answer

The previous sections explained how to find out the port number for a service name, and how to get the IP address for a host name. This section will utilize that information to create a simple client program.

The socket() API is used to create a socket. You can think of a socket as being the virtual device that is used to read & write data from a network connection.

It lists the following as the prototype for the socket() API:

This tells us that the name of the procedure to call is 'socket', and that it accepts 3 parameters. Each one is an integer, passed by value. It also returns an integer. Therefore, the RPG prototype for the socket() API looks like this:

It's important to realize that the socket APIs can be used for other networking protocols besides TCP/IP. When we create a socket, we need to explain to the socket API that we wish to communicate using the IP protocol, and that we wish to use TCP on top of the IP protocol.

Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote