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