sfisher [Mon, 25 Apr 2011 22:55:31 +0000 (22:55 +0000)]
Take out extra pair of parenthesis
git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@36858
f5534014-38df-0310-8fa8-
9805f1628bb7
darkjames [Mon, 25 Apr 2011 21:26:52 +0000 (21:26 +0000)]
Make checkapi happy
git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@36857
f5534014-38df-0310-8fa8-
9805f1628bb7
guy [Mon, 25 Apr 2011 21:20:47 +0000 (21:20 +0000)]
Get rid of some unnecessary casts that just provoke uninteresting
warnings.
More fun with GArrays: cast away some warnings that don't report real
alignment problems and that wouldn't even happen if the "data" member of
a GArray were a "void *".
git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@36856
f5534014-38df-0310-8fa8-
9805f1628bb7
guy [Mon, 25 Apr 2011 21:19:54 +0000 (21:19 +0000)]
More fun with GArrays: cast away some warnings that don't report real
alignment problems and that wouldn't even happen if the "data" member of
a GArray were a "void *".
git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@36855
f5534014-38df-0310-8fa8-
9805f1628bb7
guy [Mon, 25 Apr 2011 21:19:22 +0000 (21:19 +0000)]
More fun with GArrays: cast away some warnings that don't report real
alignment problems and that wouldn't even happen if the "data" member of
a GArray were a "void *".
Clean up indentation.
git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@36854
f5534014-38df-0310-8fa8-
9805f1628bb7
guy [Mon, 25 Apr 2011 21:07:01 +0000 (21:07 +0000)]
Get rid of some extra parentheses that cause clang to warn that you
might have meant to do an assignment rather than a comparison.
git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@36853
f5534014-38df-0310-8fa8-
9805f1628bb7
darkjames [Mon, 25 Apr 2011 19:57:45 +0000 (19:57 +0000)]
Fix compilation warning:
packet_win.c:230: warning: 'u_val' may be used uninitialized in this function
git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@36852
f5534014-38df-0310-8fa8-
9805f1628bb7
etxrab [Mon, 25 Apr 2011 19:36:13 +0000 (19:36 +0000)]
from Jakub Zawadzki:
Don't thaw the packet list during file loading to speed up file loading.
git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@36851
f5534014-38df-0310-8fa8-
9805f1628bb7
darkjames [Mon, 25 Apr 2011 19:28:00 +0000 (19:28 +0000)]
- Experimental support to edit single field_info.
Note: For now only integers (without bitmask), I'm afraid other fields require more work.
git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@36850
f5534014-38df-0310-8fa8-
9805f1628bb7
guy [Mon, 25 Apr 2011 19:01:05 +0000 (19:01 +0000)]
Store the frame_data structures in a tree, rather than a linked list.
This lets us get rid of the per-frame_data-structure prev and next
pointers, saving memory (at least according to Activity Monitor's report
of the virtual address space size on my Snow Leopard machine, it's a
noticeable saving), and lets us look up frame_data structures by frame
number in O(log2(number of frames)) time rather than O(number of frames)
time. It seems to take more CPU time when reading in the file, but
seems to go from "finished reading in all the packets" to "displaying
the packets" faster and seems to free up the frame_data structures
faster when closing the file.
It *is* doing more copying, currently, as we now don't allocate the
frame_data structure until after the packet has passed the read filter,
so that might account for the additional CPU time.
(Oh, and, for what it's worth, on an LP64 platform, a frame_data
structure is exactly 128 bytes long. However, there's more stuff to
remove, so the power-of-2 size is not guaranteed to remain, and it's not
a power-of-2 size on an ILP32 platform.)
It also means we don't need GLib 2.10 or later for the two-pass mode in
TShark.
It also means some code in the TCP dissector that was checking
pinfo->fd->next to see if it's NULL, in order to see if this is the last
packet in the file, no longer works, but that wasn't guaranteed to work
anyway:
we might be doing a one-pass read through the capture in TShark;
we might be dissecting the frame while we're reading in the
packets for the first time in Wireshark;
we might be doing a live capture in Wireshark;
in which case packets might be prematurely considered "the last packet".
#if 0 the no-longer-working tests, pending figuring out a better way of
doing it.
git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@36849
f5534014-38df-0310-8fa8-
9805f1628bb7
sfisher [Mon, 25 Apr 2011 16:29:16 +0000 (16:29 +0000)]
Cast away some clang errors about cast alignments that appear safe.
git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@36848
f5534014-38df-0310-8fa8-
9805f1628bb7
sfisher [Mon, 25 Apr 2011 16:19:07 +0000 (16:19 +0000)]
Fix clang error ("increases requird alignment from 1 to 8") by removing
unnecessary VALS() cast
git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@36847
f5534014-38df-0310-8fa8-
9805f1628bb7
guy [Mon, 25 Apr 2011 05:33:07 +0000 (05:33 +0000)]
Make the packet count an unsigned value, as frame numbers are unsigned.
Make the loops that scan through all the packets do so by frame number,
to abstract away the "next" and "previous" pointers in the frame_data
structure. Add a routine to cfile.c to map frame numbers to frame_data
structures, and put in some special case handling so scanning forward or
backward through the packets is O(N) rather than O(N^2).
git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@36846
f5534014-38df-0310-8fa8-
9805f1628bb7
morriss [Mon, 25 Apr 2011 02:06:17 +0000 (02:06 +0000)]
From Loránd Jakab via https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=5854 :
The Locator/ID Separation Protocol [1] is being standardized within the IETF,
and it is nearing RFC status (pending security review). I have been maintaining
a dissector patch for about a year, see [2]. Feedback received indicates that,
among others, it is widely used by the developers of a large router vendor,
without issues.
In January I submitted the dissector for data plane packets as bug #5602, which
was committed as r35615. The patch attached to this bug adds support for
dissection of control plane packets.
[1] http://tools.ietf.org/html/draft-ietf-lisp
[2] http://lisp.ccaba.upc.edu/wireshark/
git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@36845
f5534014-38df-0310-8fa8-
9805f1628bb7
morriss [Mon, 25 Apr 2011 01:37:19 +0000 (01:37 +0000)]
From Joakim Wiberg via https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=5801 :
The attached patch replaces most of the proto_tree_add_text() with
proto_tree_add_item(). That resulted in several new display filters.
It also uses the correct defines (ENC_NA, ENC_BIG_ENDIAN and ENC_LITTLE_ENDIAN)
instead of TRUE/FALSE in all proto_tree_add_item() calls.
Also it prints all out all connected transport data, since this is used by
"IENetP Test Tool" as a part of the XML export.
git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@36844
f5534014-38df-0310-8fa8-
9805f1628bb7
darkjames [Sun, 24 Apr 2011 22:52:49 +0000 (22:52 +0000)]
Packet editing:
- Show next editing bit (for hex it'd require patching packet_hex_apply_reverse_tag)
- Remove memset()s
- Try to fix compilation for win64.
git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@36843
f5534014-38df-0310-8fa8-
9805f1628bb7
darkjames [Sun, 24 Apr 2011 21:57:12 +0000 (21:57 +0000)]
Allocate space for epan_dissect_t inside struct.
git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@36842
f5534014-38df-0310-8fa8-
9805f1628bb7
darkjames [Sun, 24 Apr 2011 21:19:41 +0000 (21:19 +0000)]
Initial support for editing packets inside wireshark.
git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@36841
f5534014-38df-0310-8fa8-
9805f1628bb7
jmayer [Sun, 24 Apr 2011 21:10:45 +0000 (21:10 +0000)]
Fix CID 813: Code after ERROR is dead code (never reached)
git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@36840
f5534014-38df-0310-8fa8-
9805f1628bb7
guy [Sun, 24 Apr 2011 21:02:55 +0000 (21:02 +0000)]
new_packet_list_find_row_from_data() is always used to select a packet,
so get rid of the select_flag argument, and rename it
new_packet_list_select_row_from_data().
It's also always passed a frame_data *, so make its argument a
frame_data *.
Its return value is used only to detect whether the packet was found in
the display or not, so make it a gboolean. Check it in *all* cases
where it's called, and change the dialog message a bit (the most likely
cause is that the user cancelled a redissection of the packets, so not
all packets in the capture file are in the display.
Also, in the find case, pass it the new packet we found.
git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@36839
f5534014-38df-0310-8fa8-
9805f1628bb7
guy [Sun, 24 Apr 2011 19:41:28 +0000 (19:41 +0000)]
Make the interface combo box an entry, so you can type in it again.
git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@36838
f5534014-38df-0310-8fa8-
9805f1628bb7
guy [Sun, 24 Apr 2011 19:38:12 +0000 (19:38 +0000)]
gtk_combo_box_new_text() returns a GtkComboBox, and you connect a
function directly to its "changed" signal; GtkComboBox is a subclass of
GtkBin, but you don't connect to its child.
git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@36837
f5534014-38df-0310-8fa8-
9805f1628bb7
gerald [Sun, 24 Apr 2011 15:03:44 +0000 (15:03 +0000)]
[Automatic manuf, services and enterprise-numbers update for 2011-04-24]
git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@36834
f5534014-38df-0310-8fa8-
9805f1628bb7
guy [Sat, 23 Apr 2011 19:03:05 +0000 (19:03 +0000)]
Back out previous change - I guess the Solaris buildbot has a pre-2.5.30
flex.
git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@36833
f5534014-38df-0310-8fa8-
9805f1628bb7
guy [Sat, 23 Apr 2011 17:56:43 +0000 (17:56 +0000)]
Try putting the include of config.h at the top of the generated scanner,
so that the config.h definitions are available before we include
anything else; that way, for example, anything defined to enable
large-file support will be defined before we include any system header
files that might depend on it.
git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@36832
f5534014-38df-0310-8fa8-
9805f1628bb7
morriss [Sat, 23 Apr 2011 11:10:47 +0000 (11:10 +0000)]
Rename g_gnuc_malloc.h to g_gnuc.h
git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@36831
f5534014-38df-0310-8fa8-
9805f1628bb7
stig [Sat, 23 Apr 2011 09:47:28 +0000 (09:47 +0000)]
Check if changing to another profile in change_configuration_profile()
git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@36830
f5534014-38df-0310-8fa8-
9805f1628bb7
darkjames [Sat, 23 Apr 2011 09:13:16 +0000 (09:13 +0000)]
Use orginal nsstime_t structures (without copying).
git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@36829
f5534014-38df-0310-8fa8-
9805f1628bb7
sfisher [Fri, 22 Apr 2011 19:31:09 +0000 (19:31 +0000)]
Don't pass -fexcess-precision=fast to clang like we do for gcc.
git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@36828
f5534014-38df-0310-8fa8-
9805f1628bb7
morriss [Fri, 22 Apr 2011 18:32:56 +0000 (18:32 +0000)]
Avoid passing a NULL string pointer to format routines: some libc's (e.g.,
Solaris') will seg-fault on that.
git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@36827
f5534014-38df-0310-8fa8-
9805f1628bb7
sfisher [Fri, 22 Apr 2011 18:04:26 +0000 (18:04 +0000)]
Fix various warnings found by clang 3.0 (trunk 129935) complier:
- Extraneous parentheses
- Use _U_ for unused function parameters instead of assigning the variable
to itself
git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@36826
f5534014-38df-0310-8fa8-
9805f1628bb7
morriss [Fri, 22 Apr 2011 17:57:10 +0000 (17:57 +0000)]
As suggested by Jakub Zawadzki:
Rename g_gnuc_malloc.h to g_gnuc.h (since it contains non-malloc related
GNUC stuff).
Use G_GNUC_WARN_UNUSED_RESULT from glib instead of using warn_unused_result
directly.
git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@36825
f5534014-38df-0310-8fa8-
9805f1628bb7
sfisher [Fri, 22 Apr 2011 17:51:48 +0000 (17:51 +0000)]
Fix warning about using wrong enum that is probably causing an actual
bug: whenever call_state is assigned to VOIP_CALL_SETUP in other parts
of Wireshark code (such as gtk/voip_calls.c), then call_active_state
is set to VOIP_ACTIVE. Do that here too. It was set to VOIP_NO_STATE
(from the wrong enum), which would have likely resulted in the wrong
value being assigned.
git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@36824
f5534014-38df-0310-8fa8-
9805f1628bb7
sfisher [Fri, 22 Apr 2011 17:42:40 +0000 (17:42 +0000)]
Fix a "equality comparison with extraneous parentheses" warning found
by clang 3.0 (trunk 129935) compiler.
git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@36823
f5534014-38df-0310-8fa8-
9805f1628bb7
sfisher [Fri, 22 Apr 2011 17:36:16 +0000 (17:36 +0000)]
Fix a "equality comparison with extraneous parentheses" warning found
by clang 3.0 (trunk 129935) compiler.
git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@36822
f5534014-38df-0310-8fa8-
9805f1628bb7
sfisher [Fri, 22 Apr 2011 17:33:53 +0000 (17:33 +0000)]
Use _U_ for unused function parameters instead of assigning the variable
to itself. Found by clang 3.0 (trunk 129935) compiler.
git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@36821
f5534014-38df-0310-8fa8-
9805f1628bb7
sfisher [Fri, 22 Apr 2011 17:31:57 +0000 (17:31 +0000)]
Fix a few "equality comparison with extraneous parentheses" warnings
found by clang 3.0 (trunk 129935) compiler.
git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@36820
f5534014-38df-0310-8fa8-
9805f1628bb7
sfisher [Fri, 22 Apr 2011 17:30:06 +0000 (17:30 +0000)]
Use _U_ for unused function parameters instead of assigning the
variable to itself. Found by clang 3.0 (trunk) compiler.
git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@36819
f5534014-38df-0310-8fa8-
9805f1628bb7
sfisher [Fri, 22 Apr 2011 17:25:25 +0000 (17:25 +0000)]
Change enum type in struct to an int to allow different enum types to
be used for the field display type in the struct.
git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@36818
f5534014-38df-0310-8fa8-
9805f1628bb7
sfisher [Fri, 22 Apr 2011 17:08:59 +0000 (17:08 +0000)]
Fix whitespace a bit and add field names from doc/README.developer to
comments such as FIELDNAME, FIELDABBREV, etc.
git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@36817
f5534014-38df-0310-8fa8-
9805f1628bb7
guy [Fri, 22 Apr 2011 17:05:28 +0000 (17:05 +0000)]
Assume the tags are mallocated, so they're properly aligned. Cast away
the warnings.
git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@36816
f5534014-38df-0310-8fa8-
9805f1628bb7
sfisher [Fri, 22 Apr 2011 16:31:32 +0000 (16:31 +0000)]
Remove enum cast that doesn't do anything and causes a warning about
converting between enum types in clang 3.0 (trunk).
git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@36815
f5534014-38df-0310-8fa8-
9805f1628bb7
sfisher [Fri, 22 Apr 2011 16:27:01 +0000 (16:27 +0000)]
Found by clang 3.0 (built from trunk): various implicit conversion from
enumeration type 'xxx' to different enumeration type 'xxx'
Fix: Create different structs based on the enum type contained within.
git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@36814
f5534014-38df-0310-8fa8-
9805f1628bb7
sfisher [Fri, 22 Apr 2011 15:53:34 +0000 (15:53 +0000)]
Use _U_ for unused function parameters instead of assigning a variable
to itself. Found by clang compiler.
git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@36813
f5534014-38df-0310-8fa8-
9805f1628bb7
morriss [Fri, 22 Apr 2011 15:15:10 +0000 (15:15 +0000)]
If we're using GNUC, use attribute warn_unused_result to verify that the
return value of proto_item_add_subtree() is used.
(The WARN_IF_UNUSED macro doesn't belong here... But where should it go?)
git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@36812
f5534014-38df-0310-8fa8-
9805f1628bb7
morriss [Fri, 22 Apr 2011 14:48:10 +0000 (14:48 +0000)]
Use the return value of proto_item_add_subtree(): put the filter masks in their own subtree (as it appears was intended).
git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@36811
f5534014-38df-0310-8fa8-
9805f1628bb7
morriss [Fri, 22 Apr 2011 14:41:26 +0000 (14:41 +0000)]
Don't create subtrees that are not used (and don't create subtrees which might
have--if the original code was different--contained only one sub-item).
Remove some no-longer-used ett variables.
git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@36810
f5534014-38df-0310-8fa8-
9805f1628bb7
morriss [Fri, 22 Apr 2011 14:33:58 +0000 (14:33 +0000)]
Don't assume that a proto_item is equivalent to a proto_tree.
Use the return value from proto_item_add_subtree().
git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@36809
f5534014-38df-0310-8fa8-
9805f1628bb7
morriss [Fri, 22 Apr 2011 14:32:35 +0000 (14:32 +0000)]
Don't create a subtree that is not used.
git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@36808
f5534014-38df-0310-8fa8-
9805f1628bb7
morriss [Fri, 22 Apr 2011 14:30:19 +0000 (14:30 +0000)]
Use the return value of proto_item_add_subtree()
git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@36807
f5534014-38df-0310-8fa8-
9805f1628bb7
morriss [Fri, 22 Apr 2011 14:29:00 +0000 (14:29 +0000)]
Don't assume that a proto_item is equivalent to a proto_tree.
Use the return value from proto_item_add_subtree().
git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@36806
f5534014-38df-0310-8fa8-
9805f1628bb7
morriss [Fri, 22 Apr 2011 14:17:34 +0000 (14:17 +0000)]
Don't create a subtree that is not used.
git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@36805
f5534014-38df-0310-8fa8-
9805f1628bb7
morriss [Fri, 22 Apr 2011 14:13:20 +0000 (14:13 +0000)]
Use the return value of proto_item_add_subtree()
git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@36804
f5534014-38df-0310-8fa8-
9805f1628bb7
alagoutte [Fri, 22 Apr 2011 13:16:45 +0000 (13:16 +0000)]
Enhance BT-UTP dissector:
* Add type (syn, data, reset...) in column info
* Split dissect_utp_header(...) function to
* dissect_utp_header_v0(...)
* dissect_utp_header_v1(...)
* dissect_utp_extensions(...)
git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@36803
f5534014-38df-0310-8fa8-
9805f1628bb7
alagoutte [Fri, 22 Apr 2011 13:11:52 +0000 (13:11 +0000)]
Fix (latest) Dead Store (Dead nested assignment) Warning found by Clang
git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@36802
f5534014-38df-0310-8fa8-
9805f1628bb7
alagoutte [Fri, 22 Apr 2011 13:07:11 +0000 (13:07 +0000)]
From wireshark.org/lists/wireshark-dev/201104/msg00231.html
Always use the returned tree value of proto_tree_add_subtree (and not the item!)
git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@36801
f5534014-38df-0310-8fa8-
9805f1628bb7
darkjames [Fri, 22 Apr 2011 12:25:01 +0000 (12:25 +0000)]
Cleanup emem_verify_pointer()
git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@36800
f5534014-38df-0310-8fa8-
9805f1628bb7
guy [Fri, 22 Apr 2011 07:58:19 +0000 (07:58 +0000)]
Add some casts to squelch complaints about alignment; our little slab
allocator should return properly-aligned items.
git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@36799
f5534014-38df-0310-8fa8-
9805f1628bb7
darkjames [Fri, 22 Apr 2011 07:36:37 +0000 (07:36 +0000)]
Remove invalid svn:executable property
git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@36798
f5534014-38df-0310-8fa8-
9805f1628bb7
darkjames [Fri, 22 Apr 2011 07:15:45 +0000 (07:15 +0000)]
Add return instructions for system without support for G_GNUC_NORETURN (e.g. some older gcc compilers).
Reported by Anders Broman on -dev list.
git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@36797
f5534014-38df-0310-8fa8-
9805f1628bb7
guy [Fri, 22 Apr 2011 04:04:20 +0000 (04:04 +0000)]
We deal with pointer alignment ourselves, so we ensure the casts are
safe. Tell the compiler so.
git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@36796
f5534014-38df-0310-8fa8-
9805f1628bb7
guy [Fri, 22 Apr 2011 04:01:30 +0000 (04:01 +0000)]
Either the buf argument to emem_scrub_memory() is properly aligned or it
isn't. If it is, we don't need to worry about alignment, so the XXX
comment doesn't belong there; if it isn't, then we should do what the
comment says. For now, assume the comment before the XXX comment is
correct, and just cast away the alignment warning.
git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@36795
f5534014-38df-0310-8fa8-
9805f1628bb7
guy [Fri, 22 Apr 2011 03:53:01 +0000 (03:53 +0000)]
ep_alloc() returns a properly-aligned value for all uses; that's why it
returns void * rather than guint8 *. Don't pointer-convert that
information away; otherwise, compilers might whine about safe pointer
casts.
git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@36794
f5534014-38df-0310-8fa8-
9805f1628bb7
guy [Fri, 22 Apr 2011 03:34:39 +0000 (03:34 +0000)]
Stuff that comes back from ep_alloc() is properly aligned for all uses;
that's why it returns "void *", not "guint8 *". Don't pointer-convert
that information away; otherwise, compilers might whine at you about
unsafe casts.
git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@36793
f5534014-38df-0310-8fa8-
9805f1628bb7
guy [Fri, 22 Apr 2011 03:31:06 +0000 (03:31 +0000)]
Cast away bogus warnings. (I begin to see why C++ has templates here,
complicated though they might be for both users and implementors....)
git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@36792
f5534014-38df-0310-8fa8-
9805f1628bb7
guy [Fri, 22 Apr 2011 03:27:40 +0000 (03:27 +0000)]
*Properly* get rid of bogus cast.
git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@36791
f5534014-38df-0310-8fa8-
9805f1628bb7
guy [Fri, 22 Apr 2011 03:25:48 +0000 (03:25 +0000)]
"guint8 *" means "pointer to array of bytes that may or may not be
properly aligned"; "void *", at least when it's the return value of
ep_malloc(), means "pointer to properly-aligned chunk of memory". Use
"void *" in get_sdp_data_element() and its callers in that case, to
squelch compiler warnings.
git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@36790
f5534014-38df-0310-8fa8-
9805f1628bb7
guy [Fri, 22 Apr 2011 03:12:18 +0000 (03:12 +0000)]
Cast away alignment warnings about pointers where we never actually
directly dereference pointers to the field members.
Get rid of an unnecessary cast that provokes warnings.
git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@36789
f5534014-38df-0310-8fa8-
9805f1628bb7
guy [Fri, 22 Apr 2011 03:11:14 +0000 (03:11 +0000)]
Cast away warnings about "struct sockaddr" -> "struct sockaddr_XXX"
casts that are actually safe.
git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@36788
f5534014-38df-0310-8fa8-
9805f1628bb7
guy [Fri, 22 Apr 2011 03:10:22 +0000 (03:10 +0000)]
Make all the fields in the various structures just arrays of bytes, so
we can cast not-necessarily-aligned pointers to pointers to those
structures without risk of compiler warnings *or* the underlying problem
the compiler's trying to warn us about (no, you can't always dereference
an unaligned pointer - SPARC traps, and at least some ARM processors may
do something other than what you want, for example).
This also caught some cases where we were not even properly
byte-swapping on big-endian platforms.
This also lets us not muck around with splitting 64-bit times into two
32-bit fields - we have pletohll(), after all.
git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@36787
f5534014-38df-0310-8fa8-
9805f1628bb7
wmeier [Thu, 21 Apr 2011 22:49:36 +0000 (22:49 +0000)]
Remove unneeded #include <errno>,<math>,<ctype> & "isprint";
Do minoir whitespace & indentation cleanup.
git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@36786
f5534014-38df-0310-8fa8-
9805f1628bb7
wmeier [Thu, 21 Apr 2011 22:42:32 +0000 (22:42 +0000)]
Add #include <ctype.h> before #include "isprint.h";
Remove an unneeded line of code;
Do some indentation & whitespace cleanup.
git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@36785
f5534014-38df-0310-8fa8-
9805f1628bb7
morriss [Thu, 21 Apr 2011 22:38:41 +0000 (22:38 +0000)]
Avoid passing a NULL string pointer to format routines: some libc's (e.g.,
Solaris') will seg-fault on that.
git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@36784
f5534014-38df-0310-8fa8-
9805f1628bb7
wmeier [Thu, 21 Apr 2011 22:31:45 +0000 (22:31 +0000)]
#include <errno.h> & #include <math.h> not req'd;
git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@36783
f5534014-38df-0310-8fa8-
9805f1628bb7
wmeier [Thu, 21 Apr 2011 22:26:27 +0000 (22:26 +0000)]
Remove unneeded #include <ctype.h> and "isprint.h";
Do minor whitespace cleanup.
git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@36782
f5534014-38df-0310-8fa8-
9805f1628bb7
wmeier [Thu, 21 Apr 2011 22:13:56 +0000 (22:13 +0000)]
Remove some unneeded #includes;
Correct some typos;
Use consistent indentation & do some whitespace cleanup.
git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@36781
f5534014-38df-0310-8fa8-
9805f1628bb7
wmeier [Thu, 21 Apr 2011 21:50:35 +0000 (21:50 +0000)]
Remove some uneeded #includes;
Minor indentation & whitespace cleanup.
git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@36780
f5534014-38df-0310-8fa8-
9805f1628bb7
stig [Thu, 21 Apr 2011 20:56:01 +0000 (20:56 +0000)]
Removed some unneeded variables with initialization.
git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@36779
f5534014-38df-0310-8fa8-
9805f1628bb7
stig [Thu, 21 Apr 2011 20:44:56 +0000 (20:44 +0000)]
Removed some unneeded assignments.
git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@36778
f5534014-38df-0310-8fa8-
9805f1628bb7
morriss [Thu, 21 Apr 2011 19:51:05 +0000 (19:51 +0000)]
From Stefan Metzmacher and Gregor Beck via https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=5850 :
The smallest LDAP PDU is 7 bytes, not 4.
git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@36777
f5534014-38df-0310-8fa8-
9805f1628bb7
guy [Thu, 21 Apr 2011 18:33:20 +0000 (18:33 +0000)]
In a dump_open routine, you don't need to seek to the beginning of the
file before doing any writes - it starts out at the beginning of the
file. This means that you *can* write a Network Instruments capture
file to a pipe, or write it out in compressed form, now that its
dump_open routine no longer seeks.
NetXRay format and K12 binary format, however, *do* require a seek when
writing them.
git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@36776
f5534014-38df-0310-8fa8-
9805f1628bb7
morriss [Thu, 21 Apr 2011 18:09:13 +0000 (18:09 +0000)]
Avoid passing a NULL string pointer to format routines: some libc's (e.g.,
Solaris') will core on that.
Also clean up indentation and white space.
git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@36775
f5534014-38df-0310-8fa8-
9805f1628bb7
guy [Thu, 21 Apr 2011 17:51:19 +0000 (17:51 +0000)]
In file_wrappers.c, explicitly set err_info to null for all errors that
don't have an "additional information" string.
Get rid of WTAP_ERR_ZLIB; just report an internal error with
WTAP_ERR_INTERNAL instead. (If they start happening, we can think about
supplying an "additional information" string for compression errors on
output.)
git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@36774
f5534014-38df-0310-8fa8-
9805f1628bb7
alagoutte [Thu, 21 Apr 2011 16:01:26 +0000 (16:01 +0000)]
Fix Dead Store (Dead assignement/Dead increment) Warning found by Clang
git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@36773
f5534014-38df-0310-8fa8-
9805f1628bb7
alagoutte [Thu, 21 Apr 2011 16:01:03 +0000 (16:01 +0000)]
Fix Dead Store (Dead assignement/Dead increment) Warning found by Clang
git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@36772
f5534014-38df-0310-8fa8-
9805f1628bb7
alagoutte [Thu, 21 Apr 2011 16:00:38 +0000 (16:00 +0000)]
Fix Dead Store (Dead assignement/Dead increment) Warning found by Clang
git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@36771
f5534014-38df-0310-8fa8-
9805f1628bb7
alagoutte [Thu, 21 Apr 2011 15:59:58 +0000 (15:59 +0000)]
Fix Dead Store (Dead assignement/Dead increment) Warning found by Clang
git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@36770
f5534014-38df-0310-8fa8-
9805f1628bb7
alagoutte [Thu, 21 Apr 2011 15:56:43 +0000 (15:56 +0000)]
Fix Dead Store (Dead assignement/Dead increment) Warning found by Clang
git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@36769
f5534014-38df-0310-8fa8-
9805f1628bb7
alagoutte [Thu, 21 Apr 2011 14:32:39 +0000 (14:32 +0000)]
Oups
Wrong fix in Rev36755 (Miss +2)
git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@36768
f5534014-38df-0310-8fa8-
9805f1628bb7
etxrab [Thu, 21 Apr 2011 13:56:06 +0000 (13:56 +0000)]
Include time.h as compilation might fail with old gilb (2.4)
Thanks Jeff.
git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@36767
f5534014-38df-0310-8fa8-
9805f1628bb7
alagoutte [Thu, 21 Apr 2011 13:45:37 +0000 (13:45 +0000)]
Fix Dead Store (Dead assignement/Dead increment) Warning found by Clang
git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@36766
f5534014-38df-0310-8fa8-
9805f1628bb7
alagoutte [Thu, 21 Apr 2011 13:45:14 +0000 (13:45 +0000)]
Fix Dead Store (Dead assignement/Dead increment) Warning found by Clang
git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@36765
f5534014-38df-0310-8fa8-
9805f1628bb7
alagoutte [Thu, 21 Apr 2011 13:43:23 +0000 (13:43 +0000)]
Fix Dead Store (Dead assignement/Dead increment) Warning found by Clang
git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@36764
f5534014-38df-0310-8fa8-
9805f1628bb7
alagoutte [Thu, 21 Apr 2011 13:42:15 +0000 (13:42 +0000)]
Remove is_continuation_line variable (Unused for 3 years with add SMTP Command Pipelining (RFC2920) Rev24989)
Fix Dead Store (Dead assignement/Dead increment) Warning found by Clang
git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@36763
f5534014-38df-0310-8fa8-
9805f1628bb7
alagoutte [Thu, 21 Apr 2011 13:35:09 +0000 (13:35 +0000)]
Fix Dead Store (Dead nested assignment) Warning found by Clang
git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@36762
f5534014-38df-0310-8fa8-
9805f1628bb7
alagoutte [Thu, 21 Apr 2011 13:34:43 +0000 (13:34 +0000)]
Fix Dead Store (Dead nested assignment) Warning found by Clang
git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@36761
f5534014-38df-0310-8fa8-
9805f1628bb7
alagoutte [Thu, 21 Apr 2011 13:34:22 +0000 (13:34 +0000)]
Fix Dead Store (Dead nested assignment) Warning found by Clang
git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@36760
f5534014-38df-0310-8fa8-
9805f1628bb7
alagoutte [Thu, 21 Apr 2011 13:33:59 +0000 (13:33 +0000)]
Fix Dead Store (Dead nested assignment) Warning found by Clang
git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@36759
f5534014-38df-0310-8fa8-
9805f1628bb7
alagoutte [Thu, 21 Apr 2011 13:33:43 +0000 (13:33 +0000)]
Fix Dead Store (Dead nested assignment) Warning found by Clang
git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@36758
f5534014-38df-0310-8fa8-
9805f1628bb7
alagoutte [Thu, 21 Apr 2011 13:33:23 +0000 (13:33 +0000)]
Fix Dead Store (Dead nested assignment) Warning found by Clang
git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@36757
f5534014-38df-0310-8fa8-
9805f1628bb7