Commit Graph

72 Commits

Author SHA1 Message Date
Guy Harris 318cf8a678 Add support for dissecting non-packet records.
Add a dissector table indexed by the file type, and, for the
file-type-specific records, have the frame dissector skip the usual
pseudo-header processing, as the pseudo-header has a file-type-specific
record subtype in it, and call the dissector for that file type's
records.

Change-Id: Ibe97cf6340ffb0dabc08f355891bc346391b91f9
Reviewed-on: https://code.wireshark.org/review/1782
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2014-05-25 00:05:07 +00:00
Guy Harris 6db77b000f Allow wtap_read() and wtap_seek_read() to return records other than packets.
Add a "record type" field to "struct wtap_pkthdr"; currently, it can be
REC_TYPE_PACKET, for a record containing a packet, or
REC_TYPE_FILE_TYPE_SPECIFIC, for records containing file-type-specific
data.

Modify code that reads packets to be able to handle non-packet records,
even if that just means ignoring them.

Rename some routines to indicate that they handle more than just
packets.

We don't yet have any libwiretap code that supplies records other than
REC_TYPE_PACKET or that supporting writing records other than
REC_TYPE_PACKET, or any code to support plugins for handling
REC_TYPE_FILE_TYPE_SPECIFIC records; this is just the first step for bug
8590.

Change-Id: Idb40b78f17c2c3aea72031bcd252abf9bc11c813
Reviewed-on: https://code.wireshark.org/review/1773
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2014-05-24 18:31:25 +00:00
Guy Harris a344c9736e Revert "Allow wtap_read() and wtap_seek_read() to return non-packet records."
This reverts commit c0c480d08c.

A better way to do this is to have the record type be part of struct wtap_pkthdr; that keeps the metadata for the record together and requires fewer API changes.  That is in-progress.

Change-Id: Ic558f163a48e2c6d0df7f55e81a35a5e24b53bc6
Reviewed-on: https://code.wireshark.org/review/1741
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2014-05-23 10:50:10 +00:00
Guy Harris c0c480d08c Allow wtap_read() and wtap_seek_read() to return non-packet records.
This is the first step towards implementing the mechanisms requestd in
bug 8590; currently, we don't return any records other than packet
records from libwiretap, and just ignore non-packet records in the rest
of Wireshark, but this at least gets the ball rolling.

Change-Id: I34a45b54dd361f69fdad1a758d8ca4f42d67d574
Reviewed-on: https://code.wireshark.org/review/1736
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2014-05-23 03:02:32 +00:00
Guy Harris a1b1c8bed5 Revert "Refactor Wiretap"
This reverts commit 1abeb277f5.

This isn't building, and looks as if it requires significant work to fix.

Change-Id: I622b1bb243e353e874883a302ab419532b7601f2
Reviewed-on: https://code.wireshark.org/review/1568
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2014-05-09 05:21:01 +00:00
Michael Mann 1abeb277f5 Refactor Wiretap
Start of refactoring Wiretap and breaking structures down into "generally useful fields for dissection" and "capture specific". Since this in intended as a "base" for Wiretap and Filetap, the "wft" prefix is used for "common" functionality.

The "architectural" changes can be found in cfile.h, wtap.h, wtap-int.h and (new file) wftap-int.h. Most of the other (painstaking) changes were really just the result of compiling those new architecture changes.

bug:9607
Change-Id: Ife858a61760d7a8a03be073546c0e7e582cab2ae
Reviewed-on: https://code.wireshark.org/review/1485
Reviewed-by: Michael Mann <mmann78@netscape.net>
2014-05-09 03:04:39 +00:00
Alexis La Goutte 296591399f Remove all $Id$ from top of file
(Using sed : sed -i '/^ \* \$Id\$/,+1 d')

Fix manually some typo (in export_object_dicom.c and crc16-plain.c)

Change-Id: I4c1ae68d1c4afeace8cb195b53c715cf9e1227a8
Reviewed-on: https://code.wireshark.org/review/497
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2014-03-04 14:27:33 +00:00
Jakub Zawadzki ae59b09443 Add missing includes in order to remove exceptions.h from proto.h (next commit).
svn path=/trunk/; revision=53230
2013-11-10 15:59:37 +00:00
Pascal Quantin ef24e09f5d From robionekenobi via https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=9328 :
Suppress some VS2013 warnings when compiling gtk ui

svn path=/trunk/; revision=52880
2013-10-26 21:04:53 +00:00
Jakub Zawadzki c702e92121 Replace relative timestamp with reference frame number. Saves 16B per frame.
svn path=/trunk/; revision=50772
2013-07-21 23:07:33 +00:00
Jakub Zawadzki 28e9dcc4a9 Some work on multi file dissection
- make init_dissection/cleanup_dissection private for libwireshark
- implement epan_new(), epan_free()
- pass epan_t to epan_dissect*

svn path=/trunk/; revision=50761
2013-07-21 18:38:03 +00:00
Jakub Zawadzki ce81449ed9 packet dissection now takes pointer to tvb instead of guint8 data
implement frame_tvbuff, right now almost a copy of 'real' tvb.

svn path=/trunk/; revision=50497
2013-07-11 05:47:02 +00:00
Guy Harris 8c9edf1280 Have the seek-read routines take a Buffer rather than a guint8 pointer
as the "where to put the packet data" argument.

This lets more of the libwiretap code be common between the read and
seek-read code paths, and also allows for more flexibility in the "fill
in the data" path - we can expand the buffer as needed in both cases.

svn path=/trunk/; revision=49949
2013-06-16 00:20:00 +00:00
Evan Huus d0bd2097f0 Fix another dozen or so files with bad FSF addresses as caught by licensecheck.
svn path=/trunk/; revision=48869
2013-04-16 00:00:09 +00:00
Martin Mathieson 8067c41855 Allow zooming in on a rectangular region using left mouse.
Slightly simplified version of what tcp_graph.c does.

svn path=/trunk/; revision=48835
2013-04-13 14:54:34 +00:00
Bill Meier 35d1b406d7 From beroset:
remove C++ incompatibilities
 https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=8416 attachment #10408

Note: The following parts of the patch had been previously done:
 asn1/snmp/packet-snmp-template.c
 epan/dissectors/packet-snmp.c
 epan/dissectors/packet-x11.c

svn path=/trunk/; revision=48448
2013-03-21 02:58:59 +00:00
Anders Broman 12d85ac2b3 Use explicit casts.
svn path=/trunk/; revision=48144
2013-03-06 20:33:32 +00:00
Anders Broman b8f6ce287f Get rid of xor_gc altogether, I think it's a remnant from the "old" cross-hair code.
svn path=/trunk/; revision=48141
2013-03-06 18:23:22 +00:00
Bill Meier 96a24cc79f Fix spelling/typos found using a list of commonly misspelled words.
The misspellings were mostly in comments but some were
in text strings visible to the user.


svn path=/trunk/; revision=47899
2013-02-26 04:42:26 +00:00
Bill Meier 162817ad33 it's ==> its & its ==> it's as needed.
In a few cases:
 Fix spelling;
 Clean up whitespace and formatting style.

svn path=/trunk/; revision=47889
2013-02-25 23:35:13 +00:00
Martin Mathieson 18cb86cc23 Show resegmented data as grey.
svn path=/trunk/; revision=47687
2013-02-16 00:00:06 +00:00
Bill Meier c90956edb4 General cleanup: whitespace, parens & etc.
svn path=/trunk/; revision=47126
2013-01-16 22:32:29 +00:00
Bill Meier 8d41249753 Use gdk_cairo_set_source_rgba() and GdkRGBA.
svn path=/trunk/; revision=47124
2013-01-16 21:51:20 +00:00
Martin Mathieson b369116122 Don't cast away constness of passed-in tap structs.
svn path=/trunk/; revision=46552
2012-12-16 00:43:37 +00:00
Martin Mathieson d1457cfca8 Choose direction properly if launching graph based upon channel of
selected frame.

svn path=/trunk/; revision=46411
2012-12-05 22:05:18 +00:00
Martin Mathieson bd3b559725 - Allocate the correct number of elements to draw
- Draw data list then control list, so can spot blue of ACKs when zoomed
  right out
- Made the red crosses for NACKs smaller

svn path=/trunk/; revision=46243
2012-11-28 03:10:05 +00:00
Jakub Zawadzki 77368c3668 Introduce epan_dissect_run_with_taps() which run dissection with taps.
unexport tap_queue_init, tap_push_tapped_queue

svn path=/trunk/; revision=45670
2012-10-20 19:27:24 +00:00
Jakub Zawadzki 78631020b8 Add wtap_pseudo_header union to wtap_pkthdr structure.
Use pkthdr instead of pseudo_header as argument for dissecting.

svn path=/trunk/; revision=45601
2012-10-16 21:50:57 +00:00
Martin Mathieson 9fa43a6c33 Allow the RLC sequence graph to be called from the statistics window.
svn path=/trunk/; revision=45562
2012-10-15 17:29:04 +00:00
Martin Mathieson 81a50ff80b Take a deep copy of the tap struct in the tap function, as it is not
safe to access it after the packet has been fully dissected (the
struct will have been allocated with ep_alloc()).

svn path=/trunk/; revision=45449
2012-10-10 16:17:19 +00:00
Martin Mathieson 0e32b4e2ef Use ellipses rather than crosses made from lines to show data points,
and no longer connect the data points with lines.

Because this is slower than before, increase the zoom multipler.

The (very) slow part is filling in the circles - using
cairo_set_tolerance() with 1.0 doesn't do anti-aliasing but looks good
enough (halfing the time for this operation).

svn path=/trunk/; revision=45336
2012-10-06 00:56:55 +00:00
Jeff Morriss 3729335973 We always HAVE_CONFIG_H so don't bother checking whether we have it or not.
svn path=/trunk/; revision=45016
2012-09-20 01:48:30 +00:00
Martin Mathieson 0ab6929721 Rationalise the way lists/elements are allocated.
svn path=/trunk/; revision=44623
2012-08-23 04:00:39 +00:00
Martin Mathieson 17f7758036 Both lists of elements are always allocated together, so save a scan
through the segments by only getting the counts once.

svn path=/trunk/; revision=44577
2012-08-19 03:05:32 +00:00
Martin Mathieson 536a2cc823 Speed up drawing of axes by taking cairo_stroke() and
cairo_set_line_width() out of the loops they are in.

svn path=/trunk/; revision=44575
2012-08-19 01:58:29 +00:00
Martin Mathieson af89565907 Allow Page Up and Page Down to be used when zoomed in.
svn path=/trunk/; revision=44443
2012-08-11 14:41:24 +00:00
Martin Mathieson a90f6b4069 Also place a limit on how far we can zoom in horizonally (no point in
making on subframe (1ms) be really big).

svn path=/trunk/; revision=44442
2012-08-11 14:06:17 +00:00
Martin Mathieson 6f6ef84c5d When a graph is launched based upon an AM status PDU, make it for the
opposite direction.

svn path=/trunk/; revision=44440
2012-08-11 03:53:13 +00:00
Martin Mathieson 1586d80a77 RLC: when zooming, use shift and control keys to lock vertical or
horizontal scaling respectively.

RLC+TCP: when already fully zoomed out, don't multiply zoom by 1.0 and redraw.
When holding down the key to zoom out, waiting to several redraws of the
whole graph to complete could take a while...

svn path=/trunk/; revision=44374
2012-08-09 04:02:35 +00:00
Anders Broman f463e9de51 It handles GDK_DISABLE_DEPRECATED
svn path=/trunk/; revision=44326
2012-08-08 07:02:57 +00:00
Martin Mathieson f8b3e7c317 Fix a test to avoid the cross leaving a line behind at the top of the
graph.

svn path=/trunk/; revision=44315
2012-08-07 23:03:07 +00:00
Martin Mathieson 5c1c9d2244 Don't add 0.5 to coordinates used for drawing the cross. Was going
beyond the area and leaving artifacts.

svn path=/trunk/; revision=44313
2012-08-07 21:42:53 +00:00
Martin Mathieson 41d9e15025 Redo the cross drawing/erasing.
Draw in black, erase by just redrawing the current pixmap.

Will apply to tcp_graph.c if/when this gets through the buildbots.

svn path=/trunk/; revision=44308
2012-08-07 19:11:43 +00:00
Martin Mathieson 463917942d Add right mouse button grab/moving feature (from tcp_graph.c).
svn path=/trunk/; revision=44276
2012-08-05 14:20:23 +00:00
Martin Mathieson a67e77adea Add cross-hairs here too. Draw lines, but don't change mouse cursor.
svn path=/trunk/; revision=44272
2012-08-05 01:03:33 +00:00
Martin Mathieson 3e09bb9bf1 Cast event->x and event->y to int to avoid warnings seen on Windows
buildbots. 

svn path=/trunk/; revision=44201
2012-08-02 03:53:18 +00:00
Martin Mathieson a5a1aebc43 The keyboard and mouse zoom functions were almost identical - use a
common routine instead.

svn path=/trunk/; revision=44200
2012-08-02 03:18:35 +00:00
Martin Mathieson 4563416c93 Zoom in/out more slowly, and don't redefine zoom struct.
svn path=/trunk/; revision=44144
2012-07-30 21:40:30 +00:00
Martin Mathieson 4417fa263a Put back the configure_event() handler - it is needed for handling
resizing.

svn path=/trunk/; revision=44139
2012-07-30 14:42:14 +00:00
Martin Mathieson c58f4f28c4 Try to unbreak the build.
Apologies, I changed the clock time on my computer and so the file
didn't get rebuilt with the last of my changes...

svn path=/trunk/; revision=44127
2012-07-30 01:54:49 +00:00