Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How to design generic API for messages structures

Status
Not open for further replies.

RanchuPanchu

Programmer
Jun 2, 2007
5
IL
Hello,



I would like your advise regarding a design issue in c#.

I am working on a project which is like a sniffer (using winpcap dll), in which I expect in the API , some known messegas (about 25 messeges) , which means that their structure is known , all messages are no more then 20 bytes. I would also like that my project be generic ,which means( as far as I understand generic idea) that the messegas structure will not be hardcoded , but be configurable maybe in XML, database, or dataset ?.



I would appreciate your devise what code-structure to use (xml is preferred ?), and if you can refer me how to configure the messeges in such tool, and how to transfer this structure later to be used.

Does chosing XML for inserting all the structures of the messeges , is a good solution for this case ?

If I chose XML then, how to define the messeges in XML file , and how to implement this GetMessage method to the data inserted in the XML file


Thank you very much !



Ran

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top