Wireshark-bugs: [Wireshark-bugs] [Bug 3026] Enhanced OLSR packet dissector
Date: Sat, 22 Nov 2008 02:39:35 -0800 (PST)
https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=3026





--- Comment #9 from Jaap Keuter <jaap.keuter@xxxxxxxxx>  2008-11-22 02:39:32 PDT ---
When I see things like the while loop in dissect_olsr_hna() that only advance
offset when pinfo->src.type == IPv[4|6] then there is an endless loop waiting
to happen. *Always* make sure *all* your loops terminate. A
DISSECTOR_ASSERT_NOT_REACHED() would do good here, other places may require
other measures.

I don't like the 256 use here and their. Make is understandable with
(G_MAXUINT8+1), because that is where it comes from.

Try using value_string i.s.o. the constructions at line 334 (Dissect Link
Type).

Same goes for (MID Dissecting Code), using NS_TYPES[] and working out the
presentation is all provided for in value_string and its helper functions.
Please look into that, which makes your code smaller and easier to maintain.

Why setting column COL_PROTOCOL to "UDP" ?

In header fields where name and blurb are equal, like  in 
    { &hf_olsr_message,
      { "Message", "olsr.message",
        FT_BYTES, BASE_HEX, NULL, 0,
        "Message", HFILL
      }
    },
Please replace the blurb with NULL. It will be handled as if name is filled in.

Please be consistent with the line break. Some functions have just one
parameter wrapped across column 80 while other lines run along into column 150. 
I prefer not to wrap (80 chars are so 20th century), but that is personal.


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