Network monitoring tool


I've started developing a network montoring tool and have a have a few questions that I am struggling on.  I would really appreciate some help.

1) There are two parts to the application:
   Network engine
   User Interface
The user interface is going to be developed in Java, I would prefer to Program the java code manually using swing without using an IDE, what are the advantages and disadvantages of this?

2) The two aspects of the tool will be connected by a predefined protocol with the IPC method using sockets.  The Network engine is written in C and the GUI in Java.  With respect to the client server model w.r.t to the server I know of the factors involving iterative and concurrent servers however, what would be the factors i should consider w.r.t the client?

3) The protocol between the two applications will be based on application layer protocol. Considering sniffed data of a LAN is captured using libpcap and processed and written to a socket.  And the GUI would continuously read from that socket and make requests to the Network engine to extract the data for the sessions going on a LAN system, and display them appropriately.  What would be the protocol between the two?  Which application layer protocol is nearest to what I am trying to develop?  I have developed one which is below, could I have it verified?
     a) Message Identifier
     b) Message Type
     c) No of strings
     d) String Length
     e) Delimited String

I would really like some assistance on this since I am developing the server using C at the moment and am looking to begin the GUI soon.


Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Using IDE,
  1. it will be easy to locate error line,
  2. speling mistake can be avoided,
  3. Context sensitive help( easy to navigate )
  4. Auto list feaature
  5. Color coding syntaxes,

  apart from this I don't find anything useful in designing UI though they have this feature. So overall, the development will be faster & easier in using IDEs.

   Then for your other questions, I would interested in seeing other's comments. But I am wondering why you are using c & java, I think, you can achieve the same in Java itself!

>>, I think, you can achieve the same in Java itself!

No. Low level access to packets is not possible in most cases.
Cloud Class® Course: Microsoft Exchange Server

The MCTS: Microsoft Exchange Server 2010 certification validates your skills in supporting the maintenance and administration of the Exchange servers in an enterprise environment. Learn everything you need to know with this course.

Funnily enough, Mujtaba, i was going to make the very opposite point ;-)

>>But I am wondering why you are using c & java, I think, you can achieve the same in C itself!
MujtabaAuthor Commented:

Thank you so much for your response, I'm extremely pleased.

Basically, I'm doing it in C and Java, because of two reasons:
1) I'm an electronic engineer therefore I have spent a lot of time using C
2) I'm not that aware of Java, therefore I have decided to use Java for developing my UI

I would prefer to program manually, then use an IDE since I am trying to learn Java and currently I have developed the basic framework using Swing of the monitoring tool.  I haven't opened up a socket yet.

Thats why I would like to know the advantages of using manual programming to justify my approach.  I have lookied into using IDE's (specifically NetBeans) however I find the code produced difficult to uinderstand for a starter in Java.

Kind Regards
Well, producing the gui in Java will at least get you out of the problem of different windowing systems on different platforms, so in that respect, it's a good solution.

As far as IDEs are concerned, i'm no expert, as i don't use one. Using one *could* make your life easier in certain cases i'd guess, but of course they won't teach you much about Java gui layout management. The best case scenario is that a good IDE will allow you to do the layout by drag and drop, but you won't learn how the layout is composed. The worst case scenario would be that the IDE makes a dog's breakfast out of things if you don't know what you're doing and you *still* won't learn about layout management ;-)

Your alternative is to read up on layouts, draw it out with pencil and paper and code it with a text editor.
MujtabaAuthor Commented:
Thank you for your answer CEHJ

Could I request your advice on the other matters, about the protocol between the two applications.

I'm researching into other application layer protocols such as http to find the similarity between mine and the standard ones - however I am aiming for something very simple.

The data that I am capturing is,
1) Src Port
2) Dest Port
3) Src IP
4) Dest IP
5) Data portion
6) byte/packet count.

The data would arrive as a string, with the data within delimited by a " "(space) e.g. ("Src_IP" "Dest_IP" "Src_Port" "Dest_Port" etc)  

Therefore I have come up with a protocol, in in each frame there would be a header:
Message Identifier
Message Type

Message parameters:
No of strings
Length of string
Delimited string

Would do you think about this protocol?

Thank you for your help

Kind Regards

Seems OK on the face of it. I know you specify you want to create an application layer protocol, but have you thought of RMI? The knowledge you gain fron using that would be reusable and will get you out of the boring business of creating protocols in the first place - you'll be able to just call a function with your data as parameters.

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
MujtabaAuthor Commented:
RMI as far as I can rememebr only works with both the client and server being in Java, for distributed programming - am I right?

The thing is, the protocol I'm tryin to set up is going to be fairly simple - again for learning purposes.

What kind of issues would the client have to consider ina client-server model, like the one I'm using?

Thanks for your help
MujtabaAuthor Commented:
Additional question

Could you please give an idea of how web access could be enabled to the server from thew client using Java.  For instance, the client may want to connect to the server from a browser - could you inform me of the concepts behind this? Does this involve anything along the lines of private interfaces.

Thanks for your efforts

Kind Regards
This old question needs to be finalized -- accept an answer, split points, or get a refund.  For information on your options, please click here-> http:/help/closing.jsp#1 
Post your closing recommendations!  No comment means you don't care.
No comment has been added lately, so it's time to clean up this TA.
I will leave a recommendation in the Cleanup topic area that this question is:

Accept CEHJ's comment as answer.

Please leave any comments here within the next seven days.


EE Cleanup Volunteer
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today

From novice to tech pro — start learning today.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.