microsoft / microsoft/ebpf-for-windows
Expose TCP statistics helpers (bpf_tcp_sock() helper)
Nobody has claimed this yet.
- Dominant language
- C
- Stars
- 3.6k
- Forks
- 311
- Avg merge
- 6d 10h
- Merged PRs (30d)
- 21
Description
[RFC 4898](https://datatracker.ietf.org/doc/html/rfc4898) defines TCP Extended Statistics, which Windows has supported since Vista as exposed in via [GetPerTcpConnectionEStats()](https://docs.microsoft.com/en-us/windows/win32/api/iphlpapi/nf-iphlpapi-getpertcpconnectionestats) and [GetPerTcp6ConnectionEStats()](https://docs.microsoft.com/en-us/windows/win32/api/iphlpapi/nf-iphlpapi-getpertcp6connectionestats).
Some iphlpapi functionality is exposed in kernel mode netioapi.h as discussed at https://docs.microsoft.com/en-us/windows-hardware/drivers/network/ip-helper but currently this is not exposed.
Windows also supports a socket ioctl [SIO_TCP_INFO](https://docs.microsoft.com/en-us/windows/win32/winsock/sio-tcp-info) with basic TCP stats but they are only available to a process with the socket handle.
Does Linux support TCP EStats or TCP basic stats?
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by comparing the kernel-mode netioapi.h surface with the bpf_tcp_sock() helper, GetPerTcpConnectionEStats(), GetPerTcp6ConnectionEStats(), and SIO_TCP_INFO mentioned in the issue. Determine whether Linux provides equivalent TCP extended or basic statistics and define the scope of exposing them; done means the supported API surface and implementation requirements are agreed.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- c, linux
- Domain
- networking, operating-systems
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 20/100