Commit Graph

146 Commits

Author SHA1 Message Date
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
Sake Blok ff65240906 Add some more "copy" functionality:
- Enabled "Copy Description" in the main menu and gave it
  accelerator key CTRL+SHIFT+D

- Added "Copy Fieldname" to copy the fieldname of the selected
  field in the detail view (Acc.Key: CTRL+SHIFT+F)

- Added "Copy Value" to copy the value of the selected
  field in the detail view (Acc.Key: CTRL+SHIFT+V)

- Updated documentation to reflect the changes



svn path=/trunk/; revision=28006
2009-04-08 18:32:11 +00:00
Jaap Keuter 3b71d3fccb Group time related fields.
Drop packet length in favor of frame length.
Clean up code / indentations / header fields.
Improve docsis preference description.

svn path=/trunk/; revision=27329
2009-01-29 22:43:49 +00:00
Jaap Keuter cbf6045254 Improve title and remove Ethereal legacy.
svn path=/trunk/; revision=26850
2008-11-26 07:34:57 +00:00
Jaap Keuter 4fbf75f394 Fix for bug 2934.
Check that tvb backing is available before accessing it.

svn path=/trunk/; revision=26393
2008-10-09 06:24:24 +00:00
Jaap Keuter 18b69aef03 Really start printing in 8 pnt Courier, not just state so in the template.
Add Wireshark version info to the page header.

svn path=/trunk/; revision=25901
2008-08-01 17:36:09 +00:00
Jeff Morriss a5cee04fad Move the file utility functions from wiretap to libwsutil so that
libwireshark (and the plugins using those functions) do not depend on
wiretap on Windows.

While doing that, rename the eth_* functions to ws_*.

svn path=/trunk/; revision=25354
2008-05-22 15:46:27 +00:00
Bill Meier 5c848fcb57 Fix for bug #2518: 'tshark -Tfields -e data' Omits Last Character of Data
svn path=/trunk/; revision=25223
2008-05-03 22:33:51 +00:00
Stig Bjørlykke 5800abad46 From Francesco Fondelli (bug 2349):
Attached is a patch to export packets data as "C Arrays".  I often have
the need to [re]send data captured with wireshark using a raw/pf_packet socket.
Output format is one char[] per packet, it looks like almost the same as
the one produced by "Follow TCP stream".

svn path=/trunk/; revision=24604
2008-03-11 18:23:16 +00:00
Martin Mathieson 542913de9d When generating PDML, insert a fake protocol wrapper around top-level field items. This is to help preserve the PDML schema, and is discussed in bug 2226.
svn path=/trunk/; revision=24281
2008-02-07 11:45:30 +00:00
Stig Bjørlykke 47d744b59d More rewrite of prohibited APIs (sprintf, strcpy, strcat).
svn path=/trunk/; revision=24258
2008-02-03 15:38:20 +00:00
Guy Harris c856acafbd Clean up indentation.
Move some comments to make it a bit clearer what each branch of the if
handles.

svn path=/trunk/; revision=24161
2008-01-22 04:59:59 +00:00
Sake Blok 531879ad82 When using -T fields, print a "1" instead of nothing when a field of type FT_NONE is
present. This way, scripts can check for the presence of this type of fields.

(fixes bug 2210)


svn path=/trunk/; revision=24158
2008-01-22 00:56:55 +00:00
Martin Mathieson 432354c001 Don't write closing PDML tag for Data protocol - it uses simple (self-closing) tags.
Fixes bug 2185.

svn path=/trunk/; revision=24069
2008-01-12 00:34:17 +00:00
Stephen Fisher 8fd3ee0560 Remove almost all of the casts I committed recently and in place of
them, add -Wno-pointer-sign to CFLAGS when gcc will accept it.


svn path=/trunk/; revision=21253
2007-03-28 21:55:11 +00:00
Stephen Fisher 509883e3e9 From Doug Pratley:
The purpose of the patch is to provide a new output format (so it is
independent of -V): single line record per-packet with the fields chosen by the
user, with configuration options to control separator, quoting and whether a
header line is printed. It also extends some existing options behaviour (-c and
-a:filesize) so that they affect reading a file as well as writing one, so that
only the first <n> packets or bytes are read).


svn path=/trunk/; revision=21211
2007-03-26 20:17:05 +00:00
Stephen Fisher 2896811274 Fix about 150 warnings new to gcc 4.0 in the error on warning directories.
Comment out -Werror in plugins/asn1/ until warnings can be fixed.


svn path=/trunk/; revision=21158
2007-03-23 22:49:23 +00:00
Martin Mathieson 997e5415f9 Add separate union entries to fvalue.value for signed and unsigned
32-bit numbers.  Separate signed and unsigned accessors have been
added and used where appropriate.

Definitely not for 0.99.5.

svn path=/trunk/; revision=20472
2007-01-18 11:02:26 +00:00
Guy Harris d3fed959bc Have separate proto_construct_match_selected_string() and
proto_can_match_selected() routines, to more clearly separate the two
functions - but have them both call the same underlying routine, so
they both make the same decisions as to whether a match-selected string
can be constructed or not.

svn path=/trunk/; revision=19976
2006-11-24 18:25:23 +00:00
Guy Harris 37a6c02697 Rename proto_construct_dfilter_string() to
proto_construct_match_selected_string() to indicate what it does - and
have it return a Boolean indication of whether the string could be
built, returning the string through a pointer, and, if that pointer is
null, have it just return the Boolean and not construct the string.

Get rid of proto_can_match_selected() -
proto_construct_match_selected_string() can be used for that, which
means we have only one piece of code that knows whether a "match
selected" string can be constructed or not.

Have proto_construct_match_selected_string() support matching
zero-length FT_NONE (and FT_PCRE, but that shouldn't happen) fields even
if there's no epan_dissect_t, as such a match just checks whether the
field is present.

svn path=/trunk/; revision=19967
2006-11-23 21:16:46 +00:00
Guy Harris 0fe89db102 Revert the previous changes - the problem Paul Blankenbaker was fixing
was really a problem with bytes_repr_len() and zero-length FT_BYTES
fields, and it's not clear what to do about fields that have zero
length.  (Put in a comment about that.)

Clean up indentation a bit.

svn path=/trunk/; revision=19864
2006-11-07 21:04:41 +00:00
Guy Harris 4c2f1f7ccb Based on a change from Paul Blankenbaker, make the "show" attribute for
a field an empty string if the field is zero-length; for some reason,
the existing code doesn't handle that correctly.

Also, the NetPDL Visualization Extension:

	http://www.nbee.org/Docs/NetPDL/NetPDLVisualization.htm

seems to imply that "value" has to be present, so display it even if the
field is zero-length.

svn path=/trunk/; revision=19862
2006-11-07 19:49:58 +00:00
Martin Mathieson 268f9c37d6 Fix for (already-closed) bug 1180
svn path=/trunk/; revision=19737
2006-10-30 09:50:39 +00:00
Jaap Keuter 4875880d84 Fix bug 1173, remove the space after the comma in CSV lines
svn path=/trunk/; revision=19660
2006-10-22 14:28:54 +00:00
Martin Mathieson 86e32d4b90 Remove extra double quote from fix to bug 1110
svn path=/trunk/; revision=19347
2006-09-28 09:27:28 +00:00
Martin Mathieson 9a47cb27c7 Fix PDML export problem for FT_NONE fields (bug 1110)
svn path=/trunk/; revision=19334
2006-09-27 09:48:42 +00:00
Ulf Lamping 962bf89b4a print generated items in brackets [], just as we do it on the screen
svn path=/trunk/; revision=18783
2006-07-22 11:29:17 +00:00
Anders Broman f68d6e4c8c Ethereal->Wireshark
svn path=/trunk/; revision=18235
2006-05-28 20:28:20 +00:00
Ronnie Sahlberg f0b33a4789 ethereal->wireshark updates
svn path=/trunk/; revision=18206
2006-05-22 08:14:01 +00:00
Ronnie Sahlberg 89f022b12b name change
svn path=/trunk/; revision=18197
2006-05-21 05:12:17 +00:00
Ulf Lamping c3187174bf replace *a lot* of file related calls by their GLib counterparts. This is necessary for the switch to GTK 2.6 (at least on WIN32).
to do this, I've added file_util.h to wiretap (would file_compat.h be a better name?), and provide compat_macros like eth_open() instead of open(). While at it, move other file related things there, like #include <io.h>, definition of O_BINARY and alike, so it's all in one place.

deleted related things from config.h.win32

As of these massive changes, I'm almost certain that this will break the Unix build. I'll keep an eye on the buildbot so hopefully everything is working again soon.

svn path=/trunk/; revision=16403
2005-11-06 22:43:25 +00:00
Gerald Combs 4ba7a9a429 In print_hex_data(), bail out early if our length is zero.
svn path=/trunk/; revision=15088
2005-07-26 15:28:39 +00:00
Jörg Mayer 30a8557868 More 'char*' -> 'const char*' changes to fix warnings.
svn path=/trunk/; revision=15015
2005-07-23 11:41:25 +00:00
Gilbert Ramirez 06dda2e83e Put 'unmaskedvalue' field in XML for bit-masked values.
Fix interpretation of 'value' field.
Patch from Vasanth Manickam.

svn path=/trunk/; revision=14505
2005-05-31 14:07:16 +00:00
Ulf Lamping 801e9dd35e from Stefano Pettini: add CSV export function, similar to PSML export
svn path=/trunk/; revision=13724
2005-03-11 20:56:31 +00:00