Hey,
thanks for your reply!
proto_slapml should be proto_testdissect, thats right. I just forgot to
rename it, after I copied the source-code into the email, in the
original version the code does compile.
So I guess the error comes from your third suggestion. I will look into it!
Regards,
Patrick
Am 24.11.2010 16:08, schrieb news.gmane.com:
> "Patrick Nowak" <student.nowak@xxxxxxxxxx>
> wrote in message news:4CECF80A.8040507@xxxxxxxxxx...
>> Hello,
>>
>> I am fairly new to developing Dissectors for Wireshark. I started with
>> the small sample from the Wireshark Developers Guide and changed a few
>> things(Strings and Port).
>>
>> My Plugin looks like this:
> Your code does not compile.
>
> 1. proto_slapml is not defined. You pass the return value of
> proto_register_protocol to this variable.
>
> 2. proto_testdissect is -1 and can cause this exception, when you pass this
> to proto_tree_add_item.
>
> 3. The function proto_tree_add_item does not expect a return value from
> proto_register_protocol but a hf index created by
> proto_register_field_array.
> see prototype:
> proto_tree *proto_tree_add_item(proto_tree *tree, int hfindex, tvbuff_t
> *tvb,
> gint start, gint length, gboolean little_endian);
>
>
> Andy
>
>
>
> ___________________________________________________________________________
> Sent via: Wireshark-dev mailing list <wireshark-dev@xxxxxxxxxxxxx>
> Archives: http://www.wireshark.org/lists/wireshark-dev
> Unsubscribe: https://wireshark.org/mailman/options/wireshark-dev
> mailto:wireshark-dev-request@xxxxxxxxxxxxx?subject=unsubscribe