diff options
author | Michael Mann <mmann78@netscape.net> | 2014-03-18 13:21:51 -0400 |
---|---|---|
committer | Anders Broman <a.broman58@gmail.com> | 2014-03-19 05:04:54 +0000 |
commit | 04d950130624c14ac8af39c621f69851d8088ed6 (patch) | |
tree | ec315eb356b27def24a385b7b5aa8bdf72529b11 /docbook/make-wsluarm.pl | |
parent | d832cb18db4e152177cf13673385288987ba9448 (diff) | |
download | wireshark-04d950130624c14ac8af39c621f69851d8088ed6.tar.gz |
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>
Diffstat (limited to 'docbook/make-wsluarm.pl')
-rwxr-xr-x | docbook/make-wsluarm.pl | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/docbook/make-wsluarm.pl b/docbook/make-wsluarm.pl index 5c0b8db740..c4a06d21ff 100755 --- a/docbook/make-wsluarm.pl +++ b/docbook/make-wsluarm.pl @@ -40,8 +40,16 @@ sub gorolla { my $s = shift; $s =~ s/^([\n]|\s)*//ms; $s =~ s/([\n]|\s)*$//ms; + # as far as I can tell, these will only convert the *first* '<'/'>' they find in a line, but + # not subsequent ones in that line (because the flag isn't 'msg'?) -hadriel $s =~ s/\</</ms; $s =~ s/\>/>/ms; + # this is a horrible horrible hack, but it works + # basically we undo the replacements just made above, if it's a '</para>' or '<para>' case + # so that comments can include them for prettier output. Really this API generator thing needs + # to be rewritten, but I don't understand perl well enough to do it properly -hadriel + $s =~ s/<\/para>/<\/para>/ms; + $s =~ s/<para>/<para>/ms; $s; } |