ebpf-for-windows/netebpfext
Alan Jowett 0b293ad804
Fix code analysis annotations for In and In_opt parameters by adding const where appropriate or changing to Inout where appropriate. (#1749)
* Fix code analysis annotations for _In_ and _In_opt_ parameters,
add const where appropriate or change to _Inout_ where appropriate.

The following regex expressions were used to find the problems:
Find _In_ or _In_opt_ that are not const and are not followed by _Post_invalid_ or _Frees_ptr_ or _Post_ptr_invalid_:
```_In_[ ]+(?!.*(const|_Post_invalid_|_Frees_ptr_|_Post_ptr_invalid_))```
```_In_opt_[ ]+(?!.*(const|_Post_invalid_|_Frees_ptr_|_Post_ptr_invalid_))```

Some of the _In_ and _In_opt_ parameters are not const due to required compatibility with the Windows API.
Pointers to functions are const by definition, so the const qualifier is not required.

Signed-off-by: Alan Jowett <alanjo@microsoft.com>

* PR feedback

Signed-off-by: Alan Jowett <alanjo@microsoft.com>

* Fix code analysis failure

Signed-off-by: Alan Jowett <alanjo@microsoft.com>

* PR feedback

Signed-off-by: Alan Jowett <alanjo@microsoft.com>

* PR feedback

Signed-off-by: Alan Jowett <alanjo@microsoft.com>

* PR feedback

Signed-off-by: Alan Jowett <alanjo@microsoft.com>

Signed-off-by: Alan Jowett <alanjo@microsoft.com>
2022-12-15 15:58:33 -08:00
..
sys Fix code analysis annotations for In and In_opt parameters by adding const where appropriate or changing to Inout where appropriate. (#1749) 2022-12-15 15:58:33 -08:00
user Visual Studio 2022 porting (#1521) 2022-12-08 20:06:57 -07:00
CMakeLists.txt Refactor netebpfext in preparation for fuzz testing (#1464) 2022-10-18 13:21:54 -06:00
guid.c Refactor netebpfext in preparation for fuzz testing (#1464) 2022-10-18 13:21:54 -06:00
net_ebpf_ext.c Fix code analysis annotations for In and In_opt parameters by adding const where appropriate or changing to Inout where appropriate. (#1749) 2022-12-15 15:58:33 -08:00
net_ebpf_ext.h Fix code analysis annotations for In and In_opt parameters by adding const where appropriate or changing to Inout where appropriate. (#1749) 2022-12-15 15:58:33 -08:00
net_ebpf_ext_bind.c Connect redirect implementation (#1651) 2022-11-29 20:49:42 +00:00
net_ebpf_ext_bind.h Support attaching XDP program per NIC. (#803) 2022-03-14 15:16:11 -07:00
net_ebpf_ext_hook_provider.c Fix code analysis annotations for In and In_opt parameters by adding const where appropriate or changing to Inout where appropriate. (#1749) 2022-12-15 15:58:33 -08:00
net_ebpf_ext_hook_provider.h Fix code analysis annotations for In and In_opt parameters by adding const where appropriate or changing to Inout where appropriate. (#1749) 2022-12-15 15:58:33 -08:00
net_ebpf_ext_prog_info_provider.c Fix code analysis annotations for In and In_opt parameters by adding const where appropriate or changing to Inout where appropriate. (#1749) 2022-12-15 15:58:33 -08:00
net_ebpf_ext_prog_info_provider.h Fix code analysis annotations for In and In_opt parameters by adding const where appropriate or changing to Inout where appropriate. (#1749) 2022-12-15 15:58:33 -08:00
net_ebpf_ext_program_info.h Registry changes for program and section data. (#1192) 2022-06-30 16:53:03 -07:00
net_ebpf_ext_sock_addr.c Fix code analysis annotations for In and In_opt parameters by adding const where appropriate or changing to Inout where appropriate. (#1749) 2022-12-15 15:58:33 -08:00
net_ebpf_ext_sock_addr.h Connect redirect implementation (#1651) 2022-11-29 20:49:42 +00:00
net_ebpf_ext_sock_ops.c Connect redirect implementation (#1651) 2022-11-29 20:49:42 +00:00
net_ebpf_ext_sock_ops.h WFP ALE Flow established callout, tests etc. (#978) 2022-04-20 16:48:20 -07:00
net_ebpf_ext_tracelog.c Add tracelog to netebpfext. (#1247) 2022-06-30 15:08:02 -07:00
net_ebpf_ext_tracelog.h Connect redirect implementation (#1651) 2022-11-29 20:49:42 +00:00
net_ebpf_ext_xdp.c Fix code analysis annotations for In and In_opt parameters by adding const where appropriate or changing to Inout where appropriate. (#1749) 2022-12-15 15:58:33 -08:00
net_ebpf_ext_xdp.h Sock addr hook callout test (#922) 2022-04-12 11:37:44 -07:00