author | mickeyl <mickeyl> | 2003-03-30 01:51:14 (UTC) |
---|---|---|
committer | mickeyl <mickeyl> | 2003-03-30 01:51:14 (UTC) |
commit | d11a0154e2d9732854c9a3d598857bc20f359849 (patch) (side-by-side diff) | |
tree | af0e0273d01f4f6c64c9f230f22bb91a7a8a21d8 /noncore/net/wellenreiter/libwellenreiter/source/cardmode.hh | |
parent | 99899abc80a8aa05044eeecd8a061b0a8efaa713 (diff) | |
download | opie-d11a0154e2d9732854c9a3d598857bc20f359849.zip opie-d11a0154e2d9732854c9a3d598857bc20f359849.tar.gz opie-d11a0154e2d9732854c9a3d598857bc20f359849.tar.bz2 |
- the network work for libopie2 pays off...
- good bye to wellenreiterd, t'was fun but always too unstable and too hard to maintain
- good bye to libwellenreiter
Diffstat (limited to 'noncore/net/wellenreiter/libwellenreiter/source/cardmode.hh') (more/less context) (show whitespace changes)
-rw-r--r-- | noncore/net/wellenreiter/libwellenreiter/source/cardmode.hh | 107 |
1 files changed, 0 insertions, 107 deletions
diff --git a/noncore/net/wellenreiter/libwellenreiter/source/cardmode.hh b/noncore/net/wellenreiter/libwellenreiter/source/cardmode.hh deleted file mode 100644 index 73e0ae1..0000000 --- a/noncore/net/wellenreiter/libwellenreiter/source/cardmode.hh +++ b/dev/null @@ -1,107 +0,0 @@ -/* $Id$ */ - -#ifndef CARDMODE_HH -#define CARDMODE_HH - -#include <string.h> -#include <stdlib.h> -#include <errno.h> -#include <sys/types.h> -#include <sys/time.h> -#include <sys/socket.h> -#include <netinet/in.h> -#include <arpa/inet.h> -#include <sys/ioctl.h> -#include <unistd.h> -#include <linux/if.h> - -/* Following typedefs are needed here, because linux/wireless.h - includes linux/ethertool.h which is using them */ -typedef signed char s8; -typedef unsigned char u8; -typedef signed short s16; -typedef unsigned short u16; -typedef signed int s32; -typedef unsigned int u32; -typedef signed long long s64; -typedef unsigned long long u64; - -#include <linux/wireless.h> - -#ifndef SIOCIWFIRSTPRIV -#define SIOCIWFIRSTPRIV SIOCDEVPRIVATE -#endif - -extern "C" -{ -#include <net/bpf.h> -#include <pcap.h> -} - -extern pcap_t *handletopcap; - -/* Defines, used for the card setup */ -#define DEFAULT_PATH "/proc/driver/aironet/%s/Config" -#define CISCO_STATUS "/proc/driver/aironet/%s/Status" -#define CARD_TYPE_CISCO 1 -#define CARD_TYPE_NG 2 -#define CARD_TYPE_HOSTAP 3 -#define CARD_TYPE_ORINOCCO 4 - -/* Some usefull constants for frequencies */ -#define KILO 1e3 -#define MEGA 1e6 -#define GIGA 1e9 - - -/* only for now, until we have the daemon running */ -/*the config file should provide these information */ -#define CARD_TYPE CARD_TYPE_HOSTAP - -/* Prototypes */ -int card_check_rfmon_datalink (const char *device); -int card_into_monitormode (const char *, int); -int check_loopback(); -int card_set_promisc_up (const char *device); -int card_remove_promisc (const char *device); -int card_set_channel (const char *device, int channel,int cardtype); -int iw_get_range_info(int skfd, const char * ifname, struct iw_range * range); -double iw_freq2float(iw_freq * in); -void iw_float2freq(double in, iw_freq * out); -int card_detect_channels (char * device); - -/*------------------------------------------------------------------*/ -/* - * Wrapper to push some Wireless Parameter in the driver - */ -static inline int -iw_set_ext(int skfd, /* Socket to the kernel */ - char * ifname, /* Device name */ - int request, /* WE ID */ - struct iwreq * pwrq) /* Fixed part of the request */ -{ - /* Set device name */ - strncpy(pwrq->ifr_name, ifname, IFNAMSIZ); - /* Do the request */ - return(ioctl(skfd, request, pwrq)); -} - -/*------------------------------------------------------------------*/ -/* - * Wrapper to extract some Wireless Parameter out of the driver - */ -static inline int -iw_get_ext(int skfd, /* Socket to the kernel */ - char * ifname, /* Device name */ - int request, /* WE ID */ - struct iwreq * pwrq) /* Fixed part of the request */ -{ - /* Set device name */ - strncpy(pwrq->ifr_name, ifname, IFNAMSIZ); - /* Do the request */ - return(ioctl(skfd, request, pwrq)); -} - - - -#endif /* CARDMODE_HH */ |