Wireshark-bugs: [Wireshark-bugs] [Bug 8635] enhanced WCCP decoder
Date: Wed, 15 May 2013 13:26:46 +0000

Comment # 11 on bug 8635 from
Hello Jörg,

(In reply to comment #10)
> - I am just guessing: NOTE -> NOT

So it's not a typo, just my strange use of English.

> - Yes, that's the item_length check I was thinking about

Ok added and also to dissect_wccp2_info which is using the same loop.

> - Wrt FT_IPvX: Why not create two hf_ entries: One for IPv4 and one for IPv6
> and then add the correct item? IIRC it should be possible to use the same
> filter for both elements.

So FT_IPv4 for IPv4 and the custom formatter for FT_IPv6? As far as I
understand we cannot use FT_IPv6 as the IPv6 address is at a totally different
location from the bytes representing that address. Even if I remember where the
IPv6 address is and force all fields to be FT_IPv6 at this location this would
be confusing for the user as the 'field' in a certain piece of the packet
highlights data in a completely different part of the packet...

Also this would mean a lot of duplication and 'if {} else {}' pieces scattered
round.

A previous version of the code in fact had this, but it make my eyes bleed too
much...

> Oh, and I finally tried to compile the code :-)

cclang on OSX is less complaining ;)


> /home/jmayer/work/wireshark/svn/trunk/epan/dissectors/packet-wccp.c:870:12:
> error: variable ‘wccp2r1_address_table’ set but not used

Correct, the variable is there out of symmetry with the others which are used
to check if the packet has all required fields. 

As there is no such requirement I will remove it.

> /home/jmayer/work/wireshark/svn/trunk/epan/dissectors/packet-wccp.c:1393:6:
> error: request for implicit conversion from ‘void *’ to ‘gchar *’ not
> permitted in C++ [-Werror=c++-compat]
>    buf=ep_alloc(128);

Fixed and the others like it.

> /home/jmayer/work/wireshark/svn/trunk/epan/dissectors/packet-wccp.c:1825:17:
> error: declaration of ‘te’ shadows a previous local [-Werror=shadow]

Ok my Common Lisp side is showing. Renamed and others like it.

> /home/jmayer/work/wireshark/svn/trunk/epan/dissectors/packet-wccp.c:1814:15:
> error: variable ‘element_tree’ set but not used

That was an actual typo.

> /home/jmayer/work/wireshark/svn/trunk/epan/dissectors/packet-wccp.c: In
> function ‘dissect_wccp2_command_extension’:
> /home/jmayer/work/wireshark/svn/trunk/epan/dissectors/packet-wccp.c:1921:15:
> error: variable ‘tf’ set but not used [-Werror=unused-but-set-variable]
>    proto_item *tf=NULL;

Ok the assignment of NULL is not needed, but tf is used a few lines later...

> /home/jmayer/work/wireshark/svn/trunk/epan/dissectors/packet-wccp.c:1969:15:
> error: variable ‘element_tree’ set but not used

Again a real typo.

> /home/jmayer/work/wireshark/svn/trunk/epan/dissectors/packet-wccp.c:2728:16:
> error: variable ‘d’ set but not used [-Werror=unused-but-set-variable]
>    guint8 a,b,c,d;

Correct leftover from older code. Fixed.

Recompiled without warnings on clang and gcc 4.7.3 now. Will attach updated
patch later.


You are receiving this mail because:
  • You are watching all bug changes.