Robin

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.

Steve

On Jan 31, 2008 8:20 AM, Pavel Roskin <proski@gnu.org> wrote:

On Wed, 2008-01-30 at 22:09 +0000, Robin Wood wrote:
> On 30/01/2008, Pavel Roskin <proski@gnu.org> wrote:
> > On Wed, 2008-01-30 at 19:36 +0000, Robin Wood wrote:
> >
> >  > 533 #define IEEE80211_IOCTL_KICKMAC     (SIOCIWFIRSTPRIV+30)
> >
> > > 534 #define IEEE80211_IOCTL_ADDKARMASSID    (SIOCIWFIRSTPRIV+32)
> >
> >  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.
ieee80211_ioctl_giwencodeext():

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

--
Regards,
Pavel Roskin

-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
Madwifi-users mailing list
Madwifi-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/madwifi-users



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