-rw-r--r-- | libopie2/opienet/onetwork.h | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/libopie2/opienet/onetwork.h b/libopie2/opienet/onetwork.h index c544454..b57ac3f 100644 --- a/libopie2/opienet/onetwork.h +++ b/libopie2/opienet/onetwork.h | |||
@@ -15,48 +15,49 @@ | |||
15 | ._= =} : or (at your option) any later version. | 15 | ._= =} : or (at your option) any later version. |
16 | .%`+i> _;_. | 16 | .%`+i> _;_. |
17 | .i_,=:_. -<s. This program is distributed in the hope that | 17 | .i_,=:_. -<s. This program is distributed in the hope that |
18 | + . -:. = it will be useful, but WITHOUT ANY WARRANTY; | 18 | + . -:. = it will be useful, but WITHOUT ANY WARRANTY; |
19 | : .. .:, . . . without even the implied warranty of | 19 | : .. .:, . . . without even the implied warranty of |
20 | =_ + =;=|` MERCHANTABILITY or FITNESS FOR A | 20 | =_ + =;=|` MERCHANTABILITY or FITNESS FOR A |
21 | _.=:. : :=>`: PARTICULAR PURPOSE. See the GNU | 21 | _.=:. : :=>`: PARTICULAR PURPOSE. See the GNU |
22 | ..}^=.= = ; Library General Public License for more | 22 | ..}^=.= = ; Library General Public License for more |
23 | ++= -. .` .: details. | 23 | ++= -. .` .: details. |
24 | : = ...= . :.=- | 24 | : = ...= . :.=- |
25 | -. .:....=;==+<; You should have received a copy of the GNU | 25 | -. .:....=;==+<; You should have received a copy of the GNU |
26 | -_. . . )=. = Library General Public License along with | 26 | -_. . . )=. = Library General Public License along with |
27 | -- :-=` this library; see the file COPYING.LIB. | 27 | -- :-=` this library; see the file COPYING.LIB. |
28 | If not, write to the Free Software Foundation, | 28 | If not, write to the Free Software Foundation, |
29 | Inc., 59 Temple Place - Suite 330, | 29 | Inc., 59 Temple Place - Suite 330, |
30 | Boston, MA 02111-1307, USA. | 30 | Boston, MA 02111-1307, USA. |
31 | 31 | ||
32 | */ | 32 | */ |
33 | 33 | ||
34 | #ifndef ONETWORK_H | 34 | #ifndef ONETWORK_H |
35 | #define ONETWORK_H | 35 | #define ONETWORK_H |
36 | 36 | ||
37 | /* QT */ | 37 | /* QT */ |
38 | 38 | ||
39 | #include <qvaluelist.h> | ||
39 | #include <qdict.h> | 40 | #include <qdict.h> |
40 | #include <qmap.h> | 41 | #include <qmap.h> |
41 | #include <qobject.h> | 42 | #include <qobject.h> |
42 | #include <qhostaddress.h> | 43 | #include <qhostaddress.h> |
43 | 44 | ||
44 | /* OPIE */ | 45 | /* OPIE */ |
45 | 46 | ||
46 | #include <opie2/onetutils.h> | 47 | #include <opie2/onetutils.h> |
47 | 48 | ||
48 | #ifndef IFNAMSIZ | 49 | #ifndef IFNAMSIZ |
49 | #define IFNAMSIZ 16 | 50 | #define IFNAMSIZ 16 |
50 | #endif | 51 | #endif |
51 | 52 | ||
52 | // ML: Yeah, I hate to include kernel headers, but it's necessary here | 53 | // ML: Yeah, I hate to include kernel headers, but it's necessary here |
53 | // ML: Here comes an ugly hack to prevent <linux/wireless.h> including <linux/if.h> | 54 | // ML: Here comes an ugly hack to prevent <linux/wireless.h> including <linux/if.h> |
54 | // ML: which conflicts with the user header <net/if.h> | 55 | // ML: which conflicts with the user header <net/if.h> |
55 | // ML: We really a user header for the Wireless Extensions, something like <net/wireless.h> | 56 | // ML: We really a user header for the Wireless Extensions, something like <net/wireless.h> |
56 | // ML: I will drop Jean an mail on that subject | 57 | // ML: I will drop Jean an mail on that subject |
57 | 58 | ||
58 | #include <net/if.h> | 59 | #include <net/if.h> |
59 | #define _LINUX_IF_H | 60 | #define _LINUX_IF_H |
60 | #include <linux/wireless.h> | 61 | #include <linux/wireless.h> |
61 | 62 | ||
62 | #ifndef SIOCIWFIRSTPRIV | 63 | #ifndef SIOCIWFIRSTPRIV |
@@ -141,51 +142,52 @@ class ONetworkInterface | |||
141 | ifreqstruct& ifr() const; | 142 | ifreqstruct& ifr() const; |
142 | virtual void init(); | 143 | virtual void init(); |
143 | bool ioctl( int call ) const; | 144 | bool ioctl( int call ) const; |
144 | bool ioctl( int call, ifreqstruct& ) const; | 145 | bool ioctl( int call, ifreqstruct& ) const; |
145 | }; | 146 | }; |
146 | 147 | ||
147 | /*====================================================================================== | 148 | /*====================================================================================== |
148 | * OChannelHopper | 149 | * OChannelHopper |
149 | *======================================================================================*/ | 150 | *======================================================================================*/ |
150 | 151 | ||
151 | class OChannelHopper : public QObject | 152 | class OChannelHopper : public QObject |
152 | { | 153 | { |
153 | public: | 154 | public: |
154 | OChannelHopper( OWirelessNetworkInterface* ); | 155 | OChannelHopper( OWirelessNetworkInterface* ); |
155 | virtual ~OChannelHopper(); | 156 | virtual ~OChannelHopper(); |
156 | bool isActive() const; | 157 | bool isActive() const; |
157 | int channel() const; | 158 | int channel() const; |
158 | virtual void timerEvent( QTimerEvent* ); | 159 | virtual void timerEvent( QTimerEvent* ); |
159 | void setInterval( int ); | 160 | void setInterval( int ); |
160 | int interval() const; | 161 | int interval() const; |
161 | 162 | ||
162 | private: | 163 | private: |
163 | OWirelessNetworkInterface* _iface; | 164 | OWirelessNetworkInterface* _iface; |
164 | int _interval; | 165 | int _interval; |
165 | int _channel; | ||
166 | int _tid; | 166 | int _tid; |
167 | int _maxChannel; | 167 | QValueList<int> _channels; |
168 | QValueList<int>::Iterator _channel; | ||
169 | |||
168 | }; | 170 | }; |
169 | 171 | ||
170 | 172 | ||
171 | /*====================================================================================== | 173 | /*====================================================================================== |
172 | * OWirelessNetworkInterface | 174 | * OWirelessNetworkInterface |
173 | *======================================================================================*/ | 175 | *======================================================================================*/ |
174 | 176 | ||
175 | class OWirelessNetworkInterface : public ONetworkInterface | 177 | class OWirelessNetworkInterface : public ONetworkInterface |
176 | { | 178 | { |
177 | friend class OMonitoringInterface; | 179 | friend class OMonitoringInterface; |
178 | friend class OCiscoMonitoringInterface; | 180 | friend class OCiscoMonitoringInterface; |
179 | friend class OWlanNGMonitoringInterface; | 181 | friend class OWlanNGMonitoringInterface; |
180 | friend class OHostAPMonitoringInterface; | 182 | friend class OHostAPMonitoringInterface; |
181 | friend class OOrinocoMonitoringInterface; | 183 | friend class OOrinocoMonitoringInterface; |
182 | 184 | ||
183 | public: | 185 | public: |
184 | enum Mode { AdHoc, Managed, Monitor }; | 186 | enum Mode { AdHoc, Managed, Monitor }; |
185 | 187 | ||
186 | OWirelessNetworkInterface( const QString& name ); | 188 | OWirelessNetworkInterface( const QString& name ); |
187 | virtual ~OWirelessNetworkInterface(); | 189 | virtual ~OWirelessNetworkInterface(); |
188 | 190 | ||
189 | virtual void setChannel( int ) const; | 191 | virtual void setChannel( int ) const; |
190 | virtual int channel() const; | 192 | virtual int channel() const; |
191 | virtual double frequency() const; | 193 | virtual double frequency() const; |