IcmpV6Statistics.DestinationUnreachableMessagesReceived 属性
定义
重要
一些信息与预发行产品相关,相应产品在发行之前可能会进行重大修改。 对于此处提供的信息,Microsoft 不作任何明示或暗示的担保。
获取由于无法到达数据包的目标地址而接收的 Internet 控制消息协议版本 6 (ICMPv6) 消息数。
public:
abstract property long DestinationUnreachableMessagesReceived { long get(); };
public abstract long DestinationUnreachableMessagesReceived { get; }
member this.DestinationUnreachableMessagesReceived : int64
Public MustOverride ReadOnly Property DestinationUnreachableMessagesReceived As Long
属性值
Int64 值,指定接收的“无法到达目标”消息的总数。
示例
以下示例显示此属性的值。
void ShowIcmpV6UnreachableData()
{
IPGlobalProperties ^ properties = IPGlobalProperties::GetIPGlobalProperties();
IcmpV6Statistics ^ statistics = properties->GetIcmpV6Statistics();
Console::WriteLine( " Destination Unreachables ............ Sent: {0,-10} Received: {1,-10}",
statistics->DestinationUnreachableMessagesSent,
statistics->DestinationUnreachableMessagesReceived );
}
public static void ShowIcmpV6UnreachableData ()
{
IPGlobalProperties properties = IPGlobalProperties.GetIPGlobalProperties();
IcmpV6Statistics statistics = properties.GetIcmpV6Statistics();
Console.WriteLine (" Destination Unreachables ............ Sent: {0,-10} Received: {1,-10}",
statistics.DestinationUnreachableMessagesSent, statistics.DestinationUnreachableMessagesReceived);
}
Public Shared Sub ShowIcmpV6UnreachableData()
Dim properties As IPGlobalProperties = IPGlobalProperties.GetIPGlobalProperties()
Dim statistics As IcmpV6Statistics = properties.GetIcmpV6Statistics()
Console.WriteLine(" Destination Unreachables ............ Sent: {0,-10} Received: {1,-10}", statistics.DestinationUnreachableMessagesSent, statistics.DestinationUnreachableMessagesReceived)
End Sub
注解
出于以下任一原因,可以将“目标无法访问”消息发送到作为数据包源的计算机:
计算机找不到指向目标地址的路由。
管理上禁止与目标地址通信。 例如,防火墙会阻止将数据包传送到目标。
无法访问目标地址。
无法访问目标端口。 例如,没有可用于数据包协议的侦听器。