wireshark/epan/dissectors/pidl
Gregor Beck f528f55cd5 packet-dcerpc-witness: initial implementation based on the idl file from samba
See [MS-SWN], https://msdn.microsoft.com/en-us/library/hh536748.aspx

Change-Id: Ie92dad2c229ec08e7f7e31be9422450305b3908a
Signed-off-by: Gregor Beck <gbeck@sernet.de>
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Signed-off-by: Günther Deschner <gd@samba.org>
Reviewed-on: https://code.wireshark.org/review/11366
Petri-Dish: Michael Mann <mmann78@netscape.net>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Michael Mann <mmann78@netscape.net>
2015-11-03 12:38:01 +00:00
..
mapi
nspi
rfr
IDL_LICENSE.txt
Makefile.am
README
atsvc.cnf
atsvc.idl
dfs.cnf
dfs.idl
dnsserver.cnf
dnsserver.idl
dssetup.idl
efs.cnf
efs.idl
eventlog.cnf
eventlog.idl
frsrpc.cnf
frsrpc.idl
frstrans.cnf
frstrans.idl
idl_types.h
initshutdown.cnf
initshutdown.idl
lsa.cnf
lsa.idl
mdssvc.cnf
mdssvc.idl
misc.cnf
misc.idl
samr.cnf
samr.idl
srvsvc.cnf
srvsvc.idl
winreg.cnf
winreg.idl
witness.cnf
witness.idl
wkssvc.cnf
wkssvc.idl
wzcsvc.cnf
wzcsvc.idl

README

A note about PIDL generated files
=================================

Quick guide
===========

    for file in *.idl */*.idl; do
        echo "Generating dissector for $file"
        ../../../tools/pidl/pidl --includedir . --ws-parser -- $file;
    done
    cp packet-dcerpc*.* ..

Complete infos
==============

The following files:
../packet-dcerpc-atsvc.h
../packet-dcerpc-budb.c
../packet-dcerpc-budb.h
../packet-dcerpc-butc.c
../packet-dcerpc-butc.h
../packet-dcerpc-dfs.h
../packet-dcerpc-dnsserver.h
../packet-dcerpc-drsuapi.c
../packet-dcerpc-drsuapi.h
../packet-dcerpc-dssetup.h
../packet-dcerpc-efs.h
../packet-dcerpc-eventlog.h
../packet-dcerpc-frsrpc.h
../packet-dcerpc-frstrans.h
../packet-dcerpc-initshutdown.h
../packet-dcerpc-lsa.h
../packet-dcerpc-mapi.h
../packet-dcerpc-misc.h
../packet-dcerpc-nspi.h
../packet-dcerpc-rfr.h
../packet-dcerpc-samr.h
../packet-dcerpc-srvsvc.h
../packet-dcerpc-winreg.h
../packet-dcerpc-wkssvc.h
../packet-dcerpc-wzcsvc.h

are automatically generated via a tool called "pidl"; you shouldn't
modify them manually.

The pidl tool is maintained by the Samba project (http://samba.org,
samba-technical@samba.org).  We have a version in ../../../tools/pidl;
it currently differs from the Samba version only in its Wireshark-parser
generator, as we had to change it to reflect some API differences
between the current Wireshark release and the development trunk.

The Samba version can be fetched from their git tree:
    git clone git://git.samba.org/samba.git

Running pidl
============

You have to run the pidl command inside the pidl folder of the wireshark
source tree.

The command to compile file:
    ../../../tools/pidl/pidl --includedir . --ws-parser -- <idl-file>
                                                        ^^^
                                                        This is *VERY* important
The command generates 2 files:
    packet-dcerpc-<interfacename>.h
    packet-dcerpc-<interfacename>.c

For instance, with the atsvc.idl, the command will be:

        ../../../tools/pidl/pidl --includedir . --ws-parser -- atsvc.idl

This will generate 2 files:
    packet-dcerpc-atsvc.h
    packet-dcerpc-atsvc.c

If you run outside the dissectors/pidl directory, this *will* result in a
warning such as:

    atsvc.idl:5:23: idl_types.h: No such file or directory

and *may* result in additional warnings such as:

    Warning: No conformance file `initshutdown.cnf'
    Unable to handle string with flags STR_LEN4|STR_NOTERM at /usr/lib/perl5/site_perl/5.8.6/Parse/Pidl/Wireshark/NDR.pm line 283.

Notes about the in-tree pidl
============================

To allow building Wireshark pidl dissectors without having to
*explicitly* access a remote git repository, and to allow us to make
changes to the Wireshark parser generator that the Samba developers
might not want to make until a new major release of Wireshark comes out,
so as to allow users to build dissectors to run in the current Wireshark
release, a copy of pidl is located in tools/pidl.

Not compiling idl
=================
As of September 26, 2014, the following idl have issues when generating
and compiling:

pidl complains that inline arrays aren't supported for these:

	dnsserver.idl
	eventlog.idl

pidl generates possibly-incorrect code for these - this needs checking:

	rfr/rfr.idl

pidl rejects these with errors:

	srvsvc.idl
	wkssvc.cnf