Re: Hello, need some help about socket filter (NKE) development
Re: Hello, need some help about socket filter (NKE) development
- Subject: Re: Hello, need some help about socket filter (NKE) development
- From: "Quinn \"The Eskimo!\"" <email@hidden>
- Date: Mon, 17 Sep 2018 11:06:02 +0100
On 15 Sep 2018, at 08:53, Haohao Lee <email@hidden> wrote:
> If I call `sock_getsockname` in `sf_connect_out_func`, an empty address will
> be returned.
Yeah, I suspect that might be the case. One option is to defer your call to
`sock_getsockname` until you get the first data in or out. I’d expect it to be
set up by that. However, that introduces its own problems, in that you can no
longer block a connection. Rather, the program will see the connection go
through and then, if you decide to block it, immediately disconnect.
Share and Enjoy
--
Quinn "The Eskimo!" <http://www.apple.com/developer/>
Apple Developer Relations, Developer Technical Support, Core OS/Hardware
_______________________________________________
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