Re: Darwin-kernel Digest, Vol 15, Issue 30
Re: Darwin-kernel Digest, Vol 15, Issue 30
- Subject: Re: Darwin-kernel Digest, Vol 15, Issue 30
- From: Prokash Sinha <email@hidden>
- Date: Thu, 20 Sep 2018 13:24:33 -0700
Thanks so much, Eskimo! !
Yeah, that was the thinking - Why would there be just one filter ….
Now I need to dig to see why it is not loading the 2nd one. I’m testing on
Mojave, but it should be fine.
Also I subscribed to the MacNetworkProg group so I will post there anything
related to Networking.
-Pro
> On 19 Sep 2018, at 21:31, Prokash Sinha <email@hidden> wrote:
>
>> So there are two returns to indicate, if the kernel continue thru the chain
>> or not.
>
> It’s based on the function result:
>
> * 0 sends the request down the chain
>
> * `EJUSTRETURN` prevents the request going down the chain but doesn’t signal
> an error to the caller
>
> * any other error prevents the request going down the chain and signals that
> error to the caller
>
> You can see this in action in Darwin. For example, consider your
> `sf_data_out` function. It’s called by `sflt_data_out`, which iterates
> through the filters call the `sf_data_out` on each filter. That returns if
> it gets any error. The caller, `sosend`, specifically looks for
> `EJUSTRETURN` and… well… just returns
>
> <https://opensource.apple.com/source/xnu/xnu-4570.1.46/bsd/kern/kpi_socketfilter.c>
>
> <https://opensource.apple.com/source/xnu/xnu-4570.1.46/bsd/kern/uipc_socket.c>
>
> ps You might want to post your socket filter questions to the MacNetworkProg
> mailing list. While I’m happy to answer them here, that list has other
> members with direct experience with this stuff.
>
> <https://lists.apple.com/mailman/listinfo/macnetworkprog>
>
> Share and Enjoy
> --
> Quinn "The Eskimo!" <http://www.apple.com/developer/>
> Apple Developer Relations, Developer Technical Support, Core OS/Hardware
>
>
> On 20 Sep 2018, at 17:37, Prokash Sinha <email@hidden> wrote:
>
>> As it turned out, it seems like not possible to have more than one socket
>> filter for same protocol …
>
> That’s definitely not correct. I’m not sure why your second socket filter is
> failing to register, but multiple socket filters are supported.
>
> 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