author | mjm <mjm> | 2002-12-14 19:13:32 (UTC) |
---|---|---|
committer | mjm <mjm> | 2002-12-14 19:13:32 (UTC) |
commit | d9d4e587e62eac418b892c90145e958d6495d081 (patch) (side-by-side diff) | |
tree | 6a554548d6dfaaa082f4b088f8912f4c5fc7e528 /noncore/net/wellenreiter/libwellenreiter/source/sniff.cc | |
parent | 57918323f3b2e1377d9cf97ed6466e31b260d24a (diff) | |
download | opie-d9d4e587e62eac418b892c90145e958d6495d081.zip opie-d9d4e587e62eac418b892c90145e958d6495d081.tar.gz opie-d9d4e587e62eac418b892c90145e958d6495d081.tar.bz2 |
code cleanup, possible bug in sniff.cc fixed
Diffstat (limited to 'noncore/net/wellenreiter/libwellenreiter/source/sniff.cc') (more/less context) (show whitespace changes)
-rw-r--r-- | noncore/net/wellenreiter/libwellenreiter/source/sniff.cc | 15 |
1 files changed, 5 insertions, 10 deletions
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 @@ -94,8 +94,6 @@ void process_packets(const struct pcap_pkthdr *pkthdr, const unsigned char *pack return; } - 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 */ if (pinfoptr->cap_ESS == 1 &&pinfoptr->cap_IBSS ==0) { @@ -107,15 +105,14 @@ void process_packets(const struct pcap_pkthdr *pkthdr, const unsigned char *pack wl_loginfo("Found an ad-hoc network"); wl_net.net_type=2; } + 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); wl_loginfo("SSID length is: %d", pinfoptr->ssid_len); wl_net.ssid_len=pinfoptr->ssid_len; @@ -126,14 +123,12 @@ void process_packets(const struct pcap_pkthdr *pkthdr, const unsigned char *pack wl_loginfo("Mac is: %s", pinfoptr->sndhwaddr); 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); wl_loginfo("Sent network to GUI '%s:%d'", guihost, guiport); } break; + default: wl_logerr("Unknown IEEE802.11 frame subtype (%d)", FC_SUBTYPE(fc)); break; |