Commit Graph

66 Commits

Author SHA1 Message Date
Michael Mann 4a1bd75b60 Add a "hidden" array of UAT entry data to allow separation between UAT file syntax errors and "syntactically correct, but invalid field". Now UAT files load all entries into the "hidden" array (raw_data), but only adds valid ones to the user_data, which is used by the dissectors.
This is a start to fixing bug 7471 (https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=7471) and is being committed to get the new ABI/API in before the 1.10 release.
What remains is the "GUI portion" (GTK+qt) to indicate to users which UAT entries are invalid.

svn path=/trunk/; revision=48960
2013-04-22 02:10:49 +00:00
Alexis La Goutte 101489f386 Use also const char to uat_save (identical to uat_load)
svn path=/trunk/; revision=48902
2013-04-17 19:39:11 +00:00
Alexis La Goutte 1093faf643 From Michael Mann via https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=8446 Wifi details are not stored in the Decryption Key Management dialog (post 1.8.x)
If there is not 80211_keys file, using Decryption Management Key don't create the file and keys is not saved.

From me:
Use a err2 variable to avoid to break API/ABI when backport to 1.8

svn path=/trunk/; revision=48900
2013-04-17 19:38:34 +00:00
Alexis La Goutte 5dcc13489b Fix some Dead Store (Dead assignement/Dead increment) Warning found by Clang
svn path=/trunk/; revision=48771
2013-04-07 15:57:36 +00:00
Anders Broman d8bd66c291 From beroset:
remove C++ incompatibilities 
https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=8416

svn path=/trunk/; revision=48409
2013-03-18 22:38:56 +00:00
Michael Mann 3a48e7e1e2 Bugfix Decryption Key Management dialog, bug 8446 (https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=8446)
Needed to convert use of old IEEE802.11 preference strings to UAT.  Since UAT is self-contained within its own file, the entire preference file doesn't need to be rewritten/saved when UAT values are changed.

svn path=/trunk/; revision=48308
2013-03-15 01:31:53 +00:00
Guy Harris 3cd82d13c1 Add a macro to calculate, from the size of an AirpcapKeysCollection
structure, the number of keys in the key list, and use it.

svn path=/trunk/; revision=47718
2013-02-17 21:14:14 +00:00
Guy Harris 8d7ffcc99b Add a macro that, for a given count of keys, returns the total size of
an AirpcapKeysCollection structure with that number of keys, and use it
instead of doing the calculation manually.

svn path=/trunk/; revision=47699
2013-02-17 03:45:06 +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
Bill Meier f22b7d2993 Fix a [-Wshadow] warning;
Also: Do some minor whitespace and formatting changes.

svn path=/trunk/; revision=46187
2012-11-25 21:47:04 +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
Michael Mann e0e533d643 Have (almost) all preferences use the generic preferences API (per https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=7402). This cleaned up a lot of hardcoded code and allows breaking up the prefs structure (or at least prevent it from growing too large) if desired.
Bugfixed problems mentioned in
http://www.wireshark.org/lists/wireshark-dev/201208/msg00001.html

Column preferences now support default '#' character

svn path=/trunk/; revision=44348
2012-08-08 16:54:02 +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
Anders Broman ec86463ac1 From Evan Huus:
Airpcap memory leak.

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

svn path=/trunk/; revision=43198
2012-06-11 07:14:52 +00:00
Anders Broman 52e6a290c0 From Evan Huus: Two bad NULL checks in airpcap_loader.c https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=7141
svn path=/trunk/; revision=42136
2012-04-18 18:17:40 +00:00
Alexis La Goutte 9380f962a2 Fix some Dead Store (Dead assignement/Dead increment) Warning found by Clang
svn path=/trunk/; revision=42090
2012-04-16 07:59:48 +00:00
Jeff Morriss e01bfbea0a Use AIRPCAP_ERRBUF_SIZE instead of PCAP_ERRBUF_SIZE in one spot.
svn path=/trunk/; revision=41801
2012-03-27 15:17:42 +00:00
Bill Meier d8c13bcee1 #include "simple_dialog.h" ==> #include "ui/simple-dislog.h"
svn path=/trunk/; revision=40540
2012-01-16 02:56:00 +00:00
Michael Tüxen d884982138 Fix syntax...
svn path=/trunk/; revision=39124
2011-09-24 16:26:49 +00:00
Michael Tüxen 92752916ad Don't consider remote airpcap devices as airpcap devices, but as remote devices.
This makes the GUI consistent.

svn path=/trunk/; revision=39123
2011-09-24 16:24:09 +00:00
Gerald Combs aad44caa94 Update the AirPcap code in prefs_dlg.c to match the changes made to
airpcap_dlg.c long ago in r28350. Re-enable GTK_DISABLE_DEPRECATED. Add
a comment to airpcap_loader.c about moving functionality to
packet-ieee80211.c.

svn path=/trunk/; revision=38610
2011-08-18 23:04:23 +00:00
Anders Broman 639e59a9f9 From Michael Mann:
Removed "key prefix" need within GUI so it's a little more intuitive (because
that's what this bug is complaining about).  Slight backwards compatibility
issue with UAT (because key prefix was in previous keys), but all development 
(including fix for BUG 1123 that created UAT) has just been on SVN and not
released.

Also adjusted AirPCap (airpcap_loader.c) to account for the lack of "key
prefix".

Addressed some memory leaks/excess string creation.

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

svn path=/trunk/; revision=37888
2011-07-04 14:07:20 +00:00
Gerald Combs 607b228df6 Add ws_load_library and ws_module_open, which respectively call
LoadLibrary and g_module_open only for the program directory and system
directory on Windows. Use them to replace a bunch of LoadLibrary and
g_module_open calls. Use the extension ".dll" for all the DLLs that we
load. Add comments about DLL loading in Python.

svn path=/trunk/; revision=33924
2010-08-25 20:30:59 +00:00
Gerald Combs 34016ac777 Don't try to free a static pointer.
svn path=/trunk/; revision=31315
2009-12-18 19:44:10 +00:00
Gerald Combs 23df4e7f01 Update the AirPcap code for Win64 and enable AirPcap for the 64-bit build.
svn path=/trunk/; revision=30945
2009-11-12 23:48:11 +00:00
Jörg Mayer 32becb4637 () -> (void)
svn path=/trunk/; revision=28352
2009-05-13 17:29:13 +00:00
Gerald Combs 0a069bc6a3 Migrate the Airpcap UI code from GtkCombos (deprecated) to GtkComboBoxes.
Consolidate some common code. Rename a bunch of variables. Remove some
unused code.

Fix an offset flag bug in airpcap_loader.c.

This had to be merged by hand with r28349. Hopefully none of those
changes were clobbered.

svn path=/trunk/; revision=28350
2009-05-13 16:14:28 +00:00
Stig Bjørlykke 062aa7a45f Make it compile without warnings on OSX.
svn path=/trunk/; revision=28343
2009-05-13 10:01:17 +00:00
Jörg Mayer 21dd65ec11 Hmm, HMODULE should have been void*
svn path=/trunk/; revision=28341
2009-05-13 06:29:14 +00:00
Jörg Mayer e699ac6498 Replace all Windows types by glib types - hopefully the
correct ones.
Use buildbot as a compile test on Windows.

This makes "configure --enable-airpcap && make" succeed
on Linux. It crashes the moment you click the wireless
settings button because some relevant information isn't
present (nullpointer deref).


svn path=/trunk/; revision=28340
2009-05-13 04:57:45 +00:00
Jörg Mayer ec71e49011 Move the #if _WIN32 way inwards. This is needed to make
the whole thing link under Linux - of course we are still
a long way from the code being usable.
Oh, compiling will only work if the windows types get
replaced by glib types, but that is for another patch.


svn path=/trunk/; revision=28331
2009-05-11 18:46:19 +00:00
Bill Meier 247337bad7 Use g_malloc instead of malloc.
svn path=/trunk/; revision=27738
2009-03-16 14:32:01 +00:00
Stig Bjørlykke 30db09a3a4 Removed a _U_ for a used argument.
svn path=/trunk/; revision=26941
2008-12-08 23:46:26 +00:00
Jaap Keuter cddb781f53 Various corrections, as in: typos, whitespace, few return values, _U_ markers.
svn path=/trunk/; revision=26472
2008-10-15 23:17:40 +00:00
Gerald Combs 9a41723b2b Keep the wireless toolbar extension channel entry from inadvertently
setting its value to -1. Fix a bug that kept the wireless toolbar from
being enabled if HAVE_PCAP_REMOTE was defined. Fix a couple of other
minor issues.
--Thisr line, and those below, will be ignored--

M    airpcap_loader.c
M    gtk/airpcap_dlg.c
M    gtk/main_airpcap_toolbar.c

svn path=/trunk/; revision=26469
2008-10-15 21:43:00 +00:00
Anders Broman 3d39efc2c3 Fix some of the Errors/warnings detected by checkapi.
svn path=/trunk/; revision=25248
2008-05-07 05:26:40 +00:00
Anders Broman 63c5c71cf8 Remove:
#ifdef NEED_G_ASCII_STRCASECMP_H
#include "g_ascii_strcasecmp.h"
#endif

svn path=/trunk/; revision=24859
2008-04-09 05:36:08 +00:00
Guy Harris 9c89cdaaa3 strcasecmp(), strncasecmp(), g_strcasecmp(), and g_strncasecmp() delenda
est.  Use g_ascii_strcasecmp() and g_ascii_strncasecmp(), and supply our
own versions if they're missing from GLib (as is the case with GLib
1.x).

In the code to build the list of named fields for Diameter, don't use
g_strdown(); do our own g_ascii_-style upper-case to lower-case mapping
in the hash function and use g_ascii_strcasecmp() in the compare
function.

We do this because there is no guarantee that toupper(), tolower(), and
functions that use them will, for example, map between "I" and "i" in
all locales; in Turkish locales, for example, there are, in both
upper case and lower case, versions of "i" with and without a dot, and
the upper-case version of "i" is "I"-with-a-dot and the lower-case
version of "I" is "i"-without-a-dot.  This causes strings that should
match not to match.

This finishes fixing bug 2010 - an earlier checkin prevented the crash
(as there are other ways to produce the same crash, e.g. a bogus
dictionary.xml file), but didn't fix the case-insensitive string matching.

svn path=/trunk/; revision=23623
2007-11-27 18:52:51 +00:00
Gerald Combs 72daa58e19 Instead of converting between 802.11 frequencies and channels umpteen
different ways, add a set of common conversion routines.  Add a
"Frequency/Channel" column and fill it in where we can.  Fix RSSI column
printing in PPI.

Fix up whitespace along the way.

svn path=/trunk/; revision=22538
2007-08-17 19:34:14 +00:00
Bill Meier fe25e21a0e Alter slightly so compile/link with airpcap works again....
svn path=/trunk/; revision=21848
2007-05-21 00:41:58 +00:00
Anders Broman 001d89c183 Undefine AIRPCAP_DIR to get the Windows build going again.
svn path=/trunk/; revision=21841
2007-05-20 19:55:34 +00:00
Gerald Combs 55d2b928c2 From Dustin Johnson:
- Update the wireless/AirPcap GUI code to support 802.11n as well as
    some related upcoming code changes.
  - Remove airpcap.h from the repository, since it exists in the AirPcap
    devpack (and will be superseded Real Soon Now).
  - Show the individual channel flag bits in radiotap.
  
Fix the 802.11n MCS set display.

This is a partial checkin, so hopefully nothing is broken.

svn path=/trunk/; revision=21831
2007-05-18 21:06:20 +00:00
Jeff Morriss 47668171e3 Fix bug 1377:
http://bugs.wireshark.org/bugzilla/show_bug.cgi?id=1377

and complaints to the mailing list that a bogus (empty or non-ASCII contents)
dialog box was popped up when getting the list of interfaces.  The problem was
that 'get_airpcap_interface_list()' wasn't setting the returned error value
when it found that AirPcap was not loaded.  If whatever was in that variable
happened to be 1 when a non-AirPcap user requested the list of interfaces
then the bogus dialog would show up.


svn path=/trunk/; revision=21380
2007-04-11 04:57:43 +00:00
Bill Meier 547a03b25b Fix some C++ style comments
svn path=/trunk/; revision=20865
2007-02-19 21:45:27 +00:00
Gerald Combs 065e9f88e5 Spelling fixes.
svn path=/trunk/; revision=20561
2007-01-26 06:45:12 +00:00
Gerald Combs 4342c8d885 It's not an error if we don't find any AirPcap interfaces when AirPcap isn't
loaded.

svn path=/trunk/; revision=20543
2007-01-24 01:17:48 +00:00
Guy Harris cc22748169 Have the routines to get interface lists take a pointer to a "gchar *"
as an argument, and, on an error, if they have an error message, have
them set that "gchar *" to point to a g_malloc()ed string containing the
error message, rather than taking a pointer to a buffer for that message
as an argument.  That's more like what's done in Wiretap, and doesn't
impose an upper limit on the lengths of those error messages.  If that
pointer is null, don't allocate the message string and return it.

Have that error message already have the "cant_get" processing applied
to it, so nobody other than those routines need to call the "cant_get"
routines to process the error messages.

Have get_airpcap_interface_list() explicitly set "*err" to the
appropriate error code.

Clean up indentation.

svn path=/trunk/; revision=20521
2007-01-21 23:45:36 +00:00
Tomas Kukosa 084bbf692c make airpcap_loader.c compileable and linkable under Windows
svn path=/trunk/; revision=20391
2007-01-11 07:56:37 +00:00
Gerald Combs 983f496f69 Add uri_str_to_bytes(), byte_array_dup(), and byte_array_equal()
functions to strutil.  Use GByteArrays to store SSIDs for decryption,
and let the user specify arbitrary byte strings using percent-encoded
strings.  We should probably add percent encoding for pass phrases as
well, so you can escape the ":" character.

Move the key struct key conversion utilities to airpdcap.c, and remove
duplicate code from packet-ieee80211.c.  Fix a lot of indentation.

svn path=/trunk/; revision=20388
2007-01-11 02:42:34 +00:00
Gerald Combs bd282b4114 Move the contents of airpdcap to epan/crypt. Try to fix the current
distcheck failure.  Move the nmake build targets for airpdcap from 
epan/dissectors to epan.  This will probably break the Windows build.

svn path=/trunk/; revision=20231
2006-12-28 17:22:12 +00:00