The data contained in this repository can be downloaded to your computer using one of several clients.
Please see the documentation of your version control software client for more information.

Please select the desired protocol below to get the URL.

This URL has Read-Only access.

Statistics
| Branch: | Revision:

main_repo / cfile.h @ master

History | View | Annotate | Download (6.22 KB)

# Date Author Comment
a1b1c8be 05/09/2014 01:21 AM Guy Harris

Revert "Refactor Wiretap"

This reverts commit 1abeb277f5e6bd27fbaebfecc8184e37ba9d008a.

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...

1abeb277 05/08/2014 11:04 PM Michael Mann

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....

d1873dbc 03/21/2014 01:51 PM Hadriel Kaplan

Fix Bug 9903: 'Clicking reload-file ignores selected file format reader'

There's a relatively new feature in 1.11.3 to select a specific file format
reader, instead of relying on magics or heuristics. If you select a file
reader and open a file, open it, and then click the reload-file button or go...

0513b29b 03/20/2014 08:25 AM Anders Broman

Revert "Allow pcapng interface options to be available to dissectors."
This patch causes Wireshark/tshark to segfault if the file is reread(open a file and press reload).
The test suite also fails on
2.1.1 Step: Exit status for existing file: "/home/wireshark/builders/trunk/sol10sparc/build/test/captures/dhcp.pcap" must be 0/home/wireshark/builders/trunk/sol10sparc/build/test/suite-clopts.sh: line 149: 6646 Segmentation Fault (core dumped) $TSHARK -r "${CAPTURE_DIR}dhcp.pcap" > ./testout.txt 2>&1...

7b13a3b0 03/20/2014 05:54 AM Christopher Kilgour

Allow pcapng interface options to be available to dissectors.

Interface options1, and more generally pcapng options2, are useful
information that can provide improved dissector output.

Prior to this change, only certain pcapng interface options were interpreted...

29659139 03/04/2014 09:27 AM Alexis La Goutte

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 <>

0f8572cb 12/22/2013 05:41 AM Jakub Zawadzki

Avoid including definition of column_info structure in dissectors.

Move COL_* enum to <epan/column-utils.h>

XXX Later we can rename epan/column-info.h to column-int.h (or smth like this)

svn path=/trunk/; revision=54352

b75354eb 12/03/2013 06:49 PM Jakub Zawadzki

Avoid including <epan/epan.h> in dissectors.

svn path=/trunk/; revision=53774

82e2675f 11/29/2013 03:53 PM Jakub Zawadzki

Avoid including <wiretap/wtap.h> in dissectors.

svn path=/trunk/; revision=53655

4eefe7c5 11/15/2013 01:12 PM Jakub Zawadzki

Remove comment & defines for frame_data_sequence from cfile.h

It's already in epan/frame_data_sequence.c and no-one else should use it.

svn path=/trunk/; revision=53341

cbda96d7 08/14/2013 12:14 AM Guy Harris

Global variables considered harmful.

svn path=/trunk/; revision=51352

08eb36b5 08/01/2013 04:59 PM Jakub Zawadzki

Remove fdata->opt_comment, add pkt_comment to pinfo

Original (read from file) comments can be accessed by pkthdr->opt_comment
Keep user comments in seperated BST, add new method for epan session to get it.

svn path=/trunk/; revision=51090

7ec1a78f 07/22/2013 03:38 PM Jakub Zawadzki

Abuse epan_t more: add callback to get interface name.

svn path=/trunk/; revision=50794

28e9dcc4 07/21/2013 02:38 PM Jakub Zawadzki

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

45449ce1 07/11/2013 07:57 PM Jeff Morriss

Move some more modules into epan.

svn path=/trunk/; revision=50517

8c9edf12 06/15/2013 08:20 PM Guy Harris

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...

2fba8c0f 03/30/2013 11:38 AM Evan Huus

Update -2, -R and -Y to behave consistently as per the concensus reached on
https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=8223

Mention the new -Y flag and associated changes in the release notes.

svn path=/trunk/; revision=48654

5c2c5aed 12/14/2012 08:04 PM Gerald Combs

Rename the search type menu items to more accurately reflect what we're
actually doing and what users are likely to want to do. Rename the
search enum values and functions to reflect what we're actually doing
and add a comment explaining why making searches more correct might make...

78631020 10/16/2012 05:50 PM Jakub Zawadzki

Add wtap_pseudo_header union to wtap_pkthdr structure.
Use pkthdr instead of pseudo_header as argument for dissecting.

svn path=/trunk/; revision=45601

71ed7738 10/05/2012 02:52 PM Gerald Combs

Add a capture_file * element to packet_range_t and pass it explicitly in
packet_range_init(). Get rid of global cfile references in
packet-range.c. C++-ize packet-range.h. Shuffle some includes around.

svn path=/trunk/; revision=45333

99e665dc 09/28/2012 06:08 AM Jakub Zawadzki

Revert r45183:r45184

r45182 was good fix, but updae frames_count when redissecting.

svn path=/trunk/; revision=45189

bd26485a 09/27/2012 05:20 PM Jakub Zawadzki

Missing part of r45183

svn path=/trunk/; revision=45184

78019edc 09/03/2012 11:12 AM Jakub Zawadzki

cinfo.columns_changed is only used by ui/gtk, move it to cfile structure.

svn path=/trunk/; revision=44750

0da59a00 07/19/2012 05:49 PM Gerald Combs

Pass {delayed_}create_progress_dlg a pointer the top level window
so that we can properly associate a widget with create, update, and
destroy events. Only used by Qt so far but it should be easy enough to
add to GTK+.

Rename ui/qt/progress_dialog.{h,cpp} to progress_bar.{h,cpp}. Show a...

bf81b42e 06/28/2012 06:56 PM Jakub Zawadzki

Update Free Software Foundation address.

(COPYING will be updated in next commit)

svn path=/trunk/; revision=43536

06474b43 06/19/2012 09:11 PM Guy Harris

If the file has an SHB comment or any packet comments, and the user
tries to do "Save As" in a format for which we don't support comments
(currently, we only support them for pcap-ng), ask whether they want to
discard the comments and save anyway or, if the file can be saved in a...

d1128f64 06/15/2012 07:54 PM Guy Harris

For a capture file, keep an array of all encapsulation types seen.

Show all of them in the summary dialog; we will be using it in the
future to figure out what capture file formats we can write to (just
because a capture file format supports per-packet encapsulations, that...

cf6d9841 05/24/2012 01:05 AM Guy Harris

Keep track, in Wiretap, of whether the file is compressed, and provide
an API to fetch that.

When doing "Save" on a compressed file, write it out compressed.

In the Statistics -> Summary dialog and in capinfos, report whether the
file is gzip-compressed....

4a9b825c 05/20/2012 04:56 AM Guy Harris

Change the "user_saved" member of a capture_file structure to
"unsaved_changes", and have it be TRUE iff changes have been made to the
file since it was read - not if it's a temporary file from a live
capture.

Check the "is_tempfile" member, and the "unsaved_changes" member, when...

15a88e69 03/02/2012 06:41 AM Guy Harris

Update comment - now that we support adding comments to files, a capture
that we've saved to a particular path, or that we've read in, could
still be unsaved if we add comments to it.

svn path=/trunk/; revision=41321

6b178bd4 12/28/2011 07:08 PM Gerald Combs

Add 'extern "C"' wrappers and #include guards to various header files.

svn path=/trunk/; revision=40321

63981c8b 05/12/2011 03:47 PM Jakub Zawadzki

Packet editor: support for saving changed frames.

svn path=/trunk/; revision=37099

c9b9dd69 04/26/2011 10:54 PM Guy Harris

Create a new frame_data_sequence data type; it represents a dense
sequence of frame_data structures, indexed by the frame number. Extract
the relevant bits of the capture_file data structure and move them to
the frame_data_sequence, and move the relevant code from cfile.c and...

71b31d92 04/25/2011 03:01 PM Guy Harris

Store the frame_data structures in a tree, rather than a linked list.
This lets us get rid of the per-frame_data-structure prev and next
pointers, saving memory (at least according to Activity Monitor's report
of the virtual address space size on my Snow Leopard machine, it's a...

678be392 04/25/2011 01:33 AM Guy Harris

Make the packet count an unsigned value, as frame numbers are unsigned.

Make the loops that scan through all the packets do so by frame number,
to abstract away the "next" and "previous" pointers in the frame_data
structure. Add a routine to cfile.c to map frame numbers to frame_data...

b7527dd0 01/31/2011 07:19 AM Anders Broman

From Cal Turney:
Bug 5621 - With String in Packet details searches, highlight row in tree
https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=5621

svn path=/trunk/; revision=35718

347d0a77 01/19/2011 01:21 PM Stephen Fisher

From Cal Turney via enhancement bug #5587: In hex or string searches of the
packet data highlight the target rather than the entire field.

svn path=/trunk/; revision=35584

46cd4a85 08/16/2010 02:17 PM Anders Broman

From Cal Turney:
1. Restore the functionality of <Ctrl>A and <Ctrl>X to the filter textbox.
2. Assign intuitive shortcuts without consuming any new shortcut letters.
3. Add 'Un-Time Reference All Packets' to the menu.
4. Disallow the marking or ignoring of all packets in the capture....

2a328da4 08/13/2010 03:39 AM Guy Harris

Instead of using a Boolean for the search direction, use an enum, so
that you can tell from examination whether the search is forward or
backward.

Make the cf_find_packet routines take the direction as an explicit
argument, rather than, in the cases where you don't want to permanently...

cc5d7670 04/01/2010 05:55 PM Gerald Combs

Keep a copy of the interface description and capture filter around so that
we can use it in the main window title during and after capture. Add a
"-X" option for providing a description for stdin.

svn path=/trunk/; revision=32357

47be3577 12/16/2009 08:18 PM Stig Bjørlykke

Introduce "Ignore Packet" in the packet list.

This will remove the package from the dissection functions without
removing it from the capture file.

svn path=/trunk/; revision=31287

0ee2b775 09/22/2009 12:53 PM Kovarththanan Rajaratnam

Rename init_cap_file() to cap_file_init()

svn path=/trunk/; revision=30073

9398b679 09/22/2009 12:39 PM Kovarththanan Rajaratnam

Introduce cap_file_add_fdata() and start using it

svn path=/trunk/; revision=30071

702b6ea7 09/21/2009 02:30 PM Kovarththanan Rajaratnam

Remove unused 'vers' member in capture_file

svn path=/trunk/; revision=30049

8b62ba24 09/21/2009 02:20 PM Kovarththanan Rajaratnam

Remove unused 'pstats' member in capture_file

svn path=/trunk/; revision=30048

7ca137e2 09/21/2009 02:09 PM Kovarththanan Rajaratnam

Rename capture_file.plist to capture_file.plist_start to make it consistent with capture_file.plist_end

svn path=/trunk/; revision=30047

2e298683 07/24/2009 09:50 AM Anders Broman

Use g_slice if glib >=2.10

svn path=/trunk/; revision=29187

6c47f763 02/15/2009 04:55 PM Bill Meier

Adjust some spacing ....

svn path=/trunk/; revision=27457

5498ec1d 11/18/2008 09:50 AM Stig Bjørlykke

Optimized finding current row from cfile.current_frame.

svn path=/trunk/; revision=26804

2ce22e6b 09/30/2008 11:45 AM Sake Blok

From (Bug 2895):

We might receive new packets while redissecting and don't want to
dissect those before the packet-list is fully rebuilt.

svn path=/trunk/; revision=26309

1370d2f7 01/01/2007 05:23 AM Ronnie Sahlberg

break out dfcode from the capture file structure and declare it locally where it is needed.
allocate and release the dfcode program as needed instead of having it hang around in the capture file structure.

this will ensure that dfcode will not have longer than se scope lifetime in case we need that property of it later...

90303fb1 11/14/2006 05:35 PM Stephen Fisher

New feature to automatically highlight the field found when doing a find.
This works for both string and hex searches. This resolves feature request
bug #776.

svn path=/trunk/; revision=19897

59d6c8ea 11/05/2006 05:46 PM Ulf Lamping

change all file offsets from long to gint64 so we can - theoretically - handle files > 2GB correct.

Please distclean Win32 builds!

svn path=/trunk/; revision=19814

89f022b1 05/21/2006 01:12 AM Ronnie Sahlberg

name change

svn path=/trunk/; revision=18197

723c80ea 08/25/2005 05:29 PM Ulf Lamping

timestamp display precision:

- automatic adjustment depending on file format
- manual adjustment through menu items

save the setting in the recent file

svn path=/trunk/; revision=15534

6f43fbb2 08/24/2005 05:31 PM Ulf Lamping

EVERYTHING IN THE BUILDBOT IS GOING TO BE RED!!! Sorry!

I've done more than a day to change the timestamp resolution from microseconds to nanoseconds. As I really don't want to loose those changes, I'm going to check in the changes I've done so far. Hopefully someone else will give me a helping hand with the things left ......

53b54d11 08/19/2005 10:14 PM Guy Harris

Get rid of f_len field in capture_file structure - we can just keep
the length locally. within cf_read().

svn path=/trunk/; revision=15454

38ec1644 08/19/2005 03:40 PM Guy Harris

Add APIs to Wiretap to return the file of the size as supplied by the OS
(so if the file's gzipped, it's NOT the size of the file after
uncompressing), and an approximation of the amount of that data read
sequentially so far.

Use those for various progress bars and the like....

e67b202e 08/18/2005 09:17 PM Guy Harris

Have "f_datalen" keep track of the number of bytes of uncompressed file
data, so that "f_len" still keeps the size of the underlying file (which
is necessary in order to make the progress bar when files are being read
work correctly).

svn path=/trunk/; revision=15415

3a63719e 02/06/2005 04:20 PM Ulf Lamping

another two steps towards privilege seperation:

move another two capture related fields (iface and cfilter) from cfile to capture_opts

also move the handling of capture related command line options from main.c to capture.c, that way a future privilege seperated capture program can use the same code to parse it's command line than Ethereal....

dd71ad69 02/03/2005 08:29 PM Ulf Lamping

(some) redesign of capture data structures.

don't use global cfile at all but only an untpyed handle to call the cf_... functions in file.c
move the save_file member from capture_file to capture_opts, as it's only used while capturing and while preparing it...

9ff19a4c 02/03/2005 05:48 PM Ulf Lamping

move capture_file_fd field from capture_file to capture_opts type, as this is the place where it should be

svn path=/trunk/; revision=13268

8a8b8834 07/17/2004 08:24 PM Guy Harris

Set the svn:eol-style property on all text files to "native", so that
they have LF at the end of the line on UN*X and CR/LF on Windows;
hopefully this means that if a CR/LF version is checked in on Windows,
the CRs will be stripped so that they show up only when checked out on...

e5f24517 04/15/2004 07:28 PM Guy Harris

Rename a bunch of variables and routines that pertain to string search
with "string" rather than "ascii", to make it clearer what they're
involved with.

Use "gtk_toggle_button_set_active()", not
"gtk_toggle_button_set_state()" (the latter is a deprecated alias for...

3f2f2929 02/02/2004 07:16 PM Ulf Lamping

added some more info to the statusbar (filesize, packet count, ..),
fixed a minor bug in the cfile handling (file length in summary dialog)

svn path=/trunk/; revision=9961

7502ac21 01/24/2004 07:58 PM Guy Harris

There's no need to keep a "FILE *" for the file being printed to in a
"capture_file" structure. Keep it locally, instead.

Check for errors when printing packets.

Report failure to open a print destination and failure to write to a
print destination differently....

84dcd53b 01/09/2004 04:38 PM Guy Harris

We don't need to keep the progress bar quantum or next step in the
capture_file structure - just make it local to the routine scanning
through the packets.

svn path=/trunk/; revision=9616

dd628e00 09/23/2003 08:47 PM Guy Harris

Make "finfo_selected" a member of a "capture_file" structure rather than
an independent global variable.

svn path=/trunk/; revision=8524

f56d16ab 09/15/2003 06:16 PM Guy Harris

Add a routine to return the display name for a "capture_file" structure,
rather than constructing that name when a capture file is opened and
putting a pointer to it in that structure.

svn path=/trunk/; revision=8476

673e47d4 09/15/2003 04:37 PM Guy Harris

Keep a "display name" as part of a capture_file structure; for live
capture temporary files, it's "<capture", and for saved capture files,
it's the last component of the pathname of the file. Use that in
various places when displaying the file name.

svn path=/trunk/; revision=8474

1cf6565a 08/29/2003 12:03 AM Guy Harris

Get rid of the EBCDIC stuff in the find dialog - it's not supported yet,
so we shouldn't torment the users by offering it.

Check the string type and convert it to an internal representation in
the GUI code; have the search code deal only with the internal...

487d0def 07/22/2003 07:08 PM Guy Harris

From Greg Morris: code to support searches for text or raw binary data
in a frame in Find Frame.

svn path=/trunk/; revision=8067

8e876bf5 09/06/2002 07:14 PM Ronnie Sahlberg

Forgot to add two files

svn path=/trunk/; revision=6204