Calculating bytes going out via wifi network interface in windows

Hello guys, In one of my task, I need to count outgoing bytes via windows wifi adapter. I think we can do it with NDIS filter drivers. I had started looking into it. But just wanted to confirm if I am on the right path. Or is there any other simple methods through which we can count number of outgoing bytes.

I am really thankful for help.

The OS already provides a basic byte counting feature. You can query the OS’s byte counters for any interface using the GetIfTable2Ex API, and adding up OutUcastPkts + OutNUcastPkts.

Is there a reason that you need to develop your own statistical counters? Perhaps you’re trying to calculate statistics for only specific packets, or perhaps you’re trying to validate the NIC’s statistical counters?