summaryrefslogtreecommitdiff
path: root/libopie2/opienet/opcap.h
Side-by-side diff
Diffstat (limited to 'libopie2/opienet/opcap.h') (more/less context) (show whitespace changes)
-rw-r--r--libopie2/opienet/opcap.h35
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
@@ -32,14 +32,6 @@
#define OPCAP_H
-/* 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>
/* QT */
@@ -49,13 +41,23 @@ extern "C" // work around a bpf/pcap conflict in recent headers
#include <qobject.h>
#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"
#include "dhcp.h"
+
/* TYPEDEFS */
typedef struct timeval timevalstruct;
@@ -117,4 +119,5 @@ class OPacket : public QObject
friend class OPacketCapturer;
+ friend QTextStream& operator<<( QTextStream& s, const OPacket& p );
public:
@@ -132,6 +135,6 @@ class OPacket : public QObject
private:
- void dumpStructure( QObjectList* );
- QString _dumpStructure( QObjectList* );
+ QString dumpStructure() const;
+ QString _dumpStructure( QObjectList* ) const;
private:
@@ -141,4 +144,6 @@ class OPacket : public QObject
};
+QTextStream& operator<<( QTextStream& s, const OPacket& p );
+
/*======================================================================================
* OEthernetPacket - DLT_EN10MB frame