Commit Graph

315 Commits

Author SHA1 Message Date
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 abc6fb24fa Fix some code remove by 296591399f
(Copyright or info about file...)

Change-Id: I90ba8b1c3ec8406b0c3365a69a8555837fc4bbb1
Reviewed-on: https://code.wireshark.org/review/515
Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
Tested-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
2014-03-05 09:25:47 +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
Evan Huus a6415ece0a Rename a couple of to_str functions to have ep_ in the name. This makes it
obvious that the returned string is ephemeral, and opens up the original names
in the API for versions that take a wmem pool (and thus can work in any scope).

svn path=/trunk/; revision=54249
2013-12-19 15:49:09 +00:00
Jakub Zawadzki 5ac6474c94 Rename some of pint.h macros to match common style (bits number on the end).
pntohs  -> pntoh16
   pntohl  -> pntoh32
   pletohs -> pletoh16
   pletohl -> pletoh32
   phtons  -> phton16
   phtonl  -> phton32


svn path=/trunk/; revision=53652
2013-11-29 18:59:06 +00:00
Alexis La Goutte 90c2945adb Fix compilation under Linux (Ubuntu)
airpdcap.c:470:18: error: declaration of 'address' shadows a global declaration [-Werror=shadow]
airpdcap.c:611:18: error: declaration of 'address' shadows a global declaration [-Werror=shadow]

svn path=/trunk/; revision=53216
2013-11-10 10:45:29 +00:00
Jakub Zawadzki 7b64bcf0b8 Move prototype of bytes_to_str, bytes_to_str_punct to correct header.
svn path=/trunk/; revision=53214
2013-11-10 09:44:02 +00:00
Alexis La Goutte 2c3468da11 Fix (-W)documentation error found by Clang
airpdcap.c:131:11: error: parameter 'password' not found in the function declaration [-Werror,-Wdocumentation]
 * @param password [IN] pointer to a password (sequence of between 8 and
          ^~~~~~~~
airpdcap.c:154:11: error: parameter 'password' not found in the function declaration [-Werror,-Wdocumentation]
 * @param password [IN] pointer to a password (sequence of between 8 and
          ^~~~~~~~

svn path=/trunk/; revision=51254
2013-08-10 21:28:01 +00:00
Jeff Morriss 95b4443aeb LIBGCRYPT_CFLAGS is not set in Windows builds, use GNUTLS_CFLAGS instead.
svn path=/trunk/; revision=51108
2013-08-02 00:52:13 +00:00
Jeff Morriss 9d0bcc9d09 Include LIBGCRYPT_CFLAGS in wsutil (but not in epan/crypt).
svn path=/trunk/; revision=51103
2013-08-01 23:56:09 +00:00
Jeff Morriss 2df54da6e2 Move a bunch of the crypt modules and pint.h into wsutil.
This means wsutil now links against libcrypt.

Protect a bunch of the crypt header files from multiple inclusion.

svn path=/trunk/; revision=51100
2013-08-01 23:34:47 +00:00
Evan Huus 5afbf48723 Update some of the old FSF addresses caught by the new licensecheck buildbot
step.

svn path=/trunk/; revision=48848
2013-04-14 18:55:28 +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
Jaap Keuter 827eb58b04 From David Arnold:
Replace use of INCLUDES with AM_CPPFLAGS in all Makefiles to placate recent autotools.

svn path=/trunk/; revision=48261
2013-03-12 06:53:39 +00:00
Anders Broman c5ee81098c From beroset:
remove C++ incompatibilities

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

svn path=/trunk/; revision=48006
2013-03-02 12:10:56 +00:00
Balint Reczey 1ebdb2e521 Export libwireshark symbols using WS_DLL_PUBLIC define
Also remove old WS_VAR_IMPORT define and related Makefile magic
everywhere in the project.

svn path=/trunk/; revision=47992
2013-03-01 23:53:11 +00:00
Bill Meier a6e56df8b6 it's ==> its & its ==> it's as needed.
svn path=/trunk/; revision=47898
2013-02-26 02:38:52 +00:00
Martin Kaiser 38a73a32f3 include the wsutil/wsgcrypt.h instead of including gcrypt.h directly
svn path=/trunk/; revision=47802
2013-02-21 18:23:29 +00:00
Michael Mann b76078d210 Bugfix crash caused by AirPDcap decryption. Bug 8177 (https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=8177)
svn path=/trunk/; revision=47314
2013-01-27 15:28:55 +00:00
Evan Huus 50efee619e Make airpcap's print_debug_line take const arguments so that it compiles
on newer GCC's when _DEBUG is #defined.

Found while investigating
https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=8177

svn path=/trunk/; revision=47309
2013-01-26 21:21:25 +00:00
Michael Mann 86d690880f replace "unsigned" datatype with "guint". Some mpeg files needed "unsigned int" instead.
bugs 7825-7827 (https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=7825)

svn path=/trunk/; revision=46928
2013-01-04 05:22:43 +00:00
Anders Broman a6b7e3fba5 From: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
airpdcap: For FromDS and ToDS both set use magic

All 802.11 data frames on the AMP link shall be sent with ToDS and FromDS
bits in the Frame Control field both set to one. Currently for this packets
we get different associations for the same EAPOL sequence since addr2 and
addr1 change.

svn path=/trunk/; revision=45923
2012-11-05 11:55:39 +00:00
Anders Broman 45953625a5 From Andrei Emeltchenko:
Add 802.11 AMP LLC/SNAP header

Add LLC/SNAP header specified in BLUETOOTH SPECIFICATION Version 4.0 [Vol 5]
802.11 Protocol Adaptation Layer Functional Specification.
The SNAP header composed of the OUI of the Bluetooth SIG and the protocol
identifier given in spec mentioned shall be used to distinguish AMP 4-way handshake
messages from external security traffic. Decode this traffic as 802.1X authentication.

Part of
https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=7633

svn path=/trunk/; revision=45920
2012-11-05 10:02:07 +00:00
Jeff Morriss 3729335973 We always HAVE_CONFIG_H so don't bother checking whether we have it or not.
svn path=/trunk/; revision=45016
2012-09-20 01:48:30 +00:00
Jeff Morriss 4c0b20f3bb (Attempt to) fix https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=7411 :
Use LIBGCRYPT_CFLAGS if we have it.

svn path=/trunk/; revision=44758
2012-09-03 19:53:35 +00:00
Anders Broman 1a8065acdc From Chris Elston:
Split md5_hmac for incremental use 

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

svn path=/trunk/; revision=44710
2012-08-31 09:29:34 +00:00
Anders Broman f32baca6e1 From Chris Elston:
Split sha1_hmac for incremental use.

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

svn path=/trunk/; revision=44709
2012-08-31 09:25:36 +00:00
Chris Maynard cc3c9ba3e5 Allow wpa-psk decryption keys to be successfully entered.
Problems reported on ask.wireshark.org here:
1) http://ask.wireshark.org/questions/13951/invalid-key-format-wireshark-182
2) http://ask.wireshark.org/questions/13688/error-updating-record-invalid-key-format

#BACKPORT (to 1.8)

svn path=/trunk/; revision=44694
2012-08-29 16:15:01 +00:00
Jeff Morriss 1c1db865f6 Don't define HAVE_UMTS_KASUMI to anything unless we actually have it.
Use #ifdef HAVE_UMTS_KASUMI instead of #if HAVE_UMTS_KASUMI

Put $Id$ tag in kasumi.h

svn path=/trunk/; revision=44398
2012-08-09 19:33:36 +00:00
Pascal Quantin 23c35e6d14 Small fixes:
- put back return NULL in line 947 that got removed in r44384: it is mandatory to avoid accessing non initialized variables. Change rlc_channel_assign a bit to fix what was the root cause of this removal (I guess)
- put back add_channel_info in dissect_rlc_am (removed by error?)
- fix some typo errors
- fix indentation a bit

svn path=/trunk/; revision=44393
2012-08-09 18:26:08 +00:00
Anders Broman dff5959253 Add Custom.common to dist.
svn path=/trunk/; revision=44387
2012-08-09 17:12:38 +00:00
Anders Broman efa02ebb7a From Jacob Nordgren and Rishie Sharma:
FP: fixed so hsdsch type 1 also uses communication context id 

Added experimental conditional decryption support.

svn path=/trunk/; revision=44384
2012-08-09 16:42:31 +00:00
Evan Huus a234b68ff0 Fix some system header files that were #included with "" instead of <>.
They made cppcheck unhappy.

svn path=/trunk/; revision=43779
2012-07-18 02:47:56 +00:00
Jakub Zawadzki b18e880040 Update FSF address - part II.
svn path=/trunk/; revision=43538
2012-06-28 23:18:38 +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
Guy Harris faa13e5072 Neither C90 nor C99 explicitly guarantee that a memcpy() call with a
null source argument and a zero count will work; in practice, they
probably will (with a zero count, there's nothing to fetch from the
source),  but the Clang static analyzer still warns about it.

svn path=/trunk/; revision=42305
2012-04-28 02:25:15 +00:00
Jeff Morriss 75c3c92f19 Add a "-build" argument to checkAPIs.pl. Use that argument when building
from makefiles (and thus from the buildbot).

The intention is to be able to tell when a human is running the tool so we
can provide more code-review guidance.

As a starter, enable the "too many proto_tree_add_text() calls" check when
a human is running the tool.

svn path=/trunk/; revision=41943
2012-04-04 20:46:49 +00:00
Anders Broman 84370fffcb Add *.sbr files to the clean target.
svn path=/trunk/; revision=40762
2012-01-29 20:21:30 +00:00
Balint Reczey 26503be7dc fix compile errors found by dumpabi target
svn path=/trunk/; revision=40595
2012-01-19 22:55:37 +00:00
Jörg Mayer 1d7f73360e The last commit failed to check in the deleted files
svn path=/trunk/; revision=40512
2012-01-15 12:30:52 +00:00
Jörg Mayer 2097912587 Rename crypt-xxx to xxx
svn path=/trunk/; revision=40511
2012-01-15 12:29:44 +00:00
Jörg Mayer c710b63e26 Maybe adding $(GNUTLS_CFLAGS) will fix the build problem.
svn path=/trunk/; revision=40502
2012-01-14 15:46:25 +00:00
Jörg Mayer 6197143d6c Ed Beroset <beroset@mindspring.com> via bug 5531
The ANSI C12.22 protocol is a smart grid protocol for utility meters, including
gas, water and electric.  The dissector implemented in the patch file includes
full support for all EPSEM (Extended Protocol Specification for Electricity
Metering) services and includes a full implementation of the C12.22 security
modes.

[...]

To decrypt the attached sample file, you need to set up the key table in the
preferences to include key 0 with a value of 6624C7E23034E4036FE5CB3A8B5DAB44.

Me: Fixes for:

[ 64%] Building C object epan/CMakeFiles/epan.dir/dissectors/packet-c1222.c.o            
../../asn1/c1222/packet-c1222-template.c: In function ‘dissect_epsem’:                   
../../asn1/c1222/packet-c1222-template.c:860:15: error: variable ‘ft’ set but not used [-Werror=unused-but-set-variable]

[  5%] Building C object epan/CMakeFiles/epan.dir/dissectors/packet-c1222.c.o
../../asn1/c1222/packet-c1222-template.c:103:19: error: ‘c1222_flags’ defined but not used [-Werror=unused-variable]



svn path=/trunk/; revision=40500
2012-01-14 15:22:10 +00:00
Gerald Combs 9dc580af2a More C++ updates.
svn path=/trunk/; revision=40377
2012-01-04 21:26:51 +00:00
Bill Meier 781129806f Fix ex "modeline" so it works;
See https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=5748

svn path=/trunk/; revision=39081
2011-09-21 17:49:11 +00:00
Anders Broman c7c6bbf831 Move airpcap_wep.c to /wsutil
svn path=/trunk/; revision=38969
2011-09-12 08:23:15 +00:00
Stig Bjørlykke 84b3c5da84 Make lookup functions for accessing crc32c_table and crc32_ccitt_table.
svn path=/trunk/; revision=38817
2011-08-31 11:47:27 +00:00
Stig Bjørlykke 5359494b1f Second try to move crc routines to libwsutil.
This time keep the tvb routines in epan.

Now we can use common crc routines outside epan.

svn path=/trunk/; revision=38810
2011-08-31 09:00:54 +00:00
Stig Bjørlykke 71f903b956 Revert r38800, as the crc routines contains some tvb functions.
svn path=/trunk/; revision=38803
2011-08-30 14:17:40 +00:00
Stig Bjørlykke 4132d40e50 Move all crc routines to libwsutil.
This way we can use the crc routines in wiretap.

svn path=/trunk/; revision=38800
2011-08-30 13:46:42 +00:00
Jörg Mayer c15ff441c6 Replace deprecated glib functions.
In order to compile the whole project with -DG_DISABLE_DEPRECATED
the mate plugin needs to replace its usage of GMemChunk.
All other places should be clean.

svn path=/trunk/; revision=38392
2011-08-07 18:15:45 +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 a5ddd187ca Fix Coverity CID 557.
svn path=/trunk/; revision=36526
2011-04-08 21:21:32 +00:00
Chris Maynard 4d4f0b839b Clear the entire contents of ctx at the end of md5_finish(). Fixes CID 712.
svn path=/trunk/; revision=36420
2011-03-31 15:41:23 +00:00
Bill Meier 6413294dae Add a comment re a "suspicious" sizeof() reported by Coverity Prevent.
(The report seems correct but I'm not altogether sure).

svn path=/trunk/; revision=36227
2011-03-21 17:34:58 +00:00
Guy Harris b4f663a29b On Windows, try putting __declspec(noreturn) in front of declarations of
routines that don't return.  (This requires that some files include
config.h to get WS_MSVC_NORETURN declared properly.)

svn path=/trunk/; revision=35989
2011-02-17 23:11:49 +00:00
Gerald Combs 69901e8eba Fix Visual C++ code analysis errors.
svn path=/trunk/; revision=35970
2011-02-16 22:57:36 +00:00
Bill Meier d3efa3ed9f A bit of Windows makefiles rework and cleanup:
- Define macros for certain CFLAGS in config.nmake iso of having defs in each makefile;
  a. -DHAVE_CONFIG_H and -D_U_="" are now part of a macro named STANDARD_CFLAGS;
  b. -WX has been replaced by WARNINGS_ARE_ERRORS (defined as -WX in config.nmake)
      (This allows disabling "Warnings as Errors" by just changing config.nmake)
  c. CVARSDLL definitions (not usage) have been removed from the various makefiles.
     XXX: It appears the usage of CVARSDLL can also be removed (not yet done) since:
     -DWIN32 and -DNULL=0 do not appear to be needed (any more);
     -D_MT and _D_DLL  are not needed since /MP causes these definitions.
  d. Define a macro WARNINGS_CFLAGS with additional specific compiler (level4) warnings to be enabled.
     E.G., 4295: array is too small to include a terminating null character
- config.nmake: reformat some long lines for readability;
- plugins\Makefile.nmake: clean-deps does nothing: remove it (and usage in top-level makefile);
- dissectors/Makefile.nmake: test to enable packet-rrc.obj target needs to include MSVC2010 ...

svn path=/trunk/; revision=35747
2011-02-02 01:19:53 +00:00
Jeff Morriss 19b2af1e70 Make some symbols static.
svn path=/trunk/; revision=35140
2010-12-06 23:20:21 +00:00
Jeff Morriss c755b2fd54 Oh yeah, there's a reason we don't put targets in Makefile.common: the first target in a makefile is what you get when you just run make (without a target). Revert 35073 and 35069.
svn path=/trunk/; revision=35075
2010-11-30 02:04:55 +00:00
Jeff Morriss f1c066bbee Move some checkapi targets into Makefile.common
svn path=/trunk/; revision=35073
2010-11-29 22:34:04 +00:00
Anders Broman a009cc0605 Doxygen changes.
svn path=/trunk/; revision=33990
2010-08-29 10:47:38 +00:00
Anders Broman a96e6b2047 Doxygen changes.
svn path=/trunk/; revision=33981
2010-08-28 19:27:19 +00:00
Anders Broman 1c2b3b0eb9 Fix a number of doxygen directives.
svn path=/trunk/; revision=33930
2010-08-26 15:24:49 +00:00
Anders Broman 48ac5f90ff - Try to fix a couple of doxygen comments.
- whitspace changes.

svn path=/trunk/; revision=33926
2010-08-26 06:46:30 +00:00
Guy Harris e646e71d0f Fix some compiler warnings.
svn path=/trunk/; revision=31969
2010-02-23 20:30:27 +00:00
Guy Harris b395a98305 Squelch a bunch of compiler warnings.
svn path=/trunk/; revision=31961
2010-02-23 04:35:23 +00:00
Jörg Mayer ec7380a6b1 Creatig static sublibs was not a good idea:
=========================================================================
 "du -s build" with sublibs:
 396868  build
 -----------------------------------
 "du -s build" without sublibs:
 197588  build/
 =========================================================================
 tshark with sublibs:
 -rwxr-xr-x 1 jmayer users 27399706 2009-10-11 08:39 tshark*
 -----------------------------------
 tshark without sublibs:
 -rwxr-xr-x 1 jmayer users  226748 2009-10-11 09:05 tshark*
 =========================================================================

So undo the following patches:

 ------------------------------------------------------------------------
 r30459 | krj | 2009-10-10 07:08:48 +0200 (Sa, 10 Okt 2009) | 1 line
 
 Sort subdirectories alphabetically
 ------------------------------------------------------------------------
 r30458 | krj | 2009-10-10 07:03:36 +0200 (Sa, 10 Okt 2009) | 1 line
 
 Add epan/dissectors/CMakeLists.txt which creates a static dissectors library
 ------------------------------------------------------------------------
 --> readd!! *** r30443 | krj | 2009-10-09 21:43:42 +0200 (Fr, 09 Okt 2009) | 1 line
 
 Rename DISSECTOR_ASM_UTILS to LIBWIRESHARK_ASM_FILES since these files belongs to ep
 an not dissectors
 ------------------------------------------------------------------------
 r30442 | krj | 2009-10-09 21:17:26 +0200 (Fr, 09 Okt 2009) | 1 line
 
 Add epan/ftypes/CMakeLists.txt which creates a static ftypes library
 ------------------------------------------------------------------------
 r30441 | krj | 2009-10-09 21:13:01 +0200 (Fr, 09 Okt 2009) | 1 line
 
 Add epan/dfilter/CMakeLists.txt which creates a static dfilter library
 ------------------------------------------------------------------------
 r30440 | krj | 2009-10-09 21:05:29 +0200 (Fr, 09 Okt 2009) | 1 line
 
 Add epan/crypt/CMakeLists.txt which creates a static crypt library
 ------------------------------------------------------------------------
 r30439 | krj | 2009-10-09 20:22:22 +0200 (Fr, 09 Okt 2009) | 1 line
 
 Add epan/crc/CMakeLists.txt which creates a static crc library
 ------------------------------------------------------------------------

To avoid merge problems, I needed to revert r30443 as well, will readd this
one in my next patch.

svn path=/trunk/; revision=30494
2009-10-11 07:28:26 +00:00
Kovarththanan Rajaratnam e4d4f81768 Add epan/crypt/CMakeLists.txt which creates a static crypt library
svn path=/trunk/; revision=30440
2009-10-09 19:05:29 +00:00
Guy Harris 3f8748951f Fix some LLP64 issues.
svn path=/trunk/; revision=30393
2009-10-07 22:36:33 +00:00
Gerald Combs 22dcdd3f9a WPA decryption fix from Greg Schwendimann via bug 3890:
I'm reasonably sure that I introduced this bug and I apologize for the problems
with my previous patch.  The problem is that I did not use all of the seen
keys,  I used all except the first key, which in a case of one key is none. 
The attached patch fixes the error.

svn path=/trunk/; revision=29843
2009-09-10 16:50:25 +00:00
Ronnie Sahlberg a3355a0949 Break the aes set ket/decrypt/encrypt out from airpdcap_raindoll into
its own crypt-aes.

change the integer types to glib style integers


this may/will be helpful if/when we implement our own version of 
kerberos 
aes decryption of dcerpc since the existing libraries can not (yet) 
handle when header signing is used.

we should implement our own decryption of this for cfx+aes just as we 
did for classic+arcfour





svn path=/trunk/; revision=29228
2009-07-29 10:01:14 +00:00
Bill Meier 3b4b7023b9 Fix some whitespace ....
svn path=/trunk/; revision=29184
2009-07-23 20:53:44 +00:00
Anders Broman 67d6f5976e Move th /MP flag setting to LOCAL_CFLAGS set in configure.nmake
for MSVC variant 2008 only. As suggested by Bill Meier.

svn path=/trunk/; revision=29114
2009-07-16 08:27:18 +00:00
Anders Broman 91caa01090 Add /MP flag to make use of multi cores.
svn path=/trunk/; revision=29104
2009-07-15 20:55:31 +00:00
Gerald Combs 8ca33644e7 From Greg Schwendimann via bug 3156:
Airpdcap does not allow for more than one key to be stored for a pair of nodes.
 This means that when a device associates more than once the previous keys are
lost.  This is ok for the first pass as the newest key is all that is needed
but when the user tries to click on a packet, to get the tree, which used a
previous key all that is seen is the encrypted data.  The attached patch stores
previous associations in a linked list and will try all known keys before
decided the packet can't be decrypted.  The list of keys is garbage collected
when a new capture is started.

svn path=/trunk/; revision=28449
2009-05-22 17:38:21 +00:00
Gerald Combs 1b60cf3846 Make some lengths size_t's.
svn path=/trunk/; revision=27942
2009-04-03 15:44:08 +00:00
Gerald Combs 5f1b7e8f27 More Win64 fixes.
svn path=/trunk/; revision=27707
2009-03-11 22:44:06 +00:00
Stig Bjørlykke c3b54a3378 Removed a "statement not reached" warning.
svn path=/trunk/; revision=26478
2008-10-16 13:35:35 +00:00
Gerald Combs b9fac8aa8a Fetch the key length using pntohs. Initialize and check its length.
svn path=/trunk/; revision=26115
2008-09-02 17:26:24 +00:00
Bill Meier afd857957a Fix a few Emacs "file variables" to have "safe" values.
That is: indent-tabs-mode: tabs --> indent-tabs-mode: t
Also: fix a typo: set-tabs-mode --> indent-tabs-mode

svn path=/trunk/; revision=26113
2008-09-02 11:17:03 +00:00
Gerald Combs ab689cc334 Add another buffer length check to group key decryption.
svn path=/trunk/; revision=26071
2008-08-25 15:26:15 +00:00
Gerald Combs f31f3f6d14 Fix a couple of crashes in WPA group key decryption.
svn path=/trunk/; revision=26070
2008-08-25 15:22:48 +00:00
Gerald Combs b5a8677250 Add WPA group key decryption from Brian Stormont, via bug 1420:
Although this patch successfully recognizes group keys and decrypts packets
properly using the group key, there is a limitation.  If an AP is using key
rotation, clicking on individual packets in a trace may not properly decrypt a
packet encrypted with a group key.  This is because the current structure used
in Wireshark only supports one active unicast and one active group key.  If a
new key has been seen, but you are looking at a packet encrypted with an older
key, it will not decrypt.  The summary lines, however, do show the packets
properly decrypted.

I've written up a much longer and more detailed explanation in a comment in the
code, along with a proposed idea for a solution, plus a clunky work-around in
the GUI when using the current code.

I also suspect there might still be a problem with decrypting TKIP groups keys
that are sent using WPA2 authentication.  In the most common operation, if you
are using WPA2, you'll also be using AES keys. It's not a common AP
configuration to use WPA2 with TKIP. In fact, most APs don't seem to support
it.  Since it is an uncommon setup, I haven't put aside the time to test this
patch against such an AP.   I do have access to an AP that supports this, so
when I have the time I'll test it and if needed, will submit another patch to
handle that odd-ball condition.

From me:

Remove the decrypt element of s_rijndael_ctx (which was unused, as indicated
in the comments).
Preserve the GPL licensing text in several files (which the patch shouldn't
have removed).
Remove changes that added whitespace.
Convert C++-style comments to C-style.
Update to include recent SVN changes (e.g. renaming variables named "index").
Remove extraneous printf's.
Define DEBUG_DUMP in airpdcap_debug.h.
Comment out some instances of DEBUG_DUMP.
Change malloc/free to g_malloc/g_free.
Use g_memdup instead of allocating and copying.
Use gint16 instead of INT16 in airpdcap_rijndael.c.
Add Brian to AUTHORS.


svn path=/trunk/; revision=25879
2008-07-30 22:32:21 +00:00
Guy Harris a04774395f Add Makefile.common files for epan/dfilter and epan/ftypes.
Add checkapi rules to Makefile.am files.

svn path=/trunk/; revision=25656
2008-07-02 01:44:30 +00:00
Guy Harris b6e20d89be Put printf into a separate "termoutput" API group. For most files,
check for it - but not for TShark plugins, as they are expected to
print to the standard output.

svn path=/trunk/; revision=25653
2008-07-01 21:13:32 +00:00
Guy Harris dc7ae72983 Fix another variable named "index".
svn path=/trunk/; revision=25581
2008-06-24 18:10:57 +00:00
Guy Harris 710ccf240c Rename a local variable in a macro to avoid collisions with regular
variables.

svn path=/trunk/; revision=25553
2008-06-23 21:08:58 +00:00
Guy Harris 11848b9efe Rename a variable to avoid collisions with the old V7 index() function,
still declared by <string.h> on some platforms (at least the way we
compile, with all sorts of non-ANSI C/non-POSIX stuff added).

svn path=/trunk/; revision=25551
2008-06-23 21:06:42 +00:00
Anders Broman 36d89bb79c Fix some of the Errors/warnings detected by checkapi.
svn path=/trunk/; revision=25368
2008-05-23 05:55:34 +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
Stephen Fisher 726a1caaf1 - Remove GLIB1 code
- Change ugly GLIB version checking statements to GLIB_CHECK_VERSION
- Remove ws_strsplit files because we no longer need to borrow GLIB2's
  g_strsplit code for the no longer supported GLIB1 builds


svn path=/trunk/; revision=24829
2008-04-07 05:22:54 +00:00
Gerald Combs b0f634c396 If we haven't found a handshake packet, say so.
svn path=/trunk/; revision=24605
2008-03-11 18:32:20 +00:00
Gerald Combs 9d2533aa25 Change the BSD-licensed written by CACE to BSD+GPL.
svn path=/trunk/; revision=24599
2008-03-10 17:20:15 +00:00
Gerald Combs 2cc71b9b66 Move the contents of AirPDcapCleanKeys() into AirPDcapInitContext()
and call AirPDcapInitContext() where we were previously calling
AirPDcapCleanKeys(). If we're resetting our keys, we should reset our
SA list and other associated data as well.

svn path=/trunk/; revision=24562
2008-03-05 00:57:30 +00:00
Ronnie Sahlberg 722ab30a62 we must include config.h or else NEED_G_ASCII_STRCASECMP_H will never be
defined

we must also include g_ascii_strcasecmp.h from the parent directory


svn path=/trunk/; revision=23634
2007-11-28 01:20:46 +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 6327c19912 From Christopher McKenzie: Zero out our SAs before we use them.
Remove an unneeded for loop in AirPDcapCleanKeys(), and make it static.

svn path=/trunk/; revision=23314
2007-10-31 00:15:17 +00:00
Sake Blok 6bec9d3d9e From tmiller@hcjbtech.org : Spelling error on GDS DB protocol dissector: "Buffer lenght:"
(recursively grepped through the source and corrected all occurences, even 
the ones just in comments)



svn path=/trunk/; revision=23211
2007-10-16 23:42:33 +00:00
Gerald Combs d75af45adc Make the WPA passphrase a percent-escaped string. Constify and GLib-ize
some variables.

svn path=/trunk/; revision=22210
2007-06-27 19:02:58 +00:00
Gerald Combs 4944cdc899 A recent checkin broke wpa-psk keys; fix it.
svn path=/trunk/; revision=22169
2007-06-23 00:00:57 +00:00
Gerald Combs 7efcc33a1e In packet-ieee802.11.c, fix a serious preference bug introduced in the
last checkin.  In airpcap.c, appease the toolbar code by returning a
lower-case, non-separated WEP key.

svn path=/trunk/; revision=22152
2007-06-21 20:22:56 +00:00
Gerald Combs 249a747c51 Be less restrictive about WEP key preferences. Use hex_str_to_bytes to
process WEP keys.  Allow the "wep:" prefix for WEP keys even when
HAVE_AIRPDCAP isn't defined.  Add a NULL pointer check to
hex_str_to_bytes().  Fixes bug 1584.

Fixup indentation.

svn path=/trunk/; revision=22151
2007-06-21 17:49:03 +00:00
Gerald Combs c992e2a3c5 Be a little less picky about EAPOL packet lengths. Someone sent in a
capture that has extra data in the 4th handshake message.

svn path=/trunk/; revision=22138
2007-06-18 21:58:34 +00:00
Gerald Combs 1d567d6e6b The 802.11 dissector calculates the header size, so pass that value to
the WEP/WPA decryption code instead of re-calculating it.  Fixes bug
1639.

Remove fcsPresent, radiotapPresent, and associated code from airpdcap.c
since they were always FALSE.  Glib-ize some data types.  Fixup white
space.

Update the release notes.

svn path=/trunk/; revision=22104
2007-06-14 22:09:14 +00:00
Bill Meier a6dab6d644 (Minor) Use _WIN32 (instead of WIN32) like the rest of Wireshark
svn path=/trunk/; revision=22030
2007-06-03 16:07:07 +00:00
Gerald Combs 7c8bb268ca The fix for ad-hoc WEP decryption in r21814 broke WPA. Replace it with
a better fix.  Clean up whitespace while we're at it.

svn path=/trunk/; revision=21847
2007-05-20 22:40:35 +00:00
Gerald Combs 86865b0fb8 Try WEP decryption before WPA. This keeps us from returning
prematurely if we have an IBSS frame.

svn path=/trunk/; revision=21814
2007-05-17 17:14:39 +00:00
Guy Harris 1b2cecda53 Need to include <epan/pint.h> to get pletohl() defined.
svn path=/trunk/; revision=21544
2007-04-23 22:34:31 +00:00
Guy Harris d6fc852779 byteReverse assumes its argument is aligned on a 32-bit boundary; make
it a pointer to a guint32.  Also, use pletohl() to fetch a 32-bit
little-endian quantity.

svn path=/trunk/; revision=21542
2007-04-23 21:23:30 +00:00
Guy Harris 5a4771d9cb The "in" array in an MD5 context is expected to be aligned on a 4-byte
boundary; make it an array of 16 guint32's rather than 64 guint8's, to
ensure that, and add now-necessary casts and remove now-unnecessary
casts.

(Missed on the previous checkin.)

svn path=/trunk/; revision=21541
2007-04-23 21:12:04 +00:00
Guy Harris 0acc6bc5b8 The "in" array in an MD5 context is expected to be aligned on a 4-byte
boundary; make it an array of 16 guint32's rather than 64 guint8's, to
ensure that, and add now-necessary casts and remove now-unnecessary
casts.

svn path=/trunk/; revision=21540
2007-04-23 20:47:07 +00:00
Guy Harris 8e32c1e739 Get rid of no-longer-needed, and warning-generated, casts.
svn path=/trunk/; revision=21536
2007-04-23 18:30:29 +00:00
Guy Harris cdb59eed63 Make Mk16_le() work on both big-endian and little-endian processors and
on processors that don't support unaligned loads - just use pletohs().

svn path=/trunk/; revision=21534
2007-04-23 18:11:12 +00:00
Guy Harris 877db595ff Don't assume byte pointers can be safely cast to more aligned pointers;
the compiler now warns of that.

svn path=/trunk/; revision=21530
2007-04-23 17:33:29 +00:00
Guy Harris 552fff182e Don't assume a pointer to UCHAR is necessarily aligned; that now
generates a warning.

svn path=/trunk/; revision=21528
2007-04-23 16:41:31 +00:00
Guy Harris 065be642f4 Get rid of some const warnings.
Use the "pnto" macros to fetch 16-bit quantities from a buffer - not
only do they have the right casts to avoid const warnings, they also
work even on platforms (such as SPARC) where you can't dereference
unaligned pointers without a trap.

Similarly, compare a possibly-unaligned (we make no alignment guarantees
in Wireshark) 16-bit quantity against 0 a byte at a time.

svn path=/trunk/; revision=21507
2007-04-22 18:26:45 +00:00
Guy Harris 6327554e6c Check the GLib version number, not the GTK+ version number; it's GLib we
care about, and this code doesn't use GTK+, so it doesn't include any
GTK+ headers and therefore doesn't get the GTK+ version number defined.

svn path=/trunk/; revision=21506
2007-04-22 18:04:52 +00:00
Ronnie Sahlberg 7a97135752 GString.len has changed signednedd between gtk1 and gtk2
this will hopefully again compile under both gtk1 and 2


svn path=/trunk/; revision=21499
2007-04-22 15:22:53 +00:00
Jörg Mayer 7b20d35047 Fix a signedness warning.
svn path=/trunk/; revision=21497
2007-04-22 11:51:36 +00:00
Ronnie Sahlberg 99bc488535 fix the sign of a variable to prevent a singed/unsigned warning during
compiling


svn path=/trunk/; revision=21494
2007-04-22 09:58:12 +00:00
Sebastien Tandel 84e1cfee7f delete Td4 as it is used only in rijndaelDecrypt and rijndaelDecryptRound not
present in the wireshark code

svn path=/trunk/; revision=21429
2007-04-14 11:55:19 +00:00
Jörg Mayer cee590823d - Add Makefile.common to EXTRA_DIST (spotted by Christopher Maynard)
- Replaced spaces at beginning of line by tab

svn path=/trunk/; revision=21267
2007-03-29 07:41:54 +00:00
Jeff Morriss 13942d6fa3 Don't #define bzero and bcopy to be memset and memcpy on Windows, just use memset and memcpy instead.
svn path=/trunk/; revision=21201
2007-03-26 03:59:09 +00:00
Stephen Fisher 62f88a4a04 From Sebastien Tandel:
(Temporarily disable the warnings as errors default on Unix to get
to get the buildbots and people with gcc40 going again until those
additional warnings gcc40 generates can be fixed-I'm working on it
ASAP)

   Patch for configure.in which disables by default the treatment of
warnings as errors.
It can be enabled with './configure --with-warnings-as-errors'.
The macro will test first if GCC is present. If it's the case,
HAVE_WARNINGS_AS_ERRORS is defined. All the USING_GCC have been replaced
by HAVE_WARNINGS_AS_ERRORS.
With this switch, people won't suffer from unexpected warnings when
downloading svn sources during the transition time ;)


svn path=/trunk/; revision=21153
2007-03-23 17:49:59 +00:00
Stephen Fisher 84c5becd89 Add -Werror for gcc to a few more directories and fix a few warnings
svn path=/trunk/; revision=21129
2007-03-22 23:24:13 +00:00
Ulf Lamping dcb1e1bdfd add "treat warnings as errors" flag(s)
svn path=/trunk/; revision=21125
2007-03-22 22:54:00 +00:00
Luis Ontanon 69e27560c2 From: Sebastien Tandel
And here is the patch to change guint -> guint32 in the hmac function.


svn path=/trunk/; revision=21037
2007-03-16 21:22:35 +00:00
Guy Harris 2b75ac83af Eliminate __inline - not all compilers support it.
svn path=/trunk/; revision=20932
2007-02-25 23:25:23 +00:00
Guy Harris 3496de0ff1 ANSI C defines size_t; if we don't have that defined, we have bigger
problems, and there's no guarantee that _SIZE_T is defined on all ANSI C
platforms, so you might end up with a redefinition and a compile failure.

svn path=/trunk/; revision=20931
2007-02-25 22:46:54 +00:00
Gerald Combs 183cbf95cc WEP decryption is destructive -- pass a fresh copy of our data buffer
instead of the actual buffer.  Add an entry to the release notes, and
clear out leftovers from the 0.99.5 release.

svn path=/trunk/; revision=20875
2007-02-20 18:44:22 +00:00
Bill Meier 547a03b25b Fix some C++ style comments
svn path=/trunk/; revision=20865
2007-02-19 21:45:27 +00:00
Stephen Fisher 0ebc01dc03 From Sebastien Tandel:
Create two new files (ws_strsplit.[ch]) that use GTK2 code to override
the buggy g_strsplit() function when compiling for GTK1.  Include this
work-around function (ws_strsplit) in libwireshark.def.  Add notes on usage
to README.developer.  Include epan/ws_strsplit.h in all files that use
g_strsplit().


svn path=/trunk/; revision=20804
2007-02-13 20:57:22 +00:00
Jeff Morriss 0c17bfd3a8 From Eric Hall to fix bug 1289:
http://bugs.wireshark.org/bugzilla/show_bug.cgi?id=1289

Rename 'svnversion' to 'wireshark_svnversion' to resolve a symbol conflict with
GTK 2.10.6 (hmm, shouldn't GTK not be exporting that symbol or at least naming
it so as to prevent such collisions? Well, so should we, so...)

From Andreas Fink: change #ifdef for size_t in airdcap_interop.h to fix
compile on MacOS X.


svn path=/trunk/; revision=20726
2007-02-06 02:27:59 +00:00
Gerald Combs 6132c5b323 Fix saving WPA key preferences from the decryption key management dialog,
which was broken by r20388.

svn path=/trunk/; revision=20573
2007-01-26 23:28:22 +00:00
Gerald Combs f9e2736d7c Add support for "wildcard" WPA keys in the form "wpa:passphrase" (note
the lack of SSID).  Wildcarding combines the passphrase with the last
seen SSID and attempts decryption.  The last-seen stack is only one
element tall, which means it may get clobbered on busy and diverse
networks.  We can expand it if needed.

Make internal functions static in airpdcap.c.  Rearrange the
AIRPDCAP_KEY_ITEM struct so that the passphrase and SSID don't get
clobbered when we set our PSK.

svn path=/trunk/; revision=20572
2007-01-26 21:54:59 +00:00
Gerald Combs 2664012ca6 Fix a key preference crash bug. Improve WPA passphrase and SSID length
handling.  Free a byte array.  Squelch a compiler warning.  Fix a URI
string parsing bug.

svn path=/trunk/; revision=20549
2007-01-25 01:24:14 +00:00
Stephen Fisher a5b223382f From Gisle Vanem: Add the final ) to a g_strdup_printf call
svn path=/trunk/; revision=20457
2007-01-16 21:16:45 +00:00
Gerald Combs ba4a327704 Add copyright attributions and licenses. License each derived work
according to its pedigree.

svn path=/trunk/; revision=20401
2007-01-12 00:54:13 +00:00
Gerald Combs f67fdf4865 Move sha1.[ch] to epan/crypt/crypt-sha1.[ch]. Remove duplicate code.
svn path=/trunk/; revision=20399
2007-01-12 00:33:32 +00:00
Gerald Combs def1f435fc Fix compilation problems under Windows. In the GTK code, convert SSIDs
to GByteArrays.  Add format_uri() to strutil, which formats a byte string
with percent-escapes.  Fixup whitespace and indentation.

svn path=/trunk/; revision=20397
2007-01-11 22:12:33 +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
Jaap Keuter 6b97952ede Trying to get buildbot Ubuntu-5.10-x86 distcheck to build again
svn path=/trunk/; revision=20376
2007-01-10 14:37:24 +00:00
Ulf Lamping 2dbb754dc2 vastly simplify the Makefile by using Makefile.common - as this is what this file is intended to be - to be common for UNIX and Windows builds ;-)
svn path=/trunk/; revision=20374
2007-01-10 09:54:31 +00:00
Tomas Kukosa b3df178624 add missing object files into epan/crypt/Makefile.nmake
svn path=/trunk/; revision=20371
2007-01-10 07:06:16 +00:00
Luis Ontanon ae2ca85c92 remove now useless hmac.[ch] files
svn path=/trunk/; revision=20365
2007-01-10 01:14:16 +00:00
Luis Ontanon 0bd2e20098 Have the code working on BIG ENDIAN machines
svn path=/trunk/; revision=20364
2007-01-10 01:13:10 +00:00
Gerald Combs 9d5858f635 Move cryptography code to epan/crypt.
svn path=/trunk/; revision=20359
2007-01-09 22:14:07 +00:00
Luis Ontanon b68e1cf4e4 Win32 has neither bcopy nor bzero
svn path=/trunk/; revision=20357
2007-01-09 20:43:25 +00:00
Luis Ontanon f7a79f43e7 SNMPv3 USM decryption/authentication phase 1
svn path=/trunk/; revision=20353
2007-01-09 18:38:55 +00:00
Luis Ontanon e4e3c189f2 * replaced MD5 with one that that works on my Big Endian Mac. ( taken from www.pjsip.org, which BTW took it from some other place)
* externalize SHA1 functions and data types


svn path=/trunk/; revision=20351
2007-01-09 15:50:55 +00:00
Ulf Lamping 992d68cbca airpdcap_wep.h was removed
svn path=/trunk/; revision=20350
2007-01-08 22:50:49 +00:00
Gerald Combs 2a033f3350 Remove duplicate crc32 code.
svn path=/trunk/; revision=20347
2007-01-08 21:19:46 +00:00
Ulf Lamping dc7ac69d7b an attempt to fix the distcheck
svn path=/trunk/; revision=20287
2007-01-03 04:18:55 +00:00
Ulf Lamping 7cba4b4987 fix windows build
maybe the definitions from Makefile.common should better be used - the current Makefile.nmake looks a bit strange compared to others ;-)

svn path=/trunk/; revision=20281
2007-01-03 00:23:22 +00:00
Gerald Combs ed7b244446 Remove empty files (which should have been removed with r20231).
svn path=/trunk/; revision=20279
2007-01-03 00:07:07 +00:00
Gerald Combs 53689800e6 Move epan/crypt-md5.[ch] to epan/crypt. Remove
epan/crypt/airpdcap_md5.[ch].  Fix up whitespace.

svn path=/trunk/; revision=20277
2007-01-02 22:49:57 +00:00
Gerald Combs 3d0d45cac5 From Gisle Vanem:
Here are some patches needed to build using HAVE_AIRPCAP
on MingW:

* airpcap.h needs 'WEP_KEY_MAX_SIZE' from <epan/crypt/wep-wpadefs.h>.

* airpcap_loader.h needs <epan/crypt/airpdcap_user.h> and definition of
 'decryption_key_t'.

* epan/crypt/airpdcap_interop.h defines 'ntohs()' before <winsock2.h>
 gets included. Thus creating a parse error later on.

svn path=/trunk/; revision=20274
2007-01-02 19:56:59 +00:00
Gerald Combs 20fe5ab1a3 Fix a compiler warning. Surround an MSVC-specific #pragma with an
#ifdef, and add a link to a -dev mailing list thread pointing out that
it may not be necessary.  Fixup whitespace and comments.

svn path=/trunk/; revision=20256
2007-01-01 20:07:23 +00:00
Guy Harris 84792dd971 Make the crypt library the same way other sublibraries of libwireshark
are made, so that if libwireshark is shared, the crypt library is built
appropriately.  (This squelches a build warning, at least in OS X, that
linking a shared library with a static library is non-portable; it
should also arrange that the crypt library is built as
position-independent code if necessary.)

DISTCLEANFILES subsumes CLEANFILES, so it doesn't need to list files
already in CLEANFILES.

svn path=/trunk/; revision=20237
2006-12-29 22:53:44 +00:00
Guy Harris 1f349f16e1 Add some parentheses, as the suggestion of Mr. GCC.
svn path=/trunk/; revision=20236
2006-12-29 22:48:52 +00:00
Gerald Combs 32837914e6 Add clean targets to wslua. Fix the config.nmake include in crypt.
svn path=/trunk/; revision=20232
2006-12-28 17:28:29 +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
Gerald Combs 92125fc18c Add missing files.
svn path=/trunk/; revision=20228
2006-12-27 23:19:45 +00:00