aboutsummaryrefslogtreecommitdiffstats
path: root/tshark.c
AgeCommit message (Collapse)AuthorFilesLines
2012-06-28Update Free Software Foundation address.Jakub Zawadzki1-1/+1
(COPYING will be updated in next commit) svn path=/trunk/; revision=43536
2012-06-25From Michael Mann:Anders Broman1-4/+0
generic preferences implementation https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=7402 svn path=/trunk/; revision=43484
2012-06-20If we're making two passes and we have a display filter applied, createGerald Combs1-1/+5
a protocol tree in process_packet_first_pass(). Otherwise we crash with ERROR:dfvm.c:434:dfvm_apply: assertion failed: (tree) svn path=/trunk/; revision=43420
2012-05-20Change the "user_saved" member of a capture_file structure toGuy Harris1-6/+8
"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 appropriate. Just have a set_toolbar_for_capture_file() routine that updates the "save", "close", and "reload" toolbar as appropriate, given a capture_file structure - absorb the function of set_toolbar_for_unsaved_capture_file() into it. svn path=/trunk/; revision=42721
2012-05-16Fix a bunch of uninitialized variables found by Coverity Scan. CIDsGerald Combs1-0/+1
702403, 702404, 702405, 702406, 702407, 702408, 702409, 702410, 702411, and 702412. svn path=/trunk/; revision=42658
2012-04-16From Evan Huus:Anders Broman1-1/+0
Duplicate and misplaced 'break' statements. https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=7106 svn path=/trunk/; revision=42091
2012-03-14Don't free idb_inf in wtap_dump_open_ng(): free it in the callers. This ↵Jeff Morriss1-3/+3
fixes the double-free editcap crashes that the buildbot's been seeing lately. svn path=/trunk/; revision=41542
2012-03-13From Jose Pedro Oliveira:Anders Broman1-1/+3
the shb_userappl value wasn't being changed. https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=6937 svn path=/trunk/; revision=41530
2012-03-13A modified version of "pcapng: shd_userappl in newly created files"Anders Broman1-0/+5
to only add the name if no name if there yet. Original patch from Jose Pedro Oliveira. https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=6937 svn path=/trunk/; revision=41524
2012-03-12Free idb_inf and shb_hdr when done.Anders Broman1-0/+6
svn path=/trunk/; revision=41501
2012-02-21Use wtap_dump_open_ng() in tshark.Michael Tüxen1-11/+11
svn path=/trunk/; revision=41123
2012-02-21This should fix the buildbots...Michael Tüxen1-0/+8
The problem was that when reading a .pcap file, we don't have any IDBs. If reqested to write out an pcapng file, we (now) build a dummy IDB which uses the file's encapsulation as the interface encapsulation. Therefore it can't be per=packet. We need to fix this by using wtap_dump_open_ng()... svn path=/trunk/; revision=41122
2012-02-17Start moving files to ui/ and ui/cli/Jörg Mayer1-1/+1
svn path=/trunk/; revision=41047
2012-02-16With the WTAP_ERR_UNSUPPORTED error, Wiretap supplies a string givingGuy Harris1-0/+15
the details of what in particular is unsupported; report it in TShark and Wireshark. Handle WTAP_ERR_RANDOM_OPEN_PIPE in TShark. Handle WTAP_ERR_COMPRESSION_NOT_SUPPORTED in TShark, and have its error message in Wireshark not speak of gzip, in case we support compressed output in other formats in the future. If we see a second section header block in a pcap-NG file, don't report it as "the file is corrupted", report it as "the file uses a feature we don't support", as that's the case - and don't free up the interface data array, as the file remains open, and Wireshark might still try to access the packets we were able to read. svn path=/trunk/; revision=41041
2012-02-11It is a complete mistake to have *ANY* messages during packet captureGuy Harris1-10/+6
sent to the standard output if "-w" is specified because, when you capture, you can capture with the output directed to the standard output, and dumping some text crap to the standard output will corrupt your capture file. svn path=/trunk/; revision=40966
2012-02-05From Michael Mann:Anders Broman1-6/+10
Went through all stderr cases within tshark trying to make tshark "quieter". I basically ended up agreeing with the submitted in terms of what should be switched to stdout from stderr. The attached patch does that. https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=2881 svn path=/trunk/; revision=40862
2012-01-25Third try. This time pipes and stdin are supported and theMichael Tüxen1-0/+1
test scripts are passed. Use a global list containing all interfaces and only change properties of the entries when changes are made in the GUI. Do not misuse the list of interfaces specified on the command line anymore. This patch does not provide any new functionality, it just provides the base for future extensions like removing remote interface, mulitple airpcap devices and multiple pipes. This patch was provided by Irene Ruengeler. svn path=/trunk/; revision=40715
2012-01-24We need a 3rd try. (After learning how to run the testuite on Windows locally).Michael Tüxen1-1/+0
svn path=/trunk/; revision=40695
2012-01-24Second try. This time pipes and stdin are supported.Michael Tüxen1-0/+1
Use a global list containing all interfaces and only change properties of the entries when changes are made in the GUI. Do not misuse the list of interfaces specified on the command line anymore. This patch does not provide any new functionality, it just provides the base for future extensions like removing remote interface, mulitple airpcap devices and multiple pipes. This patch was provided by Irene Ruengeler. svn path=/trunk/; revision=40693
2012-01-23From Michael Mann:Anders Broman1-1/+1
help page update (pcapng is now the default file format). https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=6551 svn path=/trunk/; revision=40658
2011-12-29Leave it up to dumpcap to determine whether WinPcap was loaded and, ifGuy Harris1-13/+0
it wasn't, whether it matters; that way you can still capture from a pipe (named or "-" for standard input) even if you don't have WinPcap. svn path=/trunk/; revision=40336
2011-12-29Swallow cant_load_winpcap_err() up into capture-wpcap.c, so thatGuy Harris1-1/+0
anything that uses WinPcap can use that message text in its error messages. svn path=/trunk/; revision=40335
2011-12-29Add an additional DONT_HAVE_PCAP return value from get_interface_list()Guy Harris1-0/+1
and capture_interface_list(). Return it if, on Windows, we ask for the interface list but don't have WinPcap installed. Handle it like CANT_GET_INTERFACE_LIST. svn path=/trunk/; revision=40334
2011-12-28Add tshark option '-G heuristic-decodes' to dump heuristic dissector tables.Bill Meier1-0/+3
svn path=/trunk/; revision=40309
2011-12-27Add a "-G ftypes" option, which dumps our supprted FT_… names andGerald Combs1-0/+3
descriptions. Captitalize and fix up the descriptions. Use its output to create the field type list in the wireshark-filter man page. svn path=/trunk/; revision=40306
2011-12-13Rename WTAP_ERR_BAD_RECORD to WTAP_ERR_BAD_FILE; it really reports anyGuy Harris1-2/+2
form of corruption/bogosity in a file, including in a file header as well as in records in the file. Change the error message wtap_strerror() returns for it to reflect that. Use it for some file header problems for which it wasn't already being used - WTAP_ERR_UNSUPPORTED shouldn't be used for that, it should only be used for files that we have no reason to believe are invalid but that have a version number we don't know about or some other non-link-layer-encapsulation-type value we don't know about. svn path=/trunk/; revision=40175
2011-12-13Add the -H and -W options to the "tshark -h" output. Ref: ↵Chris Maynard1-0/+4
http://www.wireshark.org/lists/wireshark-users/201112/msg00044.html svn path=/trunk/; revision=40172
2011-11-19When reporting "sorry, *this* packet can't be written to a file of thatGuy Harris1-14/+57
type" when writing out a capture file (i.e., writing a per-packet-encapsulation capture to a file type that supports it but doesn't support one of the packet's encapsulations), report the packet number and, when doing this in a merge operation, report the file from which it came. When reporting "sorry, that file can't be written to a file of that type, period", show the file type rather than the input file link-layer type that causes the problem. (We could show both. We could be *really* ambitious and iterate through all possible file types and show the ones that will or at least might work....) file_write_error_message() is documented as handling only UNIX-style errnos, and libwireshark should be usable without libwiretap, so leave it up to its callers to handle Wiretap errors such as WTAP_ERR_SHORT_WRITE. Clean up indentation. svn path=/trunk/; revision=39949
2011-11-14Make exit_status volatile to avoid warning.Martin Mathieson1-1/+1
svn path=/trunk/; revision=39825
2011-11-12Catch the OutOfMemoryError exception and print a message.Guy Harris1-22/+49
svn path=/trunk/; revision=39798
2011-11-11Initialize threads at program startup. Hopefully this will fix theGerald Combs1-0/+3
current build test failures. svn path=/trunk/; revision=39790
2011-11-09Try to fix the GLib thread API deprecations listed in bug 6552.Gerald Combs1-6/+10
svn path=/trunk/; revision=39776
2011-09-28Rather than complain and quit if -V is missing when -O <protocols> is used, ↵Chris Maynard1-3/+3
do the user a favor and continue as if -V had been specified. Add explicit documentation of the -O <protocols> option to the man page. svn path=/trunk/; revision=39175
2011-09-27The separator between packets is an output option, not a capture option,Guy Harris1-3/+3
so it should be present even when building without libpcap. svn path=/trunk/; revision=39171
2011-09-27Add a new tshark option for being able to specify an alternate line ↵Chris Maynard1-7/+14
separator between packets. The option chosen was "-S <separator>". The former -S option was renamed to -P, and the former -P option, which was previously undocumented, was renamed to -2. This fixes https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=5342. svn path=/trunk/; revision=39168
2011-08-16From Yann via bug 6245:Stig Bjørlykke1-1/+1
Fixed crash in write_preamble(). svn path=/trunk/; revision=38562
2011-08-09Fix https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=5608 :Jeff Morriss1-3/+1
getopt() can/should normally be found in unistd.h, so: - When testing for getopt(), define that we HAVE_GETOPT instead of HAVE_GETOPT_H (to avoid confusion). - Don't attempt to include getopt.h: not all OS's have it (for example, Solaris 9 does not). - (All the places which need getopt already include unistd.h (if we have it).) If this breaks things on some OS, we might need (a real) HAVE_GETOPT_H check. svn path=/trunk/; revision=38437
2011-07-05Add some additional routine variants that handle string encodings, andGuy Harris1-2/+0
make FT_STRING and FT_UINT_STRING handle string encodings. Get rid of FT_EBCDIC in favor of FT_STRING with ENC_EBCDIC. Add some URLs for DRDA. Clean up some stuff in TN3270 and TN5250, including using ENC_ values for proto_tree_add_item(). svn path=/trunk/; revision=37909
2011-07-04From Michael Mann:Anders Broman1-1/+7
Added ability to display UTC time or UTC time with date. I liked having the difference between UTC and local time, not just setting local=UTC. https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=2629 svn path=/trunk/; revision=37898
2011-06-28Replace all strerror() with g_strerror().Stig Bjørlykke1-15/+11
Remove our local strerror implementation. Mark strerror as locale unsafe API. This fixes bug 5715. svn path=/trunk/; revision=37812
2011-06-28Use the filter argument as the capture filter for all interfaces.Michael Tüxen1-2/+6
Signal an error if another capture filter is provided using the -f option. svn path=/trunk/; revision=37811
2011-06-27Put variable under the correct #ifdef.Michael Tüxen1-2/+2
svn path=/trunk/; revision=37807
2011-06-27Fix the bug reported by Guy. NowMichael Tüxen1-0/+10
tshark -i en0 icmpp returns a correct error message. svn path=/trunk/; revision=37806
2011-06-27Improve the report of illegal capture filters. Also show the interface ↵Michael Tüxen1-2/+2
description. svn path=/trunk/; revision=37802
2011-06-27Use the interface description instead of the interface name whenMichael Tüxen1-2/+2
reporting an error. svn path=/trunk/; revision=37799
2011-06-27Get rid of old non-interface specific settings which are now interfaceMichael Tüxen1-10/+13
specifc. This finalizes the change of the infrastructure. This patch is based on work by Irene Ruengeler. svn path=/trunk/; revision=37794
2011-06-20Have mergecap, tshark, and editcap write pcap-ng files by default. ThisGerald Combs1-3/+11
is mainly an attempt to fix the currently-broken "test.sh" step on the XP buildbot. If this causes too many problems we might want to have suite-capture.sh:capture_step_snapshot pass "-P" to dumpcap instead. svn path=/trunk/; revision=37736
2011-06-15See if this squelches some compiler warnings.Guy Harris1-2/+2
svn path=/trunk/; revision=37670
2011-06-01Show the plugin paths in Help→About→Plugins. Add a "-G plugins" optionGerald Combs1-0/+2
to TShark which dumps a list of plugins. svn path=/trunk/; revision=37512
2011-05-31Get rid of has_cfilter to simplify the handling of multiple interfaces.Michael Tüxen1-3/+2
svn path=/trunk/; revision=37478