summaryrefslogtreecommitdiff
Unidiff
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/net/wellenreiter/libwellenreiter/source/sniff.cc2
1 files changed, 1 insertions, 1 deletions
diff --git a/noncore/net/wellenreiter/libwellenreiter/source/sniff.cc b/noncore/net/wellenreiter/libwellenreiter/source/sniff.cc
index 3c227ab..6b0fffb 100644
--- a/noncore/net/wellenreiter/libwellenreiter/source/sniff.cc
+++ b/noncore/net/wellenreiter/libwellenreiter/source/sniff.cc
@@ -72,65 +72,65 @@ void process_packets(const struct pcap_pkthdr *pkthdr, const unsigned char *pack
72 if (handle_beacon(fc, packet,pinfoptr) ==0) 72 if (handle_beacon(fc, packet,pinfoptr) ==0)
73 { 73 {
74 if (!strcmp(pinfoptr->desthwaddr,"ff:ff:ff:ff:ff:ff") == 0) 74 if (!strcmp(pinfoptr->desthwaddr,"ff:ff:ff:ff:ff:ff") == 0)
75 { 75 {
76 /* Every beacon must have the broadcast as destination 76 /* Every beacon must have the broadcast as destination
77 so it must be a shitti packet */ 77 so it must be a shitti packet */
78 pinfoptr->isvalid = 0; 78 pinfoptr->isvalid = 0;
79 return; 79 return;
80 } 80 }
81 81
82 if (pinfoptr->cap_ESS == pinfoptr->cap_IBSS) 82 if (pinfoptr->cap_ESS == pinfoptr->cap_IBSS)
83 { 83 {
84 /* Only one of both are possible, so must be 84 /* Only one of both are possible, so must be
85 a noise packet, if this comes up */ 85 a noise packet, if this comes up */
86 pinfoptr->isvalid = 0; 86 pinfoptr->isvalid = 0;
87 return; 87 return;
88 } 88 }
89 if (pinfoptr->channel < 1 || pinfoptr->channel > 14) 89 if (pinfoptr->channel < 1 || pinfoptr->channel > 14)
90 { 90 {
91 /* Only channels between 1 and 14 are possible 91 /* Only channels between 1 and 14 are possible
92 others must be noise packets */ 92 others must be noise packets */
93 pinfoptr->isvalid = 0; 93 pinfoptr->isvalid = 0;
94 return; 94 return;
95 } 95 }
96 96
97 97
98 /* Here should be the infos to the gui issued */ 98 /* Here should be the infos to the gui issued */
99 if (pinfoptr->cap_ESS == 1 &&pinfoptr->cap_IBSS ==0) 99 if (pinfoptr->cap_ESS == 1 &&pinfoptr->cap_IBSS ==0)
100 { 100 {
101 wl_loginfo("Found an access point"); 101 wl_loginfo("Found an access point");
102 wl_net.net_type=1; 102 wl_net.net_type=1;
103 } 103 }
104 else if(pinfoptr->cap_ESS == 0 && pinfoptr->cap_IBSS == 1) 104 else if(pinfoptr->cap_ESS == 0 && pinfoptr->cap_IBSS == 2)
105 { 105 {
106 wl_loginfo("Found an ad-hoc network"); 106 wl_loginfo("Found an ad-hoc network");
107 wl_net.net_type=2; 107 wl_net.net_type=2;
108 } 108 }
109 if (strcmp (pinfoptr->ssid,NONBROADCASTING) ==0) 109 if (strcmp (pinfoptr->ssid,NONBROADCASTING) ==0)
110 { 110 {
111 wl_loginfo("Net is a non-broadcasting network"); 111 wl_loginfo("Net is a non-broadcasting network");
112 } 112 }
113 else 113 else
114 { 114 {
115 wl_loginfo("SSID is: %s", pinfoptr->ssid); 115 wl_loginfo("SSID is: %s", pinfoptr->ssid);
116 // wl_net.bssid=pinfoptr->ssid; 116 // wl_net.bssid=pinfoptr->ssid;
117 } 117 }
118 118
119 wl_loginfo("SSID length is: %d", pinfoptr->ssid_len); 119 wl_loginfo("SSID length is: %d", pinfoptr->ssid_len);
120 wl_net.ssid_len=pinfoptr->ssid_len; 120 wl_net.ssid_len=pinfoptr->ssid_len;
121 121
122 wl_loginfo("Channel is: %d", pinfoptr->channel); 122 wl_loginfo("Channel is: %d", pinfoptr->channel);
123 wl_net.channel=pinfoptr->channel; 123 wl_net.channel=pinfoptr->channel;
124 wl_net.wep=pinfoptr->cap_WEP; 124 wl_net.wep=pinfoptr->cap_WEP;
125 125
126 wl_loginfo("Mac is: %s", pinfoptr->sndhwaddr); 126 wl_loginfo("Mac is: %s", pinfoptr->sndhwaddr);
127 memcpy(wl_net.mac, pinfoptr->sndhwaddr, sizeof(wl_net.mac)-1);; 127 memcpy(wl_net.mac, pinfoptr->sndhwaddr, sizeof(wl_net.mac)-1);;
128 wl_loginfo("SSID is: %s", pinfoptr->ssid); 128 wl_loginfo("SSID is: %s", pinfoptr->ssid);
129 memcpy(wl_net.bssid, pinfoptr->ssid, sizeof(wl_net.bssid)-1); 129 memcpy(wl_net.bssid, pinfoptr->ssid, sizeof(wl_net.bssid)-1);
130 130
131 // printf ("\n\tDest : %s\n",pinfoptr->desthwaddr); 131 // printf ("\n\tDest : %s\n",pinfoptr->desthwaddr);
132 send_network_found((char *)guihost, guiport, &wl_net); 132 send_network_found((char *)guihost, guiport, &wl_net);
133 wl_loginfo("Sent network to GUI '%s:%d'", guihost, guiport); 133 wl_loginfo("Sent network to GUI '%s:%d'", guihost, guiport);
134 } 134 }
135 break; 135 break;
136 default: 136 default: