So I've set out to make a plugin that displays(parses, whatever you want to call it) CDMI information for network traffic. But the protocol is not important. I've been told the API is extensive so I can write it in whatever language I want. With some base work in C. Now I'm not comfortable using C but by the looks of the docs(part 2) there is a nice guide written in C. I heard Lua is another viable option and wireshark has it's own built-in lua interpretor. I've never worked with it before but by the looks of the syntax and such I can tell I'd be more comfortable writing in that as opposed to C. So to put it formally: what should I expect as move along on this project. Keeping in mind, I'm somewhat of a beginner to writing software for software. Ps: I use ubuntu asked 03 Feb '11, 15:25 Rodayo |
2 Answers:
By far, the best way to write a dissector is in C, and especially since you don't already know Lua. Learning to program well in C will likely have a much larger return on your efforts than learning to program in Lua. Not only will you be able to write a much faster and more complete dissector, but you will learn skills that will allow you to participate in other open source projects, including Linux itself and most of the tools you use daily in Ubuntu. There are many ways to learn C and many books available on the topic. (I originally learned by reading the first edition of "The C Programming Language" by Kernighan and Ritchie back in 1978.) Once you get a good grasp of the basics of C, you can quickly transfer this knowledge into writing your Wireshark dissector by starting with a copy of an existing dissector and then modifying it to suit your purposes. You are likely to find that once you know C well, it will be that much easier to learn many other programming languages, including Lua. answered 04 Feb '11, 09:06 beroset |
I don't plan to become a programmer in the future. Becoming proficient in any language doesn't interest me. I just want to get the job done. Now, you're saying C is the better choice, but could you elaborate on why it's a better choice? answered 04 Feb '11, 11:55 Rodayo |
The alternative is to write a dissector in Lua. The problems with this are that there are not as many working examples to start with, that you may need to look at the Lua implementation (written in C) to figure out how to do what you want and that a C implementation will run faster and be easier for you and others to maintain since the debugging tools are better. Those are the task-specific advantages. The generic advantages I think I already covered.
Hmm, well my project partner wants to go with C as well. I researched some more languages but it looks like C is the optimal choice whether I like it or not. Thank you for insight, and sorry if I came off a bit snippy before =P
No apology necessary! I didn't have any problem with the way you asked the question. It's good to state concisely what you do and do not want, and that's what you did. If you're satisfied with the answer, you can mark it as "answered" and that way it no longer shows up as an unanswered question for those of us who filter that way.
sorry, how do you mark it as answered? I only see options for upvoting individual answers
nevermind.