Re: [Wireshark-dev] The RSVD dissector and 32-bit builds ...

2015-02-16 Thread Pascal Quantin
2015-02-16 16:48 GMT+01:00 Richard Sharpe realrichardsha...@gmail.com: On Mon, Feb 16, 2015 at 7:11 AM, Evan Huus eapa...@gmail.com wrote: On Mon, Feb 16, 2015 at 10:08 AM, Richard Sharpe realrichardsha...@gmail.com wrote: On Mon, Feb 16, 2015 at 6:55 AM, Evan Huus eapa...@gmail.com wrote:

Re: [Wireshark-dev] The RSVD dissector and 32-bit builds ...

2015-02-16 Thread Richard Sharpe
On Mon, Feb 16, 2015 at 7:11 AM, Evan Huus eapa...@gmail.com wrote: On Mon, Feb 16, 2015 at 10:08 AM, Richard Sharpe realrichardsha...@gmail.com wrote: On Mon, Feb 16, 2015 at 6:55 AM, Evan Huus eapa...@gmail.com wrote: Create the wmem_map using g_int64_equal instead of g_direct_equal and

[Wireshark-dev] The RSVD dissector and 32-bit builds ...

2015-02-16 Thread Richard Sharpe
Hi, Guy has identified a problem with my handling of SCSI dissection in the RSVD dissector. I am using a 64-bit value as the key for a wmem_map_insert and this will not work on 32-bit systems. Having looked at the key values some more what it seems that Windows is doing here is taking a 32-bit

Re: [Wireshark-dev] The RSVD dissector and 32-bit builds ...

2015-02-16 Thread Evan Huus
Create the wmem_map using g_int64_equal instead of g_direct_equal and wmem_int64_hash instead of g_direct_hash. Create a wmem_file_scope() copy of the key, and pass the resulting pointer to the insert function. Evan On Mon, Feb 16, 2015 at 9:31 AM, Richard Sharpe realrichardsha...@gmail.com

Re: [Wireshark-dev] The RSVD dissector and 32-bit builds ...

2015-02-16 Thread Richard Sharpe
On Mon, Feb 16, 2015 at 6:55 AM, Evan Huus eapa...@gmail.com wrote: Create the wmem_map using g_int64_equal instead of g_direct_equal and wmem_int64_hash instead of g_direct_hash. Create a wmem_file_scope() copy of the key, and pass the resulting pointer to the insert function. Hmmm, why do

Re: [Wireshark-dev] The RSVD dissector and 32-bit builds ...

2015-02-16 Thread Evan Huus
On Mon, Feb 16, 2015 at 10:08 AM, Richard Sharpe realrichardsha...@gmail.com wrote: On Mon, Feb 16, 2015 at 6:55 AM, Evan Huus eapa...@gmail.com wrote: Create the wmem_map using g_int64_equal instead of g_direct_equal and wmem_int64_hash instead of g_direct_hash. Create a wmem_file_scope()

Re: [Wireshark-dev] The RSVD dissector and 32-bit builds ...

2015-02-16 Thread Martin Mathieson
The idiom I use for keys that are 32 bits is to have a function to return a key, with a 'persist' flag e.g. in packet-pdcp-lte.c : /* Convenience function to get a pointer for the hash_func to work with */ static gpointer get_report_hash_key(guint16 SN, guint32 frameNumber,

Re: [Wireshark-dev] The RSVD dissector and 32-bit builds ...

2015-02-16 Thread Richard Sharpe
On Mon, Feb 16, 2015 at 7:11 AM, Evan Huus eapa...@gmail.com wrote: On Mon, Feb 16, 2015 at 10:08 AM, Richard Sharpe realrichardsha...@gmail.com wrote: On Mon, Feb 16, 2015 at 6:55 AM, Evan Huus eapa...@gmail.com wrote: Create the wmem_map using g_int64_equal instead of g_direct_equal and

Re: [Wireshark-dev] The RSVD dissector and 32-bit builds ...

2015-02-16 Thread Richard Sharpe
On Mon, Feb 16, 2015 at 7:11 AM, Evan Huus eapa...@gmail.com wrote: On Mon, Feb 16, 2015 at 10:08 AM, Richard Sharpe realrichardsha...@gmail.com wrote: On Mon, Feb 16, 2015 at 6:55 AM, Evan Huus eapa...@gmail.com wrote: Create the wmem_map using g_int64_equal instead of g_direct_equal and