Commit Graph

58 Commits

Author SHA1 Message Date
Guy Harris 64dd98e903 No version_info.c any more.
Change-Id: I96f4d07ac08d80811bb4ba9469cba8265d288945
Reviewed-on: https://code.wireshark.org/review/6157
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2014-12-31 07:10:17 +00:00
Guy Harris 27be466c9b Do the full string in get_{compiled,runtime}_version_info().
Have them start the string with "Compiled" or "Running on", and return
the string when done.

Change-Id: Ic4d290c963621fa0385dc5aab766fd4ad31d3810
Reviewed-on: https://code.wireshark.org/review/6155
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2014-12-31 06:29:11 +00:00
Guy Harris c1f30471ca Move the version_info.c stuff to wsutil/ws_version_info.c.
Change-Id: I3a5c7e219974bfb924819b43b4d445eaf00e5bde
Reviewed-on: https://code.wireshark.org/review/6153
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2014-12-31 03:41:02 +00:00
Dario Lombardo 63ebe918d9 Removed duplicated #include lines
Change-Id: I9cafa3cd5c74121168777d8c656e7e94e89efd3c
Reviewed-on: https://code.wireshark.org/review/6065
Petri-Dish: Pascal Quantin <pascal.quantin@gmail.com>
Reviewed-by: Martin Mathieson <martin.r.mathieson@googlemail.com>
Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com>
2014-12-28 00:02:39 +00:00
Gerald Combs 9ba9cd83a4 Qt: Add a CaptureFile class.
Wrap the capture_file struct in a QObject which translates cf_cb_* and
capture_cb_* events into signals. Move the global cfile to
capture_file.cpp.

Don't use a void pointer for the capture file struct.

Change-Id: Ic5d5efb4bb1db64aa0247245890e5669b1da723a
Reviewed-on: https://code.wireshark.org/review/5885
Petri-Dish: Gerald Combs <gerald@wireshark.org>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2014-12-20 17:39:29 +00:00
Joerg Mayer ed676ca3b9 Commit 54b733ce9a broke compilation of
echld by removing TS_PREC_AUTO_USEC. Replace its use by TS_PREC_AUTO.
No idea whether that's correct but it compiles again.
Trying to commit this brought complaints by checkapi, so fixed them as
well.

Maybe the echld code should be removed, it seems to be unmaintained.

Change-Id: Id9a0a6fc129abd1b8c93629c31a89c2d9ea2243f
Reviewed-on: https://code.wireshark.org/review/4811
Reviewed-by: Jörg Mayer <jmayer@loplof.de>
2014-10-18 06:43:58 +00:00
Guy Harris 067beb0210 Add a bunch of missing files to the distribution.
Files from the debian directory, documents from the doc directory,
graphics from the docbook/wsug_graphics directory, and the echld
Makefile.nmake.

Change-Id: Iccccc58811753581b0b180053defd937aea22f95
Reviewed-on: https://code.wireshark.org/review/3283
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2014-07-31 07:43:41 +00:00
Peter Wu 0272b9c435 Fix heap-use-after-free via setlocale
setlocale returns a statically-allocated memory which can be modified by
subsequent calls of setlocale. This triggers a heap-use-after free in
ASAN when the setlocale function is called again with the previous
pointer.

This was found when trying to use the "Show All Streams" option via
the Telephony -> RTP menu.

While at it, add some modelines

Change-Id: Ide47e877ce828734fd8c5c1b064d9c505ba2b37a
Reviewed-on: https://code.wireshark.org/review/3234
Reviewed-by: Peter Wu <peter@lekensteyn.nl>
Reviewed-by: Evan Huus <eapache@gmail.com>
2014-07-29 01:53:32 +00:00
Guy Harris 9dfb3e7b46 Wrong macro.
Change-Id: I2e0e7c1a30c9fc2d5af7cbd53dae26ad9a619e71
Reviewed-on: https://code.wireshark.org/review/2908
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2014-07-07 04:32:11 +00:00
Peter Wu f2b4daf400 Add printf-format annotations, fix garbage
The WRETH dissector showed up some garbage in the column display. Upon
further inspection, it turns out that the format string had a trailing
percent sign which caused (unsigned)-1 to be returned by
g_printf_string_upper_bound (in emem_strdup_vprintf). Then ep_alloc is
called with (unsigned)-1 + 1 = 0 memory, no wonder that garbage shows
up. ASAN could not even catch this error because EP is in charge of
this.

So, start adding G_GNUC_PRINTF annotations in each header that uses
the "fmt" or "format" paramters (grepped + awk). This revealed some
other errors. The NCP2222 dissector was missing a format string (not
a security vuln though).

Many dissectors used val_to_str with a constant (but empty) string,
these have been replaced by val_to_str_const. ASN.1 dissectors
were regenerated for this.

Minor: the mate plugin used "%X" instead of "%p" for a pointer type.

The ncp2222 dissector and wimax plugin gained modelines.

Change-Id: I7f3f6a3136116f9b251719830a39a7b21646f622
Reviewed-on: https://code.wireshark.org/review/2881
Reviewed-by: Evan Huus <eapache@gmail.com>
2014-07-06 23:00:40 +00:00
Guy Harris 9e6487f247 Move utility routines for capturing into a libcaputils static library.
Some of those routines are used only in dumpcap; others are used in
TShark and Wireshark as well.

Change-Id: I9d92483f2fcff57a7d8b6bf6bdf2870505d19fb7
Reviewed-on: https://code.wireshark.org/review/2841
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2014-07-04 07:25:26 +00:00
Guy Harris b33512b704 Move capture_session.h to capchild; what it declares is defined there.
Change-Id: I8b1407839390b7ac0b45bf6f583c1a509073f002
Reviewed-on: https://code.wireshark.org/review/2709
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2014-06-30 05:09:31 +00:00
Guy Harris 53c2a4d121 clopts_common.c is now part of wsutil.
Change-Id: I0fa773bfc6364689d6e4f97ee89a6508622d2b2a
Reviewed-on: https://code.wireshark.org/review/2706
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2014-06-29 23:35:59 +00:00
Guy Harris f71a6d0c47 capture_ifinfo.c and capture_sync.c are now in libcapchild.
Change-Id: I8203a3a1a77f231c4286fd32fcc6372a2ac9db48
Reviewed-on: https://code.wireshark.org/review/2603
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2014-06-24 02:07:23 +00:00
Guy Harris adf6b1a8df For capchild headers, include <capchild/XXX.h>.
Change-Id: I780c69ee637dcd9846756a2e2d6a35baf02d826d
Reviewed-on: https://code.wireshark.org/review/2594
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2014-06-24 00:28:08 +00:00
Guy Harris 376dfe847b Fix build errors for tfshark and echld.
Some come from the recent version information changes, some were broken
before that.

Change-Id: I9429f7d45d3c51c579aef592b37c79130a443299
Reviewed-on: https://code.wireshark.org/review/2531
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2014-06-22 01:55:41 +00:00
Guy Harris c46329c27b Add a routine to return a version string including VCS information.
Add a routine get_ws_vcs_version_info() that, for builds from a tree
checked out from Wireshark's version control system, returns a string
that includes both the Wireshark version number and an indication of
what particular VCS version was checked out, and just returns
Wireshark's version number for other builds.

Use that routine rather than manually gluing VERSION and the Git version
number together.

("vcs", not "git", just in case we do something bizarre or mercurial
some day. :-))

Change-Id: Ie5c6dc83b9d3f56655eaef30fec3ec9916b6320d
Reviewed-on: https://code.wireshark.org/review/2529
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2014-06-22 01:06:25 +00:00
Guy Harris ac534393ce cfutils.c is now part of libwsutil.
Change-Id: I2105ace8575e93d79e10dfdd33e1523461c3f03e
Reviewed-on: https://code.wireshark.org/review/2514
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2014-06-21 18:39:21 +00:00
Guy Harris 43443af0ac Move get_copyright_info() to wsutil.
Change-Id: I75c1c747cd2b4a9845c659636582d54b2caecf1a
Reviewed-on: https://code.wireshark.org/review/2510
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2014-06-21 17:33:05 +00:00
Bill Meier a42b04eade Remove 'include win32.mak' from certain nmake files when not needed.
Change-Id: I05a505d884abb5fd7fca87bb89af29e3e4502b74
Reviewed-on: https://code.wireshark.org/review/1460
Reviewed-by: Bill Meier <wmeier@newsguy.com>
2014-05-01 15:12:46 +00:00
Alexis La Goutte 757aa33220 Continue to remove $Id$ from top of file
(Using sed : sed -i '/^\# \$Id\$/,+1 d') (start with dash)

Change-Id: Ia4b5a6c2302f6a531f6a86c1ec3a2f8205c8c2dd
Reviewed-on: https://code.wireshark.org/review/881
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2014-03-31 18:48:06 +00:00
Alexis La Goutte 296591399f Remove all $Id$ from top of file
(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-03-04 14:27:33 +00:00
Bill Meier 11b5c15fdb Remove trailing whitespace
Change-Id: I8116f63ff88687c8db3fd6e8e23b22ab2f759af0
Reviewed-on: https://code.wireshark.org/review/385
Reviewed-by: Bill Meier <wmeier@newsguy.com>
Tested-by: Bill Meier <wmeier@newsguy.com>
2014-02-25 20:46:49 +00:00
Gerald Combs f966980937 Replace "svn" with "git" all over the place.
Rename "SVNPATH" to "GITBRANCH" since that seems more appropriate.
Rename "svnversion.h" to "version.h" as Evan suggested. Update some
URLs. In make-version.pl, make sure we don't set an improper upstream
branch name. Use the number of commits + short hash from `git describe`
for package names by default.

Change-Id: I922bba8d83eabdf49284a119f55b4076bc469b96
Reviewed-on: https://code.wireshark.org/review/139
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2014-02-07 23:03:03 +00:00
Bill Meier 8ab9c55618 From Ville Skyttä: Spelling Fixes
https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=9591


svn path=/trunk/; revision=54387
2013-12-23 15:53:13 +00:00
Jörg Mayer 7b80faa66f Fix some warnings that were really errors.
It would really help to fix the remaining warnings so that these
files can be compiled with -Werror, which gets me to the quesiton:
Is this code still maintained in some form or was it an interesting
experiment that has been terminated?

svn path=/trunk/; revision=53406
2013-11-18 07:25:12 +00:00
Jörg Mayer 061831b3db Don't include epan/filesystem.h any more
svn path=/trunk/; revision=53402
2013-11-17 21:25:00 +00:00
Jörg Mayer a3d422f906 The experimental code in echld/ also got broken by the wtap
file types commit. Make this compile again as well.
Trivial whitespace cleanup while in those files.

svn path=/trunk/; revision=53168
2013-11-08 11:50:57 +00:00
Jeff Morriss 0690c4f490 More SVN properties cleanup.
svn path=/trunk/; revision=52884
2013-10-27 01:11:15 +00:00
Jörg Mayer fbef795dc3 Move common.c to dirty files
svn path=/trunk/; revision=52012
2013-09-13 17:23:29 +00:00
Jörg Mayer b0ef116a4c Fix
/home/jmayer/work/wireshark/svn/trunk/echld/parent.c: In function ‘echld_terminate’:
/home/jmayer/work/wireshark/svn/trunk/echld/parent.c:305:5: error: suggest braces around empty body in ‘do’ statement [-Werror=empty-body]
  do ; while(sleep(1)); /* wait a full sec without signals */
     ^
cc1: all warnings being treated as errors


svn path=/trunk/; revision=52011
2013-09-13 17:23:00 +00:00
Jörg Mayer 79cd883f02 Fix might be used uninitialized warning
svn path=/trunk/; revision=52009
2013-09-13 17:20:39 +00:00
Jörg Mayer f24067ec9d Fix warnings shown by gcc-4.8.1
/home/jmayer/work/wireshark/svn/trunk/echld/common.c:134:2: error: enum conversion in initialization is invalid in C++ [-Werror=c++-compat]
  {0,NULL}
  ^
/home/jmayer/work/wireshark/svn/trunk/echld/common.c:134:2: error: (near initialization for ‘t_map[34].type’) [-Werror=c++-compat]
/home/jmayer/work/wireshark/svn/trunk/echld/common.c:269:3: note: expected ‘echld_msg_type_t’ but argument is of type ‘guint32’
/home/jmayer/work/wireshark/svn/trunk/echld/common.c:253:8: error: variable ‘off’ set but not used [-Werror=unused-but-set-variable]
   long off;
        ^
cc1: all warnings being treated as errors

Still todo:

/home/jmayer/work/wireshark/svn/trunk/echld/common.c: In function ‘echld_read_frame’:
/home/jmayer/work/wireshark/svn/trunk/echld/common.c:269:3: error: enum conversion when passing argument 4 of ‘cb’ is invalid in C++ [-Werror=c++-compat]
   cb( &(r->rp[sizeof(hdr_t)]), HDR_LEN(h), h->h.chld_id, HDR_TYPE(h), h->h.reqh_id, cb_data);
   ^
/home/jmayer/work/wireshark/svn/trunk/echld/common.c:269:3: note: expected ‘echld_msg_type_t’ but argument is of type ‘guint32’

Whitespace fixes


svn path=/trunk/; revision=52007
2013-09-13 17:08:00 +00:00
Jörg Mayer 8d5cb217dc Fix ECHLD_TIMEOUT vs ECHLD_TIMED_OUT a second time for today.
svn path=/trunk/; revision=50852
2013-07-23 20:45:25 +00:00
Luis Ontanon c9e6eda769 Yet another iteration...
svn path=/trunk/; revision=50846
2013-07-23 18:26:38 +00:00
Jörg Mayer 7e4ed00126 Move files to dirty that generate a warning about
variable length array

svn path=/trunk/; revision=50835
2013-07-23 13:24:52 +00:00
Jörg Mayer 8bdf0dd3ff - Fix a typo that was warned about (acually a coding error that
would not have had any effect in this particular case).
- Remove trailing whitespace.

svn path=/trunk/; revision=50834
2013-07-23 13:23:40 +00:00
Jörg Mayer da52691fb1 Include sys/wait.h
svn path=/trunk/; revision=50833
2013-07-23 13:11:16 +00:00
Jörg Mayer 0177ef4970 - Whitespace changes
- Add a missing continuation \

svn path=/trunk/; revision=50770
2013-07-21 21:17:35 +00:00
Jörg Mayer 61f57ac30e Remove trailing whitespace
svn path=/trunk/; revision=50754
2013-07-21 14:05:04 +00:00
Jörg Mayer 94aa66e642 More fixes for building echld with cmake (not yet finished)
svn path=/trunk/; revision=50752
2013-07-21 13:40:08 +00:00
Jörg Mayer 94bdbd2e1e Include config.h, not ../config.h, just like everywhere else.
svn path=/trunk/; revision=50750
2013-07-21 13:25:35 +00:00
Jeff Morriss 7a3ea48eb8 disabled_protos.c is in libwireshark now.
svn path=/trunk/; revision=50523
2013-07-12 02:40:44 +00:00
Jeff Morriss 16206348d9 Move disabled_protos.{h,c} into epan.
svn path=/trunk/; revision=50521
2013-07-12 01:40:06 +00:00
Luis Ontanon 880e19ac3d Yet another iteration:
- improve the parameter api
- Add a parameter set message to the NEW child message to set parameters in bulk in the child
- some more harvestig from tshark


svn path=/trunk/; revision=50393
2013-07-05 23:57:07 +00:00
Luis Ontanon 047c252e93 some more harvesting from tshark
svn path=/trunk/; revision=50380
2013-07-04 05:34:25 +00:00
Luis Ontanon baee2e21f7 ANother iteration,
- started harvesting pieces from tshark.
- fixed? signal handlers
- interactive test program

very hard to debug... set follow-on-fork doesn't seem to work on my mac. Need linux I guess...


svn path=/trunk/; revision=50273
2013-07-01 01:49:34 +00:00
Luis Ontanon a3c320fd75 One further iteration, get things right, put placeholders for things to do.
svn path=/trunk/; revision=50227
2013-06-29 01:16:48 +00:00
Luis Ontanon cf647de6a1 MS: new child
MS: ping child
MS: set/get child parameter


svn path=/trunk/; revision=50218
2013-06-28 21:10:52 +00:00
Luis Ontanon 99013aefa8 MS: list interfaces!
svn path=/trunk/; revision=50195
2013-06-27 19:00:01 +00:00