summaryrefslogtreecommitdiff
path: root/libopie2/opienet
authormickeyl <mickeyl>2003-10-21 13:23:37 (UTC)
committer mickeyl <mickeyl>2003-10-21 13:23:37 (UTC)
commit76ca3158518a851085b5a5ebe3724d0c0c3be857 (patch) (side-by-side diff)
treec1e3cd417968e08a4f01497a431720f3088f0fa6 /libopie2/opienet
parentfccc5d110dea3bc32176694c8e5fc7f014706be6 (diff)
downloadopie-76ca3158518a851085b5a5ebe3724d0c0c3be857.zip
opie-76ca3158518a851085b5a5ebe3724d0c0c3be857.tar.gz
opie-76ca3158518a851085b5a5ebe3724d0c0c3be857.tar.bz2
add clear text debug output for ioctls
Diffstat (limited to 'libopie2/opienet') (more/less context) (ignore whitespace changes)
-rw-r--r--libopie2/opienet/oioctlmap.cpp366
-rw-r--r--libopie2/opienet/oioctlmap.h17
-rw-r--r--libopie2/opienet/onetwork.cpp21
-rw-r--r--libopie2/opienet/opienet.pro11
4 files changed, 406 insertions, 9 deletions
diff --git a/libopie2/opienet/oioctlmap.cpp b/libopie2/opienet/oioctlmap.cpp
new file mode 100644
index 0000000..4a67eb6
--- a/dev/null
+++ b/libopie2/opienet/oioctlmap.cpp
@@ -0,0 +1,366 @@
+
+/*
+ * ioctl table - generated by regen.py - (C) Michael 'Mickey' Lauer <mickey@vanille.de>
+ */
+
+#include "oioctlmap.h"
+
+IntStringMap* constructIoctlMap()
+{
+ IntStringMap* map = new IntStringMap();
+
+
+ qDebug( "adding 0x8902 = SIOCSPGRP" );
+ map->insert( 0x8902, new QString("SIOCSPGRP") );
+ qDebug( "adding 0x8904 = SIOCGPGRP" );
+ map->insert( 0x8904, new QString("SIOCGPGRP") );
+ qDebug( "adding 0x8905 = SIOCATMARK" );
+ map->insert( 0x8905, new QString("SIOCATMARK") );
+ qDebug( "adding 0x8906 = SIOCGSTAMP" );
+ map->insert( 0x8906, new QString("SIOCGSTAMP") );
+ qDebug( "adding 0x890B = SIOCADDRT" );
+ map->insert( 0x890B, new QString("SIOCADDRT") );
+ qDebug( "adding 0x890C = SIOCDELRT" );
+ map->insert( 0x890C, new QString("SIOCDELRT") );
+ qDebug( "adding 0x890D = SIOCRTMSG" );
+ map->insert( 0x890D, new QString("SIOCRTMSG") );
+ qDebug( "adding 0x8910 = SIOCGIFNAME" );
+ map->insert( 0x8910, new QString("SIOCGIFNAME") );
+ qDebug( "adding 0x8911 = SIOCSIFLINK" );
+ map->insert( 0x8911, new QString("SIOCSIFLINK") );
+ qDebug( "adding 0x8912 = SIOCGIFCONF" );
+ map->insert( 0x8912, new QString("SIOCGIFCONF") );
+ qDebug( "adding 0x8913 = SIOCGIFFLAGS" );
+ map->insert( 0x8913, new QString("SIOCGIFFLAGS") );
+ qDebug( "adding 0x8914 = SIOCSIFFLAGS" );
+ map->insert( 0x8914, new QString("SIOCSIFFLAGS") );
+ qDebug( "adding 0x8915 = SIOCGIFADDR" );
+ map->insert( 0x8915, new QString("SIOCGIFADDR") );
+ qDebug( "adding 0x8916 = SIOCSIFADDR" );
+ map->insert( 0x8916, new QString("SIOCSIFADDR") );
+ qDebug( "adding 0x8917 = SIOCGIFDSTADDR" );
+ map->insert( 0x8917, new QString("SIOCGIFDSTADDR") );
+ qDebug( "adding 0x8918 = SIOCSIFDSTADDR" );
+ map->insert( 0x8918, new QString("SIOCSIFDSTADDR") );
+ qDebug( "adding 0x8919 = SIOCGIFBRDADDR" );
+ map->insert( 0x8919, new QString("SIOCGIFBRDADDR") );
+ qDebug( "adding 0x891a = SIOCSIFBRDADDR" );
+ map->insert( 0x891a, new QString("SIOCSIFBRDADDR") );
+ qDebug( "adding 0x891b = SIOCGIFNETMASK" );
+ map->insert( 0x891b, new QString("SIOCGIFNETMASK") );
+ qDebug( "adding 0x891c = SIOCSIFNETMASK" );
+ map->insert( 0x891c, new QString("SIOCSIFNETMASK") );
+ qDebug( "adding 0x891d = SIOCGIFMETRIC" );
+ map->insert( 0x891d, new QString("SIOCGIFMETRIC") );
+ qDebug( "adding 0x891e = SIOCSIFMETRIC" );
+ map->insert( 0x891e, new QString("SIOCSIFMETRIC") );
+ qDebug( "adding 0x891f = SIOCGIFMEM" );
+ map->insert( 0x891f, new QString("SIOCGIFMEM") );
+ qDebug( "adding 0x8920 = SIOCSIFMEM" );
+ map->insert( 0x8920, new QString("SIOCSIFMEM") );
+ qDebug( "adding 0x8921 = SIOCGIFMTU" );
+ map->insert( 0x8921, new QString("SIOCGIFMTU") );
+ qDebug( "adding 0x8922 = SIOCSIFMTU" );
+ map->insert( 0x8922, new QString("SIOCSIFMTU") );
+ qDebug( "adding 0x8923 = SIOCSIFNAME" );
+ map->insert( 0x8923, new QString("SIOCSIFNAME") );
+ qDebug( "adding 0x8924 = SIOCSIFHWADDR" );
+ map->insert( 0x8924, new QString("SIOCSIFHWADDR") );
+ qDebug( "adding 0x8925 = SIOCGIFENCAP" );
+ map->insert( 0x8925, new QString("SIOCGIFENCAP") );
+ qDebug( "adding 0x8926 = SIOCSIFENCAP" );
+ map->insert( 0x8926, new QString("SIOCSIFENCAP") );
+ qDebug( "adding 0x8927 = SIOCGIFHWADDR" );
+ map->insert( 0x8927, new QString("SIOCGIFHWADDR") );
+ qDebug( "adding 0x8929 = SIOCGIFSLAVE" );
+ map->insert( 0x8929, new QString("SIOCGIFSLAVE") );
+ qDebug( "adding 0x8930 = SIOCSIFSLAVE" );
+ map->insert( 0x8930, new QString("SIOCSIFSLAVE") );
+ qDebug( "adding 0x8931 = SIOCADDMULTI" );
+ map->insert( 0x8931, new QString("SIOCADDMULTI") );
+ qDebug( "adding 0x8932 = SIOCDELMULTI" );
+ map->insert( 0x8932, new QString("SIOCDELMULTI") );
+ qDebug( "adding 0x8933 = SIOCGIFINDEX" );
+ map->insert( 0x8933, new QString("SIOCGIFINDEX") );
+ qDebug( "adding 0x8934 = SIOCSIFPFLAGS" );
+ map->insert( 0x8934, new QString("SIOCSIFPFLAGS") );
+ qDebug( "adding 0x8935 = SIOCGIFPFLAGS" );
+ map->insert( 0x8935, new QString("SIOCGIFPFLAGS") );
+ qDebug( "adding 0x8936 = SIOCDIFADDR" );
+ map->insert( 0x8936, new QString("SIOCDIFADDR") );
+ qDebug( "adding 0x8937 = SIOCSIFHWBROADCAST" );
+ map->insert( 0x8937, new QString("SIOCSIFHWBROADCAST") );
+ qDebug( "adding 0x8938 = SIOCGIFCOUNT" );
+ map->insert( 0x8938, new QString("SIOCGIFCOUNT") );
+ qDebug( "adding 0x8940 = SIOCGIFBR" );
+ map->insert( 0x8940, new QString("SIOCGIFBR") );
+ qDebug( "adding 0x8941 = SIOCSIFBR" );
+ map->insert( 0x8941, new QString("SIOCSIFBR") );
+ qDebug( "adding 0x8942 = SIOCGIFTXQLEN" );
+ map->insert( 0x8942, new QString("SIOCGIFTXQLEN") );
+ qDebug( "adding 0x8943 = SIOCSIFTXQLEN" );
+ map->insert( 0x8943, new QString("SIOCSIFTXQLEN") );
+ qDebug( "adding 0x8953 = SIOCDARP" );
+ map->insert( 0x8953, new QString("SIOCDARP") );
+ qDebug( "adding 0x8954 = SIOCGARP" );
+ map->insert( 0x8954, new QString("SIOCGARP") );
+ qDebug( "adding 0x8955 = SIOCSARP" );
+ map->insert( 0x8955, new QString("SIOCSARP") );
+ qDebug( "adding 0x8960 = SIOCDRARP" );
+ map->insert( 0x8960, new QString("SIOCDRARP") );
+ qDebug( "adding 0x8961 = SIOCGRARP" );
+ map->insert( 0x8961, new QString("SIOCGRARP") );
+ qDebug( "adding 0x8962 = SIOCSRARP" );
+ map->insert( 0x8962, new QString("SIOCSRARP") );
+ qDebug( "adding 0x8970 = SIOCGIFMAP" );
+ map->insert( 0x8970, new QString("SIOCGIFMAP") );
+ qDebug( "adding 0x8971 = SIOCSIFMAP" );
+ map->insert( 0x8971, new QString("SIOCSIFMAP") );
+ qDebug( "adding 0x8980 = SIOCADDDLCI" );
+ map->insert( 0x8980, new QString("SIOCADDDLCI") );
+ qDebug( "adding 0x8981 = SIOCDELDLCI" );
+ map->insert( 0x8981, new QString("SIOCDELDLCI") );
+ qDebug( "adding 0x89F0 = SIOCDEVPRIVATE" );
+ map->insert( 0x89F0, new QString("SIOCDEVPRIVATE") );
+ qDebug( "adding 0x89E0 = SIOCPROTOPRIVATE" );
+ map->insert( 0x89E0, new QString("SIOCPROTOPRIVATE") );
+ qDebug( "adding 0x1fff = SIOCPARM_MASK" );
+ map->insert( 0x1fff, new QString("SIOCPARM_MASK") );
+ qDebug( "adding 0x00000000 = SIOC_VOID" );
+ map->insert( 0x00000000, new QString("SIOC_VOID") );
+ qDebug( "adding 0x20000000 = SIOC_OUT" );
+ map->insert( 0x20000000, new QString("SIOC_OUT") );
+ qDebug( "adding 0x40000000 = SIOC_IN" );
+ map->insert( 0x40000000, new QString("SIOC_IN") );
+ qDebug( "adding 0x8B00 = SIOCSIWCOMMIT" );
+ map->insert( 0x8B00, new QString("SIOCSIWCOMMIT") );
+ qDebug( "adding 0x8B01 = SIOCGIWNAME" );
+ map->insert( 0x8B01, new QString("SIOCGIWNAME") );
+ qDebug( "adding 0x8B02 = SIOCSIWNWID" );
+ map->insert( 0x8B02, new QString("SIOCSIWNWID") );
+ qDebug( "adding 0x8B03 = SIOCGIWNWID" );
+ map->insert( 0x8B03, new QString("SIOCGIWNWID") );
+ qDebug( "adding 0x8B04 = SIOCSIWFREQ" );
+ map->insert( 0x8B04, new QString("SIOCSIWFREQ") );
+ qDebug( "adding 0x8B05 = SIOCGIWFREQ" );
+ map->insert( 0x8B05, new QString("SIOCGIWFREQ") );
+ qDebug( "adding 0x8B06 = SIOCSIWMODE" );
+ map->insert( 0x8B06, new QString("SIOCSIWMODE") );
+ qDebug( "adding 0x8B07 = SIOCGIWMODE" );
+ map->insert( 0x8B07, new QString("SIOCGIWMODE") );
+ qDebug( "adding 0x8B08 = SIOCSIWSENS" );
+ map->insert( 0x8B08, new QString("SIOCSIWSENS") );
+ qDebug( "adding 0x8B09 = SIOCGIWSENS" );
+ map->insert( 0x8B09, new QString("SIOCGIWSENS") );
+ qDebug( "adding 0x8B0A = SIOCSIWRANGE" );
+ map->insert( 0x8B0A, new QString("SIOCSIWRANGE") );
+ qDebug( "adding 0x8B0B = SIOCGIWRANGE" );
+ map->insert( 0x8B0B, new QString("SIOCGIWRANGE") );
+ qDebug( "adding 0x8B0C = SIOCSIWPRIV" );
+ map->insert( 0x8B0C, new QString("SIOCSIWPRIV") );
+ qDebug( "adding 0x8B0D = SIOCGIWPRIV" );
+ map->insert( 0x8B0D, new QString("SIOCGIWPRIV") );
+ qDebug( "adding 0x8B0E = SIOCSIWSTATS" );
+ map->insert( 0x8B0E, new QString("SIOCSIWSTATS") );
+ qDebug( "adding 0x8B0F = SIOCGIWSTATS" );
+ map->insert( 0x8B0F, new QString("SIOCGIWSTATS") );
+ qDebug( "adding 0x8B10 = SIOCSIWSPY" );
+ map->insert( 0x8B10, new QString("SIOCSIWSPY") );
+ qDebug( "adding 0x8B11 = SIOCGIWSPY" );
+ map->insert( 0x8B11, new QString("SIOCGIWSPY") );
+ qDebug( "adding 0x8B14 = SIOCSIWAP" );
+ map->insert( 0x8B14, new QString("SIOCSIWAP") );
+ qDebug( "adding 0x8B15 = SIOCGIWAP" );
+ map->insert( 0x8B15, new QString("SIOCGIWAP") );
+ qDebug( "adding 0x8B17 = SIOCGIWAPLIST" );
+ map->insert( 0x8B17, new QString("SIOCGIWAPLIST") );
+ qDebug( "adding 0x8B18 = SIOCSIWSCAN" );
+ map->insert( 0x8B18, new QString("SIOCSIWSCAN") );
+ qDebug( "adding 0x8B19 = SIOCGIWSCAN" );
+ map->insert( 0x8B19, new QString("SIOCGIWSCAN") );
+ qDebug( "adding 0x8B1A = SIOCSIWESSID" );
+ map->insert( 0x8B1A, new QString("SIOCSIWESSID") );
+ qDebug( "adding 0x8B1B = SIOCGIWESSID" );
+ map->insert( 0x8B1B, new QString("SIOCGIWESSID") );
+ qDebug( "adding 0x8B1C = SIOCSIWNICKN" );
+ map->insert( 0x8B1C, new QString("SIOCSIWNICKN") );
+ qDebug( "adding 0x8B1D = SIOCGIWNICKN" );
+ map->insert( 0x8B1D, new QString("SIOCGIWNICKN") );
+ qDebug( "adding 0x8B20 = SIOCSIWRATE" );
+ map->insert( 0x8B20, new QString("SIOCSIWRATE") );
+ qDebug( "adding 0x8B21 = SIOCGIWRATE" );
+ map->insert( 0x8B21, new QString("SIOCGIWRATE") );
+ qDebug( "adding 0x8B22 = SIOCSIWRTS" );
+ map->insert( 0x8B22, new QString("SIOCSIWRTS") );
+ qDebug( "adding 0x8B23 = SIOCGIWRTS" );
+ map->insert( 0x8B23, new QString("SIOCGIWRTS") );
+ qDebug( "adding 0x8B24 = SIOCSIWFRAG" );
+ map->insert( 0x8B24, new QString("SIOCSIWFRAG") );
+ qDebug( "adding 0x8B25 = SIOCGIWFRAG" );
+ map->insert( 0x8B25, new QString("SIOCGIWFRAG") );
+ qDebug( "adding 0x8B26 = SIOCSIWTXPOW" );
+ map->insert( 0x8B26, new QString("SIOCSIWTXPOW") );
+ qDebug( "adding 0x8B27 = SIOCGIWTXPOW" );
+ map->insert( 0x8B27, new QString("SIOCGIWTXPOW") );
+ qDebug( "adding 0x8B28 = SIOCSIWRETRY" );
+ map->insert( 0x8B28, new QString("SIOCSIWRETRY") );
+ qDebug( "adding 0x8B29 = SIOCGIWRETRY" );
+ map->insert( 0x8B29, new QString("SIOCGIWRETRY") );
+ qDebug( "adding 0x8B2A = SIOCSIWENCODE" );
+ map->insert( 0x8B2A, new QString("SIOCSIWENCODE") );
+ qDebug( "adding 0x8B2B = SIOCGIWENCODE" );
+ map->insert( 0x8B2B, new QString("SIOCGIWENCODE") );
+ qDebug( "adding 0x8B2C = SIOCSIWPOWER" );
+ map->insert( 0x8B2C, new QString("SIOCSIWPOWER") );
+ qDebug( "adding 0x8B2D = SIOCGIWPOWER" );
+ map->insert( 0x8B2D, new QString("SIOCGIWPOWER") );
+ qDebug( "adding 0x8BE0 = SIOCIWFIRSTPRIV" );
+ map->insert( 0x8BE0, new QString("SIOCIWFIRSTPRIV") );
+ qDebug( "adding 0x8BFF = SIOCIWLASTPRIV" );
+ map->insert( 0x8BFF, new QString("SIOCIWLASTPRIV") );
+ qDebug( "adding 0x8B00 = SIOCIWFIRST" );
+ map->insert( 0x8B00, new QString("SIOCIWFIRST") );
+ qDebug( "adding 0x5000 = SIOCGBPQETHPARAM" );
+ map->insert( 0x5000, new QString("SIOCGBPQETHPARAM") );
+ qDebug( "adding 0x5001 = SIOCSBPQETHPARAM" );
+ map->insert( 0x5001, new QString("SIOCSBPQETHPARAM") );
+ qDebug( "adding 0x890B = SIOCADDRT" );
+ map->insert( 0x890B, new QString("SIOCADDRT") );
+ qDebug( "adding 0x890C = SIOCDELRT" );
+ map->insert( 0x890C, new QString("SIOCDELRT") );
+ qDebug( "adding 0x890D = SIOCRTMSG" );
+ map->insert( 0x890D, new QString("SIOCRTMSG") );
+ qDebug( "adding 0x8910 = SIOCGIFNAME" );
+ map->insert( 0x8910, new QString("SIOCGIFNAME") );
+ qDebug( "adding 0x8911 = SIOCSIFLINK" );
+ map->insert( 0x8911, new QString("SIOCSIFLINK") );
+ qDebug( "adding 0x8912 = SIOCGIFCONF" );
+ map->insert( 0x8912, new QString("SIOCGIFCONF") );
+ qDebug( "adding 0x8913 = SIOCGIFFLAGS" );
+ map->insert( 0x8913, new QString("SIOCGIFFLAGS") );
+ qDebug( "adding 0x8914 = SIOCSIFFLAGS" );
+ map->insert( 0x8914, new QString("SIOCSIFFLAGS") );
+ qDebug( "adding 0x8915 = SIOCGIFADDR" );
+ map->insert( 0x8915, new QString("SIOCGIFADDR") );
+ qDebug( "adding 0x8916 = SIOCSIFADDR" );
+ map->insert( 0x8916, new QString("SIOCSIFADDR") );
+ qDebug( "adding 0x8917 = SIOCGIFDSTADDR" );
+ map->insert( 0x8917, new QString("SIOCGIFDSTADDR") );
+ qDebug( "adding 0x8918 = SIOCSIFDSTADDR" );
+ map->insert( 0x8918, new QString("SIOCSIFDSTADDR") );
+ qDebug( "adding 0x8919 = SIOCGIFBRDADDR" );
+ map->insert( 0x8919, new QString("SIOCGIFBRDADDR") );
+ qDebug( "adding 0x891a = SIOCSIFBRDADDR" );
+ map->insert( 0x891a, new QString("SIOCSIFBRDADDR") );
+ qDebug( "adding 0x891b = SIOCGIFNETMASK" );
+ map->insert( 0x891b, new QString("SIOCGIFNETMASK") );
+ qDebug( "adding 0x891c = SIOCSIFNETMASK" );
+ map->insert( 0x891c, new QString("SIOCSIFNETMASK") );
+ qDebug( "adding 0x891d = SIOCGIFMETRIC" );
+ map->insert( 0x891d, new QString("SIOCGIFMETRIC") );
+ qDebug( "adding 0x891e = SIOCSIFMETRIC" );
+ map->insert( 0x891e, new QString("SIOCSIFMETRIC") );
+ qDebug( "adding 0x891f = SIOCGIFMEM" );
+ map->insert( 0x891f, new QString("SIOCGIFMEM") );
+ qDebug( "adding 0x8920 = SIOCSIFMEM" );
+ map->insert( 0x8920, new QString("SIOCSIFMEM") );
+ qDebug( "adding 0x8921 = SIOCGIFMTU" );
+ map->insert( 0x8921, new QString("SIOCGIFMTU") );
+ qDebug( "adding 0x8922 = SIOCSIFMTU" );
+ map->insert( 0x8922, new QString("SIOCSIFMTU") );
+ qDebug( "adding 0x8923 = SIOCSIFNAME" );
+ map->insert( 0x8923, new QString("SIOCSIFNAME") );
+ qDebug( "adding 0x8924 = SIOCSIFHWADDR" );
+ map->insert( 0x8924, new QString("SIOCSIFHWADDR") );
+ qDebug( "adding 0x8925 = SIOCGIFENCAP" );
+ map->insert( 0x8925, new QString("SIOCGIFENCAP") );
+ qDebug( "adding 0x8926 = SIOCSIFENCAP" );
+ map->insert( 0x8926, new QString("SIOCSIFENCAP") );
+ qDebug( "adding 0x8927 = SIOCGIFHWADDR" );
+ map->insert( 0x8927, new QString("SIOCGIFHWADDR") );
+ qDebug( "adding 0x8929 = SIOCGIFSLAVE" );
+ map->insert( 0x8929, new QString("SIOCGIFSLAVE") );
+ qDebug( "adding 0x8930 = SIOCSIFSLAVE" );
+ map->insert( 0x8930, new QString("SIOCSIFSLAVE") );
+ qDebug( "adding 0x8931 = SIOCADDMULTI" );
+ map->insert( 0x8931, new QString("SIOCADDMULTI") );
+ qDebug( "adding 0x8932 = SIOCDELMULTI" );
+ map->insert( 0x8932, new QString("SIOCDELMULTI") );
+ qDebug( "adding 0x8933 = SIOCGIFINDEX" );
+ map->insert( 0x8933, new QString("SIOCGIFINDEX") );
+ qDebug( "adding 0x8934 = SIOCSIFPFLAGS" );
+ map->insert( 0x8934, new QString("SIOCSIFPFLAGS") );
+ qDebug( "adding 0x8935 = SIOCGIFPFLAGS" );
+ map->insert( 0x8935, new QString("SIOCGIFPFLAGS") );
+ qDebug( "adding 0x8936 = SIOCDIFADDR" );
+ map->insert( 0x8936, new QString("SIOCDIFADDR") );
+ qDebug( "adding 0x8937 = SIOCSIFHWBROADCAST" );
+ map->insert( 0x8937, new QString("SIOCSIFHWBROADCAST") );
+ qDebug( "adding 0x8938 = SIOCGIFCOUNT" );
+ map->insert( 0x8938, new QString("SIOCGIFCOUNT") );
+ qDebug( "adding 0x8940 = SIOCGIFBR" );
+ map->insert( 0x8940, new QString("SIOCGIFBR") );
+ qDebug( "adding 0x8941 = SIOCSIFBR" );
+ map->insert( 0x8941, new QString("SIOCSIFBR") );
+ qDebug( "adding 0x8942 = SIOCGIFTXQLEN" );
+ map->insert( 0x8942, new QString("SIOCGIFTXQLEN") );
+ qDebug( "adding 0x8943 = SIOCSIFTXQLEN" );
+ map->insert( 0x8943, new QString("SIOCSIFTXQLEN") );
+ qDebug( "adding 0x8944 = SIOCGIFDIVERT" );
+ map->insert( 0x8944, new QString("SIOCGIFDIVERT") );
+ qDebug( "adding 0x8945 = SIOCSIFDIVERT" );
+ map->insert( 0x8945, new QString("SIOCSIFDIVERT") );
+ qDebug( "adding 0x8946 = SIOCETHTOOL" );
+ map->insert( 0x8946, new QString("SIOCETHTOOL") );
+ qDebug( "adding 0x8947 = SIOCGMIIPHY" );
+ map->insert( 0x8947, new QString("SIOCGMIIPHY") );
+ qDebug( "adding 0x8948 = SIOCGMIIREG" );
+ map->insert( 0x8948, new QString("SIOCGMIIREG") );
+ qDebug( "adding 0x8949 = SIOCSMIIREG" );
+ map->insert( 0x8949, new QString("SIOCSMIIREG") );
+ qDebug( "adding 0x894A = SIOCWANDEV" );
+ map->insert( 0x894A, new QString("SIOCWANDEV") );
+ qDebug( "adding 0x8953 = SIOCDARP" );
+ map->insert( 0x8953, new QString("SIOCDARP") );
+ qDebug( "adding 0x8954 = SIOCGARP" );
+ map->insert( 0x8954, new QString("SIOCGARP") );
+ qDebug( "adding 0x8955 = SIOCSARP" );
+ map->insert( 0x8955, new QString("SIOCSARP") );
+ qDebug( "adding 0x8960 = SIOCDRARP" );
+ map->insert( 0x8960, new QString("SIOCDRARP") );
+ qDebug( "adding 0x8961 = SIOCGRARP" );
+ map->insert( 0x8961, new QString("SIOCGRARP") );
+ qDebug( "adding 0x8962 = SIOCSRARP" );
+ map->insert( 0x8962, new QString("SIOCSRARP") );
+ qDebug( "adding 0x8970 = SIOCGIFMAP" );
+ map->insert( 0x8970, new QString("SIOCGIFMAP") );
+ qDebug( "adding 0x8971 = SIOCSIFMAP" );
+ map->insert( 0x8971, new QString("SIOCSIFMAP") );
+ qDebug( "adding 0x8980 = SIOCADDDLCI" );
+ map->insert( 0x8980, new QString("SIOCADDDLCI") );
+ qDebug( "adding 0x8981 = SIOCDELDLCI" );
+ map->insert( 0x8981, new QString("SIOCDELDLCI") );
+ qDebug( "adding 0x8982 = SIOCGIFVLAN" );
+ map->insert( 0x8982, new QString("SIOCGIFVLAN") );
+ qDebug( "adding 0x8983 = SIOCSIFVLAN" );
+ map->insert( 0x8983, new QString("SIOCSIFVLAN") );
+ qDebug( "adding 0x8990 = SIOCBONDENSLAVE" );
+ map->insert( 0x8990, new QString("SIOCBONDENSLAVE") );
+ qDebug( "adding 0x8991 = SIOCBONDRELEASE" );
+ map->insert( 0x8991, new QString("SIOCBONDRELEASE") );
+ qDebug( "adding 0x8992 = SIOCBONDSETHWADDR" );
+ map->insert( 0x8992, new QString("SIOCBONDSETHWADDR") );
+ qDebug( "adding 0x8993 = SIOCBONDSLAVEINFOQUERY" );
+ map->insert( 0x8993, new QString("SIOCBONDSLAVEINFOQUERY") );
+ qDebug( "adding 0x8994 = SIOCBONDINFOQUERY" );
+ map->insert( 0x8994, new QString("SIOCBONDINFOQUERY") );
+ qDebug( "adding 0x8995 = SIOCBONDCHANGEACTIVE" );
+ map->insert( 0x8995, new QString("SIOCBONDCHANGEACTIVE") );
+ qDebug( "adding 0x89F0 = SIOCDEVPRIVATE" );
+ map->insert( 0x89F0, new QString("SIOCDEVPRIVATE") );
+ qDebug( "adding 0x89E0 = SIOCPROTOPRIVATE" );
+ map->insert( 0x89E0, new QString("SIOCPROTOPRIVATE") );
+
+ return map;
+};
+
diff --git a/libopie2/opienet/oioctlmap.h b/libopie2/opienet/oioctlmap.h
new file mode 100644
index 0000000..1cd89a3
--- a/dev/null
+++ b/libopie2/opienet/oioctlmap.h
@@ -0,0 +1,17 @@
+
+/*
+ * ioctl table - generated by regen.py - (C) Michael 'Mickey' Lauer <mickey@vanille.de>
+ */
+
+#ifndef IOCTLMAP_H
+#define IOCTLMAP_H
+
+#include <qstring.h>
+#include <qintdict.h>
+
+typedef QIntDict<QString> IntStringMap;
+
+IntStringMap* constructIoctlMap();
+
+#endif
+
diff --git a/libopie2/opienet/onetwork.cpp b/libopie2/opienet/onetwork.cpp
index be45924..918ba07 100644
--- a/libopie2/opienet/onetwork.cpp
+++ b/libopie2/opienet/onetwork.cpp
@@ -55,12 +55,17 @@
#include <linux/sockios.h>
#include <net/if_arp.h>
#include <stdarg.h>
using namespace std;
+#ifndef NODEBUG
+#include <opie2/oioctlmap.h>
+IntStringMap* _ioctlmap = constructIoctlMap();
+#endif
+
/*======================================================================================
* ONetwork
*======================================================================================*/
ONetwork* ONetwork::_instance = 0;
@@ -184,18 +189,22 @@ void ONetworkInterface::init()
}
}
bool ONetworkInterface::ioctl( int call, struct ifreq& ifreq ) const
{
+ #ifndef NODEBUG
int result = ::ioctl( _sfd, call, &ifreq );
if ( result == -1 )
- qDebug( "ONetworkInterface::ioctl (%s) call %d (0x%04X) - Status: Failed: %d (%s)", name(), call, call, result, strerror( errno ) );
+ qDebug( "ONetworkInterface::ioctl (%s) call %s (0x%04X) - Status: Failed: %d (%s)", name(), (const char*) *(*_ioctlmap)[call], call, result, strerror( errno ) );
else
- qDebug( "ONetworkInterface::ioctl (%s) call %d (0x%04X) - Status: Ok.", name(), call, call );
+ qDebug( "ONetworkInterface::ioctl (%s) call %s (0x%04X) - Status: Ok.", name(), (const char*) *(*_ioctlmap)[call], call );
return ( result != -1 );
+ #else
+ return ::ioctl( _sfd, call, &ifreq ) != -1;
+ #endif
}
bool ONetworkInterface::ioctl( int call ) const
{
strcpy( _ifr.ifr_name, name() );
@@ -880,18 +889,22 @@ int OWirelessNetworkInterface::scanNetwork()
}
}
bool OWirelessNetworkInterface::wioctl( int call, struct iwreq& iwreq ) const
{
+ #ifndef NODEBUG
int result = ::ioctl( _sfd, call, &iwreq );
if ( result == -1 )
- qDebug( "ONetworkInterface::wioctl (%s) call %d (0x%04X) - Status: Failed: %d (%s)", name(), call, call, result, strerror( errno ) );
+ qDebug( "ONetworkInterface::wioctl (%s) call %s (0x%04X) - Status: Failed: %d (%s)", name(), (const char*) *(*_ioctlmap)[call], call, result, strerror( errno ) );
else
- qDebug( "ONetworkInterface::wioctl (%s) call %d (0x%04X) - Status: Ok.", name(), call, call );
+ qDebug( "ONetworkInterface::wioctl (%s) call %s (0x%04X) - Status: Ok.", name(), (const char*) *(*_ioctlmap)[call], call );
return ( result != -1 );
+ #else
+ return ::ioctl( _sfd, call, &iwreq ) != -1;
+ #endif
}
bool OWirelessNetworkInterface::wioctl( int call ) const
{
strcpy( _iwr.ifr_name, name() );
diff --git a/libopie2/opienet/opienet.pro b/libopie2/opienet/opienet.pro
index 6fcc1ec..304d968 100644
--- a/libopie2/opienet/opienet.pro
+++ b/libopie2/opienet/opienet.pro
@@ -1,28 +1,29 @@
TEMPLATE = lib
CONFIG += qt warn_on debug
DESTDIR = $(OPIEDIR)/lib
HEADERS = 802_11_user.h \
dhcp.h \
+ udp_ports.h \
wireless.h \
- omanufacturerdb.cpp \
- onetutils.cpp \
+ oioctlmap.h \
+ omanufacturerdb.h \
+ onetutils.h \
onetwork.h \
opcap.h
-SOURCES = omanufacturerdb.cpp \
+SOURCES = oioctlmap.cpp \
+ omanufacturerdb.cpp \
onetutils.cpp \
onetwork.cpp \
opcap.cpp
INTERFACES =
TARGET = opienet2
VERSION = 1.8.1
INCLUDEPATH += $(OPIEDIR)/include
DEPENDPATH += $(OPIEDIR)/include
LIBS += -lpcap
-MOC_DIR = moc
-OBJECTS_DIR = obj
!contains( platform, x11 ) {
include ( $(OPIEDIR)/include.pro )
}