author | mickeyl <mickeyl> | 2003-04-05 23:08:46 (UTC) |
---|---|---|
committer | mickeyl <mickeyl> | 2003-04-05 23:08:46 (UTC) |
commit | b7682f160fafe69bfd47dcfb1c88f2ac2b1afaf5 (patch) (unidiff) | |
tree | 68c5a0c5da88fff94582d2e6a072d8e9bbeaaf30 | |
parent | 6a949f685bd3fb50f810ad603eaafdb57720077c (diff) | |
download | opie-b7682f160fafe69bfd47dcfb1c88f2ac2b1afaf5.zip opie-b7682f160fafe69bfd47dcfb1c88f2ac2b1afaf5.tar.gz opie-b7682f160fafe69bfd47dcfb1c88f2ac2b1afaf5.tar.bz2 |
- correct beacon bug (off-by-one)
- display hex dump per packet in hex window
- allow saving hex window contents
-rw-r--r-- | noncore/net/wellenreiter/gui/hexwindow.cpp | 10 | ||||
-rw-r--r-- | noncore/net/wellenreiter/gui/hexwindow.h | 1 | ||||
-rw-r--r-- | noncore/net/wellenreiter/gui/mainwindow.cpp | 23 | ||||
-rw-r--r-- | noncore/net/wellenreiter/gui/mainwindow.h | 1 | ||||
-rw-r--r-- | noncore/net/wellenreiter/gui/scanlist.cpp | 4 | ||||
-rw-r--r-- | noncore/net/wellenreiter/gui/wellenreiter.cpp | 5 |
6 files changed, 38 insertions, 6 deletions
diff --git a/noncore/net/wellenreiter/gui/hexwindow.cpp b/noncore/net/wellenreiter/gui/hexwindow.cpp index a3022f4..8b17285 100644 --- a/noncore/net/wellenreiter/gui/hexwindow.cpp +++ b/noncore/net/wellenreiter/gui/hexwindow.cpp | |||
@@ -22,5 +22,6 @@ MHexWindow::MHexWindow( QWidget * parent, const char * name, WFlags f ) | |||
22 | ledit = new QMultiLineEdit( this ); | 22 | ledit = new QMultiLineEdit( this ); |
23 | 23 | ledit->setFont( QFont( "fixed", 10 ) ); | |
24 | |||
24 | // FIXME: Set properties( font, read-only, etc...) | 25 | // FIXME: Set properties( font, read-only, etc...) |
25 | 26 | ||
26 | }; | 27 | }; |
@@ -34,2 +35,7 @@ void MHexWindow::log( QString text ) | |||
34 | 35 | ||
36 | const QString MHexWindow::getLog() const | ||
37 | { | ||
38 | return ledit->text(); | ||
39 | } | ||
40 | |||
35 | void MHexWindow::clear() | 41 | void MHexWindow::clear() |
diff --git a/noncore/net/wellenreiter/gui/hexwindow.h b/noncore/net/wellenreiter/gui/hexwindow.h index 2618b8c..f2f870c 100644 --- a/noncore/net/wellenreiter/gui/hexwindow.h +++ b/noncore/net/wellenreiter/gui/hexwindow.h | |||
@@ -30,2 +30,3 @@ class MHexWindow: public QVBox | |||
30 | void log( QString text ); | 30 | void log( QString text ); |
31 | const QString getLog() const; | ||
31 | void clear(); | 32 | void clear(); |
diff --git a/noncore/net/wellenreiter/gui/mainwindow.cpp b/noncore/net/wellenreiter/gui/mainwindow.cpp index 8e0164f..69d2b3a 100644 --- a/noncore/net/wellenreiter/gui/mainwindow.cpp +++ b/noncore/net/wellenreiter/gui/mainwindow.cpp | |||
@@ -109,3 +109,4 @@ WellenreiterMainWindow::WellenreiterMainWindow( QWidget * parent, const char * n | |||
109 | fileSave->insertItem( "&Session...", this, SLOT( fileSaveSession() ) ); | 109 | fileSave->insertItem( "&Session...", this, SLOT( fileSaveSession() ) ); |
110 | fileSave->insertItem( "&Log...", this, SLOT( fileSaveLog() ) ); | 110 | fileSave->insertItem( "&Text Log...", this, SLOT( fileSaveLog() ) ); |
111 | fileSave->insertItem( "&Hex Log...", this, SLOT( fileSaveHex() ) ); | ||
111 | 112 | ||
@@ -282,2 +283,22 @@ void WellenreiterMainWindow::fileSaveSession() | |||
282 | 283 | ||
284 | void WellenreiterMainWindow::fileSaveHex() | ||
285 | { | ||
286 | QString fname = getFileName( true ); | ||
287 | if ( !fname.isEmpty() ) | ||
288 | { | ||
289 | QFile f( fname ); | ||
290 | if ( f.open(IO_WriteOnly) ) | ||
291 | { | ||
292 | QTextStream t( &f ); | ||
293 | t << mw->hexWindow()->getLog(); | ||
294 | f.close(); | ||
295 | qDebug( "Saved hex log to file '%s'", (const char*) fname ); | ||
296 | } | ||
297 | else | ||
298 | { | ||
299 | qDebug( "Problem saving hex log to file '%s'", (const char*) fname ); | ||
300 | } | ||
301 | } | ||
302 | } | ||
303 | |||
283 | void WellenreiterMainWindow::fileLoadSession() | 304 | void WellenreiterMainWindow::fileLoadSession() |
diff --git a/noncore/net/wellenreiter/gui/mainwindow.h b/noncore/net/wellenreiter/gui/mainwindow.h index e06a60c..1b08c5b 100644 --- a/noncore/net/wellenreiter/gui/mainwindow.h +++ b/noncore/net/wellenreiter/gui/mainwindow.h | |||
@@ -55,2 +55,3 @@ class WellenreiterMainWindow: public QMainWindow | |||
55 | void fileSaveLog(); | 55 | void fileSaveLog(); |
56 | void fileSaveHex(); | ||
56 | void fileSaveSession(); | 57 | void fileSaveSession(); |
diff --git a/noncore/net/wellenreiter/gui/scanlist.cpp b/noncore/net/wellenreiter/gui/scanlist.cpp index a006a3c..34c69f5 100644 --- a/noncore/net/wellenreiter/gui/scanlist.cpp +++ b/noncore/net/wellenreiter/gui/scanlist.cpp | |||
@@ -196,3 +196,3 @@ MScanListItem::MScanListItem( QListView* parent, QString type, QString essid, QS | |||
196 | _type( type ), _essid( essid ), _macaddr( macaddr ), _wep( wep ), | 196 | _type( type ), _essid( essid ), _macaddr( macaddr ), _wep( wep ), |
197 | _channel( channel ), _signal( signal ), _beacons( 0 ) | 197 | _channel( channel ), _signal( signal ), _beacons( 1 ) |
198 | { | 198 | { |
@@ -276,3 +276,3 @@ void MScanListItem::decorateItem( QString type, QString essid, QString macaddr, | |||
276 | _channel = channel; | 276 | _channel = channel; |
277 | _beacons = 0; | 277 | _beacons = 1; |
278 | _signal = 0; | 278 | _signal = 0; |
diff --git a/noncore/net/wellenreiter/gui/wellenreiter.cpp b/noncore/net/wellenreiter/gui/wellenreiter.cpp index d80a6e6..aa33158 100644 --- a/noncore/net/wellenreiter/gui/wellenreiter.cpp +++ b/noncore/net/wellenreiter/gui/wellenreiter.cpp | |||
@@ -112,2 +112,4 @@ void Wellenreiter::receivePacket(OPacket* p) | |||
112 | { | 112 | { |
113 | hexWindow()->log( p->dump( 8 ) ); | ||
114 | |||
113 | // check if we received a beacon frame | 115 | // check if we received a beacon frame |
@@ -163,2 +165,3 @@ void Wellenreiter::startStopClicked() | |||
163 | system( "cardctl reset; sleep 1" ); //FIXME: Use OProcess | 165 | system( "cardctl reset; sleep 1" ); //FIXME: Use OProcess |
166 | logwindow->log( "(i) Stopped Scanning." ); | ||
164 | 167 | ||
@@ -224,3 +227,3 @@ void Wellenreiter::startStopClicked() | |||
224 | 227 | ||
225 | logwindow->log( "(i) Daemon has been started." ); | 228 | logwindow->log( "(i) Started Scanning." ); |
226 | #ifdef QWS | 229 | #ifdef QWS |