-rw-r--r-- | libopie2/opienet/opcap.h | 35 |
1 files changed, 20 insertions, 15 deletions
diff --git a/libopie2/opienet/opcap.h b/libopie2/opienet/opcap.h index f5dc5c0..b873b49 100644 --- a/libopie2/opienet/opcap.h +++ b/libopie2/opienet/opcap.h @@ -33,12 +33,4 @@ -/* LINUX */ -extern "C" // work around a bpf/pcap conflict in recent headers -{ - #include <pcap.h> -} -#include <netinet/ether.h> -#include <netinet/ip.h> -#include <netinet/udp.h> -#include <netinet/tcp.h> -#include <time.h> +/* OPIE */ +#include <opie2/onetutils.h> @@ -50,8 +42,17 @@ extern "C" // work around a bpf/pcap conflict in recent headers #include <qstring.h> +#include <qtextstream.h> #include <qmap.h> -/* OPIE */ -#include <opie2/onetutils.h> +/* STD */ +extern "C" // work around a bpf/pcap conflict in recent headers +{ + #include <pcap.h> +} +#include <netinet/ether.h> +#include <netinet/ip.h> +#include <netinet/udp.h> +#include <netinet/tcp.h> +#include <time.h> -/* Custom Network Includes */ +/* Custom Network Includes (must go here, don't reorder!) */ #include "802_11_user.h" @@ -59,2 +60,3 @@ extern "C" // work around a bpf/pcap conflict in recent headers + /* TYPEDEFS */ @@ -118,2 +120,3 @@ class OPacket : public QObject friend class OPacketCapturer; + friend QTextStream& operator<<( QTextStream& s, const OPacket& p ); @@ -133,4 +136,4 @@ class OPacket : public QObject - void dumpStructure( QObjectList* ); - QString _dumpStructure( QObjectList* ); + QString dumpStructure() const; + QString _dumpStructure( QObjectList* ) const; @@ -142,2 +145,4 @@ class OPacket : public QObject +QTextStream& operator<<( QTextStream& s, const OPacket& p ); + /*====================================================================================== |