mirror of
https://github.com/tnodir/fort
synced 2024-11-15 06:55:54 +00:00
Driver: fortprov: Simplify fort_prov_register_callouts(), Part 2
This commit is contained in:
parent
a6138d269e
commit
00d93c8bb7
@ -171,7 +171,7 @@ FORT_API BOOL fort_prov_is_boot(void)
|
||||
return is_boot;
|
||||
}
|
||||
|
||||
static DWORD fort_prov_register_callouts(HANDLE engine)
|
||||
static DWORD fort_prov_register_ale_callouts(HANDLE engine)
|
||||
{
|
||||
const FWPM_CALLOUT0 callouts[] = {
|
||||
/* ocallout4 */
|
||||
@ -206,6 +206,15 @@ static DWORD fort_prov_register_callouts(HANDLE engine)
|
||||
.providerKey = (GUID *) &FORT_GUID_PROVIDER,
|
||||
.applicableLayer = FWPM_LAYER_ALE_AUTH_RECV_ACCEPT_V6,
|
||||
},
|
||||
};
|
||||
|
||||
return fort_prov_add_callouts(
|
||||
engine, callouts, /*count=*/sizeof(callouts) / sizeof(callouts[0]));
|
||||
}
|
||||
|
||||
static DWORD fort_prov_register_stream_callouts(HANDLE engine)
|
||||
{
|
||||
const FWPM_CALLOUT0 callouts[] = {
|
||||
/* scallout4 */
|
||||
{
|
||||
.calloutKey = FORT_GUID_CALLOUT_STREAM_V4,
|
||||
@ -244,7 +253,7 @@ static DWORD fort_prov_register_callouts(HANDLE engine)
|
||||
engine, callouts, /*count=*/sizeof(callouts) / sizeof(callouts[0]));
|
||||
}
|
||||
|
||||
static DWORD fort_prov_register_packet_callouts(HANDLE engine)
|
||||
static DWORD fort_prov_register_transport_callouts(HANDLE engine)
|
||||
{
|
||||
const FWPM_CALLOUT0 callouts[] = {
|
||||
/* itcallout4 */
|
||||
@ -359,8 +368,9 @@ static DWORD fort_prov_register_provider(HANDLE engine, BOOL is_boot)
|
||||
DWORD status;
|
||||
if ((status = FwpmProviderAdd0(engine, &provider, NULL))
|
||||
|| (status = FwpmSubLayerAdd0(engine, &sublayer, NULL))
|
||||
|| (status = fort_prov_register_callouts(engine))
|
||||
|| (status = fort_prov_register_packet_callouts(engine))
|
||||
|| (status = fort_prov_register_ale_callouts(engine))
|
||||
|| (status = fort_prov_register_stream_callouts(engine))
|
||||
|| (status = fort_prov_register_transport_callouts(engine))
|
||||
|| (status = fort_prov_register_filters(engine, is_boot))) {
|
||||
return status;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user