summaryrefslogtreecommitdiff
path: root/noncore
Side-by-side diff
Diffstat (limited to 'noncore') (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/net/wellenreiter/gui/scanlist.cpp52
-rw-r--r--noncore/net/wellenreiter/gui/wellenreiter.cpp2
2 files changed, 27 insertions, 27 deletions
diff --git a/noncore/net/wellenreiter/gui/scanlist.cpp b/noncore/net/wellenreiter/gui/scanlist.cpp
index ed9ec14..c605111 100644
--- a/noncore/net/wellenreiter/gui/scanlist.cpp
+++ b/noncore/net/wellenreiter/gui/scanlist.cpp
@@ -102,20 +102,20 @@ OListViewItem* MScanListView::childFactory()
return new MScanListItem( this );
}
void MScanListView::serializeTo( QDataStream& s) const
{
- odebug << "serializing MScanListView" << oendl;
+ odebug << "serializing MScanListView" << oendl;
OListView::serializeTo( s );
}
void MScanListView::serializeFrom( QDataStream& s)
{
- odebug << "serializing MScanListView" << oendl;
+ odebug << "serializing MScanListView" << oendl;
OListView::serializeFrom( s );
}
void MScanListView::addNewItem( const QString& type,
const QString& essid,
@@ -139,13 +139,13 @@ void MScanListView::addNewItem( const QString& type,
MScanListItem* network;
MScanListItem* item = static_cast<MScanListItem*> ( firstChild() );
while ( item && ( item->text( col_essid ) != essid ) )
{
#ifdef DEBUG
- odebug << "itemtext: " << item->text( col_essid ) << "" << oendl;
+ odebug << "itemtext: " << item->text( col_essid ) << "" << oendl;
#endif
item = static_cast<MScanListItem*> ( item->nextSibling() );
}
if ( item )
{
// we have already seen this net, check all childs if MAC exists
@@ -155,22 +155,22 @@ void MScanListView::addNewItem( const QString& type,
item = static_cast<MScanListItem*> ( item->firstChild() );
assert( item ); // this shouldn't fail
while ( item && ( item->text( col_ap ) != macaddr ) )
{
#ifdef DEBUG
- odebug << "subitemtext: " << item->text( col_ap ) << "" << oendl;
+ odebug << "subitemtext: " << item->text( col_ap ) << "" << oendl;
#endif
item = static_cast<MScanListItem*> ( item->nextSibling() );
}
if ( item )
{
// we have already seen this item, it's a dupe
#ifdef DEBUG
- odebug << "" << macaddr << " is a dupe - ignoring..." << oendl;
+ odebug << "" << macaddr << " is a dupe - ignoring..." << oendl;
#endif
item->receivedBeacon();
return;
}
}
else
@@ -182,13 +182,13 @@ void MScanListView::addNewItem( const QString& type,
// insert new station as child from network
// no essid to reduce clutter, maybe later we have a nick or stationname to display!?
#ifdef DEBUG
- odebug << "inserting new station " << macaddr << "" << oendl;
+ odebug << "inserting new station " << macaddr << "" << oendl;
#endif
MScanListItem* station = new MScanListItem( network, type, "", macaddr, wep, channel, signal );
station->setManufacturer( mac.manufacturer() );
station->setLocation( loc.dmsPosition() );
@@ -208,22 +208,22 @@ void MScanListView::addIfNotExisting( MScanListItem* network, const OMacAddress&
{
MScanListItem* subitem = static_cast<MScanListItem*>( network->firstChild() );
while ( subitem && ( subitem->text( col_ap ) != addr.toString(true) ) )
{
#ifdef DEBUG
- odebug << "subitemtext: " << subitem->text( col_ap ) << "" << oendl;
+ odebug << "subitemtext: " << subitem->text( col_ap ) << "" << oendl;
#endif
subitem = static_cast<MScanListItem*> ( subitem->nextSibling() );
}
if ( subitem )
{
// we have already seen this item, it's a dupe
#ifdef DEBUG
- odebug << "" << addr.toString(true) << " is a dupe - ignoring..." << oendl;
+ odebug << "" << addr.toString(true) << " is a dupe - ignoring..." << oendl;
#endif
subitem->receivedBeacon(); //FIXME: sent data bit
return;
}
// Hey, it seems to be a new item :-D
@@ -242,13 +242,13 @@ void MScanListView::addIfNotExisting( MScanListItem* network, const OMacAddress&
MLogWindow::logwindow()->log( s );
}
void MScanListView::WDStraffic( const OMacAddress& from, const OMacAddress& to, const OMacAddress& viaFrom, const OMacAddress& viaTo )
{
- odebug << "WDSTraffic: " << (const char*) viaFrom.toString() << " and " << viaTo.toString() << " seem to form a WDS" << oendl;
+ odebug << "WDSTraffic: " << (const char*) viaFrom.toString() << " and " << viaTo.toString() << " seem to form a WDS" << oendl;
QString s;
MScanListItem* network;
QListViewItemIterator it( this );
while ( it.current() &&
it.current()->text( col_ap ) != viaFrom.toString(true) &&
@@ -260,13 +260,13 @@ void MScanListView::WDStraffic( const OMacAddress& from, const OMacAddress& to,
{
addIfNotExisting( static_cast<MScanListItem*>(item->parent()), from );
addIfNotExisting( static_cast<MScanListItem*>(item->parent()), to );
}
else
{
- odebug << "D'Oh! Stations without AP... ignoring for now... will handle this in 1.1 version :-D" << oendl;
+ odebug << "D'Oh! Stations without AP... ignoring for now... will handle this in 1.1 version :-D" << oendl;
MLogWindow::logwindow()->log( "WARNING: Unhandled WSD traffic!" );
}
}
void MScanListView::toDStraffic( const OMacAddress& from, const OMacAddress& to, const OMacAddress& via )
@@ -282,13 +282,13 @@ void MScanListView::toDStraffic( const OMacAddress& from, const OMacAddress& to,
if ( item ) // AP has shown up yet, so just add our new "from" - station
{
addIfNotExisting( static_cast<MScanListItem*>(item->parent()), from, "adhoc" );
}
else
{
- odebug << "D'Oh! Station without AP... ignoring for now... will handle this in 1.1 :-D" << oendl;
+ odebug << "D'Oh! Station without AP... ignoring for now... will handle this in 1.1 :-D" << oendl;
MLogWindow::logwindow()->log( "WARNING: Unhandled toDS traffic!" );
}
}
@@ -305,47 +305,47 @@ void MScanListView::fromDStraffic( const OMacAddress& from, const OMacAddress& t
if ( item ) // AP has shown up yet, so just add our new "from" - station
{
addIfNotExisting( static_cast<MScanListItem*>(item->parent()), from, "station" );
}
else
{
- odebug << "D'Oh! Station without AP... ignoring for now... will handle this in 1.1 :-D" << oendl;
+ odebug << "D'Oh! Station without AP... ignoring for now... will handle this in 1.1 :-D" << oendl;
MLogWindow::logwindow()->log( "WARNING: Unhandled fromDS traffic!" );
}
}
void MScanListView::IBSStraffic( const OMacAddress& from, const OMacAddress& to, const OMacAddress& via )
{
- owarn << "D'oh! Not yet implemented..." << oendl;
+ owarn << "D'oh! Not yet implemented..." << oendl;
MLogWindow::logwindow()->log( "WARNING: Unhandled IBSS traffic!" );
}
void MScanListView::identify( const OMacAddress& macaddr, const QString& ip )
{
- odebug << "identify " << (const char*) macaddr.toString() << " = " << ip << "" << oendl;
+ odebug << "identify " << (const char*) macaddr.toString() << " = " << ip << "" << oendl;
QListViewItemIterator it( this );
for ( ; it.current(); ++it )
{
if ( it.current()->text( col_ap ) == macaddr.toString(true) )
{
it.current()->setText( col_ip, ip );
return;
}
}
- odebug << "D'oh! Received identification, but item not yet in list... ==> Handle this!" << oendl;
+ odebug << "D'oh! Received identification, but item not yet in list... ==> Handle this!" << oendl;
MLogWindow::logwindow()->log( QString().sprintf( "WARNING: Unhandled identification %s = %s!",
(const char*) macaddr.toString(), (const char*) ip ) );
}
void MScanListView::addService( const QString& name, const OMacAddress& macaddr, const QString& ip )
{
- odebug << "addService '" << (const char*) name << "', Server = " << (const char*) macaddr.toString() << " = " << ip << "" << oendl;
+ odebug << "addService '" << (const char*) name << "', Server = " << (const char*) macaddr.toString() << " = " << ip << "" << oendl;
//TODO: Refactor that out, we need it all over the place.
// Best to do it in a more comfortable abstraction in OListView
// (Hmm, didn't I already start something in this direction?)
QListViewItemIterator it( this );
@@ -356,22 +356,22 @@ void MScanListView::addService( const QString& name, const OMacAddress& macaddr,
MScanListItem* subitem = static_cast<MScanListItem*>( it.current()->firstChild() );
while ( subitem && ( subitem->text( col_essid ) != name ) )
{
#ifdef DEBUG
- odebug << "subitemtext: " << subitem->text( col_essid ) << "" << oendl;
+ odebug << "subitemtext: " << subitem->text( col_essid ) << "" << oendl;
#endif
subitem = static_cast<MScanListItem*> ( subitem->nextSibling() );
}
if ( subitem )
{
// we have already seen this item, it's a dupe
#ifdef DEBUG
- odebug << "" << name << " is a dupe - ignoring..." << oendl;
+ odebug << "" << name << " is a dupe - ignoring..." << oendl;
#endif
subitem->receivedBeacon(); //FIXME: sent data bit
return;
}
// never seen that - add new item
@@ -379,13 +379,13 @@ void MScanListView::addService( const QString& name, const OMacAddress& macaddr,
MScanListItem* item = new MScanListItem( it.current(), "service", "N/A", " ", false, -1, -1 );
item->setText( col_essid, name );
return;
}
}
- odebug << "D'oh! Received identification, but item not yet in list... ==> Handle this!" << oendl;
+ odebug << "D'oh! Received identification, but item not yet in list... ==> Handle this!" << oendl;
MLogWindow::logwindow()->log( QString().sprintf( "WARNING: Unhandled service addition %s = %s!",
(const char*) macaddr.toString(), (const char*) ip ) );
}
void MScanListView::contextMenuRequested( QListViewItem* item, const QPoint&, int col )
@@ -417,13 +417,13 @@ MScanListItem::MScanListItem( QListView* parent, const QString& type, const QStr
bool wep, int channel, int signal, bool probed )
:OListViewItem( parent, essid, QString::null, macaddr, QString::null, QString::null ),
_type( type ), _essid( essid ), _macaddr( macaddr ), _wep( wep ),
_channel( channel ), _signal( signal ), _beacons( 1 )
{
#ifdef DEBUG
- odebug << "creating scanlist item" << oendl;
+ odebug << "creating scanlist item" << oendl;
#endif
if ( WellenreiterConfigWindow::instance() )
WellenreiterConfigWindow::instance()->performAction( type, essid, macaddr, wep, channel, signal ); // better use signal/slot combination here
decorateItem( type, essid, macaddr, wep, channel, signal, probed );
@@ -431,13 +431,13 @@ MScanListItem::MScanListItem( QListView* parent, const QString& type, const QStr
MScanListItem::MScanListItem( QListViewItem* parent, const QString& type, const QString& essid, const QString& macaddr,
bool wep, int channel, int signal )
:OListViewItem( parent, essid, QString::null, macaddr, QString::null, QString::null )
{
#ifdef DEBUG
- odebug << "creating scanlist item" << oendl;
+ odebug << "creating scanlist item" << oendl;
#endif
if ( WellenreiterConfigWindow::instance() )
WellenreiterConfigWindow::instance()->performAction( type, essid, macaddr, wep, channel, signal ); // better use signal/slot combination here
decorateItem( type, essid, macaddr, wep, channel, signal, false );
}
@@ -455,30 +455,30 @@ OListViewItem* MScanListItem::childFactory()
return new MScanListItem( this );
}
void MScanListItem::serializeTo( QDataStream& s ) const
{
#ifdef DEBUG
- odebug << "serializing MScanListItem" << oendl;
+ odebug << "serializing MScanListItem" << oendl;
#endif
OListViewItem::serializeTo( s );
s << _type;
s << (Q_UINT8) ( _wep ? 'y' : 'n' );
}
void MScanListItem::serializeFrom( QDataStream& s )
{
#ifdef DEBUG
- odebug << "serializing MScanListItem" << oendl;
+ odebug << "serializing MScanListItem" << oendl;
#endif
OListViewItem::serializeFrom( s );
- char wep;
+ Q_UINT8 wep;
s >> _type;
- s >> (Q_UINT8) wep;
+ s >> wep;
_wep = (wep == 'y');
QString name;
name.sprintf( "wellenreiter/%s", (const char*) _type );
setPixmap( col_type, Resource::loadPixmap( name ) );
if ( _wep )
@@ -552,13 +552,13 @@ void MScanListItem::setLocation( const QString& location )
void MScanListItem::receivedBeacon()
{
_beacons++;
#ifdef DEBUG
- odebug << "MScanListItem " << _macaddr << ": received beacon #" << _beacons << "" << oendl;
+ odebug << "MScanListItem " << _macaddr << ": received beacon #" << _beacons << "" << oendl;
#endif
setText( col_sig, QString::number( _beacons ) );
setText( col_lastseen, QTime::currentTime().toString() );
MScanListItem* p = (MScanListItem*) parent();
if ( p ) p->receivedBeacon();
diff --git a/noncore/net/wellenreiter/gui/wellenreiter.cpp b/noncore/net/wellenreiter/gui/wellenreiter.cpp
index 822bde8..40cd105 100644
--- a/noncore/net/wellenreiter/gui/wellenreiter.cpp
+++ b/noncore/net/wellenreiter/gui/wellenreiter.cpp
@@ -583,13 +583,13 @@ void Wellenreiter::startClicked()
dumpname = "/var/log/dump.wellenreiter";
}
if ( cardtype != DEVTYPE_FILE )
pcap->open( interface );
else
- pcap->open( QFile( interface ) );
+ pcap->openCaptureFile( interface );
odebug << "Wellenreiter:: dumping to " << dumpname << "" << oendl;
pcap->openDumpFile( dumpname );
if ( !pcap->isOpen() )
{