site_archiver@lists.apple.com Delivered-To: darwin-kernel@lists.apple.com Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:received:in-reply-to :references:date:message-id:subject:from:to:cc:content-type :content-transfer-encoding; bh=R3FTGXP/7RirvmIo1R0az0+l+1YmC5d6ch/ldZS9pgE=; b=NM4AKWTPZ9B3JweMPj9rToTIU3pfzCK7c+dOqieAJ1KcQz3LcwYQSGbA/YKz1bDejw 37t6I5iHCiz55RPahpm73ZUsmJ+hzRCmAL6MlqbvbmJjqJAc+qOkFg1egxioD6tGoMHM rBafGlAYjzLB2Y5hf7ck5zVrAddSM+j7S0tvc= Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type:content-transfer-encoding; b=bx4DHSVs+oJLa+vHNbHSgsYJSNzBo7gNd1pZs1+03/lnD9oEiJFvzQS1FmzKeUHVO7 3SO3KdgD/wkv2oU0NgZmXrCz7BxGByIvGJjIQdVypR6x4fEyg4UkQX8UNRNQqWEqDS0H dBfzyWVt0iLS1Xx2qnjBUqIlS48ALsLyt9VbI= Not an authoritative answer, but: Anything else except zero and EJUSTRETURN that you return in sf_data_in_func gets interpreted as "drop the data" from what I understand. Userspace won't receive the error. If the KPI allowed this, you could manipulate the sb_hiwat field in the "struct socket" when your NKE is busy, which would make the window shrink to zero, which is possibly what you want. But there is no such KPI (yet). See [1] for a clean way to do this. But you need a userspace daemon and additional loopback connections will show up in netstat. Hope this helps, Bogdan [1] http://lists.apple.com/archives/darwin-kernel/2007/Mar/msg00081.html On Mon, Jul 5, 2010 at 9:30 PM, Ryan Weedon <ryan.weedon@mobidia.com> wrote:
I have an NKE that uses a socket filter to intercept TCP data sent by applications.
I am trying to figure out how to deal with the case where an application sets a socket to be non-blocking, and then sends data faster than the NKE can handle it. The filter can just return EAGAIN/EWOULDBLOCK at this point, but I don’t know how to signal at some point later the socket is again available for writing. Is this possible?
Regards,
Ryan Weedon
_______________________________________________ Do not post admin requests to the list. They will be ignored. Darwin-kernel mailing list (Darwin-kernel@lists.apple.com) Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/darwin-kernel/harjoc%40gmail.com
This email sent to harjoc@gmail.com
_______________________________________________ Do not post admin requests to the list. They will be ignored. Darwin-kernel mailing list (Darwin-kernel@lists.apple.com) Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/darwin-kernel/site_archiver%40lists.a... This email sent to site_archiver@lists.apple.com