Commit Graph

180 Commits

Author SHA1 Message Date
Bill Meier 6bdb92dd8a Use consistent indentation & formatting style.
svn path=/trunk/; revision=47727
2013-02-18 01:59:17 +00:00
Bill Meier 1c289aa89a Don't use index as a variable name (i knew that..).
Fixes compiler warning.

svn path=/trunk/; revision=47726
2013-02-18 01:18:51 +00:00
Bill Meier e7ff4a79c0 Implement proto_tree_write_fields without using ep_strbufs.
- Fixes https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=8348:
   "tshark -T fields can't print the full value of fields where the value,
    as a text string, is longer than 65535 bytes"
- Reduces ep memory allocation & string copies;


svn path=/trunk/; revision=47724
2013-02-18 00:51:59 +00:00
Pascal Quantin c246a087df Fix https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=8027 :
Fix tshark hex bytes output

svn path=/trunk/; revision=46557
2012-12-16 09:52:40 +00:00
Michael Mann 40eca5f0de Allow TShark to specify columns as fields with -e option (https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=2892)
svn path=/trunk/; revision=46465
2012-12-08 02:42:40 +00:00
Gerald Combs 606a7433ce Add changes missing from the last commit.
svn path=/trunk/; revision=45862
2012-11-01 21:17:29 +00:00
Chris Maynard 573dd5b3dc 1) Allow for the possibility for both packet summary and packet details to be
printed when either -T is not specified or "-T text" or "-T ps" is selected.

2) Allow for packet hex/ascii to be printed without necessarily requiring that
either packet summary or packet details also be printed.  This just means that
if you want packet summary information, use "-Px" instead of just "-x".

3) Fix bug with order of evaluation of -V and "-T psml".

4) If a packet separator is specified, always use it regardless of the -PVx
options chosen.

5) Don't print 2 lines of separation between packets when only printing
hex/ascii.  Print 1 line of separation as in all other cases.

Fixes https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=7782 plus other misc. enhancements.

svn path=/trunk/; revision=45715
2012-10-22 15:56:59 +00:00
Jakub Zawadzki b53dbea042 Make data_source opqaue, add getter for tvb.
svn path=/trunk/; revision=45672
2012-10-20 19:54:56 +00:00
Jeff Morriss 3551a86c36 We always HAVE_CONFIG_H so don't bother checking whether we have it or not.
svn path=/trunk/; revision=45015
2012-09-20 01:29:52 +00:00
Evan Huus 471b4d94ef Remove string constants from g_assert() calls, as per thread on wireshark-dev:
http://www.wireshark.org/lists/wireshark-dev/201209/msg00030.html

svn path=/trunk/; revision=44774
2012-09-05 01:44:09 +00:00
Jakub Zawadzki bf81b42e1e Update Free Software Foundation address.
(COPYING will be updated in next commit)

svn path=/trunk/; revision=43536
2012-06-28 22:56:06 +00:00
Jakub Zawadzki 8a1dc57c03 Remove doubled semicolons and semicolons outside function.
svn path=/trunk/; revision=42053
2012-04-13 20:22:31 +00:00
Chris Maynard 0a1072b083 Treat expert info as a <field> instead of a <proto> when exporting to pdml.
svn path=/trunk/; revision=40204
2011-12-14 21:13:06 +00:00
Chris Maynard e3834e30b3 Don't close the field tag here; it's now closed with </field>.
svn path=/trunk/; revision=40184
2011-12-13 20:07:21 +00:00
Chris Maynard c3a535a5bf Add missing </field> for data tree. Fixes https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=3809
svn path=/trunk/; revision=40162
2011-12-12 19:24:49 +00:00
Chris Maynard 1153ff7b56 Fix incorrect "pos=0" pdml values. Resolves the issue reported in comment 4 of https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=2432 and closes the bug.
svn path=/trunk/; revision=40161
2011-12-12 18:35:49 +00:00
Chris Maynard 36074c9828 Export all data sources of a frame to a C array. Fixes https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=4988
svn path=/trunk/; revision=40136
2011-12-09 19:44:28 +00:00
Stig Bjørlykke 6a15feffa2 Check for valid filename in write_pdml_preamble().
Part of fix for bug 6245.

svn path=/trunk/; revision=38563
2011-08-16 13:42:08 +00:00
Gerald Combs 99d4de66e5 From Dirk Jagdmann via bug 5875:
My attachment adds a link to a XSLT file to the preamble of the PDML.
The XSLT will transform the PDML to a HTML page, and the HTML page
features a look similar to Wireshark. See
http://cubic.org/~doj/ebay/a.pdml for an example.

The patch also contains a small perl program which converts the
Wireshark colortable into javascript code which is used in the XSLT
file. If you want to use a different color scheme you would execute the
perl program and insert the generated javascript function into your XSLT
file.

To view the HTML you could either place the PDML and XSLT file on your
webserver and verify that your webserver sends the PDML file as
"text/xml".  Then your webbrowser will find the linked XSLT file,
download that as well and convert the PDML to HTML on the fly.

You could also use an XSLT processor like xsltproc to convert the PDML
and XSLT into a static HTML file.


From me:

Minor fixups.

svn path=/trunk/; revision=37298
2011-05-19 18:10:21 +00:00
Guy Harris 1372515b02 More eradication of old-style function definitions.
svn path=/trunk/; revision=37216
2011-05-17 22:18:32 +00:00
Jeff Morriss 2a7adf624a Once we start printing an "opened up" (tshark -O) tree, print the entire
subtree.  Otherwise subitems whose abbreviation doesn't match the protocol name
(such as text items) won't get printed.

svn path=/trunk/; revision=36983
2011-05-04 15:24:14 +00:00
Stig Bjørlykke 65910b2479 From Edwin Groothuis via bug 5870:
The supplied patch adds a new option -O, which specifies a list of protocols
(names can be found with the "-G protocols" option) to be fully decoded while
the others only show the layer header.

svn path=/trunk/; revision=36947
2011-04-29 06:53:29 +00:00
Stig Bjørlykke 2e4ae4108f Added a sanity check in output_fields_set_option.
Coverity 552.

svn path=/trunk/; revision=36351
2011-03-26 15:39:35 +00:00
Chris Maynard 9ded159b40 Fix gcc warning. (Sorry, but VS2008EE complains a LOT less.)
svn path=/trunk/; revision=34809
2010-11-08 17:54:32 +00:00
Chris Maynard 3100cc2d40 Ensure strings are properly quoted for CSV output. Fixes bug 1297.
svn path=/trunk/; revision=34806
2010-11-08 17:05:30 +00:00
Jeff Morriss e17b9ccec1 Rev 29427 added packet_add_new_data_source() with a comment indicating that
the data source does not need to be allocated if (!tree).

Rev 30158 took the if (!tree) check out indicating that the check was invalid.

So: (since packet_add_new_data_source() now only calls add_new_data_source()),
remove packet_add_new_data_source().

svn path=/trunk/; revision=34717
2010-10-30 16:00:30 +00:00
Stig Bjørlykke 0b7c31a5eb Ensure we always print the heading when dumping PSML and CSV.
svn path=/trunk/; revision=34039
2010-09-01 20:54:41 +00:00
Stig Bjørlykke 6d5dfbffb3 Check input string in ps_clean_string().
This fixes bug 5148.

svn path=/trunk/; revision=33941
2010-08-26 20:22:28 +00:00
Jaap Keuter 9969691f49 Change font for packet information from Courier to Monaco.
svn path=/trunk/; revision=33773
2010-08-11 21:23:49 +00:00
Sake Blok e10147fb73 Add an option to print the first, the last or all occurrences of each field
(when using tshark -T fields)


svn path=/trunk/; revision=33529
2010-07-14 21:53:57 +00:00
Sake Blok 83a027afb8 Oops... forgot to update the "-E usage" text
svn path=/trunk/; revision=33528
2010-07-14 21:05:11 +00:00
Sake Blok 717abac483 Make 'tshark -T fields' print all values for fields with multiple occurences.
svn path=/trunk/; revision=33527
2010-07-14 20:28:34 +00:00
Guy Harris 927b7da346 Have abs_time_to_str() and abs_time_to_str_secs() take an additional
argument indicating whether to include the time zone in the string.  If
we're constructing a display filter, don't include the time zone,
otherwise do.  Fixes bug 4756.

svn path=/trunk/; revision=32913
2010-05-21 06:33:25 +00:00
Guy Harris e1b6881286 Squelch some compiler warnings.
svn path=/trunk/; revision=32165
2010-03-11 00:36:45 +00:00
Jeff Morriss b85acc1e2f Fix https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=4402 :
Escape all non-printable characters so that we generate valid PDML.

svn path=/trunk/; revision=31674
2010-01-26 01:40:10 +00:00
Jeff Morriss 9106b7351a Update the URL of the PDML spec
svn path=/trunk/; revision=31648
2010-01-24 22:11:31 +00:00
Bill Meier e0064797fb Use more unique names for certain enum constants.
(enum constant names are part of the global name space).
(Fixes at least one gcc -Wshadow warning).

svn path=/trunk/; revision=31572
2010-01-19 19:37:03 +00:00
Stephen Fisher 1fdc2edc99 Fix bug #1564: PSML - structure context node missing [when not displaying
packet #1 from the capture file]

This change keeps track of whether the <structure></structure> elements
and information in between have been shown yet, and if not, it shows them
once.  The previous behavior would only show it if packet #1 from the
capture file was being shown.


svn path=/trunk/; revision=31395
2009-12-31 19:08:59 +00:00
Guy Harris 4fde145bd2 Add an argument to abs_time_to_str() and abs_time_secs_to_str()
indicating whether the time should be shown as local time or UTC.  For
now, always pass FALSE, meaning "show as local time".

Clean up some stuff in the SNMP dissector, use abs_time_secs_to_str()
for times with one-second resolution, and update a comment in various
macros in the WSP dissector, while we're at it.

svn path=/trunk/; revision=31227
2009-12-10 22:19:29 +00:00
Stig Bjørlykke ccf7f1c257 Removed unnecessary assignment.
svn path=/trunk/; revision=30361
2009-10-06 13:23:07 +00:00
Stig Bjørlykke b97e72a89f Removed a redundant prototype.
svn path=/trunk/; revision=30298
2009-10-04 11:23:06 +00:00
Kovarththanan Rajaratnam f74d6337e3 Fix typo
svn path=/trunk/; revision=30291
2009-10-04 08:42:20 +00:00
Kovarththanan Rajaratnam f4db31c8d8 Introduce print_stream_ps_alloc() and start using it
svn path=/trunk/; revision=30164
2009-09-26 05:48:04 +00:00
Kovarththanan Rajaratnam a46d38a07d Introduce print_stream_text_alloc() and start using it
svn path=/trunk/; revision=30163
2009-09-26 05:25:42 +00:00
Kovarththanan Rajaratnam 8cba530c81 From Richard Brodie via. Bug 3913:
Free ptr array allocated through proto_find_finfo()

svn path=/trunk/; revision=29654
2009-09-01 17:09:36 +00:00
Kovarththanan Rajaratnam 27f7d88c84 Also fake empty field_info's by gracefully handling NULL field_info pointer elsewhere.
svn path=/trunk/; revision=29490
2009-08-21 11:03:30 +00:00
Kovarththanan Rajaratnam 7d44262406 This patch introduces packet_add_new_data_source() which effectively deprecates add_new_data_source(). This is based on the following observation:
1) The tvb + name (aka. data_source) is only used when the protocol tree is visible

The current implementation of add_new_data_source() doesn't take this into account and simply allocates a data_source regardless. This is what packet_add_new_data_source() tries to rectify.

A couple of dissectors have already been switched over to the new packet_add_new_data_source(). Many are still missing. Help appreciated!

svn path=/trunk/; revision=29427
2009-08-15 06:38:10 +00:00
Kovarththanan Rajaratnam 3512e485ca Add PNODE_FINFO. We've been using PITEM_FINFO on proto_node's. This works because proto_item is typedefed to proto_node. We shouldn't rely on this since this is an implementation detail.
svn path=/trunk/; revision=29354
2009-08-09 17:33:23 +00:00
Stig Bjørlykke 27572c22f4 From Kovarththanan Rajaratnam via bug 3702:
This patch optimizes the data source name processing in add_new_data_source()
by delaying it. We now simply store the constant string and lazily compute the
name when needed. This gives a performance boost because we only need the name
if we have multiple data sources.

svn path=/trunk/; revision=29066
2009-07-12 10:19:13 +00:00
Gerald Combs e648060f0f Fix the last(?) of the Win64 compilation problems.
svn path=/trunk/; revision=28065
2009-04-16 04:05:39 +00:00