Does NetworkInterface.GetIPv4Statistics() return data in macOS?

Ryan Woodings 1 Reputation point
2021-04-15T15:30:30.04+00:00

We have an application that we are porting from WPF (.Net Framework 4.8) to Xamarin.Mac and are struggling to get information from NetworkInterface.GetIPv4Statistics(), the IPv4InterfaceStatistics that is returned is all 0s.

The documentation for this function doesn't mention any special macOS permissions that might be required; does anyone know how to get valid data from NetworkInterface.GetIPv4Statistics()? Thanks!!!

Xamarin
Xamarin
A Microsoft open-source app platform for building Android and iOS apps with .NET and C#.
5,293 questions
0 comments No comments
{count} votes