Commit Graph

41496 Commits

Author SHA1 Message Date
Guy Harris 5f90f658fe Unless NL80211_BAND_ATTR_HT_CAPA is defined, assume we don't have
channel-type-setting capabilities, and don't build the code to set the
channel type or fetch any channel types other than "no HT".

(It *looks* as if nl80211.h defines NL80211_BAND_ATTR_HT_CAPA as a
member of an enum *and* as a #define, at least in the kernels I've
looked at, so we can test for it with #ifdef - perhaps that's *why* it's
#defined.)

svn path=/trunk/; revision=43608
2012-07-08 02:07:38 +00:00
Jeff Morriss db754f7821 Don't bother printing the Description of STATIC_TEXT and UAT preferences:
they don't make it into the preferences file anyway...

svn path=/trunk/; revision=43607
2012-07-08 01:48:52 +00:00
Guy Harris 4d84671f9b Keep the NL80211_CHAN_ and WS80211_CHAN_ values distinct; only the
Linux version of the platform-dependent 802.11 stuff should use the
NL80211_CHAN_ stuff.  Map from the WS80211_CHAN_ values to the
corresponding NL80211_CHAN_ values in ws80211_set_freq(), and have the
channel_types bitset use bits indexed by WS80211_CHAN_ values rather
than NL80211_CHAN_.

This won't fix the problem of building this on Linuxes with old
nl80211.h headers that lack NL80211_CHAN_, but it narrows the set of
code that needs the NL80211_CHAN_ values, perhaps allowing the fix to be
a bit cleaner, as well as making it easier to make this work on
platforms other than Linux.

svn path=/trunk/; revision=43606
2012-07-08 01:43:14 +00:00
Jeff Morriss 8f12c9d7d7 First phase of fixing https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=7380 :
Add a new name resolution option: whether or not use the configured (in the OS)
name resolver (e.g., DNS) to resolve network names.  When this option is disabled
but network name resolution is enabled then Wireshark will resolve only those
names that it can from local sources.  This includes (at least, AFAIK):

- name resolutions that Wireshark picks up on from DNS packets it decodes
- the "user hosts file" (~/.wireshark/hosts on *NIX)
- what Wireshark reads out of capture file (the PCAPNG name resolution block)

This new preference defaults to "use external resolvers" for backward
compatibility (so people turning on network name resolution will get the old
behavior).

This option can be set via Edit->Preferences and on the command line; there
remain several UIs (e.g., the "open capture file" dialog, the
View->Name Resolution menu, etc.) that don't have the new option yet.


Also expand on the "description" for the name resolution preferences: these
are used not only in the tooltips but are also written to the preferences
file.  The previous text didn't include enough context when written do the
preferences file.

svn path=/trunk/; revision=43605
2012-07-08 01:31:48 +00:00
Guy Harris 10fa9baef2 From Evan Huus:
Don't initialize GeoIP from epan_init(), as we probably haven't loaded the
preferences for it yet (thanks to it's new use of the UAT framework).

Instead, register a post_update callback with UAT and load it there. As a
bonus, this also means that applying GeoIP preferences no longer requires
restarting Wireshark - everything should Just Work with the new databases right
away.

Fixes bug 7446.

svn path=/trunk/; revision=43604
2012-07-08 01:17:19 +00:00
Guy Harris 659cf0527a UATs could be put into "categories". The categories were defined only
implicitly by the #define name and string they were defined to; not all
UATs neatly fit into any of the categories, so some of them were put
into categories that weren't obviously correct for them, and one - the
display filter macro UAT - wasn't put into any category at all (which
caused crashes when editing them, as the GUI code that handled UAT
changes from a dialog assumed the category field was non-null).

The category was, in practice, used only to decide, in the
aforementioned GUI code, whether the packet summary pane needed to be
updated or not.  It also offered no option of "don't update the packet
summary pane *and* don't redissect anything", which is what would be
appropriate for the display filter macro UAT.

Replace the category with a set of fields indicating what the UAT
affects; we currently offer "dissection", which applies to most UATs
(any UAT in libwireshark presumably affects dissection at a minimum) and
"the set of named fields that exist".  Changing any UAT that affects
dissection requires a redissection; changing any UAT that affects the
set of named fields that exist requires a redissection *and* rebuilding
the packet summary pane.

Perhaps we also need "filtering", so that if you change a display filter
macro, we re-filter, in case the display is currently filtered with a
display filter that uses a macro that changed.

svn path=/trunk/; revision=43603
2012-07-08 01:00:46 +00:00
Guy Harris 1b1fbd24e7 From Evan Huus:
There is no guarantee that uat->category is non-null, so check whether
it's null before checking whether it's UAT_CAT_FIELDS or not.

Fixes bug 7444.

#BACKPORT

svn path=/trunk/; revision=43602
2012-07-07 22:40:02 +00:00
Bill Meier 88c8b9218d Use -D_FORTIFY_SOURCE=2 only if the gc optimization level is greater than 0.
Fixes Bug #7449: https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=7449

-----
Issue:

Building Wireshark with '-O0 -D_FORTIFY_SOURCE=2 ...' fails

The warning [error] message:

/usr/include/features.h:314:4: error: #warning _FORTIFY_SOURCE requires
compiling with optimization (-O) [-Werror=cpp]`


A bit of research shows that this warning was added to a recent version of
glibc (on at least Fedora).

 See: http://sourceware.org/bugzilla/show_bug.cgi?id=13979

The warning message occurs if -D_FORTIFY_SOURCE=... is used and the gcc
'optimization level' == 0 (-O0).

Unfortunately when building with -O0 this warning message:

1. Causes compiles to fail (if -Werror [stop  on warning])
2. Causes ./configure to fail with an (incorrect) message
   about the pcap header being older than the libpcap version.


svn path=/trunk/; revision=43601
2012-07-07 22:35:55 +00:00
Jeff Morriss 9a2dc60d72 Fix https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=7445 :
"Find Next Mark" was duplicated in the Edit menu and "Find Previous Mark" was
missing (the 2nd "Find Next Mark" would, if selected, find the previous mark).

svn path=/trunk/; revision=43600
2012-07-07 14:54:14 +00:00
Bill Meier 9e7c7e7d10 From Evan Huus: Fix "Useless null checks in packet-dcerpc*"
https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=7448

svn path=/trunk/; revision=43599
2012-07-07 14:21:20 +00:00
Bill Meier 9315a45deb From Evan Huus: fix "Unused variable in packet-ansi_a.c"
https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=7447

svn path=/trunk/; revision=43598
2012-07-07 14:11:38 +00:00
Guy Harris 85f219be2e From Michael Mann:
Add a preference for the packet length statistics.

Fixes bug 3239.

svn path=/trunk/; revision=43597
2012-07-07 08:15:41 +00:00
Guy Harris ef825ec6d3 Only one place is needed for creating preference panes; this clears up
some warnings from GTK+.

For interior nodes in the preference module tree, we create a page even
if the module itself has no preferences, so there's *something* we can
show if the user clicks on it.  (Showing the top-level protocols page is
a bit weird, and requires us to keep track of it.)

svn path=/trunk/; revision=43596
2012-07-07 02:49:17 +00:00
Guy Harris f0ebe6a075 Ask about a possible simplification (by just handling all modules by
pathname, so that any module we create for a protocol is just created as
being under "Protocols/").

svn path=/trunk/; revision=43595
2012-07-07 02:10:44 +00:00
Guy Harris fa1f18d80b Clean up mix of tabs and 4-space-tab indents.
svn path=/trunk/; revision=43594
2012-07-07 01:26:58 +00:00
Guy Harris ab5e6696e1 Uniformly use two-space indents (most of the file uses it).
svn path=/trunk/; revision=43593
2012-07-07 00:41:12 +00:00
Guy Harris 503361d6e8 Get rid of most tabs (which cleans up mixed indenting with tabs and
4-tab spaces).

svn path=/trunk/; revision=43592
2012-07-07 00:30:47 +00:00
Guy Harris 47dba62a84 As per Michael Mann's email:
Yes, the following files can now be deleted:
 
	\wireshark\ui\gtk\prefs_nameres.c
	\wireshark\ui\gtk\prefs_nameres.h
	\wireshark\ui\gtk\prefs_print.c
	\wireshark\ui\gtk\prefs_print.h
	\wireshark\ui\gtk\prefs_protocols.c
	\wireshark\ui\gtk\prefs_protocols.h
	\wireshark\ui\gtk\prefs_taps.c
	\wireshark\ui\gtk\prefs_taps.h
 
	I thought removing them was part of the patch for bug 7402, but
	they still show up in the SVN (perhaps I didn't create the patch
	correctly).

Make it so.

svn path=/trunk/; revision=43591
2012-07-06 23:21:03 +00:00
Jeff Morriss dd105b80d8 Display (and allow filtering on) the "reserved for national use" bit in the AI.
(This bit is already decoded as the "national indicator" bit in ANSI.)

svn path=/trunk/; revision=43590
2012-07-06 21:25:47 +00:00
Jakub Zawadzki a898b392e2 Gadu-Gadu: dissect more packets.
svn path=/trunk/; revision=43589
2012-07-06 21:24:16 +00:00
Jakub Zawadzki c383e6f115 Fix logic typo, it should fix bug #7434
svn path=/trunk/; revision=43588
2012-07-06 17:02:08 +00:00
Pascal Quantin 7e38fe433a Fix compilation with gcc 4.3.2 and without GEOIP
svn path=/trunk/; revision=43587
2012-07-06 12:25:54 +00:00
Jakub Zawadzki 88cb14dda3 - remove no longer used #defines
- prefs.name_resolve_concurrency is now just 'name_resolve_concurrency'
- add notes about possible (?) integer overflows.

svn path=/trunk/; revision=43586
2012-07-06 07:55:58 +00:00
Jakub Zawadzki 47cee41290 Revert part of r43579, MSVC_VARIANT should be not defined.
svn path=/trunk/; revision=43585
2012-07-06 07:49:36 +00:00
Jakub Zawadzki f31b3943c0 - e_addr_resolve is structure so pass it by pointer.
- name_resolve_concurrency must be only defined when used.

svn path=/trunk/; revision=43584
2012-07-06 07:34:08 +00:00
Jakub Zawadzki 500018d4f6 Fix compilation of epan/oids.c without HAVE_LIBSMI
svn path=/trunk/; revision=43583
2012-07-06 07:24:22 +00:00
Jakub Zawadzki a22526df74 Try to fix compilation on compilers != MSVC.
Note: we should get rid of this circular dependency.

svn path=/trunk/; revision=43582
2012-07-06 07:06:09 +00:00
Pascal Quantin 41e5166f81 Add a few missing ENC_ASCII and remove a few unused hf entries
svn path=/trunk/; revision=43581
2012-07-06 05:33:55 +00:00
Pascal Quantin 0bcc9b0e66 From Michael Mann via https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=7407 :
Update ESTA manufacturer IDs and OEM code values

svn path=/trunk/; revision=43580
2012-07-06 05:17:09 +00:00
Anders Broman c19583b72c From Michael Mann:
Generic preferences implementation - Printing and Name Resolution.

svn path=/trunk/; revision=43579
2012-07-06 04:48:36 +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
Jeff Morriss 217514e565 Remove a couple set-but-unused variables. I *think* the new tree isn't
particularly useful...

svn path=/trunk/; revision=43577
2012-07-05 23:31:17 +00:00
Jakub Zawadzki c7dbc44bf3 Fix bug #7436
offset returned from dissect_nfs_open_claim4, dissect_nfs_openflag4 were different
when we were building tree and where we didn't.
Fix other similar cases.

svn path=/trunk/; revision=43576
2012-07-05 21:09:34 +00:00
Pascal Quantin a9b2a718a7 Fix https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=7437 :
PTP Cancel unicast transmission and Acknowledge cancel unicast transmission packets are decoded as malformed

svn path=/trunk/; revision=43575
2012-07-05 20:07:43 +00:00
Jeff Morriss efe4dd96aa List whether we were compiled with LIBNL or not (including which major
version).

svn path=/trunk/; revision=43574
2012-07-05 19:10:47 +00:00
Pascal Quantin a0c01750b8 From Guy Martin via https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=7439 :
Add support for DOCSIS 3.0 AES keys

svn path=/trunk/; revision=43573
2012-07-05 19:10:46 +00:00
Pascal Quantin 889ddbd9eb Fix compilation with gcc 4.3.2
svn path=/trunk/; revision=43572
2012-07-05 09:02:08 +00:00
Pascal Quantin a7fef5b3bf Upgrade LTE RRC dissector to v10.6.0
svn path=/trunk/; revision=43571
2012-07-05 08:44:30 +00:00
Guy Harris 918e00880c From Pontus Fuchs:
Remove refresh button from wireless toolbar

   With a "refresh interfaces" menu option and device hotplug
   notification in place there is no longer need for a refresh
   button in the toolbar.

svn path=/trunk/; revision=43570
2012-07-05 05:36:50 +00:00
Pascal Quantin d94492cc71 From Richard Sharpe via https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=7428 :
Add SPNEGO Extended Negotiation (NEGOEX) Security Mechanism dissector

svn path=/trunk/; revision=43569
2012-07-05 05:26:28 +00:00
Guy Harris b1ab794baa From Pontus Fuchs:
Refresh wireless toolbar too

    The recently improved refresh interfaces code forgot the wireless
    toolbar. Make sure to refresh it too.

svn path=/trunk/; revision=43568
2012-07-05 02:01:43 +00:00
Guy Harris eb38ae49b1 From Pontus Fuchs:
Fix wireless toolbar

    The compilation fix for mac got it slightly wrong:

    s/HAVE_PCAP/HAVE_LIBPCAP/

svn path=/trunk/; revision=43567
2012-07-05 01:59:00 +00:00
Bill Meier c02d156881 The amqp dissector is not a plugin; remove comment indicating that it's a plugin.
Also: Fix some "4 space tab" indentation (replace with spaces).

svn path=/trunk/; revision=43566
2012-07-04 13:04:16 +00:00
Pascal Quantin c529c306d4 From Evan Huus via https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=7433 :
Remove unused mask variable in packet-bmc.c

svn path=/trunk/; revision=43565
2012-07-04 10:08:22 +00:00
Guy Harris 5d18b53bda Expand that comment to note that there's no guarantee that GLIB_LIBS has
-gmodule or that GTK_LIBS doesn't have it.

svn path=/trunk/; revision=43564
2012-07-03 22:42:14 +00:00
Jeff Morriss 3d1b5e3474 As suggested by Jakub in https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=7429#c4 :
Add checks for calls to proto_tree_add_XXX (where XXX != item and a few other
functions) with an encoding (ENC_*) argument.


Also add a comment to checkAddTextCalls() about why 3 loops are used.

svn path=/trunk/; revision=43563
2012-07-03 21:55:55 +00:00
Guy Harris d889046e5f As per Gentoo bug 423743
https://bugs.gentoo.org/show_bug.cgi?id=423743

"The Makefile.am claims including GLIB_LIBS when linking wireshark is
unnecessary, because wireshark links to GTK_LIBS which is a superset.
It is not actually a superset: gmodule is included in GLIB_LIBS but
not in GTK_LIBS (unless accidentally on older glibs/gtks)."

so we must explicitly link with GLIB_LIBS.

Update the comment to reflect that - and to reflect that GTK+ doesn't
necessarily run atop X11 - while we're at it.

Fixes bug 7427.

#BACKPORT

svn path=/trunk/; revision=43561
2012-07-03 20:12:50 +00:00
Pascal Quantin a24fa25716 Fix https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=7430 :
Dissection of EAP-SIM and EAP-AKA is broken

svn path=/trunk/; revision=43560
2012-07-03 20:07:53 +00:00
Bill Meier 234cd599b3 Remove a leftover // "comment to self" (fixes checkAPI error).
svn path=/trunk/; revision=43559
2012-07-03 19:47:54 +00:00
Bill Meier 7882ec57c3 Improve use of the value_string x11_keysym_vals_source[]:
- Compile the value_string only as part of packet-x11.c
 - Create a value_string_ext to ref the value_string;
 - packet_vnc.c: Access the value_string using the value_string_ext;
 - packet-x11.c: Access the value-string using the value_string_ext
                 rather then building a temp GTree from the value_string.

svn path=/trunk/; revision=43558
2012-07-03 18:49:12 +00:00