Ask Question, Ask an Expert

+61-413 786 465

info@mywordsolution.com

Ask Computer Network & Security Expert

Bootstrapping all the processes and establishing correct lines of communication is, by itself, the toughest aspect of this assignment. Before writing any code you should think carefully about how to start all the process and get them connected to each other. You will have accomplished a signi?cant ?rst step once you can reliably start all 20 processes and have them establish connections among themselves properly. Inter-process communication shoulbe via sockets whose type you choose.

I recommend that you make two executables, named host and router. host should accept a command line argument of one letter: either A, B, C, or D. router should accept a command line of R1 or R2. Because there are lots of parameters (e.g., IP addresses, link addresses), have each executable read its parameters from a common ?le once the executable has determined its identity. You may ?nd the combination of socketpair(2) and forking to be useful for starting and organizing the many processes. Here is a working example of the use of the socketpair system call to get three processes (app, IP, and link) connected to each other in a stack con?guration. The code below is available with the assignment in WebCT as ?le example.c. You are welcome to use all, part, or none of this code in your assignment.

#include

#include

#include

#include

#include

#include
int sock_fd[4];

#define APP_SOCK 0

#define IP_APP_SOCK 1

#define IP_LINK_SOCK 2

#define LINK_IP_SOCK 3

#define BUF_SIZE 1024

char buf[BUF_SIZE];

Once all connections are made, I suggest writing code that will format an option less IP datagram and forward from application to application, without ICMP error cases, fragmentation, or any other unusual cases such as TTL expiration, etc. Once you have the basic data ?ow working then you can start to add code one feature at a time for TTL, checksums, fragmentation, and routing errors. You will need to have lots of print statements to trace execution, but with 20 processes, writing to the console may prove problematic. If it does, consider writing debug statements into a log ?le. Be sure to use unbuffered output statements so that there is no possibility of output statements appearing in the log in a different order than they were executed in your programs.

Computer Network & Security, Computer Science

  • Category:- Computer Network & Security
  • Reference No.:- M9528781

Have any Question?


Related Questions in Computer Network & Security

Recent tariff actions by president trump include raising

Recent tariff actions by President Trump include raising tariffs and quotas on imports of both manufactured goods like televisions and automobiles and intermediate goods like steel and aluminum sheets. How will the econo ...

Suppose there is no inflation and an insurance company

Suppose there is no inflation and an insurance company offers a contract that would pay $500,000 with certainty 50 years from now. What is the most that this contract would be worth today if: 1. The rate of interest is 7 ...

Income effects depend on the income elasticity of demand

Income effects depend on the income elasticity of demand for each good that you buy. If one of the goods you buy has a negative income elasticity, that is, it is an inferior good, what must be true of the income elastici ...

The abstract should not be more than 250 words describe

The abstract should not be more than 250 words. Describe your project, focusing on research questions and research method for next stage of the project. 1. Introduction [The introduction should describe what the project ...

Two countries australia and france have their interest

Two Countries Australia and France have their interest rates to be 8% and 2 %, respectively. If their currencies trade according to 2 Australian $s buy one euro in the spot market, what will their future spot rate be in ...

Data communications and networks assignment -aim a library

Data Communications and Networks Assignment - Aim: A library research and industry related project is to be carried out on a topic of your choice. The project topic must be related to Data Communications and Networking. ...

Assignment wireless applications advances advantages and

Assignment : Wireless Applications, Advances, Advantages, and Disadvantages The adoption of wireless technologies varies from one industry to another, and is often based on the benefits provided versus the challenges, im ...

Assignment- javafx and model-view separationyou are to

Assignment- JavaFX and Model-View separation You are to implement a JavaFX project that separates its model (application data and logic) from its view and controller (the JavaFX controls and event handlers that create th ...

Question for the remaining questions consider a 4-bit block

Question : For the remaining questions, consider a 4-bit block cipher, described in hexadecimal by the following table: Plaintext Ciphertext Plaintext Ciphertext 0 a 8 e 1 c 9 d 2 f a 0 3 6 b 7 4 3 c 5 5 8 d b 6 4 e 9 7 ...

Advanced wireless networks assignment -wlan design project

Advanced Wireless Networks Assignment - WLAN Design Project - Description: You need to form a group of at most four students, and select one of the case studies provided in Assessment module on VU Collaborate. In this pr ...

  • 4,153,160 Questions Asked
  • 13,132 Experts
  • 2,558,936 Questions Answered

Ask Experts for help!!

Looking for Assignment Help?

Start excelling in your Courses, Get help with Assignment

Write us your full requirement for evaluation and you will receive response within 20 minutes turnaround time.

Ask Now Help with Problems, Get a Best Answer

Why might a bank avoid the use of interest rate swaps even

Why might a bank avoid the use of interest rate swaps, even when the institution is exposed to significant interest rate

Describe the difference between zero coupon bonds and

Describe the difference between zero coupon bonds and coupon bonds. Under what conditions will a coupon bond sell at a p

Compute the present value of an annuity of 880 per year

Compute the present value of an annuity of $ 880 per year for 16 years, given a discount rate of 6 percent per annum. As

Compute the present value of an 1150 payment made in ten

Compute the present value of an $1,150 payment made in ten years when the discount rate is 12 percent. (Do not round int

Compute the present value of an annuity of 699 per year

Compute the present value of an annuity of $ 699 per year for 19 years, given a discount rate of 6 percent per annum. As