From 2069f87843369309b0496fcf3b2a4cfb66a7c33c Mon Sep 17 00:00:00 2001 From: Jelmer Vernooij Date: Sat, 20 Aug 2005 19:39:19 +0000 Subject: r9430: Remove obsolete file. Update pidl documentation, including description on ethereal conformance files Nicer --help ouput (This used to be commit 6c36864daee75b64fef86ce99cf980106624e0f7) --- source4/build/pidl/moduleinfo.c | 5 -- source4/build/pidl/pidl | 60 ++++++------- source4/build/pidl/pidl.1.xml | 188 ++++++++++++++++++++++++++-------------- 3 files changed, 153 insertions(+), 100 deletions(-) delete mode 100644 source4/build/pidl/moduleinfo.c (limited to 'source4/build') diff --git a/source4/build/pidl/moduleinfo.c b/source4/build/pidl/moduleinfo.c deleted file mode 100644 index 584f81d710..0000000000 --- a/source4/build/pidl/moduleinfo.c +++ /dev/null @@ -1,5 +0,0 @@ -#include "moduleinfo.h" - -#ifndef ENABLE_STATIC -G_MODULE_EXPORT const gchar version[] = VERSION; -#endif diff --git a/source4/build/pidl/pidl b/source4/build/pidl/pidl index 324f30b10e..ead70b1fad 100755 --- a/source4/build/pidl/pidl +++ b/source4/build/pidl/pidl @@ -59,8 +59,6 @@ sub FileSave($$) close(FILE); } - - my($opt_help) = 0; my($opt_parse) = 0; my($opt_dump) = 0; @@ -93,33 +91,37 @@ sub ShowHelp() print "perl IDL parser and code generator Copyright (C) tridge\@samba.org -Usage: pidl [options] - -Options: - --help this help page - --outputdir=OUTDIR put output in OUTDIR/ [.] - --parse parse a idl file to a .pidl file - --dump dump a pidl file back to idl - --uint-enums don't use C enums, instead use uint* types - --header[=OUTFILE] create generic header file - --ndr-header[=OUTFILE]create a C NDR-specific header file - --ndr-parser[=OUTFILE]create a C NDR parser - --tdr-header[=OUTFILE]create a C TDR header file - --tdr-parser[=OUTFILE]create a C TDR parser - --ejs[=OUTFILE] create ejs wrapper file - --client[=OUTFILE] create a C NDR client - --server[=OUTFILE] create server boilerplate - --template print a template for a pipe - --eth-parser[=OUTFILE]create ethereal parser and header - --swig[=OUTFILE] create swig wrapper file - --diff run diff on the idl and dumped output - --keep[=OUTFILE] keep the .pidl file - --odl accept ODL input - --dcom-proxy[=OUTFILE]create DCOM proxy (implies --odl) - --com-header[=OUTFILE]create header for COM interfaces (implies --odl) - --warn-compat warn about incompatibility with other compilers - --quiet be quiet - --verbose be verbose +Usage: pidl [options] [--] [...] + +Generic Options: + --help this help page + --outputdir=OUTDIR put output in OUTDIR/ [.] + --parse parse a idl file to a .pidl file + --dump dump a pidl file back to idl + --diff run diff on the idl and dumped output + --keep[=OUTFILE] keep the .pidl file + --odl accept ODL input + --warn-compat warn about incompatibility with other compilers + --quiet be quiet + --verbose be verbose + +Samba 4 output: + --header[=OUTFILE] create generic header file + --uint-enums don't use C enums, instead use uint* types + --ndr-header[=OUTFILE] create a C NDR-specific header file + --ndr-parser[=OUTFILE] create a C NDR parser + --client[=OUTFILE] create a C NDR client + --tdr-header[=OUTFILE] create a C TDR header file + --tdr-parser[=OUTFILE] create a C TDR parser + --ejs[=OUTFILE] create ejs wrapper file + --swig[=OUTFILE] create swig wrapper file + --server[=OUTFILE] create server boilerplate + --template print a template for a pipe + --dcom-proxy[=OUTFILE] create DCOM proxy (implies --odl) + --com-header[=OUTFILE] create header for COM interfaces (implies --odl) + +Ethereal parsers: + --eth-parser[=OUTFILE] create ethereal parser and header \n"; exit(0); } diff --git a/source4/build/pidl/pidl.1.xml b/source4/build/pidl/pidl.1.xml index e60889e895..cf7f560f0d 100644 --- a/source4/build/pidl/pidl.1.xml +++ b/source4/build/pidl/pidl.1.xml @@ -16,15 +16,25 @@ pidl --help - --output OUTNAME + --outputdir OUTNAME --parse --dump + --ndr-header[=OUTPUT] --header[=OUTPUT] - --parser[=OUTPUT] + --ejs[=OUTPUT] + --swig[=OUTPUT] + --uint-enums + --ndr-parser[=OUTPUT] + --client --server + --dcom-proxy + --com-header + --odl + --warn-compat + --quiet + --verbose --template --eth-parser[=OUTPUT] - --eth-header[=OUTPUT] --diff --keep idlfile @@ -76,11 +86,9 @@ - --output OUTNAME - Write output files to OUTNAME.*, e.g. - OUTNAME.pidl. If --output is not used, the name of - the input IDL file is used without the extension and the dot - before the extension. + --outputdir OUTNAME + Write output files to the specified directory. + Defaults to the current directory. @@ -101,15 +109,20 @@ --header - Generate a C header file for the specified interface. File will be named OUTNAME.h. + Generate a C header file for the specified interface. Filename defaults to OUTNAME.h. + + --ndr-header + + Generate a C header file with the prototypes for the NDR parsers. Filename defaults to ndr_OUTNAME.h. + - --parser + --ndr-parser - Generate a C file capable of parsing data sent using the interface. - File will be named OUTNAME.c. + Generate a C file containing NDR parsers. + Filename defaults to ndr_OUTNAME.c. @@ -118,7 +131,7 @@ --server Generate boilerplate for the RPC server that implements - the interface. Generates OUTNAME_s.c + the interface. Filename defaults to ndr_OUTNAME_s.c @@ -134,16 +147,15 @@ --eth-parser - Generate an Ethereal dissector (in C) for the interface. Output will - be written to packet-dcerpc-OUTNAME.c. - - - - - --eth-header - - Generate a header file for the Ethereal dissector. Output will - be written to packet-dcerpc-OUTNAME.h. + Generate an Ethereal dissector (in C) for the interface. Filename + defaults to packet-dcerpc-OUTNAME.c. + + + Pidl will read additional data + from an ethereal conformance file if present. Such a file should + have the same location as the IDL file but with the extension + cnf rather then idl. See + below for details on the format of this file. @@ -167,13 +179,10 @@ - SYNTAX + IDL SYNTAX IDL files are always preprocessed using the C preprocessor. - Each IDL file describes exactly one interface. Interfaces - can contain several C-like function definitions. - Pretty much everything in an interface (the interface itself, functions, parameters) can have attributes (or properties whatever name you give them). Attributes @@ -187,29 +196,6 @@ C-style comments can be used. - - - - MIDL TYPES - - -pidl uses slightly different types to midl by default. The following -defines in your MS IDL may make things easier to use the same IDL on -both platforms. - - - -#define unistr [string] wchar_t * -#define uint8 char -#define uint16 short -#define uint32 long -#define HYPER_T hyper - - - - Let's look at the multiple ways you can encode an array. - - CONFORMANT ARRAYS @@ -286,7 +272,6 @@ pidl takes a different approach, and writes it like this: VARYING ARRAYS - A varying array looks like this: @@ -356,6 +341,9 @@ embedded structures in security descriptors and spoolss. + +This section is by no means complete. See the OpenGroup and MSDN + documentation for additional information. @@ -373,13 +361,6 @@ embedded structures in security descriptors and spoolss. - - strings - - Strings in pidl are a data type rather then an attribute. - - - Datagram support @@ -426,9 +407,7 @@ The [value(expression)] property is a pidl extension that allows you to specify the value of a field when it is put on the wire. This allows fields that always have a well-known value to be automatically filled in, thus making the API more programmer friendly. The -expression can be any C expression, although if you refer to variables -in the current structure you will need to dereference them with -r->. See samr_Name as a good example. +expression can be any C expression. @@ -469,10 +448,12 @@ spoolss structures. - align + charset(name) - Force the alignment of the field this attribute is placed - on to the number of bytes specified. + Specify that the array or string uses the specified + charset. If this attribute is specified, pidl will + take care of converting the character data from this format + to the host format. Commonly used values are UCS2, DOS and UTF8. @@ -487,6 +468,81 @@ spoolss structures. + + ETHEREAL CONFORMANCE FILES + + +Pidl needs additional data for ethereal output. This data is read from +so-called conformance files. This section describes the format of these +files. + + +Conformance files are simple text files with a single command on each line. +Empty lines and lines starting with a '#' character are ignored. +Arguments to commands are seperated by spaces. + + + +The following commands are currently supported: + + + + + + TYPE name dissector ft_type base_type mask valsstring alignment + FIXME + + + + NOEMIT type + + Suppress emitting a dissect_type function for the specified type + + + + + PARAM_VALUE type param + + FIXME + + + + + HF_FIELD hf title filter ft_type base_type valsstring mask blurb + + FIXME + + + + + HF_RENAME old_hf_name new_hf_name + FIXME + + + + STRIP_PREFIX prefix + FIXME + + + + PROTOCOL longname shortname filtername + FIXME + + + + FIELD_DESCRIPTION field desc + FIXME + + + + IMPORT dissector code... + FIXME + + + + + + VERSION @@ -496,7 +552,7 @@ spoolss structures. SEE ALSO - Field Attributes [Remote Procedure Call], ethereal + Field Attributes [Remote Procedure Call], Ethereal Wiki on DCE/RPC. @@ -508,7 +564,7 @@ spoolss structures. pidl was written by Andrew Tridgell, Stefan Metzmacher, Tim Potter and Jelmer Vernooij. - This manpage was written by Andrew Tridgell and Jelmer Vernooij. + This manpage was written by Jelmer Vernooij, partially based on the original pidl README by Andrew Tridgell. -- cgit