Hi, I am trying to customize a version of wireshark. I believe what I am trying to do is add a listener, but I'm not sure. I want to be able to take certain packets, including packets with errors, and send them over a socket to another application. I will need to do some customized processing of these packets, although I can either do that processing as part of wireshark, or I can do it on the other side of my socket. Does it sound like I need to add a "Listener"? If so, is adding a listener best done in a lua script, or by modifying the wireshark C code? In the lua documentation, I see information on adding a listener, but I did not see that in the wireshark development (C) documentation. I have used C/C++ for many years but have never used lua. asked 17 Aug '11, 11:49 JVo |
One Answer:
Yes, a Listener (aka "Tap") is appropriate for the task. I would pick Lua over C. Don't be afraid of Lua...it's easy to learn:
Lua vs CHere are a few points: PROS
CONS
SocketsSee LuaSocket (or you can use LuaAlien to call your own C library). answered 17 Aug '11, 22:07 helloworld Wow, thanks for a very thorough response. I will go through everything you gave me, and let you know when I have more specific questions. I do like being able to debug C, and the fact that I already know C makes me think that for me, C development would be faster than Lua. But I also don't want to muck with something that might cause wireshark. So, I guess I'll explore my options for now. Okay, so a listener is a tap, huh? I still need to get a handle on the terminology I guess. (18 Aug '11, 08:37) JVo So, I'm also looking at adding various dissectors and will need to determine whether to do those in C or lua. It looks like using C provides me with an easy way to reassemble TCP packets: http://www.wireshark.org/docs/wsdg_html_chunked/ChDissectReassemble.html. Can I get TCP reassembly with lua? (18 Aug '11, 16:29) JVo When I said "Lua development is faster", I meant the time between making a change in code and seeing its effect in action (you simply restart Wireshark to see the change). This is opposed to the time it takes to re-compile a C dissector and re-deploy it. (Not to mention the time it takes to setup your dev environment for building Wireshark) Then again, faster or not, I certainly agree that you should go with the language you're most comfortable with. (18 Aug '11, 17:57) helloworld Wireshark Lua does not expose the TCP reassembly function (namely (18 Aug '11, 18:02) helloworld Cool, thanks! Okay, I'm getting a better handle on my options. :o) (19 Aug '11, 12:20) JVo |
possible duplicate