summaryrefslogtreecommitdiff
path: root/noncore/net/wellenreiter/libwellenreiter/source/sniff.cc
Unidiff
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.cc15
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
94 return; 94 return;
95 } 95 }
96 96
97 printf( "cap_ESS is %d, cap_IBSS is %d\n", pinfoptr->cap_ESS, pinfoptr->cap_IBSS );
98
99 /* Here should be the infos to the gui issued */ 97 /* Here should be the infos to the gui issued */
100 if (pinfoptr->cap_ESS == 1 &&pinfoptr->cap_IBSS ==0) 98 if (pinfoptr->cap_ESS == 1 &&pinfoptr->cap_IBSS ==0)
101 { 99 {
@@ -107,15 +105,14 @@ void process_packets(const struct pcap_pkthdr *pkthdr, const unsigned char *pack
107 wl_loginfo("Found an ad-hoc network"); 105 wl_loginfo("Found an ad-hoc network");
108 wl_net.net_type=2; 106 wl_net.net_type=2;
109 } 107 }
108
110 if (strcmp (pinfoptr->ssid,NONBROADCASTING) ==0) 109 if (strcmp (pinfoptr->ssid,NONBROADCASTING) ==0)
111 {
112 wl_loginfo("Net is a non-broadcasting network"); 110 wl_loginfo("Net is a non-broadcasting network");
113 }
114 else 111 else
115 {
116 wl_loginfo("SSID is: %s", pinfoptr->ssid); 112 wl_loginfo("SSID is: %s", pinfoptr->ssid);
117 // wl_net.bssid=pinfoptr->ssid; 113
118 } 114 wl_loginfo("SSID is: %s", pinfoptr->ssid);
115 memcpy(wl_net.bssid, pinfoptr->ssid, sizeof(wl_net.bssid)-1);
119 116
120 wl_loginfo("SSID length is: %d", pinfoptr->ssid_len); 117 wl_loginfo("SSID length is: %d", pinfoptr->ssid_len);
121 wl_net.ssid_len=pinfoptr->ssid_len; 118 wl_net.ssid_len=pinfoptr->ssid_len;
@@ -126,14 +123,12 @@ void process_packets(const struct pcap_pkthdr *pkthdr, const unsigned char *pack
126 123
127 wl_loginfo("Mac is: %s", pinfoptr->sndhwaddr); 124 wl_loginfo("Mac is: %s", pinfoptr->sndhwaddr);
128 memcpy(wl_net.mac, pinfoptr->sndhwaddr, sizeof(wl_net.mac)-1);; 125 memcpy(wl_net.mac, pinfoptr->sndhwaddr, sizeof(wl_net.mac)-1);;
129 wl_loginfo("SSID is: %s", pinfoptr->ssid);
130 memcpy(wl_net.bssid, pinfoptr->ssid, sizeof(wl_net.bssid)-1);
131 126
132 // printf ("\n\tDest : %s\n",pinfoptr->desthwaddr);
133 send_network_found((char *)guihost, guiport, &wl_net); 127 send_network_found((char *)guihost, guiport, &wl_net);
134 wl_loginfo("Sent network to GUI '%s:%d'", guihost, guiport); 128 wl_loginfo("Sent network to GUI '%s:%d'", guihost, guiport);
135 } 129 }
136 break; 130 break;
131
137 default: 132 default:
138 wl_logerr("Unknown IEEE802.11 frame subtype (%d)", FC_SUBTYPE(fc)); 133 wl_logerr("Unknown IEEE802.11 frame subtype (%d)", FC_SUBTYPE(fc));
139 break; 134 break;