author | max <max> | 2003-02-12 20:49:39 (UTC) |
---|---|---|
committer | max <max> | 2003-02-12 20:49:39 (UTC) |
commit | dc326e87d4a958ee49210fff9d03967f8a183242 (patch) (unidiff) | |
tree | 618a8c9757ad4ed6108963ba06dedd30d8c41588 | |
parent | 421f7d634a3b5d343834cfa1410d674ff78cf5b8 (diff) | |
download | opie-dc326e87d4a958ee49210fff9d03967f8a183242.zip opie-dc326e87d4a958ee49210fff9d03967f8a183242.tar.gz opie-dc326e87d4a958ee49210fff9d03967f8a183242.tar.bz2 |
fix const char
-rw-r--r-- | noncore/net/wellenreiter/libwellenreiter/source/cardmode.cc | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/noncore/net/wellenreiter/libwellenreiter/source/cardmode.cc b/noncore/net/wellenreiter/libwellenreiter/source/cardmode.cc index cf50d8c..626b28c 100644 --- a/noncore/net/wellenreiter/libwellenreiter/source/cardmode.cc +++ b/noncore/net/wellenreiter/libwellenreiter/source/cardmode.cc | |||
@@ -51,25 +51,25 @@ int card_into_monitormode (pcap_t **orighandle, const char *device, int cardtype | |||
51 | { | 51 | { |
52 | wl_logerr("Could not set %s in raw mode, check cardtype", device); | 52 | wl_logerr("Could not set %s in raw mode, check cardtype", device); |
53 | return 0; | 53 | return 0; |
54 | } | 54 | } |
55 | } | 55 | } |
56 | else if (cardtype == CARD_TYPE_HOSTAP) | 56 | else if (cardtype == CARD_TYPE_HOSTAP) |
57 | { | 57 | { |
58 | int skfd; | 58 | int skfd; |
59 | skfd = socket(AF_INET, SOCK_STREAM, 0); | 59 | skfd = socket(AF_INET, SOCK_STREAM, 0); |
60 | struct iwreq wrq; | 60 | struct iwreq wrq; |
61 | wrq.u.mode = IW_MODE_MONITOR; | 61 | wrq.u.mode = IW_MODE_MONITOR; |
62 | 62 | ||
63 | if(iw_set_ext(skfd,device,SIOCSIWMODE,&wrq)<0) | 63 | if(iw_set_ext(skfd,(char *) device,SIOCSIWMODE,&wrq)<0) |
64 | { | 64 | { |
65 | wl_logerr("Could not set hostap card %s to raw mode, check cardtype", device); | 65 | wl_logerr("Could not set hostap card %s to raw mode, check cardtype", device); |
66 | return 0; | 66 | return 0; |
67 | } | 67 | } |
68 | else | 68 | else |
69 | { | 69 | { |
70 | wl_loginfo("Successfully set hostap card %s into raw mode",device); | 70 | wl_loginfo("Successfully set hostap card %s into raw mode",device); |
71 | return 1; | 71 | return 1; |
72 | } | 72 | } |
73 | return 1; | 73 | return 1; |
74 | } | 74 | } |
75 | else if (cardtype == CARD_TYPE_ORINOCCO ) | 75 | else if (cardtype == CARD_TYPE_ORINOCCO ) |
@@ -94,25 +94,25 @@ int card_into_monitormode (pcap_t **orighandle, const char *device, int cardtype | |||
94 | else | 94 | else |
95 | { | 95 | { |
96 | wl_loginfo("Interface set to rfmon mode"); | 96 | wl_loginfo("Interface set to rfmon mode"); |
97 | } | 97 | } |
98 | return 1; | 98 | return 1; |
99 | } | 99 | } |
100 | 100 | ||
101 | /* Check card is in the rfmon mode */ | 101 | /* Check card is in the rfmon mode */ |
102 | int card_check_rfmon_datalink (const char *device) | 102 | int card_check_rfmon_datalink (const char *device) |
103 | { | 103 | { |
104 | int datalinktype=0; | 104 | int datalinktype=0; |
105 | pcap_t *phandle; | 105 | pcap_t *phandle; |
106 | phandle = pcap_open_live(device, 65,0,0,NULL); | 106 | phandle = pcap_open_live((char *)device, 65,0,0,NULL); |
107 | datalinktype = pcap_datalink (phandle); | 107 | datalinktype = pcap_datalink (phandle); |
108 | pcap_close(phandle); | 108 | pcap_close(phandle); |
109 | 109 | ||
110 | if (datalinktype != DLT_IEEE802_11) /* Rawmode is IEEE802_11 */ | 110 | if (datalinktype != DLT_IEEE802_11) /* Rawmode is IEEE802_11 */ |
111 | { | 111 | { |
112 | return 0; | 112 | return 0; |
113 | } | 113 | } |
114 | else | 114 | else |
115 | { | 115 | { |
116 | wl_loginfo("Your successfully listen on %s in 802.11 raw mode", device); | 116 | wl_loginfo("Your successfully listen on %s in 802.11 raw mode", device); |
117 | return 1; | 117 | return 1; |
118 | } | 118 | } |
@@ -207,25 +207,25 @@ int card_set_channel (const char *device, int channel, int cardtype) | |||
207 | wl_logerr("Could not set channel %d on %s, check cardtype",channel, device); | 207 | wl_logerr("Could not set channel %d on %s, check cardtype",channel, device); |
208 | return 0; | 208 | return 0; |
209 | } | 209 | } |
210 | } | 210 | } |
211 | /* when it is an hostap card you need another iocall for channel switching */ | 211 | /* when it is an hostap card you need another iocall for channel switching */ |
212 | else if (cardtype == CARD_TYPE_HOSTAP) | 212 | else if (cardtype == CARD_TYPE_HOSTAP) |
213 | { | 213 | { |
214 | int skfd; | 214 | int skfd; |
215 | skfd = socket(AF_INET, SOCK_STREAM, 0); | 215 | skfd = socket(AF_INET, SOCK_STREAM, 0); |
216 | struct iwreq wrq; | 216 | struct iwreq wrq; |
217 | iw_float2freq((double) channel, &wrq.u.freq); | 217 | iw_float2freq((double) channel, &wrq.u.freq); |
218 | 218 | ||
219 | if(iw_set_ext(skfd,device,SIOCSIWFREQ,&wrq)<0) | 219 | if(iw_set_ext(skfd,(char *) device,SIOCSIWFREQ,&wrq)<0) |
220 | { | 220 | { |
221 | wl_logerr("Could not set hostap card %s to channel %d", device, channel); | 221 | wl_logerr("Could not set hostap card %s to channel %d", device, channel); |
222 | return 0; | 222 | return 0; |
223 | } | 223 | } |
224 | else | 224 | else |
225 | { | 225 | { |
226 | wl_loginfo("Successfully set hostap card %s to channel %d", device, channel); | 226 | wl_loginfo("Successfully set hostap card %s to channel %d", device, channel); |
227 | return 1; | 227 | return 1; |
228 | } | 228 | } |
229 | } | 229 | } |
230 | /* For undefined situations */ | 230 | /* For undefined situations */ |
231 | return 0; | 231 | return 0; |
@@ -260,25 +260,25 @@ int card_detect_channels (char * device) | |||
260 | 260 | ||
261 | int iw_get_range_info(int skfd, const char * ifname, iw_range * range) | 261 | int iw_get_range_info(int skfd, const char * ifname, iw_range * range) |
262 | { | 262 | { |
263 | struct iwreq wrq2; | 263 | struct iwreq wrq2; |
264 | char buffer[sizeof(iw_range) * 2];/* Large enough */ | 264 | char buffer[sizeof(iw_range) * 2];/* Large enough */ |
265 | 265 | ||
266 | /* Cleanup */ | 266 | /* Cleanup */ |
267 | memset(buffer, 0, sizeof(buffer)); | 267 | memset(buffer, 0, sizeof(buffer)); |
268 | wrq2.u.data.pointer = (caddr_t) buffer; | 268 | wrq2.u.data.pointer = (caddr_t) buffer; |
269 | wrq2.u.data.length = sizeof(buffer); | 269 | wrq2.u.data.length = sizeof(buffer); |
270 | wrq2.u.data.flags = 0; | 270 | wrq2.u.data.flags = 0; |
271 | 271 | ||
272 | if(iw_get_ext(skfd, ifname, SIOCGIWRANGE, &wrq2) < 0) | 272 | if(iw_get_ext(skfd, (char *)ifname, SIOCGIWRANGE, &wrq2) < 0) |
273 | { | 273 | { |
274 | wl_logerr("Could not get the range from the interface"); | 274 | wl_logerr("Could not get the range from the interface"); |
275 | return(-1); | 275 | return(-1); |
276 | } | 276 | } |
277 | else | 277 | else |
278 | { | 278 | { |
279 | /* Copy stuff at the right place, ignore extra */ | 279 | /* Copy stuff at the right place, ignore extra */ |
280 | memcpy((char *) range, buffer, sizeof(iw_range)); | 280 | memcpy((char *) range, buffer, sizeof(iw_range)); |
281 | return 0; | 281 | return 0; |
282 | } | 282 | } |
283 | } | 283 | } |
284 | 284 | ||