-rw-r--r-- | noncore/net/wellenreiter/gui/wellenreiter.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/noncore/net/wellenreiter/gui/wellenreiter.cpp b/noncore/net/wellenreiter/gui/wellenreiter.cpp index 5bdc1b3..3bff7c4 100644 --- a/noncore/net/wellenreiter/gui/wellenreiter.cpp +++ b/noncore/net/wellenreiter/gui/wellenreiter.cpp | |||
@@ -97,65 +97,65 @@ Wellenreiter::~Wellenreiter() | |||
97 | 97 | ||
98 | delete manufacturerdb; | 98 | delete manufacturerdb; |
99 | delete pcap; | 99 | delete pcap; |
100 | } | 100 | } |
101 | 101 | ||
102 | void Wellenreiter::setConfigWindow( WellenreiterConfigWindow* cw ) | 102 | void Wellenreiter::setConfigWindow( WellenreiterConfigWindow* cw ) |
103 | { | 103 | { |
104 | configwindow = cw; | 104 | configwindow = cw; |
105 | } | 105 | } |
106 | 106 | ||
107 | void Wellenreiter::receivePacket(OPacket* p) | 107 | void Wellenreiter::receivePacket(OPacket* p) |
108 | { | 108 | { |
109 | logwindow->log( "(d) Received data from daemon" ); | 109 | logwindow->log( "(d) Received data from daemon" ); |
110 | //TODO | 110 | //TODO |
111 | 111 | ||
112 | // check if we received a beacon frame | 112 | // check if we received a beacon frame |
113 | // static_cast is justified here | 113 | // static_cast is justified here |
114 | OWaveLanManagementPacket* beacon = static_cast<OWaveLanManagementPacket*>( p->child( "802.11 Management" ) ); | 114 | OWaveLanManagementPacket* beacon = static_cast<OWaveLanManagementPacket*>( p->child( "802.11 Management" ) ); |
115 | if ( !beacon ) return; | 115 | if ( !beacon ) return; |
116 | QString type; | 116 | QString type; |
117 | 117 | ||
118 | //FIXME: Can stations in ESS mode can be distinguished from APs? | 118 | //FIXME: Can stations in ESS mode can be distinguished from APs? |
119 | //FIXME: Apparently yes, but not by listening to beacons, because | 119 | //FIXME: Apparently yes, but not by listening to beacons, because |
120 | //FIXME: they simply don't send beacons in infrastructure mode. | 120 | //FIXME: they simply don't send beacons in infrastructure mode. |
121 | //FIXME: so we also have to listen to data packets | 121 | //FIXME: so we also have to listen to data packets |
122 | 122 | ||
123 | if ( beacon->canIBSS() ) | 123 | if ( beacon->canIBSS() ) |
124 | type = "adhoc"; | 124 | type = "adhoc"; |
125 | else | 125 | else |
126 | type = "managed"; | 126 | type = "managed"; |
127 | 127 | ||
128 | OWaveLanManagementSSID* ssid = static_cast<OWaveLanManagementSSID*>( p->child( "802.11 SSID" ) ); | 128 | OWaveLanManagementSSID* ssid = static_cast<OWaveLanManagementSSID*>( p->child( "802.11 SSID" ) ); |
129 | QString essid = ssid ? ssid->ID() : "<unknown>"; | 129 | QString essid = ssid ? ssid->ID() : QString("<unknown>"); |
130 | OWaveLanManagementDS* ds = static_cast<OWaveLanManagementDS*>( p->child( "802.11 DS" ) ); | 130 | OWaveLanManagementDS* ds = static_cast<OWaveLanManagementDS*>( p->child( "802.11 DS" ) ); |
131 | int channel = ds ? ds->channel() : -1; | 131 | int channel = ds ? ds->channel() : -1; |
132 | 132 | ||
133 | OWaveLanPacket* header = static_cast<OWaveLanPacket*>( p->child( "802.11" ) ); | 133 | OWaveLanPacket* header = static_cast<OWaveLanPacket*>( p->child( "802.11" ) ); |
134 | netView()->addNewItem( type, essid, header->macAddress2().toString(), header->usesWep(), channel, 0 ); | 134 | netView()->addNewItem( type, essid, header->macAddress2().toString(), header->usesWep(), channel, 0 ); |
135 | } | 135 | } |
136 | 136 | ||
137 | void Wellenreiter::startStopClicked() | 137 | void Wellenreiter::startStopClicked() |
138 | { | 138 | { |
139 | if ( sniffing ) | 139 | if ( sniffing ) |
140 | { | 140 | { |
141 | disconnect( SIGNAL( receivedPacket(OPacket*) ), this, SLOT( receivePacket(OPacket*) ) ); | 141 | disconnect( SIGNAL( receivedPacket(OPacket*) ), this, SLOT( receivePacket(OPacket*) ) ); |
142 | 142 | ||
143 | iface->setChannelHopping(); // stop hopping channels | 143 | iface->setChannelHopping(); // stop hopping channels |
144 | pcap->close(); | 144 | pcap->close(); |
145 | sniffing = false; | 145 | sniffing = false; |
146 | oApp->setTitle(); | 146 | oApp->setTitle(); |
147 | 147 | ||
148 | // get interface name from config window | 148 | // get interface name from config window |
149 | const QString& interface = configwindow->interfaceName->currentText(); | 149 | const QString& interface = configwindow->interfaceName->currentText(); |
150 | ONetwork* net = ONetwork::instance(); | 150 | ONetwork* net = ONetwork::instance(); |
151 | iface = static_cast<OWirelessNetworkInterface*>(net->interface( interface )); | 151 | iface = static_cast<OWirelessNetworkInterface*>(net->interface( interface )); |
152 | 152 | ||
153 | // switch off monitor mode | 153 | // switch off monitor mode |
154 | iface->setMonitorMode( false ); | 154 | iface->setMonitorMode( false ); |
155 | // switch off promisc flag | 155 | // switch off promisc flag |
156 | iface->setPromiscuousMode( false ); | 156 | iface->setPromiscuousMode( false ); |
157 | 157 | ||
158 | //TODO: Display "please wait..." (use owait?) | 158 | //TODO: Display "please wait..." (use owait?) |
159 | 159 | ||
160 | /* | 160 | /* |
161 | 161 | ||