Skip to content

Add WFP listen hook simulation for sock_addr listen testing#306

Open
mikeagun wants to merge 3 commits into
microsoft:mainfrom
mikeagun:sockops-listen-hook
Open

Add WFP listen hook simulation for sock_addr listen testing#306
mikeagun wants to merge 3 commits into
microsoft:mainfrom
mikeagun:sockops-listen-hook

Conversation

@mikeagun
Copy link
Copy Markdown

Add usersim_fwp_cgroup_inet4_listen and usersim_fwp_cgroup_inet6_listen to simulate WFP ALE_AUTH_LISTEN_V4/V6 layer classify calls. These enable unit testing of the
new cgroup/listen4 and cgroup/listen6 sock_addr attach types in ebpf-for-windows.

The functions populate FWPS_FIELD_ALE_AUTH_LISTEN_V4/V6 incoming values (local address, port, compartment ID, interface LUID, app ID) and invoke the registered WFP callout via test_callout.

Michael Agun and others added 3 commits May 13, 2026 12:51
Rename usersim listen hook test functions from sock_ops naming to
cgroup_inet naming to match the sock_addr-based listen hook design:
- usersim_fwp_sock_ops_listen_v4 -> usersim_fwp_cgroup_inet4_listen
- usersim_fwp_sock_ops_listen_v6 -> usersim_fwp_cgroup_inet6_listen
- test_sock_ops_listen_v4 -> test_cgroup_inet4_listen
- test_sock_ops_listen_v6 -> test_cgroup_inet6_listen

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant