diff options
-rw-r--r-- | Makefile.am | 6 | ||||
-rw-r--r-- | Makefile.nmake | 8 | ||||
-rw-r--r-- | airpcap_loader.c | 4 | ||||
-rw-r--r-- | configure.in | 2 | ||||
-rw-r--r-- | epan/Makefile.am | 6 | ||||
-rw-r--r-- | epan/Makefile.nmake | 30 | ||||
-rw-r--r-- | epan/crypt/Makefile.am (renamed from airpdcap/Makefile.am) | 0 | ||||
-rw-r--r-- | epan/crypt/Makefile.common (renamed from airpdcap/Makefile.common) | 3 | ||||
-rw-r--r-- | epan/crypt/Makefile.nmake (renamed from airpdcap/Makefile.nmake) | 0 | ||||
-rw-r--r-- | epan/crypt/airpdcap.c (renamed from airpdcap/airpdcap.c) | 0 | ||||
-rw-r--r-- | epan/crypt/airpdcap_ccmp.c (renamed from airpdcap/airpdcap_ccmp.c) | 0 | ||||
-rw-r--r-- | epan/crypt/airpdcap_ccmp.h (renamed from airpdcap/airpdcap_ccmp.h) | 0 | ||||
-rw-r--r-- | epan/crypt/airpdcap_debug.c (renamed from airpdcap/airpdcap_debug.c) | 0 | ||||
-rw-r--r-- | epan/crypt/airpdcap_debug.h (renamed from airpdcap/airpdcap_debug.h) | 0 | ||||
-rw-r--r-- | epan/crypt/airpdcap_int.h (renamed from airpdcap/airpdcap_int.h) | 0 | ||||
-rw-r--r-- | epan/crypt/airpdcap_interop.h (renamed from airpdcap/airpdcap_interop.h) | 0 | ||||
-rw-r--r-- | epan/crypt/airpdcap_md5.c (renamed from airpdcap/airpdcap_md5.c) | 0 | ||||
-rw-r--r-- | epan/crypt/airpdcap_md5.h (renamed from airpdcap/airpdcap_md5.h) | 0 | ||||
-rw-r--r-- | epan/crypt/airpdcap_rijndael.c (renamed from airpdcap/airpdcap_rijndael.c) | 0 | ||||
-rw-r--r-- | epan/crypt/airpdcap_rijndael.h (renamed from airpdcap/airpdcap_rijndael.h) | 0 | ||||
-rw-r--r-- | epan/crypt/airpdcap_sha1.c (renamed from airpdcap/airpdcap_sha1.c) | 0 | ||||
-rw-r--r-- | epan/crypt/airpdcap_sha1.h (renamed from airpdcap/airpdcap_sha1.h) | 0 | ||||
-rw-r--r-- | epan/crypt/airpdcap_system.h (renamed from airpdcap/airpdcap_system.h) | 0 | ||||
-rw-r--r-- | epan/crypt/airpdcap_tkip.c (renamed from airpdcap/airpdcap_tkip.c) | 0 | ||||
-rw-r--r-- | epan/crypt/airpdcap_tkip.h (renamed from airpdcap/airpdcap_tkip.h) | 0 | ||||
-rw-r--r-- | epan/crypt/airpdcap_user.h (renamed from airpdcap/airpdcap_user.h) | 0 | ||||
-rw-r--r-- | epan/crypt/airpdcap_wep.c (renamed from airpdcap/airpdcap_wep.c) | 0 | ||||
-rw-r--r-- | epan/crypt/airpdcap_wep.h (renamed from airpdcap/airpdcap_wep.h) | 0 | ||||
-rw-r--r-- | epan/crypt/airpdcap_ws.h (renamed from airpdcap/airpdcap_ws.h) | 0 | ||||
-rw-r--r-- | epan/dissectors/Makefile.nmake | 12 | ||||
-rw-r--r-- | epan/dissectors/packet-ieee80211.c | 2 | ||||
-rw-r--r-- | gtk/Makefile.nmake | 2 | ||||
-rw-r--r-- | gtk/airpcap_gui_utils.c | 95 | ||||
-rw-r--r-- | gtk/main.c | 2 |
34 files changed, 89 insertions, 83 deletions
diff --git a/Makefile.am b/Makefile.am index 974de3205c..ffe3cc44c2 100644 --- a/Makefile.am +++ b/Makefile.am @@ -713,12 +713,12 @@ else install-exec-hook: endif -DIST_SUBDIRS = asn1 codecs doc airpdcap epan gtk help packaging plugins tools wiretap +DIST_SUBDIRS = asn1 codecs doc epan gtk help packaging plugins tools wiretap if HAVE_PLUGINS -SUBDIRS = tools wiretap doc airpdcap epan plugins packaging help @wireshark_SUBDIRS@ +SUBDIRS = tools wiretap doc epan plugins packaging help @wireshark_SUBDIRS@ else -SUBDIRS = tools wiretap doc airpdcap epan packaging help @wireshark_SUBDIRS@ +SUBDIRS = tools wiretap doc epan packaging help @wireshark_SUBDIRS@ endif wireshark.1: doc/wireshark.pod AUTHORS-SHORT-FORMAT diff --git a/Makefile.nmake b/Makefile.nmake index 4902b84a66..e99c507847 100644 --- a/Makefile.nmake +++ b/Makefile.nmake @@ -47,7 +47,9 @@ wireshark_LIBS= wiretap\wiretap-$(WTAP_VERSION).lib \ !ELSE epan\dissectors\dissectors.lib \ epan\wireshark.lib \ - epan\dfilter\dfilter.lib epan\ftypes\ftypes.lib \ + epan\crypt\airpdcap.lib \ + epan\dfilter\dfilter.lib \ + epan\ftypes\ftypes.lib \ $(ADNS_LIBS) \ $(PCRE_LIBS) \ $(ZLIB_LIBS) \ @@ -63,7 +65,9 @@ tshark_LIBS= wiretap\wiretap-$(WTAP_VERSION).lib \ !ELSE epan\dissectors\dissectors.lib \ epan\wireshark.lib \ - epan\dfilter\dfilter.lib epan\ftypes\ftypes.lib \ + epan\crypt\airpdcap.lib \ + epan\dfilter\dfilter.lib \ + epan\ftypes\ftypes.lib \ $(ADNS_LIBS) \ $(PCRE_LIBS) \ $(ZLIB_LIBS) \ diff --git a/airpcap_loader.c b/airpcap_loader.c index cf3f1e80f8..1aec1cdd28 100644 --- a/airpcap_loader.c +++ b/airpcap_loader.c @@ -43,13 +43,11 @@ #include <epan/prefs.h> #include <epan/prefs-int.h> #include <epan/crypt/wep-wpadefs.h> +#include <epan/crypt/airpdcap_ws.h> #include "capture_ui_utils.h" #include "simple_dialog.h" -/* AirPDcap */ -#include "airpdcap/airpdcap_ws.h" - #include <airpcap.h> #include "airpcap_loader.h" diff --git a/configure.in b/configure.in index 67f58cd9ef..d6bf7737e8 100644 --- a/configure.in +++ b/configure.in @@ -1319,10 +1319,10 @@ AC_CONFIG_SUBDIRS(wiretap) AC_OUTPUT( Makefile doxygen.cfg - airpdcap/Makefile asn1/Makefile doc/Makefile epan/Makefile + epan/crypt/Makefile epan/doxygen.cfg epan/dfilter/Makefile epan/dissectors/Makefile diff --git a/epan/Makefile.am b/epan/Makefile.am index 4443d77105..00af9929f6 100644 --- a/epan/Makefile.am +++ b/epan/Makefile.am @@ -34,7 +34,7 @@ wslua_dist_dir = wslua endif # HAVE_LIBLUA -SUBDIRS = ftypes dfilter dissectors $(wslua_dir) +SUBDIRS = crypt ftypes dfilter dissectors $(wslua_dir) DIST_SUBDIRS = $(SUBDIRS) $(wslua_dist_dir) @@ -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 ../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) +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 crypt/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 crypt/libairpdcap.a $(wslua_lib) tvbtest: tvbtest.o tvbuff.o except.o strutil.o emem.o $(LINK) $^ $(GLIB_LIBS) -lz diff --git a/epan/Makefile.nmake b/epan/Makefile.nmake index ab9b44f6d3..bf5ccf57d3 100644 --- a/epan/Makefile.nmake +++ b/epan/Makefile.nmake @@ -37,6 +37,7 @@ libwireshark_LIBS = \ $(LUA_LIBS) \ ..\wiretap\wiretap-$(WTAP_VERSION).lib \ $(ICONV_DIR)\lib\iconv.lib \ + crypt\airpdcap.lib \ ftypes\ftypes.lib \ dfilter\dfilter.lib \ $(WSLUA_LIB) \ @@ -61,17 +62,17 @@ DOXYGEN_DEP=doxygen !ENDIF !IFDEF ENABLE_LIBWIRESHARK -all: ftypes dfilter $(WSLUA_DIR) dissectors libwireshark.dll +all: crypt ftypes dfilter $(WSLUA_DIR) dissectors libwireshark.dll !ELSE -all: ftypes dfilter $(WSLUA_DIR) dissectors libwireshark.lib +all: crypt ftypes dfilter $(WSLUA_DIR) dissectors libwireshark.lib !ENDIF # For use when making libwireshark.dll libwireshark.lib: libwireshark.dll libwireshark.exp: libwireshark.dll -libwireshark.dll: ..\config.h $(LIBWIRESHARK_OBJECTS) libwireshark.def ftypes dfilter $(WSLUA_DIR) dissectors $(DOXYGEN_DEP) $(EXTRA_OBJECTS) \ - ftypes\ftypes.lib dfilter\dfilter.lib dissectors\dissectors.lib $(WSLUA_LIB) ..\image\libwireshark.res +libwireshark.dll: ..\config.h $(LIBWIRESHARK_OBJECTS) libwireshark.def crypt ftypes dfilter $(WSLUA_DIR) dissectors $(DOXYGEN_DEP) $(EXTRA_OBJECTS) \ + crypt\airpdcap.lib ftypes\ftypes.lib dfilter\dfilter.lib dissectors\dissectors.lib $(WSLUA_LIB) ..\image\libwireshark.res @echo Linking libwireshark.dll $(link) $(dlllflags) $(conlibsdll) \ $(LOCAL_LDFLAGS) \ @@ -81,8 +82,8 @@ libwireshark.dll: ..\config.h $(LIBWIRESHARK_OBJECTS) libwireshark.def ftypes df dissectors\register.obj \ $(EXTRA_OBJECTS) -libwireshark.lib : ..\config.h $(LIBWIRESHARK_OBJECTS) ftypes dfilter $(WSLUA_DIR) dissectors $(DOXYGEN_DEP) $(EXTRA_OBJECTS) \ - ftypes\ftypes.lib dfilter\dfilter.lib $(WSLUA_LIB) dissectors\dissectors.lib +libwireshark.lib : ..\config.h $(LIBWIRESHARK_OBJECTS) crypt ftypes dfilter $(WSLUA_DIR) dissectors $(DOXYGEN_DEP) $(EXTRA_OBJECTS) \ + crypt\airpdcap.lib ftypes\ftypes.lib dfilter\dfilter.lib $(WSLUA_LIB) dissectors\dissectors.lib link /lib /out:libwireshark.lib $(LIBWIRESHARK_OBJECTS) \ $(EXTRA_OBJECTS) @@ -94,7 +95,9 @@ libwireshark.lib : ..\config.h $(LIBWIRESHARK_OBJECTS) ftypes dfilter $(WSLUA_DI clean: rm -f $(LIBWIRESHARK_OBJECTS) $(EXTRA_OBJECTS) libwireshark.lib libwireshark.dll libwireshark.lib libwireshark.exp $(PDB_FILE) doxygen.cfg html/*.* if exist html rmdir html - cd ftypes + cd crypt + $(MAKE) /$(MAKEFLAGS) -f Makefile.nmake clean + cd ../ftypes $(MAKE) /$(MAKEFLAGS) -f Makefile.nmake clean cd ../dfilter $(MAKE) /$(MAKEFLAGS) -f Makefile.nmake clean @@ -117,7 +120,9 @@ distclean: clean rm -f config.h register.c mkstemp.c strptime.c radius_dict.c \ dtd_grammar.out dtd_grammar.c dtd_grammar.h dtd_parse.c \ dtd_preparse.c - cd ftypes + cd crypt + $(MAKE) /$(MAKEFLAGS) -f Makefile.nmake distclean + cd ../ftypes $(MAKE) /$(MAKEFLAGS) -f Makefile.nmake distclean cd ../dfilter $(MAKE) /$(MAKEFLAGS) -f Makefile.nmake distclean @@ -128,7 +133,9 @@ distclean: clean cd .. maintainer-clean: distclean - cd ftypes + cd crypt + $(MAKE) /$(MAKEFLAGS) -f Makefile.nmake maintainer-clean + cd ../ftypes $(MAKE) /$(MAKEFLAGS) -f Makefile.nmake maintainer-clean cd ../dfilter $(MAKE) /$(MAKEFLAGS) -f Makefile.nmake maintainer-clean @@ -138,6 +145,11 @@ maintainer-clean: distclean $(MAKE) /$(MAKEFLAGS) -f Makefile.nmake maintainer-clean cd .. +crypt:: ..\config.h + cd crypt + $(MAKE) /$(MAKEFLAGS) -f Makefile.nmake + cd .. + ftypes:: ..\config.h cd ftypes $(MAKE) /$(MAKEFLAGS) -f Makefile.nmake diff --git a/airpdcap/Makefile.am b/epan/crypt/Makefile.am index fc50901c83..fc50901c83 100644 --- a/airpdcap/Makefile.am +++ b/epan/crypt/Makefile.am diff --git a/airpdcap/Makefile.common b/epan/crypt/Makefile.common index 8d465ac436..bcf3d28c9e 100644 --- a/airpdcap/Makefile.common +++ b/epan/crypt/Makefile.common @@ -45,4 +45,5 @@ LIBAIRPDCAP_INCLUDES = \ airpdcap_tkip.h \ airpdcap_user.h \ airpdcap_wep.h \ - airpdcap_ws.h + airpdcap_ws.h \ + wep-wpadefs.h diff --git a/airpdcap/Makefile.nmake b/epan/crypt/Makefile.nmake index e2f5f4bd54..e2f5f4bd54 100644 --- a/airpdcap/Makefile.nmake +++ b/epan/crypt/Makefile.nmake diff --git a/airpdcap/airpdcap.c b/epan/crypt/airpdcap.c index ce220ac472..ce220ac472 100644 --- a/airpdcap/airpdcap.c +++ b/epan/crypt/airpdcap.c diff --git a/airpdcap/airpdcap_ccmp.c b/epan/crypt/airpdcap_ccmp.c index 5dfa85a8f6..5dfa85a8f6 100644 --- a/airpdcap/airpdcap_ccmp.c +++ b/epan/crypt/airpdcap_ccmp.c diff --git a/airpdcap/airpdcap_ccmp.h b/epan/crypt/airpdcap_ccmp.h index e69de29bb2..e69de29bb2 100644 --- a/airpdcap/airpdcap_ccmp.h +++ b/epan/crypt/airpdcap_ccmp.h diff --git a/airpdcap/airpdcap_debug.c b/epan/crypt/airpdcap_debug.c index 6b6125ef5c..6b6125ef5c 100644 --- a/airpdcap/airpdcap_debug.c +++ b/epan/crypt/airpdcap_debug.c diff --git a/airpdcap/airpdcap_debug.h b/epan/crypt/airpdcap_debug.h index c41caaeef7..c41caaeef7 100644 --- a/airpdcap/airpdcap_debug.h +++ b/epan/crypt/airpdcap_debug.h diff --git a/airpdcap/airpdcap_int.h b/epan/crypt/airpdcap_int.h index 6424be6731..6424be6731 100644 --- a/airpdcap/airpdcap_int.h +++ b/epan/crypt/airpdcap_int.h diff --git a/airpdcap/airpdcap_interop.h b/epan/crypt/airpdcap_interop.h index e398bf21bf..e398bf21bf 100644 --- a/airpdcap/airpdcap_interop.h +++ b/epan/crypt/airpdcap_interop.h diff --git a/airpdcap/airpdcap_md5.c b/epan/crypt/airpdcap_md5.c index aa7a6727ac..aa7a6727ac 100644 --- a/airpdcap/airpdcap_md5.c +++ b/epan/crypt/airpdcap_md5.c diff --git a/airpdcap/airpdcap_md5.h b/epan/crypt/airpdcap_md5.h index e69de29bb2..e69de29bb2 100644 --- a/airpdcap/airpdcap_md5.h +++ b/epan/crypt/airpdcap_md5.h diff --git a/airpdcap/airpdcap_rijndael.c b/epan/crypt/airpdcap_rijndael.c index c024a2da35..c024a2da35 100644 --- a/airpdcap/airpdcap_rijndael.c +++ b/epan/crypt/airpdcap_rijndael.c diff --git a/airpdcap/airpdcap_rijndael.h b/epan/crypt/airpdcap_rijndael.h index b113c84643..b113c84643 100644 --- a/airpdcap/airpdcap_rijndael.h +++ b/epan/crypt/airpdcap_rijndael.h diff --git a/airpdcap/airpdcap_sha1.c b/epan/crypt/airpdcap_sha1.c index b49fe0d0a8..b49fe0d0a8 100644 --- a/airpdcap/airpdcap_sha1.c +++ b/epan/crypt/airpdcap_sha1.c diff --git a/airpdcap/airpdcap_sha1.h b/epan/crypt/airpdcap_sha1.h index 87ebfb643d..87ebfb643d 100644 --- a/airpdcap/airpdcap_sha1.h +++ b/epan/crypt/airpdcap_sha1.h diff --git a/airpdcap/airpdcap_system.h b/epan/crypt/airpdcap_system.h index 4c8d42bc59..4c8d42bc59 100644 --- a/airpdcap/airpdcap_system.h +++ b/epan/crypt/airpdcap_system.h diff --git a/airpdcap/airpdcap_tkip.c b/epan/crypt/airpdcap_tkip.c index 886540e6c9..886540e6c9 100644 --- a/airpdcap/airpdcap_tkip.c +++ b/epan/crypt/airpdcap_tkip.c diff --git a/airpdcap/airpdcap_tkip.h b/epan/crypt/airpdcap_tkip.h index e69de29bb2..e69de29bb2 100644 --- a/airpdcap/airpdcap_tkip.h +++ b/epan/crypt/airpdcap_tkip.h diff --git a/airpdcap/airpdcap_user.h b/epan/crypt/airpdcap_user.h index b637ea90b8..b637ea90b8 100644 --- a/airpdcap/airpdcap_user.h +++ b/epan/crypt/airpdcap_user.h diff --git a/airpdcap/airpdcap_wep.c b/epan/crypt/airpdcap_wep.c index 1501d61155..1501d61155 100644 --- a/airpdcap/airpdcap_wep.c +++ b/epan/crypt/airpdcap_wep.c diff --git a/airpdcap/airpdcap_wep.h b/epan/crypt/airpdcap_wep.h index a7885c18f6..a7885c18f6 100644 --- a/airpdcap/airpdcap_wep.h +++ b/epan/crypt/airpdcap_wep.h diff --git a/airpdcap/airpdcap_ws.h b/epan/crypt/airpdcap_ws.h index 6eec4d0ff6..6eec4d0ff6 100644 --- a/airpdcap/airpdcap_ws.h +++ b/epan/crypt/airpdcap_ws.h diff --git a/epan/dissectors/Makefile.nmake b/epan/dissectors/Makefile.nmake index d63ebd842f..d45d0d8c2b 100644 --- a/epan/dissectors/Makefile.nmake +++ b/epan/dissectors/Makefile.nmake @@ -24,9 +24,9 @@ DISSECTOR_OBJECTS = $(DISSECTOR_SRC:.c=.obj) DISSECTOR_SUPPORT_OBJECTS = $(DISSECTOR_SUPPORT_SRC:.c=.obj) -dissectors.lib: airpdcap.lib register.obj packet-ncp2222.c $(GENERATED_HEADER_FILES) ../../config.h $(DISSECTOR_OBJECTS) $(DISSECTOR_SUPPORT_OBJECTS) +dissectors.lib: register.obj packet-ncp2222.c $(GENERATED_HEADER_FILES) ../../config.h $(DISSECTOR_OBJECTS) $(DISSECTOR_SUPPORT_OBJECTS) @echo Linking dissectors.lib - link /lib /out:dissectors.lib $(DISSECTOR_OBJECTS) $(DISSECTOR_SUPPORT_OBJECTS) ..\..\airpdcap\airpdcap.lib + link /lib /out:dissectors.lib $(DISSECTOR_OBJECTS) $(DISSECTOR_SUPPORT_OBJECTS) # # The header files listed here are built from x11-fields using Perl; @@ -74,11 +74,6 @@ x11-declarations.h x11-register-info.h: x11-fields process-x11-fields.pl # All subsequent arguments are the files to scan. # -airpdcap.lib: - cd ..\..\airpdcap - $(MAKE) /$(MAKEFLAGS) -f Makefile.nmake - cd ..\epan\dissectors - register.c: $(DISSECTOR_SRC) !IFDEF PYTHON @echo Making register.c (using python) @@ -101,9 +96,6 @@ packet-ncp2222.c : ncp2222.py !ENDIF clean: - cd ..\..\airpdcap - $(MAKE) /$(MAKEFLAGS) -f Makefile.nmake clean - cd ..\epan\dissectors rm -f dissectors.lib $(PDB_FILE) \ $(DISSECTOR_OBJECTS) $(DISSECTOR_SUPPORT_OBJECTS) diff --git a/epan/dissectors/packet-ieee80211.c b/epan/dissectors/packet-ieee80211.c index 9285be48a0..b664097b51 100644 --- a/epan/dissectors/packet-ieee80211.c +++ b/epan/dissectors/packet-ieee80211.c @@ -794,7 +794,7 @@ static int wlan_tap = -1; /* Davide Schiera (2006-11-22): including AirPDcap project */ #ifdef HAVE_AIRPDCAP -#include "airpdcap/airpdcap_ws.h" +#include <epan/crypt/airpdcap_ws.h> AIRPDCAP_CONTEXT airpdcap_ctx; #else int airpdcap_ctx; diff --git a/gtk/Makefile.nmake b/gtk/Makefile.nmake index 76283c82b5..0472fa5a18 100644 --- a/gtk/Makefile.nmake +++ b/gtk/Makefile.nmake @@ -55,7 +55,7 @@ WIRESHARK_WIN32_GTK_OBJECTS = $(WIRESHARK_WIN32_GTK_SRC:.c=.obj) libui.lib : ..\config.h $(WIRESHARK_WIN32_GTK_OBJECTS) $(WIRESHARK_TAP_OBJECTS) - link /lib /out:libui.lib $(WIRESHARK_WIN32_GTK_OBJECTS) $(WIRESHARK_TAP_OBJECTS) winmm.lib ..\airpdcap\airpdcap.lib + link /lib /out:libui.lib $(WIRESHARK_WIN32_GTK_OBJECTS) $(WIRESHARK_TAP_OBJECTS) winmm.lib wireshark-tap-register.c: $(WIRESHARK_TAP_SRC) ../make-tapreg-dotc Makefile.common @echo Making wireshark-tap-register.c diff --git a/gtk/airpcap_gui_utils.c b/gtk/airpcap_gui_utils.c index 92b558d4c0..d70cddf0e3 100644 --- a/gtk/airpcap_gui_utils.c +++ b/gtk/airpcap_gui_utils.c @@ -36,6 +36,7 @@ #include <string.h> #include <epan/filesystem.h> +#include <epan/crypt/airpdcap_ws.h> #include "gtk/main.h" #include "dlg_utils.h" @@ -50,8 +51,6 @@ #include "airpcap_loader.h" #include "airpcap_gui_utils.h" -#include "../airpdcap/airpdcap_ws.h" - #include "keys.h" /* @@ -65,7 +64,7 @@ airpcap_get_all_channels_list(airpcap_if_info_t* if_info) { gchar *channels; gchar *tmp; -guint n,i; +guint n,i; GList *current_item; airpcap_if_info_t* current_adapter; @@ -77,7 +76,7 @@ channels[0]='\0'; if(airpcap_if_is_any(if_info)) { n = g_list_length(airpcap_if_list); - + for(i = 0; i < n; i++) { current_item = g_list_nth(airpcap_if_list,i); @@ -87,12 +86,12 @@ if(airpcap_if_is_any(if_info)) tmp = g_strdup_printf("%d",current_adapter->channel); g_strlcat(channels,tmp,128); g_free(tmp); - - if(i<(n-1)) g_strlcat(channels,",",128); + + if(i<(n-1)) g_strlcat(channels,",",128); } - } + } } - + return channels; } @@ -307,70 +306,70 @@ decryption_key_t* curr_key = NULL; n = 0; fake_if_info = airpcap_driver_fake_if_info_new(); - + /* We can retrieve the driver's key list (i.e. we have the right .dll)*/ wireshark_key_list = get_wireshark_keys(); n = g_list_length(wireshark_key_list); - + for(i = 0; i < n; i++) { curr_key = (decryption_key_t*)g_list_nth_data(wireshark_key_list,i); - + if(curr_key->type == AIRPDCAP_KEY_TYPE_WEP) { s = g_strdup(curr_key->key->str); - + new_row[0] = g_strdup(AIRPCAP_WEP_KEY_STRING); new_row[1] = g_strdup(s); new_row[2] = g_strdup(""); gtk_clist_append(GTK_CLIST(keylist),new_row); - + g_free(new_row[0]); g_free(new_row[1]); g_free(new_row[2]); - + g_free(s); } else if(curr_key->type == AIRPDCAP_KEY_TYPE_WPA_PWD) { s = g_strdup(curr_key->key->str); - if(curr_key->ssid != NULL) + if(curr_key->ssid != NULL) s2= g_strdup(curr_key->ssid->str); - else + else s2 = NULL; - + new_row[0] = g_strdup(AIRPCAP_WPA_PWD_KEY_STRING); new_row[1] = g_strdup(s); - if(curr_key->ssid != NULL) + if(curr_key->ssid != NULL) new_row[2] = g_strdup(s2); else new_row[2] = g_strdup(""); - + gtk_clist_append(GTK_CLIST(keylist),new_row); - + g_free(new_row[0]); g_free(new_row[1]); g_free(new_row[2]); - + g_free(s); if(s2 != NULL) g_free(s2); } else if(curr_key->type == AIRPDCAP_KEY_TYPE_WPA_PMK) { s = g_strdup(curr_key->key->str); - + new_row[0] = g_strdup(AIRPCAP_WPA_BIN_KEY_STRING); new_row[1] = g_strdup(s); new_row[2] = g_strdup(""); gtk_clist_append(GTK_CLIST(keylist),new_row); - + g_free(new_row[0]); g_free(new_row[1]); g_free(new_row[2]); - + g_free(s); } } @@ -560,20 +559,20 @@ airpcap_channel_combo_set_by_number(GtkWidget* w,UINT channel) int airpcap_if_is_any(airpcap_if_info_t* if_info) { -if(g_strcasecmp(if_info->name,AIRPCAP_DEVICE_ANY_EXTRACT_STRING)==0) +if(g_strcasecmp(if_info->name,AIRPCAP_DEVICE_ANY_EXTRACT_STRING)==0) return 1; else - return 0; + return 0; } /* * Update channel combo box. If the airpcap interface is "Any", the combo box will be disabled. */ -void +void airpcap_update_channel_combo(GtkWidget* w, airpcap_if_info_t* if_info) { gchar* channels_list; - + if(airpcap_if_is_any(if_info)) { channels_list = airpcap_get_all_channels_list(if_info); @@ -642,10 +641,10 @@ KeysCollection->nKeys = keys_in_list; for(i = 0; i < keys_in_list; i++) { /* Retrieve the row infos */ - gtk_clist_get_text(GTK_CLIST(key_ls),i,0,&row_type); + gtk_clist_get_text(GTK_CLIST(key_ls),i,0,&row_type); gtk_clist_get_text(GTK_CLIST(key_ls),i,1,&row_key); - gtk_clist_get_text(GTK_CLIST(key_ls),i,2,&row_ssid); - + gtk_clist_get_text(GTK_CLIST(key_ls),i,2,&row_ssid); + if(g_strcasecmp(row_type,AIRPCAP_WEP_KEY_STRING) == 0) KeysCollection->Keys[i].KeyType = AIRPDCAP_KEY_TYPE_WEP; else if(g_strcasecmp(row_type,AIRPCAP_WPA_PWD_KEY_STRING) == 0) @@ -655,7 +654,7 @@ for(i = 0; i < keys_in_list; i++) /* Retrieve the Item corresponding to the i-th key */ new_key = g_string_new(row_key); - + KeysCollection->Keys[i].KeyLen = new_key->len / 2; memset(&KeysCollection->Keys[i].KeyData, 0, sizeof(KeysCollection->Keys[i].KeyData)); @@ -741,10 +740,10 @@ KeysCollection->nKeys = keys_in_list; for(i = 0; i < keys_in_list; i++) { /* Retrieve the row infos */ - gtk_clist_get_text(GTK_CLIST(key_ls),i,0,&row_type); + gtk_clist_get_text(GTK_CLIST(key_ls),i,0,&row_type); gtk_clist_get_text(GTK_CLIST(key_ls),i,1,&row_key); - gtk_clist_get_text(GTK_CLIST(key_ls),i,2,&row_ssid); - + gtk_clist_get_text(GTK_CLIST(key_ls),i,2,&row_ssid); + if(g_strcasecmp(row_type,AIRPCAP_WEP_KEY_STRING) == 0) KeysCollection->Keys[i].KeyType = AIRPDCAP_KEY_TYPE_WEP; else if(g_strcasecmp(row_type,AIRPCAP_WPA_PWD_KEY_STRING) == 0) @@ -754,7 +753,7 @@ for(i = 0; i < keys_in_list; i++) /* Retrieve the Item corresponding to the i-th key */ new_key = g_string_new(row_key); - + KeysCollection->Keys[i].KeyLen = new_key->len / 2; memset(&KeysCollection->Keys[i].KeyData, 0, sizeof(KeysCollection->Keys[i].KeyData)); @@ -808,7 +807,7 @@ char* tmp_ssid = NULL; decryption_key_t* tmp_dk=NULL; -/* +/* * Save the keys for Wireshark... */ @@ -871,24 +870,24 @@ if_n = g_list_length(if_list); for(i = 0; i < if_n; i++) { curr_if = (airpcap_if_info_t*)g_list_nth_data(if_list,i); - + if(curr_if != NULL) { /* XXX - Set an empty collection */ airpcap_if_clear_decryption_settings(curr_if); - + /* Save to registry */ airpcap_save_selected_if_configuration(curr_if); } - } + } } /* * This function will load from the preferences file ALL the - * keys (WEP, WPA and WPA_BIN) and will set them as default for + * keys (WEP, WPA and WPA_BIN) and will set them as default for * each adapter. To do this, it will save the keys in the registry... * A check will be performed, to make sure that keys found in - * registry and keys found in Wireshark preferences are the same. If not, + * registry and keys found in Wireshark preferences are the same. If not, * the user will be asked to choose if use all keys (merge them), * or use Wireshark preferences ones. In the last case, registry keys will * be overwritten for all the connected AirPcap adapters. @@ -900,7 +899,7 @@ airpcap_check_decryption_keys(GList* if_list) { gint if_n = 0; gint i = 0; -gint n_adapters_keys = 0; +gint n_adapters_keys = 0; gint n_driver_keys = 0; gint n_wireshark_keys = 0; airpcap_if_info_t* curr_if = NULL; @@ -912,11 +911,11 @@ GList* curr_adapter_key_list; gboolean equals = TRUE; gboolean adapters_keys_equals=TRUE; -/* +/* * If no AirPcap interface is found, return TRUE, so Wireshark * will use HIS OWN keys. */ -if(if_list == NULL) +if(if_list == NULL) return TRUE; if_n = g_list_length(if_list); @@ -950,10 +949,10 @@ return equals; /* * This function will load from the preferences file ALL the - * keys (WEP, WPA_PWD and WPA_BIN) and will set them as default for + * keys (WEP, WPA_PWD and WPA_BIN) and will set them as default for * each adapter. To do this, it will save the keys in the registry... * A check will be performed, to make sure that keys found in - * registry and keys found in Wireshark preferences are the same. If not, + * registry and keys found in Wireshark preferences are the same. If not, * the user will be asked to choose if use all keys (merge them), * or use Wireshark preferences ones. In the last case, registry keys will * be overwritten for all the connected AirPcap adapters. @@ -979,7 +978,7 @@ for(i = 0; i < if_n; i++) } /* - * This function will set the gibven GList of decryption_key_t structures + * This function will set the gibven GList of decryption_key_t structures * as the defoult for both Wireshark and the AirPcap adapters... */ void diff --git a/gtk/main.c b/gtk/main.c index 3c139ea71f..8c14baeb7e 100644 --- a/gtk/main.c +++ b/gtk/main.c @@ -174,7 +174,7 @@ #ifdef HAVE_AIRPDCAP /* Davide Schiera (2006-11-22): including AirPDcap project */ -#include "../airpdcap/airpdcap_ws.h" +#include <epan/crypt/airpdcap_ws.h> /* Davide Schiera (2006-11-22) ---------------------------------------------- */ #endif |