Commit Graph

366 Commits

Author SHA1 Message Date
Guy Harris 05c9234020 Make routines not used outside their source files static.
svn path=/trunk/; revision=49522
2013-05-22 20:23:10 +00:00
Michael Mann 312daa4f6c The printf format may require 2 arguments passed and if it does, the second argument could be garbage, so make sure printf has 2 arguments. Fixes bug 8066 (https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=8066)
svn path=/trunk/; revision=49451
2013-05-20 18:50:50 +00:00
Anders Broman 85a8e304dd Add the posibillity to use a key for per-packet-data.
svn path=/trunk/; revision=49259
2013-05-12 18:11:02 +00:00
Jeff Morriss 2602490a2d From Niels de Vos via https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=8626 :
It is useful to see not only the minimal, maximum and average service time for
RPC procedures, but also the total time these took.


From me: add it to the man page.

svn path=/trunk/; revision=49144
2013-05-03 13:53:16 +00:00
Evan Huus 37600a157b Rename value string (and similar) functions to use a consistent pattern. This
was done using textual search+replace, not anything syntax-aware, so presumably
it got most comments as well (except where there were typos).

Use a consistent coding style, and make proper use of the WS_DLL_* defines.

Group the functions appropriately in the header.

I ended up getting rid of most of the explanatory comments since many of them
duplicated what was in the value_string.c file (and were out of sync with the
recent updates I made to those in r48633). Presumably most of the comments
should be in the .h file not the .c file, but there's enough churn ahead that
it's not worth fixing yet.

Part of https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=8467

svn path=/trunk/; revision=48634
2013-03-29 00:26:23 +00:00
Anders Broman dafdc19d9e -Wmissing-prototypes
svn path=/trunk/; revision=48609
2013-03-28 07:34:13 +00:00
Bill Meier 0df5a9390d From beroset:
remove C++ incompatibilities
 https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=8416 attachment #10397

svn path=/trunk/; revision=48438
2013-03-20 01:18:10 +00:00
Anders Broman ed87ba43a6 Use explicit casts.
svn path=/trunk/; revision=48179
2013-03-07 19:52:33 +00:00
Anders Broman 5d698bfd88 Use explicit casts.
svn path=/trunk/; revision=48161
2013-03-07 07:05:45 +00:00
Anders Broman 7990a0e4d0 Use explicit casts.
svn path=/trunk/; revision=48137
2013-03-06 17:35:11 +00:00
Anders Broman b204e38aef Use explicit casts.
svn path=/trunk/; revision=48108
2013-03-05 22:15:20 +00:00
Balint Reczey 1ebdb2e521 Export libwireshark symbols using WS_DLL_PUBLIC define
Also remove old WS_VAR_IMPORT define and related Makefile magic
everywhere in the project.

svn path=/trunk/; revision=47992
2013-03-01 23:53:11 +00:00
Guy Harris 47b8a34ebb GPOINTER_TO_INT() is the inverse of GINT_TO_POINTER().
svn path=/trunk/; revision=47374
2013-01-30 21:31:45 +00:00
Guy Harris d29e1b5604 Use optargp, not optarg, in followSsl(), as in other routines; this
squelches a shadowing warning.

svn path=/trunk/; revision=47373
2013-01-30 21:07:19 +00:00
Michael Mann 7f3064e6ae Add support in TShark to follow SSL streams
From QA Cafe, bug 8280 (https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=8280)

svn path=/trunk/; revision=47372
2013-01-30 20:36:47 +00:00
Alexis La Goutte b6d08dca21 Fix some Dead Store (Dead assignement/Dead increment) Warning found by Clang
svn path=/trunk/; revision=46981
2013-01-06 19:42:11 +00:00
Guy Harris 8ed7a73e22 Fix a bunch of warnings.
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-26 05:57:06 +00:00
Evan Huus b06842274a Remove unused parameter from iousers_process_address_packet
svn path=/trunk/; revision=46628
2012-12-20 03:20:24 +00:00
Michael Mann 072041e3fb Add absolute date options (-ad) for start date/time of conversation in TShark. Bug 1849 (https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=1849)
svn path=/trunk/; revision=46626
2012-12-20 01:19:22 +00:00
Martin Mathieson 460d6be1af Don't cast away const qualifier.
svn path=/trunk/; revision=46550
2012-12-16 00:25:25 +00:00
Bill Meier ae68f42297 Fix [-Wshadow] warnings.
svn path=/trunk/; revision=46426
2012-12-06 20:59:53 +00:00
Martin Mathieson 5589af9699 Use g_malloc0() to initialize the counters. MAC was using uninitialized
memory...

svn path=/trunk/; revision=46385
2012-12-05 03:12:43 +00:00
Martin Mathieson 85e8ebaf19 Add %DL padding to LTE MAC stats.
svn path=/trunk/; revision=46215
2012-11-27 01:11:41 +00:00
Chris Maynard bc8e520439 Allow <interval> to be successfully sscanf'd no matter the locale for the
decimal symbol.  Fixes https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=2880 (again).

#BACKPORT(1.8)

svn path=/trunk/; revision=45770
2012-10-24 17:46:16 +00:00
Jeff Morriss 3551a86c36 We always HAVE_CONFIG_H so don't bother checking whether we have it or not.
svn path=/trunk/; revision=45015
2012-09-20 01:29:52 +00:00
Jeff Morriss 623720dc92 Add python cache and temporary files to the list of files to clean up.
svn path=/trunk/; revision=44974
2012-09-18 17:40:50 +00:00
Jeff Morriss c7fa2f0b6f If we have PYTHON use make-tap-reg.py (in both autofoo and Windows): it's
slightly faster than the old shell-script version on *NIX and it seems
significantly faster on Windows.

svn path=/trunk/; revision=44972
2012-09-18 15:15:39 +00:00
Evan Huus dd01cc0490 From Niels Widger via https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=7725
Add get_filter method to Wireshark's Lua interface (to correspond with the
already-exposed set_filter method).

svn path=/trunk/; revision=44916
2012-09-15 13:58:57 +00:00
Anders Broman 5e11cf0596 Add default branch to try to fix buildbot [-Werror=switch]
svn path=/trunk/; revision=44737
2012-09-02 09:47:49 +00:00
Anders Broman 33a27d1601 From Cal Turney: Incorrect io-stat table format when unsupported -t operand is specified and when using AVG of relative_time fields https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=7685
svn path=/trunk/; revision=44736
2012-09-02 08:36:38 +00:00
Anders Broman 9d6e58a52b From Cal Turney: Fix Performance regression in tshark -z io,stat https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=7674
svn path=/trunk/; revision=44707
2012-08-31 07:30:01 +00:00
Anders Broman 45e9efc6a9 From Evan Huus:
Fix leaks

- don't g_strdup a string just to use it in a g_strdup_printf
- clean up properly in error cases in lua bindings
- misc. other missing g_free() calls
- one missing fclose() in the new 80211_utils

https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=7454

svn path=/trunk/; revision=43617
2012-07-09 01:56:27 +00:00
Martin Mathieson 4c647041d4 Take yet more care not to be dividing by zero when calculating the bit
rate of the channel/UE. Times four... 

svn path=/trunk/; revision=43578
2012-07-06 01:52:09 +00:00
Jakub Zawadzki bf81b42e1e Update Free Software Foundation address.
(COPYING will be updated in next commit)

svn path=/trunk/; revision=43536
2012-06-28 22:56:06 +00:00
Bill Meier d0868be051 Add '*.sbr' to 'clean'
svn path=/trunk/; revision=43233
2012-06-13 16:19:35 +00:00
Gerald Combs 698ad5bd95 From Martin Kaiser via bug 7312:
there's three coverity defects about division by zero in ui/cli/tap-iostat.c,
function iostat_packet()

This can be triggered from the command line

martin@greta# ./tshark -z io,stat,0.2,AVG\(frame.number\)
Capturing on eth0
Floating point exception

it->num is 0, wireshark crashes in

parent->max_vals[it->colnum] =                       
MAX(parent->max_vals[it->colnum], it->counter/it->num);

(and similar for other data types)

My proposal for a fix is to not update parent->max_vals[it->colnum] when
it->num==0, see the attached patch.

svn path=/trunk/; revision=42952
2012-05-31 21:40:55 +00:00
Anders Broman 27596da916 From Florent Drouin:
(Jeff Morriss, Michael Mann )
Add absolute timestamps to -z io,stat

https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=7207

svn path=/trunk/; revision=42808
2012-05-23 06:55:31 +00:00
Anders Broman 0832853fa8 From Robert Bullen:
The Wireshark and tshark TCP conversations stats tables aggregate reused connections into a single line item

https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=7248

svn path=/trunk/; revision=42806
2012-05-23 06:36:47 +00:00
Guy Harris 47fadf1d2a Clean up indentation. (HT should not be assumed to work on 4-space tab
stops.)

svn path=/trunk/; revision=42580
2012-05-11 17:35:56 +00:00
Guy Harris f1b11f62f8 proto_registrar_get_ftype() returns an FT_ value; make its return type
"enum ftenum" to reflect that, and fix the "switch doesn't handle XXX"
warnings that provokes.

svn path=/trunk/; revision=42579
2012-05-11 17:29:56 +00:00
Martin Mathieson cbf94b40d4 Avoid needlessly shadowing a variable.
svn path=/trunk/; revision=42551
2012-05-10 16:05:02 +00:00
Bill Meier 1783543e92 AFAICT '#include sys/types.h' is not needed for these files.
svn path=/trunk/; revision=42446
2012-05-05 21:29:13 +00:00
Bill Meier a703450659 AFAICT '#include sys/types.h' is not needed for these files.
svn path=/trunk/; revision=42443
2012-05-05 20:51:14 +00:00
Chris Maynard 2eeb504807 From Klaus Heckelmann via https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=7221: Avoid wireshark crash on platforms where an 8 byte alignment is required by changing the resp_time field in the icmp_transaction_t from a double to an nstime_t.
svn path=/trunk/; revision=42393
2012-05-03 01:48:59 +00:00
Jakub Zawadzki 8a1dc57c03 Remove doubled semicolons and semicolons outside function.
svn path=/trunk/; revision=42053
2012-04-13 20:22:31 +00:00
Graham Bloice aa8c8f6dfd Added Rel. Start and Duration to tshark -z conv,xxx output. Tidied up duplicated code
svn path=/trunk/; revision=42037
2012-04-12 20:18:49 +00:00
Martin Mathieson 7054049bef Fix test to avoid dividing by 0.0 (was displaying as "-nan" rather than
crashing).

svn path=/trunk/; revision=41948
2012-04-05 00:53:01 +00:00
Jeff Morriss 75c3c92f19 Add a "-build" argument to checkAPIs.pl. Use that argument when building
from makefiles (and thus from the buildbot).

The intention is to be able to tell when a human is running the tool so we
can provide more code-review guidance.

As a starter, enable the "too many proto_tree_add_text() calls" check when
a human is running the tool.

svn path=/trunk/; revision=41943
2012-04-04 20:46:49 +00:00
Alexis La Goutte ba19f72aab Fix some Dead Store (Dead assignement/Dead increment) Warning found by Clang
svn path=/trunk/; revision=41461
2012-03-10 17:45:17 +00:00
Anders Broman 1b7e7ea109 Try to make the buildbot happy
svn path=/trunk/; revision=41370
2012-03-06 09:24:49 +00:00
Anders Broman 3b06ee6ca0 From Cal Turney: Try to fix the remaining warnings. https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=6883
svn path=/trunk/; revision=41367
2012-03-06 08:45:54 +00:00
Anders Broman de47b36104 From Cal Turney:
Bugs in the tshark '-z io,stat' output:
1: The LOAD stat in the last row of the output is inaccurate because rpc.time
is divided by the full interval rather than limiting it to the capture
duration.
2: An The empty comma field (for outputting total frames and bytes) is ignored
when it is the first field in the command.
3: Intervals at the end of capture that contain no data are not displayed. Such
intervals are as important to see as those (zero data intervals) that occur
earlier in the capture. 
4: Floating point numbers are not properly aligned under their column headers.

Enhancements to '-z io,stat' output:
1. Column widths are determined by the maximum magnitude of their values rather
than set to a fixed width of 15 chars which allows for more stats to be
displayed per row without wrapping. 
2. To improve readability, filters wrap at 102 chars or the table width,
whichever is greater, and wrap on the nearest space. An option can be added to
alter the 102-char limit. 
3. Column numbers begin at 1 instead of 0.     
4. The columns and entire output are enclosed in a border for improved
presentability in reports. The table can be imported into a spreadsheet by
specifying the vertical bar as the data delimiter.

"Fixed" compiling on Ubuntu

https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=6883

svn path=/trunk/; revision=41355
2012-03-05 12:06:26 +00:00
Jeff Morriss 094e8f8947 Revert 41240, 41239, 41234, 41233, and (finally) 41231. Every time I fix a warning, 3 more pop up. Some of the uninitialized-variable ones look genuine and figuring them out would take a while.
svn path=/trunk/; revision=41241
2012-02-29 15:28:20 +00:00
Anders Broman ee38355eed Remove the offending %s for now.
svn path=/trunk/; revision=41240
2012-02-29 15:22:33 +00:00
Jeff Morriss 4a6e191973 Don't use itoa(). It still doesn't compile due to a format warning on line 760; like Martin, I'm not sure what is supposed to be there.
svn path=/trunk/; revision=41239
2012-02-29 15:04:06 +00:00
Martin Mathieson e7bd26af04 Fix another couple of warnings, but not sure what to do about the rest:
tap-iostat.c: In function ‘iostat_draw’:
tap-iostat.c:542:5: error: implicit declaration of function ‘itoa’
tap-iostat.c:756:9: error: too few arguments for format
tap-iostat.c:756:9: error: too few arguments for format

itoa() could be converted into a g_snprintf(), but the buffer used is only
one character long.  Is that right?

For the printf() format one, I'm not sure what was intended.


svn path=/trunk/; revision=41234
2012-02-29 10:25:44 +00:00
Martin Mathieson 86f0a7b80c Fix several compiler warnings (a few more remain though).
svn path=/trunk/; revision=41233
2012-02-29 10:19:32 +00:00
Anders Broman 9bdde5216f From Cal Turney:io,stat LOAD error, comma field ignored, zero data intervals not displayed, enhanced output https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=6883
svn path=/trunk/; revision=41231
2012-02-29 05:49:18 +00:00
Bill Meier 605dea0486 CVARSDLL hasn't been used (is undefined) for a while....
svn path=/trunk/; revision=41180
2012-02-24 16:23:38 +00:00
Bill Meier d7ed0237c4 (Minor): use GLIB_CFLAGS instead of GTK_CFLAGS; also put libcliui: as first target
svn path=/trunk/; revision=41078
2012-02-19 23:30:03 +00:00
Guy Harris 7100e7a8a0 We already have GENERATED_HEADER_FILES; use that instead of
GENERATED_H_FILES.

If we have DIRTY_GENERATED_C_FILES, use it the same way we use
GENERATED_C_FILES.

GENERATED_FILES is "everything to nuke on a "make maintainer-clean"",
not "everything to put into the distribution".

svn path=/trunk/; revision=41075
2012-02-19 22:41:53 +00:00
Bill Meier ec953f91f2 A few more changes to fix the Windows build: Fix building tshark-tap-register.c
svn path=/trunk/; revision=41073
2012-02-19 21:38:48 +00:00
Guy Harris 30d168baa6 This is 2 levels down, unlike the 1-level-down ui/Makefile.nmake I
copied as an initial contents of this.

svn path=/trunk/; revision=41071
2012-02-19 19:28:31 +00:00
Guy Harris 2ae289a62e Build the TShark taps into a static libcliui library in the ui/cli
directory, and link TShark with that; let's see if this fixes the
Windows buildbots.

svn path=/trunk/; revision=41070
2012-02-19 19:01:01 +00:00
Guy Harris 9dc2cbdecc Move dftest.c back to the top-level directory; that way, all of the
stuff in ui/cli can be stuffed into a libcliui library to link with
TShark, and all of the source files containing main() (except for
Wireshark) are in the top-level directory (dftest isn't any more special
than TShark or capinfos or mergecap or editcap or...).

svn path=/trunk/; revision=41064
2012-02-19 05:57:14 +00:00
Jörg Mayer 35508464b2 Start moving files to ui/ and ui/cli/
svn path=/trunk/; revision=41047
2012-02-17 12:30:27 +00:00