开发者

MIB_IPFORWARDROW metric(s) vs. ROUTE's

开发者 https://www.devze.com 2023-01-19 18:46 出处:网络
开发者_运维知识库In the Windows command line, the \'ROUTE PRINT\' command yields a tabular list of entries, with a single column labeled \'Metric\'.

开发者_运维知识库In the Windows command line, the 'ROUTE PRINT' command yields a tabular list of entries, with a single column labeled 'Metric'.

In the Windows Platform SDK, you can fetch the same values (more or less) via the API, through the structure MIB_IPFORWARDROW. I can correlate most of the fields in MIB_IPFORWARDROW to the one's in ROUTE PRINT's but when it comes to Metrics, MIB_IPFORWARDROW has 5 (five!) metric fields. Which one of them is ROUTE PRINT's Metric?


Oops... I missed that part in the documentation that says:

A number of members of the MIB_IPFORWARDROW structure are not currently used by IPv4 routing. These members include dwForwardPolicy, dwForwardNextHopAS, dwForwardMetric2, dwForwardMetric3, dwForwardMetric4, and dwForwardMetric5.

So, answering myself: In IPv4, ROUTE PRINT's Metric is dwForwardMetric1 in MIB_IPFORWARDROW.

0

精彩评论

暂无评论...
验证码 换一张
取 消