Diffstat (limited to 'noncore/net/wellenreiter/libwellenreiter') (more/less context) (ignore whitespace changes)
-rw-r--r-- | noncore/net/wellenreiter/libwellenreiter/source/cardmode.cc | 7 | ||||
-rw-r--r-- | noncore/net/wellenreiter/libwellenreiter/source/cardmode.hh | 1 |
2 files changed, 8 insertions, 0 deletions
diff --git a/noncore/net/wellenreiter/libwellenreiter/source/cardmode.cc b/noncore/net/wellenreiter/libwellenreiter/source/cardmode.cc index 7362f14..d462488 100644 --- a/noncore/net/wellenreiter/libwellenreiter/source/cardmode.cc +++ b/noncore/net/wellenreiter/libwellenreiter/source/cardmode.cc | |||
@@ -53,12 +53,19 @@ int card_into_monitormode (pcap_t **orighandle, char *device, int cardtype) | |||
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 | wl_logerr("Got a host-ap card, nothing is implemented now"); | 58 | wl_logerr("Got a host-ap card, nothing is implemented now"); |
59 | char hostapcmd[250]; | ||
60 | snprintf(hostapcmd, sizeof(hostapcmd) -1, "%s %s monitor 2", IWPRIV_PATH, device); | ||
61 | if (system(hostapcmd) !=0) | ||
62 | { | ||
63 | wl_logerr("Could not set %s in raw mode, check cardtype", device); | ||
64 | return 0; | ||
65 | } | ||
59 | } | 66 | } |
60 | 67 | ||
61 | return 1; | 68 | return 1; |
62 | } | 69 | } |
63 | 70 | ||
64 | /* Set card into promisc mode */ | 71 | /* Set card into promisc mode */ |
diff --git a/noncore/net/wellenreiter/libwellenreiter/source/cardmode.hh b/noncore/net/wellenreiter/libwellenreiter/source/cardmode.hh index b85b7b7..9721b39 100644 --- a/noncore/net/wellenreiter/libwellenreiter/source/cardmode.hh +++ b/noncore/net/wellenreiter/libwellenreiter/source/cardmode.hh | |||
@@ -25,12 +25,13 @@ extern "C" | |||
25 | 25 | ||
26 | /* only for now, until we have the daemon running */ | 26 | /* only for now, until we have the daemon running */ |
27 | /*the config file should provide these information */ | 27 | /*the config file should provide these information */ |
28 | #define CARD_TYPE CARD_TYPE_HOSTAP | 28 | #define CARD_TYPE CARD_TYPE_HOSTAP |
29 | #define SBIN_PATH "/sbin/ifconfig %s promisc up" | 29 | #define SBIN_PATH "/sbin/ifconfig %s promisc up" |
30 | #define WLANCTL_PATH "/sbin/wlanctl-ng" | 30 | #define WLANCTL_PATH "/sbin/wlanctl-ng" |
31 | #define IWPRIV_PATH "/sbin/iwpriv" | ||
31 | 32 | ||
32 | /* Prototypes */ | 33 | /* Prototypes */ |
33 | int card_into_monitormode (pcap_t **, char *, int); | 34 | int card_into_monitormode (pcap_t **, char *, int); |
34 | int card_set_promisc_up (const char *); | 35 | int card_set_promisc_up (const char *); |
35 | 36 | ||
36 | #endif /* CARDMODE_HH */ | 37 | #endif /* CARDMODE_HH */ |