author | mickeyl <mickeyl> | 2004-04-06 11:53:07 (UTC) |
---|---|---|
committer | mickeyl <mickeyl> | 2004-04-06 11:53:07 (UTC) |
commit | 52b7f68dd9435286a2d0b53fc8649b4323b8af38 (patch) (side-by-side diff) | |
tree | 0ae35404ee9c301f7e96b1e55d3e098d41486dfb | |
parent | d3d2fbab3991b637f50217bbe966484f583fbb19 (diff) | |
download | opie-52b7f68dd9435286a2d0b53fc8649b4323b8af38.zip opie-52b7f68dd9435286a2d0b53fc8649b4323b8af38.tar.gz opie-52b7f68dd9435286a2d0b53fc8649b4323b8af38.tar.bz2 |
add autodetection for wireless extension version
-rw-r--r-- | libopie2/opienet/onetwork.h | 15 |
1 files changed, 11 insertions, 4 deletions
diff --git a/libopie2/opienet/onetwork.h b/libopie2/opienet/onetwork.h index a953296..f5fbe1d 100644 --- a/libopie2/opienet/onetwork.h +++ b/libopie2/opienet/onetwork.h @@ -19,41 +19,48 @@ ..}^=.= = ; Library General Public License for more ++= -. .` .: details. : = ...= . :.=- -. .:....=;==+<; You should have received a copy of the GNU -_. . . )=. = Library General Public License along with -- :-=` this library; see the file COPYING.LIB. If not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ #ifndef ONETWORK_H #define ONETWORK_H #if !defined( OPIE_WE_VERSION ) -#error Need to define a wireless extension version to build against! -#endif + #warning No wireless extension specified; autodetecting... + #include <linux/version.h> + #if LINUX_VERSION_CODE < KERNEL_VERSION(2,4,23) + #define OPIE_WE_VERSION 15 + #else + #define OPIE_WE_VERSION 16 + #endif // LINUX_VERSION_CODE < KERNEL_VERSION(2.4.23) +#endif // !defined( OPIE_WE_VERSION ) #if OPIE_WE_VERSION == 15 #include "wireless.15.h" +#warning Using WE V15 #endif - #if OPIE_WE_VERSION == 16 #include "wireless.16.h" +#warning Using WE V16 #endif /* OPIE */ #include <opie2/onetutils.h> #include <opie2/ostation.h> /* QT */ #include <qvaluelist.h> #include <qdict.h> #include <qmap.h> #include <qobject.h> #include <qhostaddress.h> namespace Opie { @@ -542,33 +549,33 @@ class OWlanNGMonitoringInterface : public OMonitoringInterface /*====================================================================================== * OHostAPMonitoringInterface *======================================================================================*/ class OHostAPMonitoringInterface : public OMonitoringInterface { public: OHostAPMonitoringInterface( ONetworkInterface*, bool _prismHeader ); virtual ~OHostAPMonitoringInterface(); public: virtual void setEnabled( bool ); virtual QString name() const; - + private: class Private; Private *d; }; /*====================================================================================== * OOrinocoMonitoringInterface *======================================================================================*/ class OOrinocoMonitoringInterface : public OMonitoringInterface { public: OOrinocoMonitoringInterface( ONetworkInterface*, bool _prismHeader ); virtual ~OOrinocoMonitoringInterface(); |