LocalIP (Windows): fix link speed calcuation

This commit is contained in:
李通洲
2025-07-24 20:10:54 +08:00
parent e7a6b84107
commit f0fc38bcb5
2 changed files with 2 additions and 2 deletions
+1 -1
View File
@@ -10,7 +10,7 @@ typedef struct FFLocalIpResult
FFstrbuf mac;
FFstrbuf flags;
int32_t mtu;
int32_t speed;
int32_t speed; // in Mbps
bool defaultRoute;
} FFLocalIpResult;
+1 -1
View File
@@ -173,7 +173,7 @@ const char* ffDetectLocalIps(const FFLocalIpOptions* options, FFlist* results)
{
FFLocalIpResult* result = FF_LIST_GET(FFLocalIpResult, *results, results->length - 1);
if (options->showType & FF_LOCALIP_TYPE_SPEED_BIT)
result->speed = (int32_t) (adapter->ReceiveLinkSpeed / 1000);
result->speed = (int32_t) (adapter->ReceiveLinkSpeed / 1000000);
if (options->showType & FF_LOCALIP_TYPE_MTU_BIT)
result->mtu = (int32_t) adapter->Mtu;
if (options->showType & FF_LOCALIP_TYPE_FLAGS_BIT)