Wireshark-bugs: [Wireshark-bugs] [Bug 8562] New dissector for ISO 10747 Interdomain Routeing Pro
Date: Sun, 07 Apr 2013 16:37:07 +0000

Comment # 13 on bug 8562 from
Hi Matthias,

sorry but this still needs some more work.

The standard copyright header is missing.

It's not compiling on my system

make[5]: Entering directory `/home/martin/src/wiresharkDevel/epan/dissectors'
  CC     libdissectors_la-packet-idrp.lo
packet-idrp.c: In function 'dissect_attributes':
packet-idrp.c:286:10: error: variable 'rib_attribute_len' set but not used
[-Werror=unused-but-set-variable]
packet-idrp.c: In function 'dissect_BISPDU_UPDATE':
packet-idrp.c:714:3: error: 'path_attr_len' undeclared (first use in this
function)
packet-idrp.c:714:3: note: each undeclared identifier is reported only once for
each function it appears in
packet-idrp.c:664:9: error: variable 'path_attr_flag' set but not used
[-Werror=unused-but-set-variable]
packet-idrp.c: In function 'dissect_BISPDU_ERROR':
packet-idrp.c:770:9: error: variable 'error_subcode' set but not used
[-Werror=unused-but-set-variable]
cc1: all warnings being treated as errors
make[5]: *** [libdissectors_la-packet-idrp.lo] Error 1
make[5]: Leaving directory `/home/martin/src/wiresharkDevel/epan/dissectors'
make[4]: *** [all-recursive] Error 1
make[4]: Leaving directory `/home/martin/src/wiresharkDevel/epan/dissectors'
make[3]: *** [all] Error 2
make[3]: Leaving directory `/home/martin/src/wiresharkDevel/epan/dissectors'
make[2]: *** [all-recursive] Error 1
make[2]: Leaving directory `/home/martin/src/wiresharkDevel/epan'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/home/martin/src/wiresharkDevel'
make: *** [all] Error 2

There's checkapi warnings

martin@reykholt:~/src/wiresharkDevel$ ./tools/checkAPIs.pl
epan/dissectors/packet-idrp.c 
Error: the blurb for hf_idrp_open_authentication_data
("idrp.open.authentication-data") matches the field name in
epan/dissectors/packet-idrp.c
epan/dissectors/packet-idrp.c: found 21 useless add_text() vs. 31
add_<something else>() calls (67.74%)

dissect_idrp_heur() always returns FALSE for tree==NULL
I'd prefer getting rid of dissect_idrp_heur() completely. Use

 heur_dissector_add("clnp", dissect_idrp, proto_idrp);

and make dissect_irdp() return int. Move the check inside make_dissect_irdp()
and return 0 if the packet is not irdp. Otherwise return the number of bytes
dissected.

There's no need to have an initializer for each and every variable you declare.
E.g. for

  guint8 error_code = 0;                                                        
...
  error_code = tvb_get_guint8(tvb, offset);                                     

There's no need to initialize error_code.

You should define one ett variable for each subtree that you use.

Best regards,
Martin


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