POCO_NO_NET_IFTYPES有什么用?

What is POCO_NO_NET_IFTYPES used for?

我想了解这个变量的用途。它似乎需要用于 iOS 构建,因为您无法访问 iOS 设备上的 MAC 地址?

如果未定义,NetworkInterface.cpp 中的第 1349 行将在编译时失败并返回 "file not found": #include

我的评估正确吗?

您的评价是正确的。如果一个平台上没有net/if_types.h header,说明有些类型没有定义。结果是这些类型将 not be detected during the discovery of the interface type and interface will be reported to be of NI_TYPE_OTHER type.

出于某种原因,尽管 Apple provides the header, it is not available 在 iPhone 台设备上。

如果您需要确切地知道接口的类型是什么,这个缺点会影响到您;你应该能够discover从接口名称。