forked from microsoft/ebpf-for-windows
-
Notifications
You must be signed in to change notification settings - Fork 0
/
net_ebpf_ext_sock_ops.h
73 lines (64 loc) · 1.53 KB
/
net_ebpf_ext_sock_ops.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
// Copyright (c) eBPF for Windows contributors
// SPDX-License-Identifier: MIT
#pragma once
#include "net_ebpf_ext.h"
// Callout GUIDs
// f53b4577-bc47-11ec-9a30-18602489beee
DEFINE_GUID(
EBPF_HOOK_ALE_FLOW_ESTABLISHED_V4_CALLOUT,
0xf53b4577,
0xbc47,
0x11ec,
0x9a,
0x30,
0x18,
0x60,
0x24,
0x89,
0xbe,
0xee);
// f53b4578-bc47-11ec-9a30-18602489beee
DEFINE_GUID(
EBPF_HOOK_ALE_FLOW_ESTABLISHED_V6_CALLOUT,
0xf53b4578,
0xbc47,
0x11ec,
0x9a,
0x30,
0x18,
0x60,
0x24,
0x89,
0xbe,
0xee);
/**
* @brief WFP classifyFn callback for EBPF_HOOK_ALE_FLOW_ESTABLISHED_V4/6_CALLOUT.
*/
void
net_ebpf_extension_sock_ops_flow_established_classify(
_In_ const FWPS_INCOMING_VALUES* incoming_fixed_values,
_In_ const FWPS_INCOMING_METADATA_VALUES* incoming_metadata_values,
_Inout_opt_ void* layer_data,
_In_opt_ const void* classify_context,
_In_ const FWPS_FILTER* filter,
uint64_t flow_context,
_Inout_ FWPS_CLASSIFY_OUT* classify_output);
/**
* @brief WFP flowDeleteFn callback for EBPF_HOOK_ALE_FLOW_ESTABLISHED_V4/6_CALLOUT.
*/
void
net_ebpf_extension_sock_ops_flow_delete(uint16_t layer_id, uint32_t callout_id, uint64_t flow_context);
/**
* @brief Unregister SOCK_OPS NPI providers.
*
*/
void
net_ebpf_ext_sock_ops_unregister_providers();
/**
* @brief Register SOCK_OPS NPI providers.
*
* @retval STATUS_SUCCESS Operation succeeded.
* @retval STATUS_UNSUCCESSFUL Operation failed.
*/
NTSTATUS
net_ebpf_ext_sock_ops_register_providers();