-rw-r--r-- | noncore/net/wellenreiter/gui/configbase.ui | 8 | ||||
-rw-r--r-- | noncore/net/wellenreiter/gui/main.cpp | 17 | ||||
-rw-r--r-- | noncore/net/wellenreiter/gui/mainwindow.cpp | 9 | ||||
-rw-r--r-- | noncore/net/wellenreiter/gui/protolistview.cpp | 2 | ||||
-rw-r--r-- | noncore/net/wellenreiter/gui/wellenreiter.cpp | 16 | ||||
-rw-r--r-- | noncore/net/wellenreiter/gui/wellenreiter.h | 1 |
6 files changed, 45 insertions, 8 deletions
diff --git a/noncore/net/wellenreiter/gui/configbase.ui b/noncore/net/wellenreiter/gui/configbase.ui index 422826a..590ca92 100644 --- a/noncore/net/wellenreiter/gui/configbase.ui +++ b/noncore/net/wellenreiter/gui/configbase.ui @@ -115,2 +115,6 @@ <property stdset="1"> + <name>enabled</name> + <bool>false</bool> + </property> + <property stdset="1"> <name>title</name> @@ -461,2 +465,6 @@ <property stdset="1"> + <name>enabled</name> + <bool>false</bool> + </property> + <property stdset="1"> <name>text</name> diff --git a/noncore/net/wellenreiter/gui/main.cpp b/noncore/net/wellenreiter/gui/main.cpp index 96ebb3f..55a5260 100644 --- a/noncore/net/wellenreiter/gui/main.cpp +++ b/noncore/net/wellenreiter/gui/main.cpp @@ -48,2 +48,3 @@ int main( int argc, char **argv ) a.setMainWidget( w ); + w->setCaption( "Wellenreiter II" ); w->show(); @@ -67,2 +68,4 @@ int main( int argc, char **argv ) + static int killed = false; + QString line; @@ -91,3 +94,5 @@ int main( int argc, char **argv ) if ( -1 == ::kill( (*it).toInt(), SIGTERM ) ) - qWarning( "Wellenreiter: can't kill process (%s)", result, strerror( errno ) ); + qWarning( "Wellenreiter: can't kill process #%d (%s)", result, strerror( errno ) ); + else + killed = true; } @@ -96,2 +101,12 @@ int main( int argc, char **argv ) a.exec(); + + if ( killed ) + { + result = QMessageBox::warning( w, " - Wellenreiter II - (dhcp)", QObject::tr( "Restart your dhcp client?" ), QMessageBox::Yes, QMessageBox::No ); + if ( result == QMessageBox::Yes ) + { + system( QString().sprintf( "dhclient &; udhcpcd &; dhcpcd &" ) ); + } + } + delete w; diff --git a/noncore/net/wellenreiter/gui/mainwindow.cpp b/noncore/net/wellenreiter/gui/mainwindow.cpp index 7241f7a..3e36f5b 100644 --- a/noncore/net/wellenreiter/gui/mainwindow.cpp +++ b/noncore/net/wellenreiter/gui/mainwindow.cpp @@ -137,4 +137,5 @@ WellenreiterMainWindow::WellenreiterMainWindow( QWidget * parent, const char * n id = mb->insertItem( tr( "&Sniffer" ), sniffer ); - //id = mb->insertItem( tr( "&Demo" ), demo ); - //mb->setItemEnabled( id, true ); + + id = mb->insertItem( tr( "&Demo" ), demo ); + mb->setItemEnabled( id, true ); @@ -217,2 +218,4 @@ void WellenreiterMainWindow::demoAddStations() { + mw = 0; + mw->netView()->addNewItem( "managed", "Vanille", "00:00:20:EF:A6:43", true, 6, 80 ); @@ -361 +364,3 @@ void WellenreiterMainWindow::closeEvent( QCloseEvent* e ) } + + diff --git a/noncore/net/wellenreiter/gui/protolistview.cpp b/noncore/net/wellenreiter/gui/protolistview.cpp index f4b45d0..daca095 100644 --- a/noncore/net/wellenreiter/gui/protolistview.cpp +++ b/noncore/net/wellenreiter/gui/protolistview.cpp @@ -86,3 +86,3 @@ void ProtocolListView::addProtocol( const QString& name ) #endif - combo->insertItem( "Ignore" ); + combo->insertItem( "Pass" ); combo->insertItem( "Discard!" ); diff --git a/noncore/net/wellenreiter/gui/wellenreiter.cpp b/noncore/net/wellenreiter/gui/wellenreiter.cpp index 965f6b0..4257be1 100644 --- a/noncore/net/wellenreiter/gui/wellenreiter.cpp +++ b/noncore/net/wellenreiter/gui/wellenreiter.cpp @@ -405,3 +405,2 @@ void Wellenreiter::startClicked() // configure device - ONetwork* net = ONetwork::instance(); @@ -409,4 +408,12 @@ void Wellenreiter::startClicked() - // set monitor mode + // bring device UP + iface->setUp( true ); + if ( !iface->isUp() ) + { + QMessageBox::warning( this, "Wellenreiter II", + tr( "Can't bring interface '%1' up:\n" ).arg( iface->name() ) + strerror( errno ) ); + return; + } + // set monitor mode bool usePrism = configwindow->usePrismHeader(); @@ -432,3 +439,3 @@ void Wellenreiter::startClicked() QMessageBox::warning( this, "Wellenreiter II", - tr( "Can't set device into monitor mode." ) ); + tr( "Can't set interface '%1' into monitor mode:\n" ).arg( iface->name() ) + strerror( errno ) ); return; @@ -463,3 +470,3 @@ void Wellenreiter::startClicked() QMessageBox::warning( this, "Wellenreiter II", - tr( "Can't open packet capturer:\n" ) + QString(strerror( errno ) )); + tr( "Can't open packet capturer for '%1':\n" ).arg( iface->name() ) + QString(strerror( errno ) )); return; @@ -532 +539,2 @@ void Wellenreiter::doAction( const QString& action, const QString& protocol, OPa } + diff --git a/noncore/net/wellenreiter/gui/wellenreiter.h b/noncore/net/wellenreiter/gui/wellenreiter.h index 37e692c..d776492 100644 --- a/noncore/net/wellenreiter/gui/wellenreiter.h +++ b/noncore/net/wellenreiter/gui/wellenreiter.h @@ -50,2 +50,3 @@ class Wellenreiter : public WellenreiterBase { + public: bool sniffing; |