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/configbase.ui8
-rw-r--r--noncore/net/wellenreiter/gui/main.cpp17
-rw-r--r--noncore/net/wellenreiter/gui/mainwindow.cpp9
-rw-r--r--noncore/net/wellenreiter/gui/protolistview.cpp2
-rw-r--r--noncore/net/wellenreiter/gui/wellenreiter.cpp16
-rw-r--r--noncore/net/wellenreiter/gui/wellenreiter.h1
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
@@ -114,4 +114,8 @@
</property>
<property stdset="1">
+ <name>enabled</name>
+ <bool>false</bool>
+ </property>
+ <property stdset="1">
<name>title</name>
<string>Scan on channel</string>
@@ -460,4 +464,8 @@
</property>
<property stdset="1">
+ <name>enabled</name>
+ <bool>false</bool>
+ </property>
+ <property stdset="1">
<name>text</name>
<string>Use Adaptive(TM) Hop Scheme</string>
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
@@ -47,4 +47,5 @@ int main( int argc, char **argv )
#else
a.setMainWidget( w );
+ w->setCaption( "Wellenreiter II" );
w->show();
#endif
@@ -66,4 +67,6 @@ int main( int argc, char **argv )
// and I want to call it like that: if ( OProcess::isRunning( QString& ) ) ...
+ static int killed = false;
+
QString line;
QDir d = QDir( "/proc" );
@@ -90,9 +93,21 @@ 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;
}
}
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;
return 0;
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
@@ -136,6 +136,7 @@ WellenreiterMainWindow::WellenreiterMainWindow( QWidget * parent, const char * n
//mb->setItemEnabled( id, false );
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 );
#ifdef QWS
@@ -216,4 +217,6 @@ WellenreiterMainWindow::~WellenreiterMainWindow()
void WellenreiterMainWindow::demoAddStations()
{
+ mw = 0;
+
mw->netView()->addNewItem( "managed", "Vanille", "00:00:20:EF:A6:43", true, 6, 80 );
mw->netView()->addNewItem( "managed", "Vanille", "00:30:6D:EF:A6:23", true, 11, 10 );
@@ -360,2 +363,4 @@ 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
@@ -85,5 +85,5 @@ void ProtocolListView::addProtocol( const QString& name )
combo->setFixedWidth( 75 );
#endif
- combo->insertItem( "Ignore" );
+ combo->insertItem( "Pass" );
combo->insertItem( "Discard!" );
combo->insertItem( "TouchSound" );
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
@@ -404,10 +404,17 @@ void Wellenreiter::startClicked()
// configure device
-
ONetwork* net = ONetwork::instance();
iface = static_cast<OWirelessNetworkInterface*>(net->interface( interface ));
- // 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();
@@ -431,5 +438,5 @@ 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;
}
@@ -462,5 +469,5 @@ 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;
}
@@ -531,2 +538,3 @@ void Wellenreiter::doAction( const QString& action, const QString& protocol, OPa
QString().sprintf( "Got packet with protocol '%s'", (const char*) protocol ) );
}
+
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
@@ -49,4 +49,5 @@ class Wellenreiter : public WellenreiterBase {
bool isDaemonRunning() const { return sniffing; };
+ public:
bool sniffing;