本文整理汇总了C#中System.Net.NetworkInformation.IPGlobalProperties.GetIcmpV4Statistics方法的典型用法代码示例。如果您正苦于以下问题:C# IPGlobalProperties.GetIcmpV4Statistics方法的具体用法?C# IPGlobalProperties.GetIcmpV4Statistics怎么用?C# IPGlobalProperties.GetIcmpV4Statistics使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类System.Net.NetworkInformation.IPGlobalProperties
的用法示例。
在下文中一共展示了IPGlobalProperties.GetIcmpV4Statistics方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: ShowIcmpV4Statistics
public static void ShowIcmpV4Statistics()
{
IPGlobalProperties properties = IPGlobalProperties.GetIPGlobalProperties();
IcmpV4Statistics stat = properties.GetIcmpV4Statistics();
Console.WriteLine("ICMP V4 Statistics:");
Console.WriteLine(" Messages ............................ Sent: {0,-10} Received: {1,-10}",
stat.MessagesSent, stat.MessagesReceived);
Console.WriteLine(" Errors .............................. Sent: {0,-10} Received: {1,-10}",
stat.ErrorsSent, stat.ErrorsReceived);
Console.WriteLine(" Echo Requests ....................... Sent: {0,-10} Received: {1,-10}",
stat.EchoRequestsSent, stat.EchoRequestsReceived);
Console.WriteLine(" Echo Replies ........................ Sent: {0,-10} Received: {1,-10}",
stat.EchoRepliesSent, stat.EchoRepliesReceived);
Console.WriteLine(" Destination Unreachables ............ Sent: {0,-10} Received: {1,-10}",
stat.DestinationUnreachableMessagesSent, stat.DestinationUnreachableMessagesReceived);
Console.WriteLine(" Source Quenches ..................... Sent: {0,-10} Received: {1,-10}",
stat.SourceQuenchesSent, stat.SourceQuenchesReceived);
Console.WriteLine(" Redirects ........................... Sent: {0,-10} Received: {1,-10}",
stat.RedirectsSent, stat.RedirectsReceived);
Console.WriteLine(" TimeExceeded ........................ Sent: {0,-10} Received: {1,-10}",
stat.TimeExceededMessagesSent, stat.TimeExceededMessagesReceived);
Console.WriteLine(" Parameter Problems .................. Sent: {0,-10} Received: {1,-10}",
stat.ParameterProblemsSent, stat.ParameterProblemsReceived);
Console.WriteLine(" Timestamp Requests .................. Sent: {0,-10} Received: {1,-10}",
stat.TimestampRequestsSent, stat.TimestampRequestsReceived);
Console.WriteLine(" Timestamp Replies ................... Sent: {0,-10} Received: {1,-10}",
stat.TimestampRepliesSent, stat.TimestampRepliesReceived);
Console.WriteLine(" Address Mask Requests ............... Sent: {0,-10} Received: {1,-10}",
stat.AddressMaskRequestsSent, stat.AddressMaskRequestsReceived);
Console.WriteLine(" Address Mask Replies ................ Sent: {0,-10} Received: {1,-10}",
stat.AddressMaskRepliesSent, stat.AddressMaskRepliesReceived);
Console.WriteLine("");
}
开发者ID:.NET开发者,项目名称:System.Net.NetworkInformation,代码行数:42,代码来源:IPGlobalProperties.GetIcmpV4Statistics