Commit Graph

44300 Commits

Author SHA1 Message Date
Guy Harris 6cb00759cc Squelch some Windows-only warnings - the third argument to _read() is
int, not size_t.

svn path=/trunk/; revision=46787
2012-12-26 13:49:04 +00:00
Evan Huus c2945ff831 Squash some sign-conversion warnings that g++ picks up but gcc does
not. QtShark now builds warning-free (for me at least).

svn path=/trunk/; revision=46786
2012-12-26 13:41:30 +00:00
Evan Huus 1fafe099ab Cast away another const warning that only shows up under really recent GCCs.
svn path=/trunk/; revision=46785
2012-12-26 13:18:58 +00:00
Anders Broman eb34f28b9f if 0 out debug code
svn path=/trunk/; revision=46784
2012-12-26 12:34:08 +00:00
Anders Broman 369fe110c2 if 0 out debug code
svn path=/trunk/; revision=46783
2012-12-26 12:31:50 +00:00
Anders Broman fe7a2570db Move summary related stuff to summary_dlg
svn path=/trunk/; revision=46782
2012-12-26 12:29:43 +00:00
Guy Harris 3dfac15921 Another 64-bit-to-32-bit warning on 32-bit platforms.
svn path=/trunk/; revision=46781
2012-12-26 12:28:40 +00:00
Guy Harris 6255cc03f0 Fix another discarded qualifier error.
Remove some redundant declarations/definitions from
ui/gtk/capture_dlg.h.

svn path=/trunk/; revision=46780
2012-12-26 12:24:55 +00:00
Guy Harris ec5a6f8c5e pipe_write_header() should return ssize_t, as it returns the return
value from write(), which, at least on UN*X, is ssize_t.

svn path=/trunk/; revision=46779
2012-12-26 12:14:59 +00:00
Guy Harris b467ecfc8b If the attempt to read the record header fails because we hit the EOF,
treat that as "this isn't a CommView file" rather than "this is a bad
file".

svn path=/trunk/; revision=46774
2012-12-26 12:01:14 +00:00
Guy Harris 1825519526 On I/O errors when opening a file, use wtap_close() to clean up, to make
sure we clean up everything.

svn path=/trunk/; revision=46773
2012-12-26 11:59:47 +00:00
Guy Harris 29acae89d9 OK, see if not using an enum gets rid of "implicit conversion shortens
64-bit value to 32 bits" warnings on 32-bit compilers.  According to
6.1.3.3 "Enumeration constants" of C90, "An identifier declared as an
enumeration constant has type int", so there may be signed vs. unsigned
issues.

svn path=/trunk/; revision=46772
2012-12-26 11:46:48 +00:00
Guy Harris ea888f9113 Squelch some more discarding-qualifiers warnings.
svn path=/trunk/; revision=46771
2012-12-26 11:27:21 +00:00
Guy Harris ef175a2208 Squelch some more discarding-qualifiers warnings.
svn path=/trunk/; revision=46770
2012-12-26 11:24:39 +00:00
Guy Harris 1cd57ad3c5 bytestring_to_str() now returns a const char *; assign its result to a
const char *, not a char *.

svn path=/trunk/; revision=46769
2012-12-26 10:54:03 +00:00
Guy Harris 544efd26a6 And another 64-bit-to-32-bit conversion on 32-bit platforms.
svn path=/trunk/; revision=46768
2012-12-26 10:49:05 +00:00
Guy Harris 4fc5688f87 simple_dialog_primary_start() and simple_dialog_primary_end() are now
declared as returning const char *s; make it so.

svn path=/trunk/; revision=46767
2012-12-26 10:33:02 +00:00
Guy Harris 852ee34955 Another 64-bit-to-32-bit warning that shows up in 32-bit environments.
svn path=/trunk/; revision=46766
2012-12-26 10:30:34 +00:00
Guy Harris c1245c6b32 Change wireshark_gen.py to make the operation argument to routines a
"const char *", as it is now expected to be.  Regenerate the dissectors.

Update the URL for OmniOrb.

In README.parlay, use idl2wrs in the sample command.

svn path=/trunk/; revision=46765
2012-12-26 10:28:03 +00:00
Guy Harris ce0d04c6d2 Hopefully this case is OK in C++; bit-fields can't be enums in standard
C, so....

svn path=/trunk/; revision=46764
2012-12-26 09:59:18 +00:00
Guy Harris 688b567111 And more 64-bit-to-32-bit time issues on 32-bit platforms.
svn path=/trunk/; revision=46763
2012-12-26 09:56:18 +00:00
Guy Harris 15feaf9744 OK, I give up.
svn path=/trunk/; revision=46759
2012-12-26 07:08:24 +00:00
Guy Harris dd1505428c Another ILP32 Y2.038K warning.
svn path=/trunk/; revision=46758
2012-12-26 07:05:42 +00:00
Guy Harris 6d678c20d6 OK, does *this* convince the compiler that the loop isn't ever going to
be infinite?

svn path=/trunk/; revision=46757
2012-12-26 06:56:17 +00:00
Guy Harris 7f40879104 Squelch a (Y2.038K) warning.
svn path=/trunk/; revision=46756
2012-12-26 06:41:49 +00:00
Guy Harris 229ec8c545 OK, *this* isn't a possibly-infinite loop.
svn path=/trunk/; revision=46755
2012-12-26 06:39:53 +00:00
Guy Harris 34633f5fe3 Widen some loop variables, in the hopes that it'll squelch some loop
warnings.

svn path=/trunk/; revision=46754
2012-12-26 06:20:59 +00:00
Guy Harris 50102335a7 Eliminate multiple "const"s.
svn path=/trunk/; revision=46753
2012-12-26 06:16:39 +00:00
Guy Harris 44d7a093e8 Widen an argument to match its (theoretical) widest possible width. See
if that squelches a loop-optimization warning.

svn path=/trunk/; revision=46752
2012-12-26 06:14:44 +00:00
Guy Harris 07350b2b53 Squelch a (Y2.038K) warning.
svn path=/trunk/; revision=46751
2012-12-26 06:10:25 +00:00
Guy Harris b0d6fbcdeb OK, fine, maybe sometimes it's used; flag it with _U_ while we're at it.
svn path=/trunk/; revision=46750
2012-12-26 06:07:04 +00:00
Guy Harris a9635c3b9c If a parameter might be unused, mark it with _U_; don't stick in a fake
usage.

svn path=/trunk/; revision=46749
2012-12-26 06:04:05 +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
Guy Harris 8ede6b7dc0 bssmap_msg_fcn[] is a dense array, not a sparse array, so *every* entry
must be filled in - even if we don't happen to have dissectors for
particular message types.  Just put NULL in there, so we don't index
past the end of the array, grab a random location in memory's contents
as a function pointer, and crash when we call through that pointer.

svn path=/trunk/; revision=46747
2012-12-25 23:14:05 +00:00
Guy Harris 8432edcc72 More checks to make sure pinfo->private_data is not null.
svn path=/trunk/; revision=46746
2012-12-25 22:48:01 +00:00
Guy Harris ce5039c522 Add some additional sanity checks.
svn path=/trunk/; revision=46745
2012-12-25 22:39:11 +00:00
Michael Tüxen 22df071cef Add support for -D option. The preamble will start with
an I or O indicating the direction of the packet. This
will be stored in the generated file if the pcap-ng
format is used.
Thanks to Jaap for suggesting to integrate this into
the preamble!

svn path=/trunk/; revision=46744
2012-12-25 22:37:40 +00:00
Guy Harris c8f3c1d9a3 In dissect_bthci_evt_command_complete():
Make a loop counter a full-width integer, just to be sure.

Do *NOT* assume that pinfo->private_data is non-null; I have at least
one capture where it is null when dissect_bthci_evt_command_complete()
is captured.

svn path=/trunk/; revision=46743
2012-12-25 22:35:54 +00:00
Michael Tüxen 01d97c7ee1 Fix writing of PCAP-NG files when flags are provided.
svn path=/trunk/; revision=46742
2012-12-25 22:25:40 +00:00
Michael Tüxen 6329407d9a Remove current version of -D option, because:
* it is off by default
* not documented
* makes text2pcap to coredump when used
* its goal is not clear (to me).
I'm willing to reimplement it under a different option name
if I understand what it should do. Then I can fix and test it.


svn path=/trunk/; revision=46741
2012-12-25 19:53:04 +00:00
Michael Tüxen 05827f38ab Add some debug output regarding preamble processing.
svn path=/trunk/; revision=46740
2012-12-25 19:16:28 +00:00
Martin Kaiser 13a5f0b5da set the dtls record length for reassembly _before_ adding a fragment
this is a workaround for
https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=8111
it does not fully fix the underlying issue

svn path=/trunk/; revision=46739
2012-12-25 18:44:14 +00:00
Michael Tüxen 4abfc13149 Clear preamble if no timespec is given.
svn path=/trunk/; revision=46738
2012-12-25 17:45:04 +00:00
Michael Tüxen f8d48662c8 Add support of -m option for SCTP.
svn path=/trunk/; revision=46737
2012-12-25 17:32:30 +00:00
Michael Tüxen dcd2b0614b Fix SCTP packet generation if DATA chunk headers need
to be generated.

svn path=/trunk/; revision=46736
2012-12-25 14:34:24 +00:00
Michael Tüxen 4aa19ce98f Fix bugs I introduced. Now
od -Ax -tx1 -v stream | text2pcap -m1460 -T1234,1234 - stream.pcap
does work again.

svn path=/trunk/; revision=46734
2012-12-25 12:02:39 +00:00
Guy Harris b98d44d71f If there's no packet data, there's nothing to check to see whether this
is an MPEG-2 transport packet, so don't treat it as one.

svn path=/trunk/; revision=46733
2012-12-25 12:00:32 +00:00
Guy Harris ceb69f1413 Show the Vines Fragmentation Protocol control flags field as bitflags,
rather than as a single field.  If bits other than the two defined bits
are set in the first byte of the packet, don't dissect UDP packets as
Vines FRP, so that other dissectors get a chance to look at the packet.

svn path=/trunk/; revision=46732
2012-12-25 11:57:03 +00:00
Michael Tüxen d6a70b809e Improve description.
svn path=/trunk/; revision=46731
2012-12-25 10:31:21 +00:00
Michael Tüxen 2daea0a310 Add option to suppress duplicate suppression.
svn path=/trunk/; revision=46730
2012-12-25 10:29:22 +00:00