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

Toms income is 480and he spends it on two goods x and y his

Tom's income is $480and he spends it on two goods, X and Y. His utility function is U = XY. Both X and Y sells for $8 per unit.   a. Use lagrangian function to calculate Tom's utility-maximizing purchases of X and Y.  b. ...

A wall street journal article noted that a study by us

A Wall Street Journal article noted that a study by U.S. Congressional Budget Office "estimated raising the minimum wage to $10.10 per hour reduced U.S employment by 500,000 but lift 900,000 Americans out of poverty". Wh ...

About rsa please answer the following questionsa suppose

About RSA, please answer the following questions. (a) Suppose p=11 and q=7. What is ? (n), where n=p?q? (b) If the public key e is 11, find the private key d. (c) If the ciphertext is 4, what is the plaintext? (d) For en ...

Discussion bulldefine a packet analyzer and describe its

Discussion: • Define a packet analyzer and describe its use • List commonly used packet analyzers (beyond WireShark) • List best practices for analyzing packets • Describe uses (good and bad, ie. hacker) of a packetanaly ...

It networking assignment -major lab scenario -assessment

IT Networking Assignment - Major Lab Scenario - Assessment Requirements: Subnet an address space with given requirements. Assign appropriate addresses to interfaces and document them in the address table. Build the netwo ...

Assignment descriptionproject scope a typical

Assignment Description Project Scope: A typical network layout diagram of a firm is given below for illustrative purposes only. The service requirements are enclosed. Figure. Network layout of a firm Service requirements ...

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 ...

Question snmp initially appeared in 1988 but it did not

Question : SNMP initially appeared in 1988, but it did not receive widespread adoption. What have been the issues with SNMP, and have they been addressed? How widely used is SNMP now? Find some examples of tools that use ...

Part - athe assignmentwrite a critique review of the

Part - A The assignment Write a critique / review of the following paper: Mark Pollitt Eoghan Casey David-Olivier Jaquet-Chiffelle Pavel Gladyshev, "A Framework for Harmonizing Forensic Science Practices and Digital/Mult ...

Americans purchase a lot of coffee grown in brazil and

Americans purchase a lot of coffee grown in Brazil and elsewhere in Latin America. It would seem that in order to avoid the huge transportation costs of bringing coffee here and to provide jobs for Americans, we should g ...

  • 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