Wireshark-dev: [Wireshark-dev] Custom dissector creation

From: Andriy Beregovenko <jet@xxxxxxxxxxx>
Date: Tue, 6 Dec 2011 00:25:40 +0200
Hi,

I'm truing to create custom dissector. Data in protocol is crypted with rc4,
so I use internal implementation of RC4 encription and it works fine. Of
course I read [0] before writing code :)
But I got strange behaivor with result displaing. At time of dump loading
and dissector processing data, all data structures is filled correct(I check
this using many printf :]). But when I look into wireshark window, I saw
random data in "decoded data source", and, of course, all parcing fails.[1]
Here is a code [2]. It is pretty simple.
Please, can you point me to my error. I feel that i do something wrong, but
I can't find what I am doing wrong.

[0] http://www.wireshark.org/docs/wsdg_html_chunked/ChDissectTransformed.html
[1] http://ompldr.org/vYmxydQ/image0046.jpg
[2] http://pastebin.com/raw.php?i=pGeQCUwb
As for source code: All parse fails if I uncomment last commented section,
but I have no idea about, case sources actually doing nothing with globals.
-- 
Best regards,
Andriy
0xBDDBDAE3

Attachment: signature.asc
Description: Digital signature