Move all of the scripts in epan/dissectors/ to tools/ .

Add a target ("x11-dissector") to build the X11 dissector.

Put the X11-related files (back) in the source distribution.

svn path=/trunk/; revision=29871
This commit is contained in:
Jeff Morriss 2009-09-12 23:02:34 +00:00
parent 7eed375f9d
commit ee8f078374
13 changed files with 46 additions and 29 deletions

View File

@ -5,17 +5,17 @@
# Wireshark - Network traffic analyzer
# By Gerald Combs <gerald@wireshark.org>
# Copyright 2004 Gerald Combs
#
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2
# of the License, or (at your option) any later version.
#
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
@ -47,12 +47,19 @@ EXTRA_DIST = \
Custom.nmake \
Makefile.common \
Makefile.nmake \
ncp2222.py \
packet-ncp2222.inc
packet-ncp2222.inc \
README.X11 \
x11-fields
packet-ncp2222.c : $(srcdir)/ncp2222.py
packet-ncp2222.c : $(top_srcdir)/tools/ncp2222.py
$(PYTHON) $< -o $@
# Target to rebuild the X11 dissector header files.
# See README.X11 before using this--it requires the xcb and mesa source.
x11-dissector: $(top_srcdir)/tools/process-x11-fields.pl x11-fields $(top_srcdir)/tools/process-x11-xcb.pl
$(PERL) $(top_srcdir)/tools/process-x11-fields.pl < x11-fields
$(PERL) $(top_srcdir)/tools/process-x11-xcb.pl
#
# Build register.c, which contains a function register_all_protocols()
# that calls the register routines for all protocols and a function

View File

@ -151,7 +151,7 @@ ASN1_DISSECTOR_SRC = \
packet-x509af.c \
packet-x509ce.c \
packet-x509if.c \
packet-x509sat.c
packet-x509sat.c
#
# asn2wrs-generated ASN.1 dissectors with warnings.

View File

@ -17,7 +17,7 @@ CFLAGS=-WX -DHAVE_CONFIG_H /I. /I.. /I../.. $(GLIB_CFLAGS) \
$(KFW_CFLAGS) $(AIRPCAP_CFLAGS) $(GEOIP_CFLAGS) \
/I$(PCAP_DIR)\include -D_U_="" $(LOCAL_CFLAGS)
CVARSDLL=-DWIN32 -DNULL=0 -D_MT -D_DLL
CVARSDLL=-DWIN32 -DNULL=0 -D_MT -D_DLL
.c.obj::
$(CC) $(CVARSDLL) $(CFLAGS) -Fd.\ -c $<
@ -29,8 +29,8 @@ DISSECTOR_SUPPORT_OBJECTS = \
$(DISSECTOR_SUPPORT_SRC:.c=.obj)
dissectors.lib: register.obj packet-ncp2222.c $(GENERATED_HEADER_FILES) ../../config.h $(DISSECTOR_OBJECTS) $(DISSECTOR_SUPPORT_OBJECTS)
@echo Linking dissectors.lib $(DISSECTOR_OBJECTS) $(DISSECTOR_SUPPORT_OBJECTS)
link /lib /out:dissectors.lib $(DISSECTOR_OBJECTS) $(DISSECTOR_SUPPORT_OBJECTS)
@echo Linking dissectors.lib $(DISSECTOR_OBJECTS) $(DISSECTOR_SUPPORT_OBJECTS)
link /lib /out:dissectors.lib $(DISSECTOR_OBJECTS) $(DISSECTOR_SUPPORT_OBJECTS)
!IF "$(MSVC_VARIANT)" != "MSVC2005EE" && "$(MSVC_VARIANT)" != "MSVC2005" && "$(MSVC_VARIANT)" != "MSVC2008EE" && "$(MSVC_VARIANT)" != "MSVC2008"
# Disable debug for large dissectors
@ -81,10 +81,10 @@ register.c: $(ALL_DISSECTORS_SRC)
@$(SH) ../../tools/make-dissector-reg . dissectors $(ALL_DISSECTORS_SRC) \
!ENDIF
packet-ncp2222.c : ncp2222.py
packet-ncp2222.c : ../../tools/ncp2222.py
!IFDEF PYTHON
@echo Making packet-ncp2222.c
$(PYTHON) ncp2222.py -o packet-ncp2222.c
$(PYTHON) ../../tools/ncp2222.py -o packet-ncp2222.c
!ELSE
@echo Faking packet-ncp2222.c...
@echo Python is required to build the NCP disector
@ -95,6 +95,12 @@ packet-ncp2222.c : ncp2222.py
packet-ncp2222.obj: packet-ncp2222.inc
# Target to rebuild the X11 dissector header files.
# See README.X11 before using this--it requires the xcb and mesa source.
x11-dissector: ../../tools/process-x11-fields.pl x11-fields ../../tools/process-x11-xcb.pl
$(PERL) ../../tools/process-x11-fields.pl < x11-fields
$(PERL) ../../tools/process-x11-xcb.pl
clean:
rm -f dissectors.lib *.pdb register.c-tmp register-cache.pkl \
$(DISSECTOR_OBJECTS) $(DISSECTOR_SUPPORT_OBJECTS)

View File

@ -14,10 +14,10 @@ it up to date. Please be aware that the Mesa repository is rather large; it is
slightly more than 53MB as of this writing.
Run the following:
perl5.10 ./process-x11-xcb.pl
make x11-dissector
This will automatically run process-x11-fields.pl (for the core protocol
definitions), and then it will process the XML descriptions from XCB and Mesa
to generate the extension dissectors.
definitions), and then it will run process-x11-xcb.pl to process the XML
descriptions from XCB and Mesa to generate the extension dissectors.
Once process-x11-xcb.pl is complete, compile wireshark as usual.
Once this is complete, compile wireshark as usual.

View File

@ -1,5 +1,5 @@
/* Do not modify this file. */
/* It was automatically generated by ./process-x11-fields.pl. */
/* It was automatically generated by ../../tools/process-x11-fields.pl. */
/* $Id$ */
/*
@ -480,7 +480,7 @@ static int hf_x11_window_value_mask_cursor = -1;
static int hf_x11_x = -1;
static int hf_x11_y = -1;
/* Generated by process-x11-xcb.pl below this line */
/* Generated by ../../tools/process-x11-xcb.pl below this line */
static int hf_x11_glx_render_CallList_list = -1;
static int hf_x11_glx_render_CallLists_n = -1;
static int hf_x11_glx_render_CallLists_type = -1;

View File

@ -1,5 +1,5 @@
/* Do not modify this file. */
/* It was automatically generated by process-x11-xcb.pl
/* It was automatically generated by ../../tools/process-x11-xcb.pl
using xcbproto version 1.5-4-ga507629 */
/* $Id$ */

View File

@ -1,5 +1,5 @@
/* Do not modify this file. */
/* It was automatically generated by process-x11-xcb.pl
/* It was automatically generated by ../../tools/process-x11-xcb.pl
using xcbproto version 1.5-4-ga507629 */
/* $Id$ */

View File

@ -1,5 +1,5 @@
/* Do not modify this file. */
/* It was automatically generated by process-x11-xcb.pl
/* It was automatically generated by ../../tools/process-x11-xcb.pl
using mesa version mesa_7_5_1-3181-gd9dc4cb */
/* $Id$ */

View File

@ -1,5 +1,5 @@
/* Do not modify this file. */
/* It was automatically generated by ./process-x11-fields.pl. */
/* It was automatically generated by ../../tools/process-x11-fields.pl. */
/* $Id$ */
/*
@ -480,7 +480,7 @@
{ &hf_x11_x, { "x", "x11.x", FT_INT16, BASE_DEC, NULL, 0, NULL, HFILL }},
{ &hf_x11_y, { "y", "x11.y", FT_INT16, BASE_DEC, NULL, 0, NULL, HFILL }},
/* Generated by process-x11-xcb.pl below this line */
/* Generated by ../../tools/process-x11-xcb.pl below this line */
{ &hf_x11_glx_render_CallList_list, { "list", "x11.glx.render.CallList.list", FT_UINT32, BASE_HEX_DEC, NULL, 0, NULL, HFILL }},
{ &hf_x11_glx_render_CallLists_n, { "n", "x11.glx.render.CallLists.n", FT_UINT32, BASE_HEX_DEC, NULL, 0, NULL, HFILL }},
{ &hf_x11_glx_render_CallLists_type, { "type", "x11.glx.render.CallLists.type", FT_UINT32, BASE_HEX, VALS(mesa_enum), 0, NULL, HFILL }},

View File

@ -83,30 +83,33 @@ PIDL_FILES= \
EXTRA_DIST = \
$(PIDL_FILES) \
WiresharkXML.py \
Makefile.nmake \
asn2wrs.py \
cvsdiff-fix.py \
dfilter-test.py \
extract_asn1_from_spec.pl \
extract_asn1_from_spec.pl \
fuzz-test.sh \
html2text.py \
html2text.py \
idl2wrs.sh \
idl2wrs.sh.in \
lex.py \
Makefile.nmake \
make-dissector-reg \
make-dissector-reg.py \
make-tap-reg.py \
msnchat \
native-nmake.cmd \
native-nmake.cmd \
ncp2222.py \
netscreen2dump.py \
pkt-from-core.py \
process-x11-fields.pl \
process-x11-xcb.pl \
runlex.sh \
setuid-root.pl.in \
unix2dos.pl \
win32-setup.sh \
wireshark_be.py \
wireshark_gen.py \
WiresharkXML.py \
yacc.py
noinst_SCRIPTS = setuid-root.pl

View File

@ -1099,7 +1099,8 @@ eot
}
# initialize core X11 protocol
system('./process-x11-fields.pl < x11-fields');
# Do this in the Makefile now
#system('./process-x11-fields.pl < x11-fields');
# Extension implementation
$impl = new IO::File '> x11-extension-implementation.h'