site_archiver@lists.apple.com Delivered-To: darwin-kernel@lists.apple.com On 19 Sep 2018, at 21:31, Prokash Sinha <prokash@garlic.com> 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 _______________________________________________ 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