• 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: userspace / kernel communication with control socket
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: userspace / kernel communication with control socket


  • Subject: Re: userspace / kernel communication with control socket
  • From: Jean Suisse <email@hidden>
  • Date: Tue, 28 Aug 2012 22:55:31 +0200

Thank you for your reply.
well, no. My call looks like this:

errno_t error = ctl_enqueuedata(clientRef, client.sc_unit, dataStructure, dataSize, CTL_DATA_NOWAKEUP);

If I am not mistaken, CTL_DATA_NOWAKEUP is the only available flag (as stated by the documentation).
Now you mention it, that's a second difference between TCPLogNKE and my code…. They use the value 0 in the example.


Below is an extract from doc, stating CTL_DATA_NOWAKEUP is currently the only supported flag.
But I already feel it. You must be so right. If this works (I will test it right away) it will be the second really annoying documentation error in two days (but don't get me wrong, I really am grateful for the documentation).

Thanks a million for your help.


/*!
@function ctl_enqueuedata
@discussion Send data from the kernel control to the client.
@param kctlref The control reference of the kernel control.
@param unit The unit number of the kernel control instance.
@param data A pointer to the data to send.
@param len The length of data to send.
@param flags Send flags. CTL_DATA_NOWAKEUP is currently the only
supported flag.
@result 0 - Data was enqueued to be read by the client.
EINVAL - Invalid parameters.
EMSGSIZE - The buffer is too large.
ENOBUFS - The queue is full or there are no free mbufs.
 */
errno_t 
ctl_enqueuedata(kern_ctl_ref kctlref, u_int32_t unit, void *data, size_t len, u_int32_t flags);




When you call ctl_enqueuedata, are you passing CTL_DATA_EOR in to the flags?

For an example, see bsd/net/ntstat.c in the xnu project.

-josh



 _______________________________________________
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

References: 
 >userspace / kernel communication with control socket (From: Jean Suisse <email@hidden>)
 >Re: userspace / kernel communication with control socket (From: Josh Graessley <email@hidden>)

  • Prev by Date: Re: userspace / kernel communication with control socket
  • Next by Date: Re: userspace / kernel communication with control socket
  • Previous by thread: Re: userspace / kernel communication with control socket
  • Next by thread: Re: userspace / kernel communication with control socket
  • Index(es):
    • Date
    • Thread