summaryrefslogtreecommitdiff
path: root/file.c
AgeCommit message (Collapse)AuthorFilesLines
2013-09-22Get rid of struct addrinfo, use the hastables for name resolution instead.Anders Broman1-5/+4
svn path=/trunk/; revision=52176
2013-09-05Try to fix https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=9106 :Pascal Quantin1-0/+1
Intialize phdr structure to avoid an invalid access to phdr->opt_comment svn path=/trunk/; revision=51791
2013-08-14Global variables considered harmful.Guy Harris1-53/+41
svn path=/trunk/; revision=51352
2013-08-13Only rescan packets if we have packets to rescan. Fixes at least the surfaceEvan Huus1-1/+3
problem in https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=9033 The underlying scoping issues may not be fully resolved yet. svn path=/trunk/; revision=51327
2013-08-07It's not necessary to call epan_free() in cf_open(): cf_close() (which isJeff Morriss1-2/+3
called by cf_open()) already calls epan_free(). svn path=/trunk/; revision=51188
2013-08-01use explicit cast to squelch compiler warningMartin Kaiser1-1/+1
svn path=/trunk/; revision=51093
2013-08-01Remove fdata->opt_comment, add pkt_comment to pinfoJakub Zawadzki1-20/+106
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
2013-07-30Remove interface_id, pack_flags from frame_data structure.Jakub Zawadzki1-4/+4
This patch assumes that wtap_phdr interface_id, pack_flags both from initial read and seek read will contain same values. Please fix if it's not. svn path=/trunk/; revision=51041
2013-07-23Make a routine not used outside file.c static.Guy Harris1-1/+1
svn path=/trunk/; revision=50857
2013-07-22Abuse epan_t more: add callback to get interface name.Jakub Zawadzki1-1/+2
svn path=/trunk/; revision=50794
2013-07-21Fix file.c:112:1: error: ‘static’ is not at beginning of declarationEvan Huus1-1/+1
[-Werror=old-style-declaration] svn path=/trunk/; revision=50775
2013-07-21Replace relative timestamp with reference frame number. Saves 16B per frame.Jakub Zawadzki1-15/+15
svn path=/trunk/; revision=50772
2013-07-21Add helper function to epan_session which can be used to get absolute ↵Jakub Zawadzki1-4/+36
timestamp of given frame. Remove ->prev_cap, for testing purpose also replace ->prev_dis with number of previously displayed frame number. This patch reduce size of frame_data by 8B (amd64) This is what (I think) was suggested by Guy in comment 13 (https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=5821#c13) svn path=/trunk/; revision=50765
2013-07-21Some work on multi file dissectionJakub Zawadzki1-22/+21
- 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-16Move merge.{h,c} into wiretap: these modules use wiretap to merge files.Jeff Morriss1-13/+14
svn path=/trunk/; revision=50656
2013-07-12Move the print modules into epan.Jeff Morriss1-2/+3
svn path=/trunk/; revision=50526
2013-07-11Move some more modules into epan.Jeff Morriss1-1/+0
svn path=/trunk/; revision=50517
2013-07-11packet dissection now takes pointer to tvb instead of guint8 dataJakub Zawadzki1-13/+14
implement frame_tvbuff, right now almost a copy of 'real' tvb. svn path=/trunk/; revision=50497
2013-06-29Fix some Dead Store (Dead assignement/Dead increment) Warning found by ClangAlexis La Goutte1-4/+0
svn path=/trunk/; revision=50232
2013-06-26Move tempfile.{h,c} into wsutil.Jeff Morriss1-1/+1
svn path=/trunk/; revision=50163
2013-06-25Fix build with packet editor enabled. (Fix a typo while we're at it.)Guy Harris1-1/+2
svn path=/trunk/; revision=50153
2013-06-20inform expert info layer about the current number of packet commentsMartin Kaiser1-0/+3
when the last comment is removed and we have no other expert info, the maximum severity is changed from comment to none svn path=/trunk/; revision=50091
2013-06-19Allow for column headers not to be printed in order to make it possible to ↵Chris Maynard1-3/+7
export packets as plain text in a format that could then have a chance of being imported again (assuming other factors such as packet bytes were printed, etc.) in order to recover the original pcap file. Fixes https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=1636 svn path=/trunk/; revision=50036
2013-06-16Have the seek-read routines take a Buffer rather than a guint8 pointerGuy Harris1-19/+39
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-04-13Don't take the shortcut of moving/copying the existing file if we have a nameEvan Huus1-14/+44
resolution block to write (which isn't necessarily in the existing file). Fixes at least part of https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=8317 svn path=/trunk/; revision=48842
2013-04-02Rename cf_not_saved() to cf_has_unsaved_data() to clarify what itGuy Harris1-1/+1
indicates. (Note: "unsaved data" is more than just "unsaved changes"; it could also mean "temporary file that hasn't been saved anywhere".) svn path=/trunk/; revision=48709
2013-04-01Add routines to file.c to indicate whether:Guy Harris1-5/+93
a save can be done ("can" in the sense of "there's something to save" and in the sense of "we can write that something out"); a "save as" can be done (in the sense of "we can write what we have out"); there's unsaved data to save (which might be unsaved changes or might be a temporary file full of packets); and use them as appropriate. This means that the "unsaved data" indicator in the UI will be turned on for temporary files full of packets as well as for files with unsaved changes; that's what we want. svn path=/trunk/; revision=48693
2013-04-01Add a wtap_dump_can_write() routine that indicates whether WiretapGuy Harris1-14/+8
supports writing files with a given set of encapsulations and comment types. Use it, rather than asking for a list of file formats that support the given set of encapsulation and comment types and checking whether we got back such a list, or duplicating its logic. Having file.c use it means that nobody's using wtap_dump_can_write_encaps() any more; get rid of it. Instead, have a private routine that checks whether a given file format supports a given set of encapsulations *and* comment types, and use that internally. svn path=/trunk/; revision=48690
2013-04-01Define a collection of bits for different types of capture file comments.Guy Harris1-4/+10
For each capture file type, have a bitset of comment types supported by that capture file type. Add a Wiretap routine that, for a given file type, returns the bitset of comment types it supports. Have wtap_get_savable_file_types() take a bitset of comment types that need to be supported by the file types it returns. Replace cf_has_comments() with a routine that returns a bitset of capture file comment types in the capture file. Use those routines in the capture file dialogs; don't wire in the notion that pcap-NG supports all comment types and no other file formats support any comment types. (That's currently true, but we don't want to wire that in as being forever true.) svn path=/trunk/; revision=48689
2013-03-27From Hadriel Kaplan via https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=8223Evan Huus1-12/+1
Add a 2-pass display-filter flag to tshark so that reassembly and other forward- looking dissections can be used with filters. It's a bit of a hack, but this entire area of 2-pass analysis etc. is a giant pile of hacks to begin with and needs cleaning up. For now just having this feature is a big enough win. svn path=/trunk/; revision=48589
2013-03-21Make internal functions static.Anders Broman1-1/+1
svn path=/trunk/; revision=48465
2013-03-20 From beroset:Bill Meier1-4/+4
remove C++ incompatibilities https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=8416 attachment #10397 svn path=/trunk/; revision=48438
2013-03-15Fix the leaking of packet comments, i.e. the rest ofEvan Huus1-4/+2
https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=7530 The frame_data_cleanup function was ambiguous; it was being used for two different purposes, and did neither of them quite properly. Split it instead into frame_data_reset and frame_data_destroy, and call the correct one depending on why we were originally calling frame_data_cleanup. svn path=/trunk/; revision=48324
2013-03-06Use explicit casts.Anders Broman1-17/+17
svn path=/trunk/; revision=48137
2012-12-22Add support for writing the packet block flags for pcapng.Michael Tüxen1-0/+3
While there, do some minor cleanup. svn path=/trunk/; revision=46699
2012-12-15Rename the search type menu items to more accurately reflect what we'reGerald Combs1-14/+25
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 searching worse. Add a search bar to the Qt main window, thus continuing the War On Gratuitous Dialogs. Clear out any previous temporary label stack items before adding a new one. svn path=/trunk/; revision=46541
2012-11-25Fix a number of [-Wshadow] warnings;Bill Meier1-51/+50
Also: Do some minor whitespace changes svn path=/trunk/; revision=46182
2012-11-03Make a few variables volatile to satisfy gcc.Evan Huus1-7/+7
svn path=/trunk/; revision=45886
2012-11-03Manually revert r45669Jakub Zawadzki1-41/+22
svn path=/trunk/; revision=45884
2012-10-22volatile fixes.Jakub Zawadzki1-6/+9
svn path=/trunk/; revision=45729
2012-10-22Move some variables inside TRY { } block.Jakub Zawadzki1-89/+95
svn path=/trunk/; revision=45724
2012-10-22Make progbar_quantum volatile to suppress setjmp/longjmp warnings.Guy Harris1-1/+1
svn path=/trunk/; revision=45723
2012-10-22Move TRY CATCH outside reading packet loops.Jakub Zawadzki1-49/+45
svn path=/trunk/; revision=45722
2012-10-221) Allow for the possibility for both packet summary and packet details to beChris Maynard1-0/+4
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-20Move ep_free_all() *AFTER* packet dissection.Jakub Zawadzki1-1/+1
Use glib allocator for data_source. Thread on wireshark-dev: http://www.wireshark.org/lists/wireshark-dev/201210/msg00116.html svn path=/trunk/; revision=45673
2012-10-20I don't understand how this variable might be clobbered, but mark it ↵Jakub Zawadzki1-1/+1
volatile to silent gcc warning. svn path=/trunk/; revision=45671
2012-10-20Introduce epan_dissect_run_with_taps() which run dissection with taps.Jakub Zawadzki1-6/+2
unexport tap_queue_init, tap_push_tapped_queue svn path=/trunk/; revision=45670
2012-10-20- Allow reseting edt with new function epan_dissect_reset(),Jakub Zawadzki1-33/+52
- initialize edt once in few places, and later reset it after dissecting (add_packet_to_packet_list), - revert r45667, probably no longer needed. svn path=/trunk/; revision=45669
2012-10-20Make a few variables volatile to fix longjmp warnings.Evan Huus1-9/+9
svn path=/trunk/; revision=45667
2012-10-20Pass create_proto_tree, cinfo directly to add_packet_to_packet_listJakub Zawadzki1-41/+29
svn path=/trunk/; revision=45666