Rather than remove or re-use an existing ioctl you could always add your functionality as a private ioctl. That means its invocable by name (a string) and not some magic number and you can call it from the shell using iwpriv.


On Jan 31, 2008 8:20 AM, Pavel Roskin <> wrote:

On Wed, 2008-01-30 at 22:09 +0000, Robin Wood wrote:
> On 30/01/2008, Pavel Roskin <> wrote:
> > On Wed, 2008-01-30 at 19:36 +0000, Robin Wood wrote:
> >
> >  > 533 #define IEEE80211_IOCTL_KICKMAC     (SIOCIWFIRSTPRIV+30)
> >
> >
> >  You cannot do it.  It would exceed SIOCIWLASTPRIV (see
> >  include/linux/wireless.h in Linux sources).  SIOCIWFIRSTPRIV+31 is the
> >  upper limit.
> Thanks, I thought that may be the case but it is nice to know before I
> bang my head against it too much. I'll just have to remove an existing
> one for what I want, I'll find one that seems the least likely to be
> used.

There are some free odd numbers.  You just need to ensure that ordinary
users cannot do anything bad (like break connection or steal the keys),
since the odd numbers are available to the users by default.  See e.g.

     if (!capable(CAP_NET_ADMIN))
          return -EPERM;

Pavel Roskin

This email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
Madwifi-users mailing list

The day Microsoft sells something that doesn't suck is the day they start selling vacuum cleaners.