|
I have defined a foo protocol dissector in Wireshark and compiled it successfully, but when I try adding this dissector in Preferences->Protocols->DLT_USER->Encapsulations Table, it shows this error:
Please advise. EDIT: SOURCE ADDED BELOW
|
|
You need to register your dissector with name, register_dissector("rtp", dissect_rtp, proto_rtp); Hi I added the following statement in the function proto_register_foo() function but no use.. Still getting the same error :(
(04 Feb '12, 11:02)
ashish_goel
There is no "following statement" in your comment. Presumably you didn't literally add the statement
as that would only work for an RTP dissector, but you instead registered with a name such as "foo" and with names such as You also need to put it in your dissector's "register" routine (not the "register_handoff" routine).
(04 Feb '12, 16:14)
Guy Harris ♦♦
@ guy harris. I added : register_dissector("foo",dissect_foo,proto_foo); function call at the last line of proto_register_foo() routine. I guess I have done it right as per your suggestion. but its not working.
(05 Feb '12, 00:45)
ashish_goel
I.e., if you open up the preferences for DLT_USER, click the "Edit..." button for "Encapsulations Table", click "New" or select an existing item and click "Edit...", and put "foo" into the "Payload protocol" field, and click "OK", you get that error?
(05 Feb '12, 11:14)
Guy Harris ♦♦
@guy harris. yes, I followed the same steps. And the foo protocol which I have defined is the same one which is there is developer's guide.
(05 Feb '12, 18:55)
ashish_goel
It might help if you edited your question to include your code for
(05 Feb '12, 19:26)
helloworld
not having that right now.. will edit it in few hours.. BTW Is there anything not clear?
(05 Feb '12, 22:50)
ashish_goel
No. Adding
(05 Feb '12, 23:45)
helloworld
And to be complete, my
(05 Feb '12, 23:51)
helloworld
I have called register_dissector() function not new_register_dissector(). BTW I have edited the ques to include the source of my proto_register_foo function.
(06 Feb '12, 01:34)
ashish_goel
any suggestions plz??
(06 Feb '12, 08:27)
ashish_goel
You can use either Your code works for me (I can add "foo" to the DLT table from prefs). If you type
(06 Feb '12, 14:53)
helloworld
My source file is located in:
I added
If you're not using CMake (i.e., you're using the
(06 Feb '12, 15:03)
helloworld
the dissector is registered for sure. I can use it in the decode as option. Even the filter text box turns green. the new_register_dissector function not working for me. throws an error while compiling.
(06 Feb '12, 18:44)
ashish_goel
I don't have any other suggestions other than for you to step through the code with a debugger (put a breakpoint at
(06 Feb '12, 22:36)
helloworld
thanks, for all the help. I had to create a new workspace and it worked. I guess some file was corrupted
(07 Feb '12, 22:39)
ashish_goel
showing 5 of 16
show 11 more comments
|
|
I've seen this when the thanks, it worked.. I had to create a new workspace and it worked. I guess some file was corrupted
(07 Feb '12, 22:38)
ashish_goel
|
