aboutsummaryrefslogtreecommitdiffstats
path: root/tshark.c
AgeCommit message (Collapse)AuthorFilesLines
2010-03-04"capture-pcap-util.h" include <pcap.h>, and <pcap.h>, for better orGuy Harris1-1/+0
worse, has no include-once guards; include it only once. svn path=/trunk/; revision=32110
2010-01-29Fix various gcc -Wshadow warnings.Bill Meier1-5/+5
svn path=/trunk/; revision=31729
2009-10-06Invert check for getopt: NEED_GETOPT_H -> HAVE_GETOPT_HStig Bjørlykke1-3/+4
Rename getopt.[ch] -> wsgetopt.[ch] to avoid name collision. svn path=/trunk/; revision=30370
2009-09-26Free capture filename on shutdownKovarththanan Rajaratnam1-1/+2
svn path=/trunk/; revision=30165
2009-09-26(Cosmetic) Reorder so that the failure message output handler appear in ↵Kovarththanan Rajaratnam1-105/+105
succession svn path=/trunk/; revision=30162
2009-09-22Remove unused 'offset' parameterKovarththanan Rajaratnam1-2/+2
svn path=/trunk/; revision=30078
2009-09-22Add initial support for "two pass analysis" in tshark. This allows tshark to ↵Kovarththanan Rajaratnam1-25/+277
arrive at the same protocol tree as the Wireshark GUI. Before this change tshark only supported a single scan over the file. This effectively means that packets cannot use data that are gathered from frames that appear after the current frame. By scanning twice we give the dissector the opportunity to make forward references. svn path=/trunk/; revision=30076
2009-09-22Rename init_cap_file() to cap_file_init()Kovarththanan Rajaratnam1-1/+1
svn path=/trunk/; revision=30073
2009-09-22Always initialise fdata even when we don't dissect (we access some of fdatas ↵Kovarththanan Rajaratnam1-2/+2
variables) svn path=/trunk/; revision=30070
2009-09-22Simply some logic inside process_packet()Kovarththanan Rajaratnam1-14/+8
svn path=/trunk/; revision=30069
2009-09-22Make frame_data_set_after_dissect() callers do the necessary checks insteadKovarththanan Rajaratnam1-2/+0
svn path=/trunk/; revision=30068
2009-09-22Refactor frame_data_init() into frame_data_set_before_dissect() and ↵Kovarththanan Rajaratnam1-6/+8
frame_data_set_after_dissect(). svn path=/trunk/; revision=30066
2009-09-21Move frame_data_init() declaration to frame_data.hKovarththanan Rajaratnam1-9/+2
svn path=/trunk/; revision=30033
2009-09-20Fix return type for frame_data_init()Kovarththanan Rajaratnam1-1/+1
svn path=/trunk/; revision=30024
2009-09-20Introduce frame_data_cleanup() and start using itKovarththanan Rajaratnam1-9/+1
svn path=/trunk/; revision=30023
2009-09-20Introduce frame_data_init() and get rid of fill_in_fdata() in tshark.cKovarththanan Rajaratnam1-70/+13
svn path=/trunk/; revision=30021
2009-09-20Make cf_mark_frame() an empty stub in tshark.c. We only need it to satisfy a ↵Kovarththanan Rajaratnam1-10/+2
linker dependency. Add a comment in tap-rtp-common.c indicating that is is wrong to refer to cf_mark_frame() which is only applicable for the GTK UI backend. svn path=/trunk/; revision=30019
2009-09-20Remove unused cf_unmark_frame() functionKovarththanan Rajaratnam1-15/+0
svn path=/trunk/; revision=30018
2009-09-20Move verbose banner output to show_version() and tighten scope of some variablesKovarththanan Rajaratnam1-21/+29
svn path=/trunk/; revision=30017
2009-09-08Add an option to col_fill_in() to allow us to disable column expression ↵Kovarththanan Rajaratnam1-1/+1
processing. This is rarely needed. It's only needed when the user right clicks on the packet list view to generate a display filter. svn path=/trunk/; revision=29806
2009-09-08Make tshark and rawshark use build_column_format_array() instead of ↵Kovarththanan Rajaratnam1-42/+2
duplicating the code svn path=/trunk/; revision=29803
2009-09-07Store the packet encapsulation type as gint8. Saves 3 bytes per packetKovarththanan Rajaratnam1-1/+3
svn path=/trunk/; revision=29767
2009-09-06Split a bunch of init routines into init() and cleanup(). This allows us to ↵Kovarththanan Rajaratnam1-3/+7
free memory properly on shutdown. This is an initial step. There's still some work to do. svn path=/trunk/; revision=29754
2009-08-13Introduce epan_dissect_init()/epan_dissect_cleanup(). These are used to ↵Kovarththanan Rajaratnam1-11/+13
initialise/cleanup stack allocated 'edt' structures. This should speed up dissection since we avoid some malloc traffic. svn path=/trunk/; revision=29404
2009-08-08Note that the new behavior matches what Wireshark does.Guy Harris1-1/+1
svn path=/trunk/; revision=29333
2009-08-07tshark: console_log_level preference now controls which log msgs are sent to ↵Bill Meier1-6/+41
stderr; Note: This is a behavior change: Given the default value for the console_log_level preference tshark will now show ERROR, CRITICAL and WARNING level log messages. Prior to this change tshark was hardwired to show only ERROR and CRITICAL level messages. Time will tell whether this change results in too much noise in tshark output. svn path=/trunk/; revision=29328
2009-07-27From Kovarththanan Rajaratnam:Anders Broman1-1/+1
Only fill in frame_data vals when needed. svn path=/trunk/; revision=29203
2009-07-23From Kovarththanan Rajaratnam:Anders Broman1-0/+7
Precompile custom columns filters. https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=3767 svn path=/trunk/; revision=29174
2009-07-08Clarify that "-w" specifies a *pcap-format* file to be written to.Guy Harris1-1/+2
svn path=/trunk/; revision=29029
2009-06-05Have tap listeners specify whether the "packet" routine requiresGuy Harris1-11/+40
a protocol tree; the column values. This includes stats-tree listeners. Have the routines to build the packet list, and to retap packets, honor those requirements. This means that cf_retap_packets() no longer needs an argument to specify whether to construct the column values or not, so get rid of that argument. This also means that there's no need for a tap to have a fake filter to ensure that the protocol tree will be built, so don't set up a fake "frame" filter. While we're at it, clean up some cases where "no filter" was represented as a null string rather than a null pointer. Have a routine to return an indication of the number of tap listeners with filters; use that rather than the global num_tap_filters. Clean up some indentation and some gboolean vs. gint items. svn path=/trunk/; revision=28645
2009-03-22Change the signature of init_progfile_dir() so the casting of theGuy Harris1-1/+1
function pointer (to main) to an argument to dladdr() is done in init_progfile_dir() rather than its callers. svn path=/trunk/; revision=27814
2009-03-22In Solaris, the second argument to dladdr() is just a void *, not aGuy Harris1-2/+1
const void *. svn path=/trunk/; revision=27813
2009-03-22Attempt to use dladdr() to get the pathname of the executable image ifGuy Harris1-1/+2
it's available and works. svn path=/trunk/; revision=27812
2009-03-15From Jakub Zawadzki:Stig Bjørlykke1-2/+1
More remove checking for NULL before g_free(). svn path=/trunk/; revision=27728
2009-02-15For tshark -b -S -w: close files after reading them; fixes bug #3172;Bill Meier1-7/+10
Also: Do a bit of cleanup on related code. svn path=/trunk/; revision=27458
2009-02-15Add a routine to report write errors to the list of failure-reportingGuy Harris1-4/+16
routines handled by epan/report_err.c. Move copy_binary_file() in file.c to epan/filesystem.c, and rename it to copy_file_binary_mode() (to clarify that it *can* copy text files; arguably, *all* files are "binary" unless you're on, say, an IBM 1401 :-)). Have it use the report_err.c routines, so it works in console-mode programs. Clean up some comments while we're at it. svn path=/trunk/; revision=27456
2009-02-07#include <epan/conversation.h> not req'd ...Bill Meier1-1/+0
svn path=/trunk/; revision=27392
2008-10-03add a -K command line option to provide the name of the kerberos keytab Ronnie Sahlberg1-1/+7
file to use for decryption of Krb5 and GSS-KRB svn path=/trunk/; revision=26343
2008-08-26#include <emem.h> not req'dBill Meier1-1/+0
svn path=/trunk/; revision=26093
2008-08-19The packet counts and drop counts reported by libpcap are unsigned.Guy Harris1-12/+12
Clean up indentation a bit. svn path=/trunk/; revision=26037
2008-06-30Move privileges.c and unicode-utils.c from epan to wsutil (so things likeJeff Morriss1-1/+1
capinfos and dumpcap don't need to depend on libwireshark nor directly pull in those modules). Because capinfos and editcap were only being linked with privileges.c if we had plugins, this allows those programs to be linked when someone is compiling --without-plugins. svn path=/trunk/; revision=25640
2008-06-23Rename capture_opts to global_capture_opts - that's what it's called inGuy Harris1-37/+37
dumpcap, and calling it capture_opts collides with parameter names, as noted by John Smith. svn path=/trunk/; revision=25545
2008-05-30Free up the err_info string returned by wtap_read().Guy Harris1-0/+2
svn path=/trunk/; revision=25399
2008-05-22Move the file utility functions from wiretap to libwsutil so thatJeff Morriss1-2/+1
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-06Removed an unused break.Stig Bjørlykke1-1/+0
svn path=/trunk/; revision=25247
2008-04-30Get rid of extra blank lines at the end of the file.Guy Harris1-2/+0
svn path=/trunk/; revision=25202
2008-04-30Use report_failure() to report failures in capture_sync.c; that will doGuy Harris1-23/+1
the right thing in Wireshark and TShark, as both of them call epan_init() to set the appropriate "report an error" function. That obviates the need to have TShark have its own private version of simple_dialog(). Have cmdarg_err() just call failure_message() instead of duplicating the code in failure_message(). svn path=/trunk/; revision=25201
2008-04-03http://www.wireshark.org/lists/wireshark-dev/200803/msg00308.htmlLuis Ontanon1-0/+2
proto.[hc] define new APIs to allow delayed registration of protocol fields, so that dissectors with "flexible" fields like xml, radius, diameter, snmp do not have to load their files at startup but can do so as late as possible. gtk/dfilter_expr_dlg.c : have the expression dialog registering all prefixes so that all fileds appear in the dialog tshark.c register all prefixes when called with -G epan/radius_dict.l epan/dissectors/packet-radius.c epan/dissectors/packet-radius.h refactor registration to delay dictionary loading as long as possible svn path=/trunk/; revision=24762
2008-03-21Make tshark and rawshark behave similar to wireshark when ↵Sake Blok1-4/+8
"frame.time_delta_displayed" is used within a display filter. (the usefullness of "frame.time_delta_displayed" in a display filter is very limited since it bites it's own tail. Still, wireshark and tshark should at least show the same behaviour) svn path=/trunk/; revision=24708
2008-03-17Allow tshark to print custom columns.Stig Bjørlykke1-1/+8
svn path=/trunk/; revision=24678