ANNOUNCEMENT: Live Wireshark University & Allegro Packets online APAC Wireshark Training Session
April 17th, 2024 | 14:30-16:00 SGT (UTC+8) | Online

Wireshark-bugs: [Wireshark-bugs] [Bug 3256] New dissector: gadu-gadu protocol

Date: Sat, 3 Oct 2009 06:56:20 -0700 (PDT)
https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=3256





--- Comment #20 from Jakub Zawadzki <darkjames@xxxxxxxxxxxxxxxx>  2009-10-03 06:56:19 PDT ---
(In reply to comment #19) 
> 4.  Please use tvb_reported_length_remaining rather than 
>     tvb_length_remaining.
>     For an explanation see:
>     http://www.wireshark.org/lists/wireshark-dev/200807/msg00179.html

Ok, but Gadu-Gadu packets has got len field inside, so it might be better to:
     if (tvb_reported_length_remaining(tvb, 0) != expected_len)
          ; /* throw exception, add info about shortened packet ? */

Or maybe pass expected_len as param to subfunctions? 
( and don't use tvb*_length_remaining() )

> 5.  #ifndef max/#endif is needed around the #define max.
>     Compilation of this dissector fails in my Windows Wireshark
>     environment w/o this.

I found that glib has got MAX macro, so i changed it.

> 9.  I'm not altogether thrilled about the use of varargs in
>     gg_tree_add_item_except() along with the use of #defines to 
>     specify some of the args for the calls to gg_tree_add_item_except()..

I removed gg_tree_add_item_except(), the idea was nice, but it didn't work so
well.


I was thinking to change description in gg_packets_type_recv &
gg_packets_type_send, e.g.

from: { GG_WELCOME, "Welcome packet" },
  to  { GG_WELCOME, "GG_WELCOME" }
and inside COL_INFO put "Welcome packet"

It would fix "multiple identical text value_strings"
What you think about it?


Thanks for your review! (and sorry for my horrible coding style...)


-- 
Configure bugmail: https://bugs.wireshark.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.