-rw-r--r-- | noncore/net/wellenreiter/libwellenreiter/source/sniff.cc | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/noncore/net/wellenreiter/libwellenreiter/source/sniff.cc b/noncore/net/wellenreiter/libwellenreiter/source/sniff.cc index 66299d1..81eccab 100644 --- a/noncore/net/wellenreiter/libwellenreiter/source/sniff.cc +++ b/noncore/net/wellenreiter/libwellenreiter/source/sniff.cc | |||
@@ -95,53 +95,59 @@ void process_packets(const struct pcap_pkthdr *pkthdr, const unsigned char *pack | |||
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 == 1) |
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_net.ssid_len=pinfoptr->ssid_len; | 120 | wl_net.ssid_len=pinfoptr->ssid_len; |
121 | |||
122 | wl_loginfo("Channel is: %d", pinfoptr->channel); | ||
120 | wl_net.channel=pinfoptr->channel; | 123 | wl_net.channel=pinfoptr->channel; |
121 | wl_net.wep=pinfoptr->cap_WEP; | 124 | wl_net.wep=pinfoptr->cap_WEP; |
122 | memcpy(wl_net.mac, pinfoptr->sndhwaddr, sizeof(wl_net.mac));; | 125 | |
123 | memcpy(wl_net.bssid, pinfoptr->ssid, sizeof(wl_net.bssid)); | 126 | wl_loginfo("Mac is: %s", pinfoptr->sndhwaddr); |
127 | memcpy(wl_net.mac, pinfoptr->sndhwaddr, sizeof(wl_net.mac)-1);; | ||
128 | wl_loginfo("SSID is: %s", pinfoptr->ssid); | ||
129 | memcpy(wl_net.bssid, pinfoptr->ssid, sizeof(wl_net.bssid)-1); | ||
124 | 130 | ||
125 | // printf ("\n\tDest : %s\n",pinfoptr->desthwaddr); | 131 | // printf ("\n\tDest : %s\n",pinfoptr->desthwaddr); |
126 | send_network_found((char *)guihost, guiport, &wl_net); | 132 | send_network_found((char *)guihost, guiport, &wl_net); |
127 | wl_loginfo("Sent network to GUI '%s:%d'", guihost, guiport); | 133 | wl_loginfo("Sent network to GUI '%s:%d'", guihost, guiport); |
128 | } | 134 | } |
129 | break; | 135 | break; |
130 | default: | 136 | default: |
131 | wl_logerr("Unknown IEEE802.11 frame subtype (%d)", FC_SUBTYPE(fc)); | 137 | wl_logerr("Unknown IEEE802.11 frame subtype (%d)", FC_SUBTYPE(fc)); |
132 | break; | 138 | break; |
133 | } /* End of switch over different mgt frame types */ | 139 | } /* End of switch over different mgt frame types */ |
134 | 140 | ||
135 | break; | 141 | break; |
136 | 142 | ||
137 | case T_CTRL: | 143 | case T_CTRL: |
138 | wl_loginfo("Received control frame, not implemented yet"); | 144 | wl_loginfo("Received control frame, not implemented yet"); |
139 | break; | 145 | break; |
140 | 146 | ||
141 | case T_DATA: | 147 | case T_DATA: |
142 | wl_loginfo("Received date frame, not implemented yet"); | 148 | wl_loginfo("Received date frame, not implemented yet"); |
143 | break; | 149 | break; |
144 | 150 | ||
145 | default: | 151 | default: |
146 | wl_logerr("Unknown IEEE802.11 frame type (%d)", FC_TYPE(fc)); | 152 | wl_logerr("Unknown IEEE802.11 frame type (%d)", FC_TYPE(fc)); |
147 | break; | 153 | break; |