Diffstat (limited to 'noncore/net/wellenreiter/libwellenreiter') (more/less context) (show whitespace changes)
-rw-r--r-- | noncore/net/wellenreiter/libwellenreiter/source/cardmode.cc | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/noncore/net/wellenreiter/libwellenreiter/source/cardmode.cc b/noncore/net/wellenreiter/libwellenreiter/source/cardmode.cc index 697d182..0c23922 100644 --- a/noncore/net/wellenreiter/libwellenreiter/source/cardmode.cc +++ b/noncore/net/wellenreiter/libwellenreiter/source/cardmode.cc @@ -70,12 +70,16 @@ int card_into_monitormode (pcap_t **orighandle, char *device, int cardtype) snprintf(lucentcmd, sizeof(lucentcmd) - 1, "$(which iwpriv) %s monitor 2 %d", device, 1); if (system(lucentcmd) != 0) { wl_logerr("Could not set %s in raw mode, check cardtype", device); return 0; } + else + { + wl_loginfo("Successfully set %s into raw mode",device); + } } /* Setting the promiscous and up flag to the interface */ if (!card_check_rfmon_datalink(device)) { wl_logerr("Cannot set interface to rfmon mode"); @@ -153,35 +157,36 @@ int card_set_promisc_up (const char *device) } } /* Set channel (Wireless frequency) of the device */ int card_set_channel (const char *device, int channel, int cardtype) { - if (cardtype == CARD_TYPE_CISCO) { /* Cisco cards don't need channelswitching */ return 1; } /* If it is a lucent orinocco card */ else if (cardtype == CARD_TYPE_ORINOCCO) { char lucentreset[63]; char lucentcmd[62]; - snprintf(lucentreset, sizeof(lucentreset) -1,"$(which iwpriv) %s card_reset", device); + snprintf(lucentreset, sizeof(lucentreset) -1,"$(which iwpriv) %s force_reset", device); if (system(lucentreset) != 0) { wl_logerr("Could not reset the card %s",device); return 0; } snprintf(lucentcmd, sizeof(lucentcmd) - 1, "$(which iwpriv) %s monitor 2 %d", device, channel); if (system(lucentcmd) != 0) { wl_logerr("Could not set %s in raw mode, check cardtype", device); return 0; } + wl_loginfo("Channel %d set on interface %s",channel,device); + return 1; } /* For undefined situations */ return 0; } |