summaryrefslogtreecommitdiff
authormickeyl <mickeyl>2002-12-11 13:10:26 (UTC)
committer mickeyl <mickeyl>2002-12-11 13:10:26 (UTC)
commit57a776c8345422a0fc32b3fb9d604be1c050d201 (patch) (side-by-side diff)
tree30d484143b11fe69f39c94078dc614ce78d40566
parent84d92e2298605f4d4f9a9209731f62c2b10e54e4 (diff)
downloadopie-57a776c8345422a0fc32b3fb9d604be1c050d201.zip
opie-57a776c8345422a0fc32b3fb9d604be1c050d201.tar.gz
opie-57a776c8345422a0fc32b3fb9d604be1c050d201.tar.bz2
fix for g++ complaining about different linking schemes:
/usr/include/net/bpf.h:408: previous declaration of `u_int bpf_filter(bpf_insn*, u_char*, unsigned int, unsigned int)' with C++ linkage /usr/include/pcap.h:201: conflicts with new declaration with C linkage /usr/include/net/bpf.h:407: previous declaration of `int bpf_validate(bpf_insn*, int)' with C++ linkage /usr/include/pcap.h:202: conflicts with new declaration with C linkage
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/net/wellenreiter/libwellenreiter/source/cardmode.hh6
-rw-r--r--noncore/net/wellenreiter/libwellenreiter/source/sniff.hh6
2 files changed, 10 insertions, 2 deletions
diff --git a/noncore/net/wellenreiter/libwellenreiter/source/cardmode.hh b/noncore/net/wellenreiter/libwellenreiter/source/cardmode.hh
index 976ceeb..a3f8280 100644
--- a/noncore/net/wellenreiter/libwellenreiter/source/cardmode.hh
+++ b/noncore/net/wellenreiter/libwellenreiter/source/cardmode.hh
@@ -1,33 +1,37 @@
/* $Id$ */
#ifndef CARDMODE_HH
#define CARDMODE_HH
#include <string.h>
#include <stdlib.h>
-#include <pcap.h>
#include <errno.h>
#include <sys/socket.h>
#include <netinet/in.h>
#include <arpa/inet.h>
+
+extern "C"
+{
#include <net/bpf.h>
+#include <pcap.h>
+}
#include "../../libwellenreiter/source/log.hh"
/* Defines, used for the card setup */
#define DEFAULT_PATH "/proc/driver/aironet/%s/Config"
#define CARD_TYPE_CISCO 1
#define CARD_TYPE_NG 2
#define CARD_TYPE_HOSTAP 3
/* only for now, until we have the daemon running */
/*the config file should provide these information */
#define CARD_TYPE CARD_TYPE_CISCO
#define SBIN_PATH "/sbin/ifconfig %s promisc up"
#define WLANCTL_PATH "/sbin/wlanctl-ng"
/* Prototypes */
int card_into_monitormode (pcap_t **, char *, int);
int card_set_promisc_up (const char *);
#endif /* CARDMODE_HH */
diff --git a/noncore/net/wellenreiter/libwellenreiter/source/sniff.hh b/noncore/net/wellenreiter/libwellenreiter/source/sniff.hh
index 60cdc43..c13461a 100644
--- a/noncore/net/wellenreiter/libwellenreiter/source/sniff.hh
+++ b/noncore/net/wellenreiter/libwellenreiter/source/sniff.hh
@@ -1,38 +1,42 @@
/* $Id$ */
#ifndef SNIFF_HH
#define SNIFF_HH
#include <string.h>
#include <stdio.h>
#include <stdlib.h>
-#include <pcap.h>
#include <errno.h>
#include <sys/socket.h>
#include <netinet/in.h>
#include <arpa/inet.h>
+
+extern "C"
+{
#include <net/bpf.h>
+#include <pcap.h>
+}
#define NONBROADCASTING "non-broadcasting"
/* holds all the interresting data */
struct packetinfo
{
int isvalid;
int pktlen;
int fctype;
int fcsubtype;
int fc_wep;
int cap_WEP;
int cap_IBSS;
int cap_ESS;
int channel;
char bssid[sizeof("00:00:00:00:00:00") + 1];
char desthwaddr[sizeof("00:00:00:00:00:00") + 1];
char sndhwaddr[sizeof("00:00:00:00:00:00") + 1];
char ssid[128];
int ssid_len;
};
void process_packets(const struct pcap_pkthdr* pkthdr,const u_char* packet, char *, int);
int decode_80211b_hdr(const u_char *p,struct packetinfo *ppinfo);