aboutsummaryrefslogtreecommitdiffstats
path: root/epan
diff options
context:
space:
mode:
authorGerald Combs <gerald@wireshark.org>2006-12-27 23:05:55 +0000
committerGerald Combs <gerald@wireshark.org>2006-12-27 23:05:55 +0000
commit2437fd2e778b10418e22917d32a2679b2203435a (patch)
treed3f8e772ec737813b09289115d67b06bcc849331 /epan
parent25862eff23f5981ca5764217346d7dfa62c1494e (diff)
Prepare to move the airpdcap code to epan/crypt (SVN won't let me actually
move the files until these changes are checked in). Add an AC_DEFINE for airpdcap (which will be removed once the changes have settled). Update the airpdcap code to compile on non-Windows systems. Fix up comments and whitespace to conform more closely to the rest of the code base. Verified to compile under Windows and OS X. svn path=/trunk/; revision=20227
Diffstat (limited to 'epan')
-rw-r--r--epan/Makefile.am4
-rw-r--r--epan/dissectors/packet-ieee80211.c15
2 files changed, 11 insertions, 8 deletions
diff --git a/epan/Makefile.am b/epan/Makefile.am
index 966a29a612..4443d77105 100644
--- a/epan/Makefile.am
+++ b/epan/Makefile.am
@@ -100,8 +100,8 @@ MAINTAINERCLEANFILES = \
#
# Add the object files for missing routines, if any.
#
-libwireshark_la_LIBADD = @G_ASCII_STRTOULL_LO@ @INET_ATON_LO@ @INET_PTON_LO@ @INET_NTOP_LO@ dfilter/libdfilter.la ftypes/libftypes.la dissectors/libdissectors.la $(wslua_lib) @ADNS_LIBS@ @LIBGNUTLS_LIBS@ @LIBICONV@ @KRB5_LIBS@ @SNMP_LIBS@ @SSL_LIBS@ -lm
-libwireshark_la_DEPENDENCIES = @G_ASCII_STRTOULL_LO@ @INET_ATON_LO@ @INET_PTON_LO@ @INET_NTOP_LO@ dfilter/libdfilter.la ftypes/libftypes.la dissectors/libdissectors.la $(wslua_lib)
+libwireshark_la_LIBADD = @G_ASCII_STRTOULL_LO@ @INET_ATON_LO@ @INET_PTON_LO@ @INET_NTOP_LO@ dfilter/libdfilter.la ftypes/libftypes.la dissectors/libdissectors.la ../airpdcap/libairpdcap.a $(wslua_lib) @ADNS_LIBS@ @LIBGNUTLS_LIBS@ @LIBICONV@ @KRB5_LIBS@ @SNMP_LIBS@ @SSL_LIBS@ -lm
+libwireshark_la_DEPENDENCIES = @G_ASCII_STRTOULL_LO@ @INET_ATON_LO@ @INET_PTON_LO@ @INET_NTOP_LO@ dfilter/libdfilter.la ftypes/libftypes.la dissectors/libdissectors.la ../airpdcap/libairpdcap.a $(wslua_lib)
tvbtest: tvbtest.o tvbuff.o except.o strutil.o emem.o
$(LINK) $^ $(GLIB_LIBS) -lz
diff --git a/epan/dissectors/packet-ieee80211.c b/epan/dissectors/packet-ieee80211.c
index b40b11b48c..9285be48a0 100644
--- a/epan/dissectors/packet-ieee80211.c
+++ b/epan/dissectors/packet-ieee80211.c
@@ -70,6 +70,7 @@
#include <epan/crc32.h>
#include <epan/tap.h>
#include <epan/emem.h>
+#include <epan/crypt/wep-wpadefs.h>
#include <ctype.h>
#include "isprint.h"
@@ -791,14 +792,15 @@ static dissector_handle_t data_handle;
static int wlan_tap = -1;
-/* Davide Schiera (2006-11-22): including AirPDcap project */
-#ifdef HAVE_AIRPDCAP
-#include "..\..\airpdcap\airpdcap_ws.h"
+/* Davide Schiera (2006-11-22): including AirPDcap project */
+#ifdef HAVE_AIRPDCAP
+#include "airpdcap/airpdcap_ws.h"
AIRPDCAP_CONTEXT airpdcap_ctx;
#else
int airpdcap_ctx;
#endif
-/* Davide Schiera (2006-11-22) ---------------------------------------------- */
+/* Davide Schiera (2006-11-22) ---------------------------------------------- */
+
/* ************************************************************************* */
/* Return the length of the current header (in bytes) */
@@ -5454,7 +5456,7 @@ void set_airpdcap_keys()
gboolean res;
gchar* tmpk = NULL;
- keys=(PAIRPDCAP_KEYS_COLLECTION)malloc(sizeof(AIRPDCAP_KEYS_COLLECTION));
+ keys=(PAIRPDCAP_KEYS_COLLECTION)g_malloc(sizeof(AIRPDCAP_KEYS_COLLECTION));
keys->nKeys = 0;
for(i = 0; i < MAX_ENCRYPTION_KEYS; i++)
@@ -5526,12 +5528,13 @@ void set_airpdcap_keys()
keys->nKeys++;
}
}
+ if(tmpk != NULL) g_free(tmpk);
}
/* Now set the keys */
AirPDcapSetKeys(&airpdcap_ctx,keys->Keys,keys->nKeys);
+ g_free(keys);
- if(tmpk != NULL) g_free(tmpk);
}
#endif