summaryrefslogtreecommitdiff
path: root/libopie2/opienet/onetwork.cpp
authormickeyl <mickeyl>2003-04-03 23:46:04 (UTC)
committer mickeyl <mickeyl>2003-04-03 23:46:04 (UTC)
commit487971af0c1b70babcc39fd549dc0d8142cd4865 (patch) (side-by-side diff)
treee317df1359a20686ba35b17309a8b82386108fb3 /libopie2/opienet/onetwork.cpp
parent934e4d81bc078c704a39f02663607a6c16a5b29f (diff)
downloadopie-487971af0c1b70babcc39fd549dc0d8142cd4865.zip
opie-487971af0c1b70babcc39fd549dc0d8142cd4865.tar.gz
opie-487971af0c1b70babcc39fd549dc0d8142cd4865.tar.bz2
first part of private IOCTL API for OWirelessNetworkInterface implemented
Diffstat (limited to 'libopie2/opienet/onetwork.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--libopie2/opienet/onetwork.cpp33
1 files changed, 33 insertions, 0 deletions
diff --git a/libopie2/opienet/onetwork.cpp b/libopie2/opienet/onetwork.cpp
index 2548a04..66fa215 100644
--- a/libopie2/opienet/onetwork.cpp
+++ b/libopie2/opienet/onetwork.cpp
@@ -52,6 +52,7 @@
#include <sys/types.h>
#include <unistd.h>
#include <linux/sockios.h>
+#include <stdarg.h>
using namespace std;
@@ -582,6 +583,38 @@ QString OWirelessNetworkInterface::nickName() const
}
+void OWirelessNetworkInterface::setPrivate( const QString& call, int numargs, ... )
+{
+ OPrivateIOCTL* priv = static_cast<OPrivateIOCTL*>( child( (const char*) call ) );
+ if ( !priv )
+ {
+ qDebug( "OWirelessNetworkInterface::setPrivate(): interface '%s' does not support private ioctl '%s'", name(), (const char*) call );
+ return;
+ }
+ if ( priv->numberSetArgs() != numargs )
+ {
+ qDebug( "OWirelessNetworkInterface::setPrivate(): parameter count not matching. '%s' expects %d arguments, but got %d", (const char*) call, priv->numberSetArgs(), numargs );
+ return;
+ }
+
+ qDebug( "OWirelessNetworkInterface::setPrivate(): about to call '%s' on interface '%s'", (const char*) call, name() );
+ memset( &_iwr, 0, sizeof _iwr );
+ va_list argp;
+ va_start( argp, numargs );
+ for ( int i = 0; i < numargs; ++i )
+ {
+ priv->setParameter( i, va_arg( argp, int ) );
+ }
+ va_end( argp );
+ priv->invoke();
+}
+
+
+void OWirelessNetworkInterface::getPrivate( const QString& call )
+{
+}
+
+
QString OWirelessNetworkInterface::SSID() const
{
char str[IW_ESSID_MAX_SIZE];