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 4508] Add new GSMTAP dissector

Date: Sat, 20 Feb 2010 08:49:44 -0800 (PST)
https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=4508

Bill Meier <wmeier@xxxxxxxxxxx> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |wmeier@xxxxxxxxxxx

--- Comment #3 from Bill Meier <wmeier@xxxxxxxxxxx> 2010-02-20 08:49:41 PST ---
 Also:
------

Microsoft C does not support C99 so the use of C99 things like
char *x[] = {
  [1] = "abc";
  [3] = "def";
};

is not portable (Wireshark is built with Windows as well as *nix compilers).

The use of the GNU C __attribute__ is also not portable.

See doc/README.developer  for additional information.

(In any case, as noted by Anders above, the gsmtap_bursts array should be a 
a value_striing array).

------------

The gsmtap_hdr struct isn't actually referenced in the code and so, 
at the least, should be commented out (leaving it only for documentation 
purposes if desired).

------------
A $Id$ line is needed ....

 * (C) 2008-2010 by Harald Welte <laforge@xxxxxxxxxxxx>
 *
 * $Id$
 *

-------------

#include <sys/types,h> is not needed once glib types are used as requested by
Anders.

-------------

The "" in the "blurb" field of each of the hf[] entries should be replaced by
NULL


+    static hf_register_info hf[] = {
+        { &hf_gsmtap_version, { "Version", "gsmtap.version", FT_UINT8,
BASE_DEC, NULL, 0, "", HFILL }},

should be:

+    static hf_register_info hf[] = {
+        { &hf_gsmtap_version, { "Version", "gsmtap.version", FT_UINT8,
BASE_DEC, NULL, 0, NULL, HFILL }},

-------
Re:
+enum {
+    SUB_DATA = 0,
+    SUB_UM,
+    SUB_ABIS,
+
+    SUB_MAX
+};

It's probably a good idea to have the enum names be a bit more specific.

Maybe something like GSMTAP_SUB_DATA, etc similar to the #defines..

-------

typedef gboolean (*sub_checkfunc_t)(packet_info *);

isn't used anyplace and thus should be removed.

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