views:

58

answers:

1
+2  Q: 

network topology

Hi,

I'm trying to build an application that would display network topology, using c or maybe c++. I have knowledge of sockets. I know this a broad question with little details. It's just that i haven't found anything to start from. I have no idea what to do.

+5  A: 

This, like any problem you are faced with in life, requires a clear definition of the problem. And you'll need to break it down into parts.

Firstly, do you need to "discover" the topology, or do you already have it supplied in a text file somewhere? Is your requirement merely to graph the topology (in which case a program called "graphviz" will probably already do the job you require)? If you have to discover the topology, what kind of network is it? LAN? WAN? TCP/IP? Something else?

Then you have to ask yourself why you want to use C or C++ - it would appear from your question that you have not much experience with networks - thus it is not apparent why you would want to go to the trouble of using a low-level language to undertake your chosen task. Perhaps a high level language would be appropriate in the near term.

Be aware that many have faced the same challenge you have - graphing a network topology; thus there are many applications that do just this. Perhaps you could elaborate on your reasons for wanting to attempt this task yourself?

PP
Let me narrow the search using answering your questions. 1) I need to discover the topology, that's my bigger subproblem2) I need to draw it but i guess i can use a graph library, maybe use the one you said3) it's a LAN network. Specifically small and medium business' networks.4) I've used c sockets before but just to do ip applications not this. The language is requirement. I would prefer a higher level language.
gvalero87
Regarding discovery: have you considered an application like [netdisco](http://netdisco.org/)?
PP
No, I'm looking into it
gvalero87