Re: Hello, need some help about socket filter (NKE) development
site_archiver@lists.apple.com Delivered-To: darwin-kernel@lists.apple.com User-agent: Mutt/1.10.1 (2018-07-13) On Fri, Sep 14, 2018 at 02:40:43PM +0800, Haohao Lee wrote:
typedef errno_t (*sf_connect_out_func)(void *cookie, socket_t so, const struct sockaddr *to); Only remote address is provided.
How can I get the local address in sf_connect_out_func or is there another way to achieve this?
I've not checked the darwin source for this, but generally connect seems to do an internal bind first if not already called by the user. So maybe there will be an initial form of bind callback from where you can stash the source address? DF _______________________________________________ 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: https://lists.apple.com/mailman/options/darwin-kernel/site_archiver%40lists.... This email sent to site_archiver@lists.apple.com
participants (1)
-
Derek Fawcus