summaryrefslogtreecommitdiff
Unidiff
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--libopie2/opienet/onetwork.h15
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
@@ -1,91 +1,98 @@
1/* 1/*
2                 This file is part of the Opie Project 2                 This file is part of the Opie Project
3              Copyright (C) 2003-2004 by Michael 'Mickey' Lauer 3              Copyright (C) 2003-2004 by Michael 'Mickey' Lauer
4 =. <mickey@Vanille.de> 4 =. <mickey@Vanille.de>
5 .=l. 5 .=l.
6           .>+-= 6           .>+-=
7 _;:,     .>    :=|. This program is free software; you can 7 _;:,     .>    :=|. This program is free software; you can
8.> <`_,   >  .   <= redistribute it and/or modify it under 8.> <`_,   >  .   <= redistribute it and/or modify it under
9:`=1 )Y*s>-.--   : the terms of the GNU Library General Public 9:`=1 )Y*s>-.--   : the terms of the GNU Library General Public
10.="- .-=="i,     .._ License as published by the Free Software 10.="- .-=="i,     .._ License as published by the Free Software
11 - .   .-<_>     .<> Foundation; either version 2 of the License, 11 - .   .-<_>     .<> Foundation; either version 2 of the License,
12     ._= =}       : or (at your option) any later version. 12     ._= =}       : or (at your option) any later version.
13    .%`+i>       _;_. 13    .%`+i>       _;_.
14    .i_,=:_.      -<s. This program is distributed in the hope that 14    .i_,=:_.      -<s. This program is distributed in the hope that
15     +  .  -:.       = it will be useful, but WITHOUT ANY WARRANTY; 15     +  .  -:.       = it will be useful, but WITHOUT ANY WARRANTY;
16    : ..    .:,     . . . without even the implied warranty of 16    : ..    .:,     . . . without even the implied warranty of
17    =_        +     =;=|` MERCHANTABILITY or FITNESS FOR A 17    =_        +     =;=|` MERCHANTABILITY or FITNESS FOR A
18  _.=:.       :    :=>`: PARTICULAR PURPOSE. See the GNU 18  _.=:.       :    :=>`: PARTICULAR PURPOSE. See the GNU
19..}^=.=       =       ; Library General Public License for more 19..}^=.=       =       ; Library General Public License for more
20++=   -.     .`     .: details. 20++=   -.     .`     .: details.
21 :     =  ...= . :.=- 21 :     =  ...= . :.=-
22 -.   .:....=;==+<; You should have received a copy of the GNU 22 -.   .:....=;==+<; You should have received a copy of the GNU
23  -_. . .   )=.  = Library General Public License along with 23  -_. . .   )=.  = Library General Public License along with
24    --        :-=` this library; see the file COPYING.LIB. 24    --        :-=` this library; see the file COPYING.LIB.
25 If not, write to the Free Software Foundation, 25 If not, write to the Free Software Foundation,
26 Inc., 59 Temple Place - Suite 330, 26 Inc., 59 Temple Place - Suite 330,
27 Boston, MA 02111-1307, USA. 27 Boston, MA 02111-1307, USA.
28 28
29*/ 29*/
30 30
31#ifndef ONETWORK_H 31#ifndef ONETWORK_H
32#define ONETWORK_H 32#define ONETWORK_H
33 33
34#if !defined( OPIE_WE_VERSION ) 34#if !defined( OPIE_WE_VERSION )
35#error Need to define a wireless extension version to build against! 35 #warning No wireless extension specified; autodetecting...
36#endif 36 #include <linux/version.h>
37 #if LINUX_VERSION_CODE < KERNEL_VERSION(2,4,23)
38 #define OPIE_WE_VERSION 15
39 #else
40 #define OPIE_WE_VERSION 16
41 #endif // LINUX_VERSION_CODE < KERNEL_VERSION(2.4.23)
42#endif // !defined( OPIE_WE_VERSION )
37 43
38#if OPIE_WE_VERSION == 15 44#if OPIE_WE_VERSION == 15
39#include "wireless.15.h" 45#include "wireless.15.h"
46#warning Using WE V15
40#endif 47#endif
41
42#if OPIE_WE_VERSION == 16 48#if OPIE_WE_VERSION == 16
43#include "wireless.16.h" 49#include "wireless.16.h"
50#warning Using WE V16
44#endif 51#endif
45 52
46/* OPIE */ 53/* OPIE */
47 54
48#include <opie2/onetutils.h> 55#include <opie2/onetutils.h>
49#include <opie2/ostation.h> 56#include <opie2/ostation.h>
50 57
51/* QT */ 58/* QT */
52 59
53#include <qvaluelist.h> 60#include <qvaluelist.h>
54#include <qdict.h> 61#include <qdict.h>
55#include <qmap.h> 62#include <qmap.h>
56#include <qobject.h> 63#include <qobject.h>
57#include <qhostaddress.h> 64#include <qhostaddress.h>
58 65
59namespace Opie { 66namespace Opie {
60namespace Net { 67namespace Net {
61 68
62class ONetworkInterface; 69class ONetworkInterface;
63class OWirelessNetworkInterface; 70class OWirelessNetworkInterface;
64class OChannelHopper; 71class OChannelHopper;
65class OMonitoringInterface; 72class OMonitoringInterface;
66 73
67/*====================================================================================== 74/*======================================================================================
68 * ONetwork 75 * ONetwork
69 *======================================================================================*/ 76 *======================================================================================*/
70 77
71/** 78/**
72 * @brief A container class for all network interfaces 79 * @brief A container class for all network interfaces
73 * 80 *
74 * This class provides access to all available network interfaces of your computer. 81 * This class provides access to all available network interfaces of your computer.
75 * 82 *
76 * @author Michael 'Mickey' Lauer <mickey@vanille.de> 83 * @author Michael 'Mickey' Lauer <mickey@vanille.de>
77 */ 84 */
78class ONetwork : public QObject 85class ONetwork : public QObject
79{ 86{
80 Q_OBJECT 87 Q_OBJECT
81 88
82 public: 89 public:
83 typedef QDict<ONetworkInterface> InterfaceMap; 90 typedef QDict<ONetworkInterface> InterfaceMap;
84 typedef QDictIterator<ONetworkInterface> InterfaceIterator; 91 typedef QDictIterator<ONetworkInterface> InterfaceIterator;
85 92
86 public: 93 public:
87 /** 94 /**
88 * @returns the number of available interfaces 95 * @returns the number of available interfaces
89 */ 96 */
90 int count() const; 97 int count() const;
91 /** 98 /**
@@ -510,81 +517,81 @@ class OCiscoMonitoringInterface : public OMonitoringInterface
510 virtual ~OCiscoMonitoringInterface(); 517 virtual ~OCiscoMonitoringInterface();
511 518
512 virtual void setEnabled( bool ); 519 virtual void setEnabled( bool );
513 virtual QString name() const; 520 virtual QString name() const;
514 virtual void setChannel( int ); 521 virtual void setChannel( int );
515 private: 522 private:
516 class Private; 523 class Private;
517 Private *d; 524 Private *d;
518 525
519}; 526};
520 527
521 528
522/*====================================================================================== 529/*======================================================================================
523 * OWlanNGMonitoringInterface 530 * OWlanNGMonitoringInterface
524 *======================================================================================*/ 531 *======================================================================================*/
525 532
526 533
527class OWlanNGMonitoringInterface : public OMonitoringInterface 534class OWlanNGMonitoringInterface : public OMonitoringInterface
528{ 535{
529 public: 536 public:
530 OWlanNGMonitoringInterface( ONetworkInterface*, bool _prismHeader ); 537 OWlanNGMonitoringInterface( ONetworkInterface*, bool _prismHeader );
531 virtual ~OWlanNGMonitoringInterface(); 538 virtual ~OWlanNGMonitoringInterface();
532 539
533 public: 540 public:
534 virtual void setEnabled( bool ); 541 virtual void setEnabled( bool );
535 virtual QString name() const; 542 virtual QString name() const;
536 virtual void setChannel( int ); 543 virtual void setChannel( int );
537 private: 544 private:
538 class Private; 545 class Private;
539 Private *d; 546 Private *d;
540 547
541}; 548};
542 549
543 550
544/*====================================================================================== 551/*======================================================================================
545 * OHostAPMonitoringInterface 552 * OHostAPMonitoringInterface
546 *======================================================================================*/ 553 *======================================================================================*/
547 554
548 555
549class OHostAPMonitoringInterface : public OMonitoringInterface 556class OHostAPMonitoringInterface : public OMonitoringInterface
550{ 557{
551 public: 558 public:
552 OHostAPMonitoringInterface( ONetworkInterface*, bool _prismHeader ); 559 OHostAPMonitoringInterface( ONetworkInterface*, bool _prismHeader );
553 virtual ~OHostAPMonitoringInterface(); 560 virtual ~OHostAPMonitoringInterface();
554 561
555 public: 562 public:
556 virtual void setEnabled( bool ); 563 virtual void setEnabled( bool );
557 virtual QString name() const; 564 virtual QString name() const;
558 565
559 private: 566 private:
560 class Private; 567 class Private;
561 Private *d; 568 Private *d;
562 }; 569 };
563 570
564 571
565/*====================================================================================== 572/*======================================================================================
566 * OOrinocoMonitoringInterface 573 * OOrinocoMonitoringInterface
567 *======================================================================================*/ 574 *======================================================================================*/
568 575
569 576
570class OOrinocoMonitoringInterface : public OMonitoringInterface 577class OOrinocoMonitoringInterface : public OMonitoringInterface
571{ 578{
572 public: 579 public:
573 OOrinocoMonitoringInterface( ONetworkInterface*, bool _prismHeader ); 580 OOrinocoMonitoringInterface( ONetworkInterface*, bool _prismHeader );
574 virtual ~OOrinocoMonitoringInterface(); 581 virtual ~OOrinocoMonitoringInterface();
575 582
576 public: 583 public:
577 virtual void setChannel( int ); 584 virtual void setChannel( int );
578 virtual void setEnabled( bool ); 585 virtual void setEnabled( bool );
579 virtual QString name() const; 586 virtual QString name() const;
580 587
581 private: 588 private:
582 class Private; 589 class Private;
583 Private *d; 590 Private *d;
584}; 591};
585 592
586} 593}
587} 594}
588 595
589#endif // ONETWORK_H 596#endif // ONETWORK_H
590 597