author | mickeyl <mickeyl> | 2003-05-05 22:25:58 (UTC) |
---|---|---|
committer | mickeyl <mickeyl> | 2003-05-05 22:25:58 (UTC) |
commit | 3f8c29b3cbbb32864694fe9c95b43d1cb777360e (patch) (unidiff) | |
tree | dd749f9d27bfb8c9ad02bea8545fecba33555a67 | |
parent | 3b193b852133a82b5c1708b68a7e460c63629768 (diff) | |
download | opie-3f8c29b3cbbb32864694fe9c95b43d1cb777360e.zip opie-3f8c29b3cbbb32864694fe9c95b43d1cb777360e.tar.gz opie-3f8c29b3cbbb32864694fe9c95b43d1cb777360e.tar.bz2 |
fix typos
-rw-r--r-- | libopie2/examples/opienet/miniwellenreiter/miniwellenreiter.cpp | 2 | ||||
-rw-r--r-- | libopie2/opienet/opcap.cpp | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/libopie2/examples/opienet/miniwellenreiter/miniwellenreiter.cpp b/libopie2/examples/opienet/miniwellenreiter/miniwellenreiter.cpp index 34d32d2..c49daa0 100644 --- a/libopie2/examples/opienet/miniwellenreiter/miniwellenreiter.cpp +++ b/libopie2/examples/opienet/miniwellenreiter/miniwellenreiter.cpp | |||
@@ -82,49 +82,49 @@ public: | |||
82 | // downcast should be safe now | 82 | // downcast should be safe now |
83 | wiface = (OWirelessNetworkInterface*) iface; | 83 | wiface = (OWirelessNetworkInterface*) iface; |
84 | printf( "Using wireless interface '%s' for scanning (current SSID is '%s')...\n", (const char*) interface, (const char*) wiface->SSID() ); | 84 | printf( "Using wireless interface '%s' for scanning (current SSID is '%s')...\n", (const char*) interface, (const char*) wiface->SSID() ); |
85 | 85 | ||
86 | // ifconfig +promisc the interface to receive all packets | 86 | // ifconfig +promisc the interface to receive all packets |
87 | if ( !wiface->promiscuousMode() ) | 87 | if ( !wiface->promiscuousMode() ) |
88 | { | 88 | { |
89 | printf( "Interface status is not promisc... switching to promisc... " ); | 89 | printf( "Interface status is not promisc... switching to promisc... " ); |
90 | wiface->setPromiscuousMode( true ); | 90 | wiface->setPromiscuousMode( true ); |
91 | if ( !wiface->promiscuousMode() ) | 91 | if ( !wiface->promiscuousMode() ) |
92 | { | 92 | { |
93 | printf( "failed (%s). Exiting.\n", strerror( errno ) ); | 93 | printf( "failed (%s). Exiting.\n", strerror( errno ) ); |
94 | exit( -1 ); | 94 | exit( -1 ); |
95 | } | 95 | } |
96 | else | 96 | else |
97 | { | 97 | { |
98 | printf( "ok.\n" ); | 98 | printf( "ok.\n" ); |
99 | } | 99 | } |
100 | } | 100 | } |
101 | else | 101 | else |
102 | printf( "Interface status is already promisc - good.\n" ); | 102 | printf( "Interface status is already promisc - good.\n" ); |
103 | 103 | ||
104 | // connect a monitoring strategy to the interface | 104 | // connect a monitoring strategy to the interface |
105 | if ( driver == "orinoco" ) | 105 | if ( driver == "orinoco" ) |
106 | new OOrinocoMonitoringInterface( wiface ); | 106 | new OOrinocoMonitoringInterface( wiface, false ); |
107 | else | 107 | else |
108 | { | 108 | { |
109 | printf( "Unknown driver. Exiting\n" ); | 109 | printf( "Unknown driver. Exiting\n" ); |
110 | exit( -1 ); | 110 | exit( -1 ); |
111 | } | 111 | } |
112 | 112 | ||
113 | // enable monitoring mode | 113 | // enable monitoring mode |
114 | printf( "Enabling monitor mode...\n" ); | 114 | printf( "Enabling monitor mode...\n" ); |
115 | //wiface->setMonitorMode( true ); | 115 | //wiface->setMonitorMode( true ); |
116 | 116 | ||
117 | // open a packet capturer | 117 | // open a packet capturer |
118 | cap = new OPacketCapturer(); | 118 | cap = new OPacketCapturer(); |
119 | cap->open( interface ); | 119 | cap->open( interface ); |
120 | if ( !cap->isOpen() ) | 120 | if ( !cap->isOpen() ) |
121 | { | 121 | { |
122 | printf( "Unable to open libpcap (%s). Exiting.\n", strerror( errno ) ); | 122 | printf( "Unable to open libpcap (%s). Exiting.\n", strerror( errno ) ); |
123 | exit( -1 ); | 123 | exit( -1 ); |
124 | } | 124 | } |
125 | 125 | ||
126 | // set capturer to non-blocking mode | 126 | // set capturer to non-blocking mode |
127 | cap->setBlocking( false ); | 127 | cap->setBlocking( false ); |
128 | 128 | ||
129 | // start channel hopper | 129 | // start channel hopper |
130 | //wiface->setChannelHopping( 1000 ); | 130 | //wiface->setChannelHopping( 1000 ); |
diff --git a/libopie2/opienet/opcap.cpp b/libopie2/opienet/opcap.cpp index f6d05ea..523be3e 100644 --- a/libopie2/opienet/opcap.cpp +++ b/libopie2/opienet/opcap.cpp | |||
@@ -785,49 +785,49 @@ OLLCPacket::OLLCPacket( const unsigned char* end, const struct ieee_802_11_802_2 | |||
785 | { | 785 | { |
786 | qDebug( "OLLCPacket::OLLCPacket(): contains an encapsulated Ethernet frame (type=%04X)", EXTRACT_16BITS( &_header->type ) ); | 786 | qDebug( "OLLCPacket::OLLCPacket(): contains an encapsulated Ethernet frame (type=%04X)", EXTRACT_16BITS( &_header->type ) ); |
787 | 787 | ||
788 | switch ( EXTRACT_16BITS( &_header->type ) ) // defined in linux/if_ether.h | 788 | switch ( EXTRACT_16BITS( &_header->type ) ) // defined in linux/if_ether.h |
789 | { | 789 | { |
790 | case ETH_P_IP: new OIPPacket( end, (const struct iphdr*) (data+1), this ); break; | 790 | case ETH_P_IP: new OIPPacket( end, (const struct iphdr*) (data+1), this ); break; |
791 | case ETH_P_ARP: new OARPPacket( end, (const struct myarphdr*) (data+1), this ); break; | 791 | case ETH_P_ARP: new OARPPacket( end, (const struct myarphdr*) (data+1), this ); break; |
792 | default: qWarning( "OLLCPacket::OLLCPacket(): Unknown Encapsulation (type=%04X)", EXTRACT_16BITS( &_header->type ) ); | 792 | default: qWarning( "OLLCPacket::OLLCPacket(): Unknown Encapsulation (type=%04X)", EXTRACT_16BITS( &_header->type ) ); |
793 | } | 793 | } |
794 | 794 | ||
795 | } | 795 | } |
796 | } | 796 | } |
797 | 797 | ||
798 | 798 | ||
799 | OLLCPacket::~OLLCPacket() | 799 | OLLCPacket::~OLLCPacket() |
800 | { | 800 | { |
801 | } | 801 | } |
802 | 802 | ||
803 | 803 | ||
804 | /*====================================================================================== | 804 | /*====================================================================================== |
805 | * OWaveLanControlPacket | 805 | * OWaveLanControlPacket |
806 | *======================================================================================*/ | 806 | *======================================================================================*/ |
807 | 807 | ||
808 | OWaveLanControlPacket::OWaveLanControlPacket( const unsigned char* end, const struct ieee_802_11_control_header* data, OWaveLanPacket* parent ) | 808 | OWaveLanControlPacket::OWaveLanControlPacket( const unsigned char* end, const struct ieee_802_11_control_header* data, OWaveLanPacket* parent ) |
809 | :QObject( parent, "802.11 Data" ), _header( data ) | 809 | :QObject( parent, "802.11 Control" ), _header( data ) |
810 | { | 810 | { |
811 | qDebug( "OWaveLanControlPacket::OWaveLanDataControl(): decoding frame..." ); | 811 | qDebug( "OWaveLanControlPacket::OWaveLanDataControl(): decoding frame..." ); |
812 | //TODO: Implement this | 812 | //TODO: Implement this |
813 | } | 813 | } |
814 | 814 | ||
815 | 815 | ||
816 | OWaveLanControlPacket::~OWaveLanControlPacket() | 816 | OWaveLanControlPacket::~OWaveLanControlPacket() |
817 | { | 817 | { |
818 | } | 818 | } |
819 | 819 | ||
820 | 820 | ||
821 | /*====================================================================================== | 821 | /*====================================================================================== |
822 | * OPacketCapturer | 822 | * OPacketCapturer |
823 | *======================================================================================*/ | 823 | *======================================================================================*/ |
824 | 824 | ||
825 | OPacketCapturer::OPacketCapturer( QObject* parent, const char* name ) | 825 | OPacketCapturer::OPacketCapturer( QObject* parent, const char* name ) |
826 | :QObject( parent, name ), _name( QString::null ), _open( false ), | 826 | :QObject( parent, name ), _name( QString::null ), _open( false ), |
827 | _pch( 0 ), _pcd( 0 ), _sn( 0 ) | 827 | _pch( 0 ), _pcd( 0 ), _sn( 0 ) |
828 | { | 828 | { |
829 | } | 829 | } |
830 | 830 | ||
831 | 831 | ||
832 | OPacketCapturer::~OPacketCapturer() | 832 | OPacketCapturer::~OPacketCapturer() |
833 | { | 833 | { |