Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

Code Executes Multiple Times

Posted on 2012-04-02
4
Medium Priority
?
764 Views
Last Modified: 2012-06-27
I have compiled code for a simple router program. I am taking a class and I needed to create a program that would simulate routers updating their routing tables. The only real question i have left is i'm not sure if the program should update the routers so often. I have attached all the parts of the program, the exe file and the log file of the output. Can someone take a quick look and let me know if the program should call the update function so many times, as illustrated by the output?

Thanks!

Running one node0/1/2/3.c file will also call the main program prog3.c and the other nodes and initiate the update process between all of the other nodes, also known as routers.
node0.c
node1.c
node2.c
node3.c
prog3.c
RoutingLog.txt
0
Comment
Question by:new435
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
4 Comments
 
LVL 35

Assisted Solution

by:sarabande
sarabande earned 500 total points
ID: 37800293
it is only you who could answer that question. generally, a simulation should be as near as possible to the reality. if in reality you have much less updates it isn't a good simulation at least in that point. note, a simulation is different to a stress test. in the latter you would go the limits but not beyond. if your program is neither a simulation nor a stress test but a unit test you could go beyond the limits and try to produce even worsest scenarios just to proove that your system is stable in every case. such a complete unit test is fine if it has the expected results. if it only finds problems which wouldn't occur in the reality you might loose the right focus and forget to test the normal.

Sara
0
 

Author Comment

by:new435
ID: 37802543
I'm not quite sure how often real routers update themselves, which is why I posed the question.
0
 
LVL 3

Accepted Solution

by:
algorith earned 500 total points
ID: 37803811
I have heard that a poisoned router will be cured in 15 minutes or so on average, but I could not find this number on a quick search.  This article might help http://www.isoc.org/isoc/conferences/ndss/06/proceedings/papers/churn_as_shelter.pdf

Bandwidth limitations might be a good way to decide - i.e. you don't want the router updating so often that it consumes a significant portion of you network's bandwidth.  On the other hand, you do want the bad routing information to be purged as quickly as possible. All of which makes the answer specific to your own situation, which as an assignment is possibly ill-defined.

You could ask the TA...let us know if he can answer...
0
 

Author Comment

by:new435
ID: 37818160
see my program ends up updating > 100 times and im not sure if that is rediculus or not.
0

Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This is a short and sweet, but (hopefully) to the point article. There seems to be some fundamental misunderstanding about the function prototype for the "main" function in C and C++, more specifically what type this function should return. I see so…
The article shows the basic steps of integrating an HTML theme template into an ASP.NET MVC project
The goal of the tutorial is to teach the user how to use functions in C++. The video will cover how to define functions, how to call functions and how to create functions prototypes. Microsoft Visual C++ 2010 Express will be used as a text editor an…
The viewer will learn how to use the return statement in functions in C++. The video will also teach the user how to pass data to a function and have the function return data back for further processing.

670 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question