aboutsummaryrefslogtreecommitdiffstats
path: root/capture_sync.c
AgeCommit message (Collapse)AuthorFilesLines
2014-03-04Remove all $Id$ from top of fileAlexis La Goutte1-2/+0
(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-02-26Fix capture_sync: Assigned value is garbage or undefined (clang analyzer)Hadriel Kaplan1-3/+3
I'm not 100% positive this fix is the right way to handle this condition, but it seems the safest way without changing a lot of other code. Change-Id: Icaa8d6f38bc03177162f046d1e7ca55d87bad6a6 Reviewed-on: https://code.wireshark.org/review/373 Reviewed-by: Evan Huus <eapache@gmail.com> Reviewed-by: Balint Reczey <balint@balintreczey.hu> Tested-by: Balint Reczey <balint@balintreczey.hu>
2014-01-19coverity 281214Martin Kaiser1-6/+8
check the return value of strtok() before passing it to strtoul() (can't be triggered in practice as dumpcap never sends a NULL string) svn path=/trunk/; revision=54847
2013-12-03When including <epan/prefs.h> don't force inclusion of <epan/uat.h>Jakub Zawadzki1-0/+1
svn path=/trunk/; revision=53769
2013-11-17Move the epan/filesystem.c routines to wsutil; they're not specific toGuy Harris1-1/+1
packet dissection, they're specific to the entire Wireshark suite of programs. svn path=/trunk/; revision=53377
2013-10-11Replace a question in a comment with a better explanation (that answers the ↵Jeff Morriss1-3/+2
question). svn path=/trunk/; revision=52550
2013-08-29Handle the 2GiB boundary case of the max filesize autostop condition ↵Chris Maynard1-16/+16
properly so that we avoid overflow conditions and so that we ensure we don't capture more than 2GiB. Also, document the max filesize autostop value of 2GIB as well as indicating that it's truly GiB and not GB. This fixes the problem reported on ask: http://ask.wireshark.org/questions/23891/wireshark-wont-run-with-multiple-capture-files #BACKPORT(1.10) ... not sure about 1.8? svn path=/trunk/; revision=51576
2013-08-24Add a routine to create a dummy signal pipe and pass it to dumpcap whenGerald Combs1-1/+27
gathering interface statistics. This should help dumpcap exit properly if its parent process crashes or is killed. svn path=/trunk/; revision=51502
2013-08-01pass --capture-comment from tshark to dumpcapMartin Kaiser1-0/+5
handle error cases in tshark svn path=/trunk/; revision=51094
2013-07-15Move report_err.{h,c} from epan into wsutil: there's nothing epan-specific ↵Jeff Morriss1-1/+1
there and moving it avoids having to recompile the file for use in editcap and capinfos (which don't link against libwireshark). svn path=/trunk/; revision=50598
2013-06-27MS: list interfaces!Luis Ontanon1-1/+17
svn path=/trunk/; revision=50195
2013-06-27get main_window_update out of the way... pass an update_cb to the ↵Luis Ontanon1-17/+17
capture_sync stuff ... as per the XXX comment removed from tshark.c this was a mess to keep the linker happy... I couldn't! I did this without even understanding whether calling main_window_update was realy necessary in most cases. I guess nothing or more specific update cbs would be best. svn path=/trunk/; revision=50188
2013-06-04From Mike Garratt:Anders Broman1-2/+39
Friendly Names support causing unnecessary delay when Wireshark starts. https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=8034 svn path=/trunk/; revision=49752
2013-05-23No need for those arguments to be pointers to arrays of const pointers,Guy Harris1-15/+15
especially given that we end up freeing what all of those pointers point to. svn path=/trunk/; revision=49542
2013-05-22Fix the Windows side to look for the signal pipe stuff in cap_session.Guy Harris1-3/+3
svn path=/trunk/; revision=49497
2013-05-22Pull the capture-session state information out of capture_opts and putGuy Harris1-32/+47
it into a separate capture_session structure. capture_opts should contain only user-specified option information (and stuff directly derived from it, such as the "capturing from a pipe" flag). svn path=/trunk/; revision=49493
2013-03-25From Michal Labedzki: linktype_val_to_name() returns a string, not aGuy Harris1-3/+1
number, and that string is what's appropriate for the -y command-line argument, so just directly pass it to sync_pipe_add_arg(), and get rid of the now-unnecessary sdlt variable. svn path=/trunk/; revision=48546
2013-03-05it seems that g_free() needs a gpointerMartin Kaiser1-3/+3
using a gconstpointer creates a warning capture_sync.c: In function ‘sync_pipe_open_command’: capture_sync.c:823:13: error: passing argument 1 of ‘g_free’ discards ‘const’ qualifier from pointer target type [-Werror] svn path=/trunk/; revision=48096
2013-03-05Use explicit casts.Anders Broman1-7/+7
svn path=/trunk/; revision=48088
2013-02-28Add a #define for the default capture buffer size and use it.Jeff Morriss1-2/+1
svn path=/trunk/; revision=47942
2013-02-27Increase the default buffer size to 2MB.Anders Broman1-1/+2
svn path=/trunk/; revision=47920
2013-01-14Declare count as ssize_t instead of size_t, since read(), and thus ↵Chris Maynard1-1/+1
ws_read(), can return a negative number. If that were to happen, then assigning the return value to an unsigned variable and then comparing that variable against 0 will yield incorrect/unintended results. Fixes Coverity CID 761910: Negative array index write. svn path=/trunk/; revision=47069
2012-12-29Add a few consts to fix some compiler (GCC) errors.Bill Meier1-1/+1
svn path=/trunk/; revision=46849
2012-12-26Make sure we don't sign-extend the (binary) bytes of the message length.Guy Harris1-1/+1
svn path=/trunk/; revision=46792
2012-12-26Use casts rather than changing the prototype of pipe_convert_header.Evan Huus1-9/+9
It has to be unsigned or else certain headers get misread due to signedness. svn path=/trunk/; revision=46790
2012-12-26Squash some sign-conversion warnings that g++ picks up but gcc doesEvan Huus1-3/+3
not. QtShark now builds warning-free (for me at least). svn path=/trunk/; revision=46786
2012-12-26Fix a bunch of warnings.Guy Harris1-22/+23
Cast away some implicit 64-bit-to-32-bit conversion errors due to use of sizeof. Cast away some implicit 64-bit-to-32-bit conversion errors due to use of strtol() and strtoul(). Change some data types to avoid those implicit conversion warnings. When assigning a constant to a float, make sure the constant isn't a double, by appending "f" to the constant. Constify a bunch of variables, parameters, and return values to eliminate warnings due to strings being given const qualifiers. Cast away those warnings in some cases where an API we don't control forces us to do so. Enable a bunch of additional warnings by default. Note why at least some of the other warnings aren't enabled. randpkt.c and text2pcap.c are used to build programs, so they don't need to be in EXTRA_DIST. If the user specifies --enable-warnings-as-errors, add -Werror *even if the user specified --enable-extra-gcc-flags; assume they know what they're doing and are willing to have the compile fail due to the extra GCC warnings being treated as errors. svn path=/trunk/; revision=46748
2012-12-12Make the "-g" argument to tshark actually work (by passing it to dumpcap).Jeff Morriss1-0/+4
svn path=/trunk/; revision=46515
2012-12-05Fix numerous instances of a variable/parameter name "shadowing" a library ↵Bill Meier1-3/+3
function name; (At least some (gcc ?) compilers give a "shadow" warning for these). svn path=/trunk/; revision=46402
2012-11-05From Bill Parker:Anders Broman1-0/+4
code fails to check/test return value from select() https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=7861 svn path=/trunk/; revision=45917
2012-10-11Make sure sync_interface_stats_close calls sync_pipe_kill on allGerald Combs1-0/+7
platforms. This ham-fistedly fixes a delay when moving from the "Capture" item to the "Open" and "Learn" items on the welcome screen in the Qt version. svn path=/trunk/; revision=45475
2012-10-08Add a cast.Gerald Combs1-1/+1
svn path=/trunk/; revision=45407
2012-10-08Log the time we spend waiting for the capture child to exit.Gerald Combs1-1/+13
Add breadcrumbs so that we can switch from g_get_current_time to g_get_real_time when our minimum GLib version is >= 2.28. svn path=/trunk/; revision=45399
2012-09-20We always HAVE_CONFIG_H so don't bother checking whether we have it or not.Jeff Morriss1-3/+1
svn path=/trunk/; revision=45015
2012-08-24Revert r44644 and 44645. g_source_*, g_timeout_, and g_io_* all dependGerald Combs1-1/+0
on the GLib main loop which isn't portable (unless you want to want to manage the main loop yourself). svn path=/trunk/; revision=44655
2012-08-23Move the pipe input routines to the common UI directory.Gerald Combs1-0/+1
svn path=/trunk/; revision=44644
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-20Comment back in the body of tb80211_do_set_channel to avoid warnings aboutJörg Mayer1-0/+47
unused parameters. Add the missing functions by applying the skipped patches to capture_sync.[hc] svn path=/trunk/; revision=43414
2012-06-09Undo an accidental portion of the last commit.Chris Maynard1-1/+1
svn path=/trunk/; revision=43173
2012-06-09Be sure to specify FORMAT_MESSAGE_IGNORE_INSERTS in the dwFlags arg to all ↵Chris Maynard1-3/+3
FormatMessage() calls where FORMAT_MESSAGE_FROM_SYSTEM is also specified. (Ref: http://blogs.msdn.com/b/oldnewthing/archive/2007/11/28/6564257.aspx) svn path=/trunk/; revision=43172
2012-04-13From Evan Huus: fix memory leak. Fixes bug 7081.Guy Harris1-0/+3
svn path=/trunk/; revision=42057
2012-03-11If the length is bogus in a message received from the sync pipe, dumpGuy Harris1-2/+3
out all 4 bytes we read, to provide more information about the message that was sent so it's easier to see if something was spewing extra output to the standard output or error in the child. svn path=/trunk/; revision=41489
2012-01-25Third try. This time pipes and stdin are supported and theMichael Tüxen1-0/+2
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-2/+0
svn path=/trunk/; revision=40695
2012-01-24Second try. This time pipes and stdin are supported.Michael Tüxen1-0/+2
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-16Move some headers for UI stuff, and the alert_box.c UI-specific file, toGuy Harris1-1/+3
the ui directory. (Perhaps some other files that would be used by all flavors of Wireshark, for any GUI toolkit or for someting such as ncurses, and not for any command-line tool such as TShark, should be moved there as well.) Shuffle some #includes to put the "ui/XXX.h" includes together. svn path=/trunk/; revision=40529
2012-01-04Expand, and fix, a comment. Change a function argument name to matchGuy Harris1-7/+16
the name in the definition of the function it calls. svn path=/trunk/; revision=40367
2011-11-16Get rid of unnecessary assignment (the code below it always assigns aGuy Harris1-1/+0
value to the variable). Praise be to Clang Cat. svn path=/trunk/; revision=39877
2011-10-20Back out infrastructure change. We missed supportingMichael Tüxen1-2/+0
stdin and pipes. svn path=/trunk/; revision=39498
2011-10-20Use a global list containing all interfaces and only changeMichael Tüxen1-0/+2
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=39495