• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Passing up per-socket data from NKE
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Passing up per-socket data from NKE


  • Subject: Re: Passing up per-socket data from NKE
  • From: Bogdan Harjoc <email@hidden>
  • Date: Mon, 6 Sep 2010 12:33:11 +0300

SIOCGIFKPI sounds like an interface ioctl, which the socket level
filter may not be receiving. And looking at where the ioctl call ends
up (the IOCGROUP for SIOCGIFKPI is 'i' for 'interface'):

ioctl
  soioctl
    /* Call the socket filter's ioctl handler for most ioctls */
    if (IOCGROUP(cmd) != 'i' && IOCGROUP(cmd) != 'r') { ... }
    ...
    ifioctllocked
      ifioctl
        ifp = ifunit(ifr->ifr_name);
        if (ifp == 0) return ENXIO;
        ...
        if (cmd == SIOCSIFKPI) {... }
        ...
        ifnet_ioctl(...)

it looks like that SIOCSIFKPI is strictly handled by interface code
(and filters).

You can just use getsockopt instead, for a SOL_SOCKET option. I can
provide some example code but it should be straightforward.

Off topic perhaps, but if you've solved the issue of making sure a
socket doesn't get detached while you're calling sock_xyz() from your
kext (outside a sflt callback), I'd be interested in finding out how.

HTH,
Bogdan

On Sat, Sep 4, 2010 at 2:07 PM, Matt Slot <email@hidden> wrote:
>        ioctl(tcpSocket, SIOCGIFKPI, &myreq);
>
> The last call is failing with ENXIO, and I never see the ioctl() come through.
>
 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Darwin-kernel mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

  • Follow-Ups:
    • Re: Passing up per-socket data from NKE
      • From: Joe Lowe <email@hidden>
References: 
 >Passing up per-socket data from NKE (From: Matt Slot <email@hidden>)

  • Prev by Date: Passing up per-socket data from NKE
  • Next by Date: Re: Passing up per-socket data from NKE
  • Previous by thread: Passing up per-socket data from NKE
  • Next by thread: Re: Passing up per-socket data from NKE
  • Index(es):
    • Date
    • Thread