Wireshark-bugs: [Wireshark-bugs] [Bug 1430] EtherCAT dissector
Date: Mon, 8 Oct 2007 21:38:51 +0000 (GMT)
http://bugs.wireshark.org/bugzilla/show_bug.cgi?id=1430





------- Comment #40 from jaap.keuter@xxxxxxxxx  2007-10-08 21:38 GMT -------
Doesn't this dissector violate the portability rules? From README.developer:

"Don't fetch data from packets by getting a pointer to data in the packet
with "tvb_get_ptr()", casting that pointer to a pointer to a structure,
and dereferencing that pointer.  That point won't necessarily be aligned
on the proper boundary, which can cause crashes on some platforms (even
if it doesn't crash on an x86-based PC); furthermore, the data in a
packet is not necessarily in the byte order of the machine on which
Wireshark is running.  Use the tvbuff routines to extract individual
items from the packet, or use "proto_tree_add_item()" and let it extract
the items for you."


What are these? 
+      { &hf_ecat_mailboxtype,  
+      { "Type    ", "ecat_mailbox.type",
+      FT_UINT8, BASE_HEX, VALS(FlbMBoxType), 0x0F,
+      "", 0x0F, 0, 0, 0, NULL, NULL }
+      },
+      { &hf_ecat_mailboxcounter,  
+      { "Counter    ", "ecat_mailbox.counter",
+      FT_UINT8, BASE_HEX, NULL, 0x70,
+      "", 0x70, 0, 0, 0, NULL, NULL }
+      },
I mean, what's wrong with HFILL? There are more than just these two.


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