summaryrefslogtreecommitdiff
path: root/libopie2/opienet/onetutils.cpp
Unidiff
Diffstat (limited to 'libopie2/opienet/onetutils.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--libopie2/opienet/onetutils.cpp33
1 files changed, 29 insertions, 4 deletions
diff --git a/libopie2/opienet/onetutils.cpp b/libopie2/opienet/onetutils.cpp
index 3e11b53..fd8f9e9 100644
--- a/libopie2/opienet/onetutils.cpp
+++ b/libopie2/opienet/onetutils.cpp
@@ -27,12 +27,13 @@
27 Inc., 59 Temple Place - Suite 330, 27 Inc., 59 Temple Place - Suite 330,
28 Boston, MA 02111-1307, USA. 28 Boston, MA 02111-1307, USA.
29 29
30*/ 30*/
31 31
32#include <opie2/onetutils.h> 32#include <opie2/onetutils.h>
33#include <opie2/onetwork.h>
33 34
34#include <net/if.h> 35#include <net/if.h>
35 36
36#include <cstdio> 37#include <cstdio>
37using namespace std; 38using namespace std;
38 39
@@ -115,36 +116,60 @@ OPrivateIOCTL::OPrivateIOCTL( QObject* parent, const char* name, int cmd, int ge
115 116
116OPrivateIOCTL::~OPrivateIOCTL() 117OPrivateIOCTL::~OPrivateIOCTL()
117{ 118{
118} 119}
119 120
120 121
121inline int OPrivateIOCTL::numberGetArgs() const 122#ifdef QT_NO_DEBUG
123inline
124#endif
125int OPrivateIOCTL::numberGetArgs() const
122{ 126{
123 return _getargs & IW_PRIV_SIZE_MASK; 127 return _getargs & IW_PRIV_SIZE_MASK;
124} 128}
125 129
126 130
127inline int OPrivateIOCTL::typeGetArgs() const 131#ifdef QT_NO_DEBUG
132inline
133#endif
134int OPrivateIOCTL::typeGetArgs() const
128{ 135{
129 return _getargs & IW_PRIV_TYPE_MASK >> 12; 136 return _getargs & IW_PRIV_TYPE_MASK >> 12;
130} 137}
131 138
132 139
133inline int OPrivateIOCTL::numberSetArgs() const 140#ifdef QT_NO_DEBUG
141inline
142#endif
143int OPrivateIOCTL::numberSetArgs() const
134{ 144{
135 return _setargs & IW_PRIV_SIZE_MASK; 145 return _setargs & IW_PRIV_SIZE_MASK;
136} 146}
137 147
138 148
139inline int OPrivateIOCTL::typeSetArgs() const 149#ifdef QT_NO_DEBUG
150inline
151#endif
152int OPrivateIOCTL::typeSetArgs() const
140{ 153{
141 return _setargs & IW_PRIV_TYPE_MASK >> 12; 154 return _setargs & IW_PRIV_TYPE_MASK >> 12;
142} 155}
143 156
144 157
158void OPrivateIOCTL::invoke() const
159{
160 ( (OWirelessNetworkInterface*) parent() )->wioctl( _ioctl );
161}
162
163
164void OPrivateIOCTL::setParameter( int num, u_int32_t value )
165{
166 u_int32_t* arglist = (u_int32_t*) &( (OWirelessNetworkInterface*) parent() )->_iwr.u.name;
167 arglist[num] = value;
168}
169
145/*====================================================================================== 170/*======================================================================================
146 * assorted functions 171 * assorted functions
147 *======================================================================================*/ 172 *======================================================================================*/
148 173
149void dumpBytes( const unsigned char* data, int num ) 174void dumpBytes( const unsigned char* data, int num )
150{ 175{