summaryrefslogtreecommitdiff
path: root/libopie2/opienet/opcap.cpp
Side-by-side diff
Diffstat (limited to 'libopie2/opienet/opcap.cpp') (more/less context) (show whitespace changes)
-rw-r--r--libopie2/opienet/opcap.cpp8
1 files changed, 7 insertions, 1 deletions
diff --git a/libopie2/opienet/opcap.cpp b/libopie2/opienet/opcap.cpp
index fdd519c..4081d4f 100644
--- a/libopie2/opienet/opcap.cpp
+++ b/libopie2/opienet/opcap.cpp
@@ -36,24 +36,29 @@
#include <qapplication.h> // don't use oapplication here (will decrease reusability in other projects)
#include <qsocketnotifier.h>
#include <qobjectlist.h>
/* SYSTEM */
#include <sys/time.h>
#include <sys/types.h>
#include <unistd.h>
/* LOCAL */
#include "udp_ports.h"
+using namespace Opie::Core;
+
+namespace Opie {
+namespace Net {
+
/*======================================================================================
* OPacket
*======================================================================================*/
OPacket::OPacket( int datalink, packetheaderstruct header, const unsigned char* data, QObject* parent )
:QObject( parent, "Generic" ), _hdr( header ), _data( data )
{
//qDebug( "OPacket::OPacket(): (Len %d, CapLen %d)" /*, ctime((const time_t*) header.ts.tv_sec)*/, header.len, header.caplen );
_end = (unsigned char*) data + header.len;
//qDebug( "OPacket::data @ %0x, end @ %0x", data, _end );
@@ -1335,13 +1340,14 @@ int OPacketCapturer::snapShot() const
bool OPacketCapturer::swapped() const
{
return pcap_is_swapped( _pch );
}
QString OPacketCapturer::version() const
{
return QString().sprintf( "%d.%d", pcap_major_version( _pch ), pcap_minor_version( _pch ) );
}
-
+}
+}