NKE: Reinjecting data into a socket when it shuts down
NKE: Reinjecting data into a socket when it shuts down
- Subject: NKE: Reinjecting data into a socket when it shuts down
- From: Bogdan Harjoc <email@hidden>
- Date: Thu, 6 May 2010 16:30:45 +0300
Hello,
My kext filters TCP streams by swallowing their data and sending it to a
userspace application, and injects it back as it comes back from that
application.
Now, when a shutdown happens, data may be in processing (in usermode)
and in order to make sure that user processes see it, it has to be injected
before the user process is woken up to see the shutdown.
My question is, how could the shutdown event be delayed until a response
arrives from the usermode filter. The sflt_filter->sf_notify_fn callback apparently
can not msleep() and I haven't found another way to intercept the shutdown.
The sf_detach_fn callback allows msleep(), but by then it's too late because
the user process has gotten the 0 result from recv().
Cheers,
Bogdan
_______________________________________________
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