microsoft / microsoft/ebpf-for-windows

Expose TCP statistics helpers (bpf_tcp_sock() helper)

Open
#335 8 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

enhancement triaged
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

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.