summaryrefslogtreecommitdiff
authormjm <mjm>2002-12-14 19:13:32 (UTC)
committer mjm <mjm>2002-12-14 19:13:32 (UTC)
commitd9d4e587e62eac418b892c90145e958d6495d081 (patch) (side-by-side diff)
tree6a554548d6dfaaa082f4b088f8912f4c5fc7e528
parent57918323f3b2e1377d9cf97ed6466e31b260d24a (diff)
downloadopie-d9d4e587e62eac418b892c90145e958d6495d081.zip
opie-d9d4e587e62eac418b892c90145e958d6495d081.tar.gz
opie-d9d4e587e62eac418b892c90145e958d6495d081.tar.bz2
code cleanup, possible bug in sniff.cc fixed
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/net/wellenreiter/libwellenreiter/source/cardmode.cc1
-rw-r--r--noncore/net/wellenreiter/libwellenreiter/source/cardmode.hh2
-rw-r--r--noncore/net/wellenreiter/libwellenreiter/source/proto.cc9
-rw-r--r--noncore/net/wellenreiter/libwellenreiter/source/sniff.cc17
4 files changed, 11 insertions, 18 deletions
diff --git a/noncore/net/wellenreiter/libwellenreiter/source/cardmode.cc b/noncore/net/wellenreiter/libwellenreiter/source/cardmode.cc
index a1c3945..3aaa4a7 100644
--- a/noncore/net/wellenreiter/libwellenreiter/source/cardmode.cc
+++ b/noncore/net/wellenreiter/libwellenreiter/source/cardmode.cc
@@ -7,2 +7,3 @@
#include "cardmode.hh"
+#include "log.hh"
diff --git a/noncore/net/wellenreiter/libwellenreiter/source/cardmode.hh b/noncore/net/wellenreiter/libwellenreiter/source/cardmode.hh
index fad74cf..7c6a21d 100644
--- a/noncore/net/wellenreiter/libwellenreiter/source/cardmode.hh
+++ b/noncore/net/wellenreiter/libwellenreiter/source/cardmode.hh
@@ -18,4 +18,2 @@ extern "C"
-#include "../../libwellenreiter/source/log.hh"
-
/* Defines, used for the card setup */
diff --git a/noncore/net/wellenreiter/libwellenreiter/source/proto.cc b/noncore/net/wellenreiter/libwellenreiter/source/proto.cc
index 305f401..2ec23f4 100644
--- a/noncore/net/wellenreiter/libwellenreiter/source/proto.cc
+++ b/noncore/net/wellenreiter/libwellenreiter/source/proto.cc
@@ -58,5 +58,2 @@ int send_network_found (const char *guihost, int guiport, void *structure)
- fprintf( stderr, "Temp is %s\n", temp );
- fprintf( stderr, "ssid_len is %d\n", ptr->ssid_len );
-
/* Set ssid */
@@ -64,5 +61,7 @@ int send_network_found (const char *guihost, int guiport, void *structure)
- fprintf( stderr, "Buffer is %s\n", buffer );
-
/* Send prepared buffer to GUI */
+#ifdef DEBUG
+ wl_loginfo("Sending network to GUI: '%s'", buffer);
+#endif
+
sendcomm(guihost, guiport, buffer);
diff --git a/noncore/net/wellenreiter/libwellenreiter/source/sniff.cc b/noncore/net/wellenreiter/libwellenreiter/source/sniff.cc
index 84caf12..c703052 100644
--- a/noncore/net/wellenreiter/libwellenreiter/source/sniff.cc
+++ b/noncore/net/wellenreiter/libwellenreiter/source/sniff.cc
@@ -96,4 +96,2 @@ void process_packets(const struct pcap_pkthdr *pkthdr, const unsigned char *pack
- printf( "cap_ESS is %d, cap_IBSS is %d\n", pinfoptr->cap_ESS, pinfoptr->cap_IBSS );
-
/* Here should be the infos to the gui issued */
@@ -109,11 +107,10 @@ void process_packets(const struct pcap_pkthdr *pkthdr, const unsigned char *pack
}
+
if (strcmp (pinfoptr->ssid,NONBROADCASTING) ==0)
- {
wl_loginfo("Net is a non-broadcasting network");
- }
else
- {
wl_loginfo("SSID is: %s", pinfoptr->ssid);
- // wl_net.bssid=pinfoptr->ssid;
- }
+
+ wl_loginfo("SSID is: %s", pinfoptr->ssid);
+ memcpy(wl_net.bssid, pinfoptr->ssid, sizeof(wl_net.bssid)-1);
@@ -128,6 +125,3 @@ void process_packets(const struct pcap_pkthdr *pkthdr, const unsigned char *pack
memcpy(wl_net.mac, pinfoptr->sndhwaddr, sizeof(wl_net.mac)-1);;
- wl_loginfo("SSID is: %s", pinfoptr->ssid);
- memcpy(wl_net.bssid, pinfoptr->ssid, sizeof(wl_net.bssid)-1);
-
- // printf ("\n\tDest : %s\n",pinfoptr->desthwaddr);
+
send_network_found((char *)guihost, guiport, &wl_net);
@@ -136,2 +130,3 @@ void process_packets(const struct pcap_pkthdr *pkthdr, const unsigned char *pack
break;
+
default: