pidl sync with wireshark

Aurélien Aptel aaptel at suse.com
Mon Feb 8 16:51:57 UTC 2016


Hi,

I'm trying to sync the changes of wireshark's pidl back to samba. I've
started from wireshark latest "samba sync commit" 

  commit ef106f4
  Author: Guy Harris <guy at alum.mit.edu>
  Date:   Fri Sep 26 12:30:23 2014 -0700
  
      Update to latest version from Samba Git repository.

      <log of imported samba commits here>

But in the middle of doing this I've realized that they were already
different at this sync commit and both versions diverge since a longer
time. So this might be tricky to resolve *sigh*.

For example, Wireshark has changed the dissector primitives by moving a
private member of a struct to a new arguments (the new `di` parameter
between `tree` and `drep`):

(long lines edited)

pidl/lib/Parse/Pidl/Wireshark/NDR.pm in Samba

$self->register_type("char", "offset = PIDL_dissect_uint8(tvb, offset,
  pinfo, tree, drep, ...
$self->register_type("long", "offset = PIDL_dissect_uint32(tvb, offset,
  pinfo, tree, drep, ...
$self->register_type("dlong", "offset = dissect_ndr_duint32(tvb,
  offset, pinfo, tree, drep, ...

tools/pidl/lib/Parse/Pidl/Wireshark/NDR.pm in Wireshark

$self->register_type("char", "offset = PIDL_dissect_uint8(tvb, offset,
  pinfo, tree, di, drep, ...
$self->register_type("long", "offset = PIDL_dissect_uint32(tvb, offset,
  pinfo, tree, di, drep, ...
$self->register_type("dlong", "offset = dissect_ndr_duint32(tvb,
  offset, pinfo, tree, di, drep, ...

Such a big change means that the current Samba version cannot even be
used anymore (the *_dissect_* functions are defined in the WS
codebase). That means that most of the WS version of Wireshark/NDR.pm
should be kept.

Another thing I need to check is whether WS has made any fix on the
generated code instead of fixing pidl or the source idl files.

I was trying to port the WS commits to keep the history but since the
problem is more complex than I though I will probably end up with
several "merge" commits where multiple changes will be bundled together.

I hope we'll be able to share an exact copy of pidl between the two
projects when I'm done.

-- 
Aurélien Aptel / SUSE Labs Samba Team
GPG: 1839 CB5F 9F5B FB9B AA97  8C99 03C8 A49B 521B D5D3
SUSE Linux GmbH, Maxfeldstraße 5, 90409 Nürnberg, Germany
GF: Felix Imendörffer, Jane Smithard, Graham Norton, HRB 21284 (AG
Nürnberg)
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 819 bytes
Desc: OpenPGP digital signature
URL: <http://lists.samba.org/pipermail/samba-technical/attachments/20160208/6af35295/attachment.sig>


More information about the samba-technical mailing list