I think you are looking for the
System.Net.NetworkInformation.NetworkInterface
You can get all the adapters on your system by using
NetworkInterface.GetAllNetworkInterfaces()
. From every adapter you can request the Speed.
If you need to know it from a specific IP Address you can use something like:
foreach (NetworkInterface networkInterface in NetworkInterface.GetAllNetworkInterfaces())
{
if (networkInterface.OperationalStatus == OperationalStatus.Up)
{
foreach (UnicastIPAddressInformation unicastIPAddressInformation in
networkInterface.GetIPProperties().UnicastAddresses)
{
if ((null != unicastIPAddressInformation.IPv4Mask) &&
(unicastIPAddressInformation.Address.AddressFamily ==
AddressFamily.InterNetwork))
{
IPAddress theAddress = unicastIPAddressInformation.Address;
IPAddress theMask = unicastIPAddressInformation.IPv4Mask;
}
}
}
}