Huge thanks to our Platinum Members Endace and LiveAction,
and our Silver Member Veeam, for supporting the Wireshark Foundation and project.

Wireshark-bugs: [Wireshark-bugs] [Bug 6986] Updating the RPL SRH dissector and implementing RPL

Date: Tue, 29 May 2012 23:29:57 -0700 (PDT)
https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=6986

--- Comment #14 from Jakub Zawadzki <darkjames-ws@xxxxxxxxxxxx> 2012-05-29 23:29:56 PDT ---
(In reply to comment #13)
> Thanks for the feedback... I was initially hesitant to use memcmp on the
> addresses since they are stored as structs and I know that comparing structs
> might get you into trouble due to padding sometimes being added by the
> compiler.  Thinking about it more, though, since all that is needed is to
> compare the 'bytes' arrays directly, there is no way that padding could
> possible mess that up, so memcmp is a much better solution.  I apologize for
> the mistake, and please let me know if there is anything else I should change. 
> Thanks!

Well no problem, but if you think this way, you should also avoid doing
memcpy(), like in:

+  struct e_in6_addr srcAddr;
+  memcpy((guint8 *)&srcAddr, (guint8 *)pinfo->src.data, pinfo->src.len);

Anyway e_in6_addr is just char[16] /* but we should've just typedef it, not
make it a struct... */ we can assume there's no padding.

This patch looks much better now, thanks.

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