Commit Graph

64 Commits

Author SHA1 Message Date
Hadriel Kaplan 0caf0616ba Lua: split up wslua files into class-based files
The size of some of the wslua source files has grown large, and it's hard
to quickly find things. So split them up based on class name, as much as
seems reasonable. Also have the make-wsluarm.pl Perl script handle this.

Change-Id: Ib495ec5c2a4df90495c0a05504856288a0b09213
Reviewed-on: https://code.wireshark.org/review/9579
Petri-Dish: Hadriel Kaplan <hadrielk@yahoo.com>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Hadriel Kaplan <hadrielk@yahoo.com>
2015-07-12 02:08:24 +00:00
Graham Bloice e15513be9d Fix Windows asciidoc build
Replace some unixisms with CMake equivalents

Change-Id: I8dc125e830cdf7c31b13539c0a86df736097afef
Reviewed-on: https://code.wireshark.org/review/8208
Petri-Dish: Gerald Combs <gerald@wireshark.org>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Gerald Combs <gerald@wireshark.org>
Reviewed-by: Graham Bloice <graham.bloice@trihedral.com>
2015-04-28 15:43:48 +00:00
Gerald Combs 3ac9921065 Retire git_version.xml.
Remove check_git_version.sh and its associated targets. We haven't used
git_version.xml since the AsciiDoc conversion.

Change-Id: I480f0094c4355d71201f2dd285198581bbbfc415
Reviewed-on: https://code.wireshark.org/review/8104
Petri-Dish: Gerald Combs <gerald@wireshark.org>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2015-04-17 17:02:22 +00:00
Gerald Combs 6dd1296b76 WSUG: Update the Packet Colorization section.
Change-Id: I0f880293bd185e202d230f0db1a6bc4cbe6cfbfb
Reviewed-on: https://code.wireshark.org/review/7011
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2015-02-07 19:23:11 +00:00
Gerald Combs 9a19d6de54 CMake: Look for FOP and HHC only when needed.
FOP is only required for generating PDF output and HHC is only needed
for CHM output. Don't look for them unconditionally.

Change-Id: I7bec7d061c9e9e8b99431cab873e8c719469552c
Reviewed-on: https://code.wireshark.org/review/6539
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2015-01-14 23:27:41 +00:00
Graham Bloice b4f5b6e72b Update CMake "Project names" and Folders
This gives a more structured layout in Visual Studio

Change-Id: I0da87a3e5ec759c69aeee031366cf287485cdac2
Reviewed-on: https://code.wireshark.org/review/6485
Reviewed-by: Graham Bloice <graham.bloice@trihedral.com>
Tested-by: Graham Bloice <graham.bloice@trihedral.com>
2015-01-11 00:09:14 +00:00
Gerald Combs 4f658999e6 CMake: Migrate to hhc.cmake.
Remove FindHHC.cmake in favor of CMake's FindHTMLHelp. Remove the
hhc.cmd wrapper.

Change-Id: I548e58d2264c74596e9067d5053b056c35089b3c
Reviewed-on: https://code.wireshark.org/review/6449
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2015-01-09 17:49:37 +00:00
Gerald Combs cd7408e526 CMake: Enable DocBook on Windows.
Add a wrapper script and CMake macros which lets us run Cygwin's a2x
from Windows. Add *another* wrapper script that ignores the return value
of hhc.exe.

Move the ASCIIDOC2DOCBOOK macro to FindASCIIDOC.cmake. Add FindHHC.cmake.
Add hints to FindFOP.cmake.

Use unique file names in the HTML Help chain in an attempt to avoid a
race condition.

To do:
- Fix curly quote in HHC title.

Change-Id: I9b154b7fbd02703656e2ab380199ec0a6db4e36d
Reviewed-on: https://code.wireshark.org/review/6379
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2015-01-08 22:05:38 +00:00
Gerald Combs 1ce64e75ab CMake: Make it easier to generate the release notes & NEWS.
Add convenience targets for generating the release notes and the NEWS
file. Make sure we don't run multiple instances of a2x + AsciiDoc at the
same time.

Add the docbook directory to the build by default unless we're running
Windows. Explain why we don't yet build docs on Windows. Make each
docbook makefile target optional.

Split the ENABLE_GUIDES option into ENABLE_HTML_GUIDES and
ENABLE_PDF_GUIDES. Add a default "all_guides" target if either is on.
Remove the Debian patch that hacked around the PDF requirement.

Copy ws.css to the docbook build directory. Don't build PDF release
notes. I'm not sure we ever used them and I don't want to install Java
and FOP just to make a release.

Change-Id: Ia2f710000c17f9e0b4b514fd373d9a5902889553
Reviewed-on: https://code.wireshark.org/review/5712
Petri-Dish: Gerald Combs <gerald@wireshark.org>
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2014-12-11 21:41:44 +00:00
Gerald Combs 62289300d6 Finish converting the User's Guide to AsciiDoc.
As with the Developer's Guide, add user-guide-docinfo.xml, which lets us
carry over DocBook front matter. Remove the meta_info chapter. Most of
its contents are now in user-guide-docinfo.xml. Add a DocBook revision
history based on hints from the Git/SVN/CVS revision history.

Remove the various makefile targets for converting AsciiDoc files to
DocBook chapters. Remove GPL_appendix.xml. We use the AsciiDoc version.

Change-Id: I543fa2a92f2c735c5f00c97ec65cff2187e09e3a
Reviewed-on: https://code.wireshark.org/review/5216
Petri-Dish: Gerald Combs <gerald@wireshark.org>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2014-11-10 05:30:10 +00:00
Gerald Combs 3924310d86 WSUG: Convert ``Command Line Tools'' to AsciiDoc.
Move the idl2wrs section to the Developer's Guide. Leave most of the
other content intact for now.

Change-Id: I98c6eeab62af5cc55e3ce23ab1107df02b1a22cf
Reviewed-on: https://code.wireshark.org/review/5214
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2014-11-09 19:41:44 +00:00
Gerald Combs b41f0c3257 WSUG: Convert ``Troubleshooting'' to AsciiDoc.
The chapter is disabled so its final output hasn't been checked. Leave
most of the content intact for now.

Change-Id: I2147ee2863e7ededadf892794a836b4dc8055649
Reviewed-on: https://code.wireshark.org/review/5211
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2014-11-09 18:25:10 +00:00
Gerald Combs f8f915c248 WSUG: Convert ``Protocols'', ``Messages'', and ``How Wireshark Works''
to AsciiDoc.

``How Wireshark Works'' is disabled, so its final output hasn't been
checked.

Leave most of the content intact for now.

Change-Id: Ia78951faa3ffd9c6d2e23067dbfb954ab4042f60
Reviewed-on: https://code.wireshark.org/review/5210
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2014-11-09 18:17:15 +00:00
Gerald Combs d8a0757674 WSUG: Convert ``Files'' to AsciiDoc.
Leave most of the content intact for now.

Change-Id: I78f47b8310cb41ac5a07d352e56ec907b36665f8
Reviewed-on: https://code.wireshark.org/review/5209
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2014-11-09 17:44:35 +00:00
Gerald Combs 04aad36c0e Convert the Lua reference to AsciiDoc.
Move it to the Developer's Guide while we're here.

Nudge the markup in epan/wslua where needed. Note that we should
probably convert it to AsciiDoc (if we're going to keep it in the DG) or
Doxygen.

Change-Id: Ie175111043f98b7a37eeeb8d185a833d8e866f8b
Reviewed-on: https://code.wireshark.org/review/5203
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2014-11-09 05:12:09 +00:00
Gerald Combs f8c3f15613 WSUG: Convert ``Customizing'' to AsciiDoc.
Leave most of the content intact for now.

Change-Id: Id00d942f87e0a25e27333ac56eb9b99311694a13
Reviewed-on: https://code.wireshark.org/review/5063
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2014-11-02 03:54:14 +00:00
Gerald Combs f20d5d7bd3 WSUG: Convert ``Telephony'' to AsciiDoc.
Leave most of the content intact for now.

Change-Id: I21aad681194d1bb1841e29f4ac41be4677fcb909
Reviewed-on: https://code.wireshark.org/review/3939
Petri-Dish: Gerald Combs <gerald@wireshark.org>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2014-09-01 14:44:26 +00:00
Gerald Combs af3e2dbdc6 WSUG: Convert ``Advanced Topics'' to AsciiDoc.
Leave most of the content intact for now.

Change-Id: Ie91fda8a3fe6ea2eb4c47acf7c41d7e6979235b0
Reviewed-on: https://code.wireshark.org/review/3938
Petri-Dish: Gerald Combs <gerald@wireshark.org>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2014-09-01 05:16:14 +00:00
Gerald Combs 5e6e0600c5 WSUG: Convert ``Working with captured packets'' to AsciiDoc.
Leave most of the content intact for now.

Change-Id: Ic264814aa8e442df100ae8533098843ef6a2e6c9
Reviewed-on: https://code.wireshark.org/review/3937
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2014-09-01 02:38:16 +00:00
Gerald Combs eb14a1f932 WSUG: Convert the ``File I/O'' chapter to AsciiDoc.
Leave most of the content intact for now. Remove images for
no-longer-supported versions of GTK+. Add an example for building the
Guides to README.cmake.

Change-Id: Id9e6a308c91b594d1fb7f107d7b9b28074a92a8b
Reviewed-on: https://code.wireshark.org/review/3931
Petri-Dish: Gerald Combs <gerald@wireshark.org>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2014-09-01 01:07:08 +00:00
Joerg Mayer 1c98a1261b WSUG_chapter_capture is now an asciidoc file that gets converted
into an xml file.

Change-Id: I43ae59d14cbdcf460250cf62005aea4a2772d11f
Reviewed-on: https://code.wireshark.org/review/3846
Reviewed-by: Jörg Mayer <jmayer@loplof.de>
2014-08-25 22:42:11 +00:00
Gerald Combs d31011572d Convert admon graphics to SVG.
Use a common set of SVG files for AsciiDoc / DocBook admonition
graphics. Put them in a common directory. According to
http://caniuse.com/svg all common browsers have had SVG support for
a while now.

The graphics themselves were created with Inkscape. If you would like
to refine them further you are more than welcome.

Use variables to assemble xsltproc commands in Autotools and Nmake
while we're here.

Try to update Debian rules to reflect ga92c3fb.

Change-Id: If82647af27a60117c517125dff0aca81c033be72
Reviewed-on: https://code.wireshark.org/review/3206
Petri-Dish: Gerald Combs <gerald@wireshark.org>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2014-08-24 02:56:35 +00:00
Gerald Combs a92c3fb2fa CMake: More a2x / asciidoc fixes.
Create graphics directories and copy files into them similar
to Autotools and Nmake. Adjust some xsltproc arguments. Fix the
--asciidoc-opts flag.

Note: Admon graphics are broken pending change 3206.

Change-Id: I94d498de36150a7cb4ffd080581523300b222bd4
Reviewed-on: https://code.wireshark.org/review/3805
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2014-08-24 00:11:32 +00:00
Gerald Combs 02c5a12ee4 WSUG: Convert the "User Interface" chapter to AsciiDoc.
Add the "asciidoc.conf" compatibility configuration file from
Asciidoctor. Although we don't use Asciidoctor it gives us macros that
keep us from losing some useful DocBook elements. Update various CMake
files to support multiple AsciiDoc configuration files.

Leave most of the content intact for now. Hopefully the other chapters
aren't as laden with markup.

Change-Id: Id69757342b86abb2b3130cb61e90f5695a26ea8a
Reviewed-on: https://code.wireshark.org/review/3680
Petri-Dish: Gerald Combs <gerald@wireshark.org>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2014-08-23 18:32:51 +00:00
Gerald Combs 43eea3cfe8 Convert the Statistics chapter to AsciiDoc.
Don't update any content for now.

Change-Id: Ib4f6402d9b23bd1ad57a57831b63c63a150391aa
Reviewed-on: https://code.wireshark.org/review/3372
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2014-08-02 23:23:11 +00:00
Gerald Combs a722f83ff1 Convert the build and install chapter to AsciiDoc.
Add OS X content. Remove GTK+ content. Update the names in the NSIS
package to match the documentation (untested).

Change-Id: Id8fd08982bc26871bb8a319b0319808bcdba878c
Reviewed-on: https://code.wireshark.org/review/3366
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2014-08-02 21:05:01 +00:00
Gerald Combs 700a474d3b Start converting the User's Guide to AsciiDoc.
Convert the preface and introduction. Update various makefiles.

Change-Id: Id998cabadb6de458f04b7a43bdba4f98e4edb052
Reviewed-on: https://code.wireshark.org/review/3139
Reviewed-by: Gerald Combs <gerald@wireshark.org>
Tested-by: Gerald Combs <gerald@wireshark.org>
2014-07-21 15:31:16 +00:00
Joerg Mayer fc13d22854 Fix typo that would have hit once conversion of the users guide to
asciidoc would have started

Change-Id: Ie4f79bbf65a56a83995c70eb864d2476885c9170
Reviewed-on: https://code.wireshark.org/review/1966
Reviewed-by: Jörg Mayer <jmayer@loplof.de>
2014-06-04 23:20:38 +00:00
Joerg Mayer 5defb48d9a Do not rebuild developers-guide.xml on each run. Do this only when
required.

Change-Id: I525c09e78c385593a7132ad3bfbca1114ea0de8b
Reviewed-on: https://code.wireshark.org/review/1965
Reviewed-by: Jörg Mayer <jmayer@loplof.de>
2014-06-04 23:05:27 +00:00
Alexis La Goutte 757aa33220 Continue to remove $Id$ from top of file
(Using sed : sed -i '/^\# \$Id\$/,+1 d') (start with dash)

Change-Id: Ia4b5a6c2302f6a531f6a86c1ec3a2f8205c8c2dd
Reviewed-on: https://code.wireshark.org/review/881
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2014-03-31 18:48:06 +00:00
Hadriel Kaplan 8c2bb80574 Add various functions for Lua directory handling and path info
This adds new functions to get plugins path info, find out if a directory
exists, make a new one, remove one, etc. It also creates a file environment
for user-supplied Lua scripts, to prevent global variable contamination as
well as supply the script-specific file name.  Some other minor cleanup was
done as I found them.

A new testsuite was added to test the existing and new directory functions.

Change-Id: I19bd587b5e8a73d89b8521af73670e023314fb33
Reviewed-on: https://code.wireshark.org/review/832
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2014-03-26 07:37:34 +00:00
Michael Mann 04d9501306 Add capture file reader/writer support for Lua so scripts can implement new capture file formats.
This enables a Lua script to implement a brand new capture file format reader/writer, so that for example one could write a script to read from vendor-specific "logs" of packets, and show them as normal packets in wireshark.

Change-Id: Id394edfffa94529f39789844c382b7ab6cc2d814
Reviewed-on: https://code.wireshark.org/review/431
Reviewed-by: Hadriel Kaplan <hadrielk@yahoo.com>
Reviewed-by: Michael Mann <mmann78@netscape.net>
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2014-03-19 05:04:54 +00:00
Hadriel Kaplan ea46cdc474 Add GLib's regex library into Lua
While Lua's built-in pattern support is ok for simple things, many people end
up wanting a real regex engine. Since Wireshark already includes the GLib
Regex library (a wrapper for PCRE), it makes sense to expose that library to
Lua scripts. This has been done using Lrexlib, one of the most popular regex
bindings for Lua. Lrexlib didn't support binding GLib's Regex in particular -
it does for PCRE but GLib is a different API - so I've done that. A fairly
thorough testsuite came along with that, which has been incorporated into the
wireshark wslua testuites as well in this commit.

Change-Id: I05811d1edf7af8d7c9f4f081de6850f31c0717c7
Reviewed-on: https://code.wireshark.org/review/332
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2014-03-10 07:11:12 +00:00
Hadriel Kaplan c4f1777a97 Adds support for Lua struct library so one can pack/unpack binary structures
This is based on Roberto Ierusalimschy's struct library, along with additional
options based on Flemming Madsen's patch to the lua-users mailing list, and
some changes I made to support 64-bit integer packing/unpacking.  Details
are in the top comments for wslua_struct.c.  This also includes a test script.

Change-Id: Ifcd0116ba013d5c760927721c8d6e9f28965534b
Reviewed-on: https://code.wireshark.org/review/98
Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
Tested-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
2014-02-14 10:11:50 +00:00
Gerald Combs 5e3113e7c9 Finish converting the Developer's Guide to AsciiDoc.
Add developer-guide-docinfo.xml, which lets us carry over DocBook front
matter. Remove the meta_info chapter. Most of its contents are now in
developer-guide-docinfo.xml. Add a DocBook revision history based on
hints from the Git/SVN/CVS revision history.

Comment out or note makefile content that's no longer necessary for
converting the Developer's Guide but will be useful for converting the
User's Guide. Fix building the release notes with CMake. Other minor
changes. Tested with Autotools, nmake, and CMake.

Change-Id: Ib6d50c821ca906fff50a84ad4d6af3212ebdff0a
Reviewed-on: https://code.wireshark.org/review/155
Reviewed-by: Gerald Combs <gerald@wireshark.org>
Tested-by: Gerald Combs <gerald@wireshark.org>
2014-02-11 18:04:45 +00:00
Gerald Combs 1dc06a2681 Convert the user interface chapter to AsciiDoc.
Start mentioning Qt. Update and add HIG links.

Change-Id: Iac984045b03a96862981d58ff63c9ee6bcdbbce8
Reviewed-on: https://code.wireshark.org/review/127
Tested-by: Wireshark Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2014-02-06 20:59:00 +00:00
Hadriel Kaplan 2e7f771a18 Adds support for Lua Int64 and UInt64 operators, functions, and general
usefulness, working around bug #9162 until Lua 5.3 is released.

The existing Int64 and UInt64 classes provide virtually no
usefullness, other than for creating a string of their value.  While
one could then write Lua code to convert the string to Lua numbers and
such, ultimately Lua has no native 64-bit integer support, making such
a task difficult to handle in Lua.  This change adds a host of
functions and operators to the existing Int64 (gint64) and UInt64
(guint64) classes, to enable true 64-bit integer support on par with
native Lua numbers.

A test script is also provided, which tests the functions/operators.

Change-Id: I4c5f8f5219b9a88198902283bd32ddf24c346bbe
Reviewed-on: https://code.wireshark.org/review/83
Tested-by: Evan Huus <eapache@gmail.com>
Reviewed-by: Evan Huus <eapache@gmail.com>
2014-02-04 00:37:46 +00:00
Gerald Combs 4dd6451a91 Convert the dissection chapter to AsciiDoc.
Change-Id: Ieccd2ad235576b9ec6013ddb23a8373ccf2f8cdf
Reviewed-on: https://code.wireshark.org/review/92
Reviewed-by: Gerald Combs <gerald@wireshark.org>
Tested-by: Gerald Combs <gerald@wireshark.org>
2014-02-03 18:32:32 +00:00
Gerald Combs 1b2145d931 Convert three more WSDG chapters: works, build, and capture.
Start adding references to Qt and wsutil. Fix a file extension in
CMakeLists.txt.

Change-Id: I0cbe7e802d88a05effff40b5de72669e22c0df53
Reviewed-on: https://code.wireshark.org/review/79
Reviewed-by: Gerald Combs <gerald@wireshark.org>
Tested-by: Gerald Combs <gerald@wireshark.org>
2014-02-02 19:12:17 +00:00
Gerald Combs ec6fc7690b Convert the libraries chapter to AsciiDoc.
Add some docbook-related entries to .gitignore. Whoever maintains the
Windows libraries has done a terrible job of keeping this chapter up to
date.

Change-Id: Ic6dcbd9e8369eae9f07403bd3f805a515886f542
Reviewed-on: https://code.wireshark.org/review/72
Reviewed-by: Gerald Combs <gerald@wireshark.org>
Tested-by: Gerald Combs <gerald@wireshark.org>
2014-02-01 19:30:01 +00:00
Gerald Combs bdafbad955 Convert the tools chapter to AsciiDoc.
Replace SVN text with Git, other mostly-minor edits.

Change-Id: I41b602cc9334656dc8e5f37c33fb6cd660043d17
Reviewed-on: https://code.wireshark.org/review/69
Reviewed-by: Gerald Combs <gerald@wireshark.org>
Tested-by: Gerald Combs <gerald@wireshark.org>
2014-02-01 18:27:15 +00:00
Gerald Combs 257e301696 Convert the quick setup chapter to AsciiDoc and start converting its
content to Git.

svn path=/trunk/; revision=54985
2014-01-27 18:43:57 +00:00
Gerald Combs 5344e2f2fc Migrate the build environment introduction to AsciiDoc.
svn path=/trunk/; revision=54971
2014-01-27 04:20:44 +00:00
Gerald Combs e61a6533e7 Convert the preface to AsciiDoc with minor edits.
svn path=/trunk/; revision=54970
2014-01-27 03:08:01 +00:00
Gerald Combs 927914a2cf Fix xpath selector. Clean up whitespace.
svn path=/trunk/; revision=54955
2014-01-25 01:09:28 +00:00
Gerald Combs c57ac03e65 Try to get CMake to build the Developer Guide again. I don't have
dblatex installed so the release notes fail to build but the WSDG
targets appear to work.

svn path=/trunk/; revision=54952
2014-01-25 00:17:19 +00:00
Jörg Mayer c86c9ed709 Looks like the asciidoc stuff is wip and breaks cmake builds.
Comment it out for now.

svn path=/trunk/; revision=54937
2014-01-24 06:42:49 +00:00
Gerald Combs a9ddc06adc Prepare for conversion of Guide chapters to AsciiDoc.
svn path=/trunk/; revision=54936
2014-01-24 01:10:10 +00:00
Gerald Combs 2b26c1e216 Prepare for Git migration.
Mass-replace "svn" with "git". Add commented code to use git to fetch
the repository version.

svn path=/trunk/; revision=54905
2014-01-22 18:15:44 +00:00
Jörg Mayer ec34959796 Add generation of release notes.
Regenerate NEWS file

svn path=/trunk/; revision=53014
2013-11-01 09:55:26 +00:00