MIB_IPFORWARDROW 指标与 ROUTE 指标

发布于 2024-09-26 08:15:50 字数 372 浏览 0 评论 0原文

在 Windows 命令行中,“ROUTE PRINT”命令会生成一个条目表格列表,其中有一列标记为“Metric”。

在 Windows Platform SDK 中,您可以通过 API 通过结构 MIB_IPFORWARDROW。我可以将 MIB_IPFORWARDROW 中的大部分字段与 ROUTE PRINT 中的字段相关联,但是当涉及指标时,MIB_IPFORWARDROW 有 5 个(五个!)指标字段。其中哪一项是 ROUTE PRINT 的指标?

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?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

无语# 2024-10-03 08:15:50

哎呀...我错过了文档 上面写着:

多名成员
MIB_IPFORWARDROW 结构不是
目前由 IPv4 路由使用。这些
成员包括 dwForwardPolicy、
dwForwardNextHopAS, dwForwardMetric2,
dwForwardMetric3, dwForwardMetric4,
和 dwForwardMetric5。

所以,回答我自己:在 IPv4 中,ROUTE PRINT 的度量是 MIB_IPFORWARDROW 中的 dwForwardMetric1。

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.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文