System.Net.NetworkInformation Namespace

System.Net.NetworkInformation 命名空间提供对网络流量数据、网络地址信息和本地计算机的地址更改通知的访问。 The System.Net.NetworkInformation namespace provides access to network traffic data, network address information, and notification of address changes for the local computer. 该命名空间还包含实现 Ping 实用工具的类。 The namespace also contains classes that implement the Ping utility. 可以使用 Ping 和相关的类检查是否可通过网络连接到计算机。 You can use Ping and related classes to check whether a computer is reachable across the network.

GatewayIPAddressInformation

表示网关的 IP 地址。Represents the IP address of the network gateway. 此类无法实例化。This class cannot be instantiated.

GatewayIPAddressInformationCollection

存储一组 GatewayIPAddressInformation 类型。Stores a set of GatewayIPAddressInformation types.

IcmpV4Statistics

提供本地计算机的 Internet 控制消息协议 IPv4 (ICMPv4) 统计数据。Provides Internet Control Message Protocol for IPv4 (ICMPv4) statistical data for the local computer.

IcmpV6Statistics

提供本地计算机的 Internet 协议版本 6 (ICMPv6) Internet 控制消息协议的统计数据。Provides Internet Control Message Protocol for Internet Protocol version 6 (ICMPv6) statistical data for the local computer.

IPAddressCollection

存储一组 IPAddress 类型。Stores a set of IPAddress types.

IPAddressInformation

提供有关网络接口地址的信息。Provides information about a network interface address.

IPAddressInformationCollection

存储一组 IPAddressInformation 类型。Stores a set of IPAddressInformation types.

IPGlobalProperties

提供有关本地计算机的网络连接的信息。Provides information about the network connectivity of the local computer.

IPGlobalStatistics

提供 Internet 协议 (IP) 统计数据。Provides Internet Protocol (IP) statistical data.

IPInterfaceProperties

提供有关支持 Internet 协议版本 4 (IPv4) 或 Internet 协议版本 6 (IPv6) 的网络接口的信息。Provides information about network interfaces that support Internet Protocol version 4 (IPv4) or Internet Protocol version 6 (IPv6).

IPInterfaceStatistics

提供针对本地计算机上的网络接口的 Internet 协议 (IP) 统计数据。Provides Internet Protocol (IP) statistical data for an network interface on the local computer.

IPv4InterfaceProperties

提供有关支持 Internet 协议版本 4 (IPv4) 的网络接口的信息。Provides information about network interfaces that support Internet Protocol version 4 (IPv4).

IPv4InterfaceStatistics

提供本地计算机上的网络接口的统计数据。Provides statistical data for a network interface on the local computer.

IPv6InterfaceProperties

提供有关支持 Internet 协议版本 6 (IPv6) 的网络接口的信息。Provides information about network interfaces that support Internet Protocol version 6 (IPv6).

MulticastIPAddressInformation

提供网络接口的多路广播地址信息。Provides information about a network interface's multicast address.

MulticastIPAddressInformationCollection

存储一组 MulticastIPAddressInformation 类型。Stores a set of MulticastIPAddressInformation types.

NetworkAvailabilityEventArgs

NetworkAvailabilityChanged 事件提供数据。Provides data for the NetworkAvailabilityChanged event.

NetworkChange

使应用程序可以在网络接口(也称为网卡或网络适配器)的 Internet 协议 (IP) 地址更改时收到通知。Allows applications to receive notification when the Internet Protocol (IP) address of a network interface, also called a network card or adapter, changes.

NetworkInformationException

因检索网络信息时发生错误而引发的异常。The exception that is thrown when an error occurs while retrieving network information.

NetworkInformationPermission

控制对本地计算机的网络信息和通信统计信息的访问。Controls access to network information and traffic statistics for the local computer. 此类不能被继承。This class cannot be inherited.

NetworkInformationPermissionAttribute

允许对要使用声明性安全应用到代码中的 NetworkInformationPermission 执行安全操作。Allows security actions for NetworkInformationPermission to be applied to code using declarative security.

NetworkInterface

提供网络接口的配置和统计信息。Provides configuration and statistical information for a network interface.

PhysicalAddress

提供网络接口(适配器)的媒体访问控制 (MAC) 地址。Provides the Media Access Control (MAC) address for a network interface (adapter).

Ping

允许应用程序确定是否可通过网络访问远程计算机。Allows an application to determine whether a remote computer is accessible over the network.

PingCompletedEventArgs

PingCompleted 事件提供数据。Provides data for the PingCompleted event.

PingException

SendSendAsync 方法调用的方法引发异常时引发的异常。The exception that is thrown when a Send or SendAsync method calls a method that throws an exception.

PingOptions

用于控制如何传输 Ping 数据包。Used to control how Ping data packets are transmitted.

PingReply

提供有关 SendSendAsync 操作的状态及产生的数据的信息。Provides information about the status and data resulting from a Send or SendAsync operation.

TcpConnectionInformation

提供有关本地计算机上的传输控制协议 (TCP) 连接的信息。Provides information about the Transmission Control Protocol (TCP) connections on the local computer.

TcpStatistics

提供传输控制协议 (TCP) 统计数据。Provides Transmission Control Protocol (TCP) statistical data.

UdpStatistics

提供用户数据报协议 (UDP) 统计数据。Provides User Datagram Protocol (UDP) statistical data.

UnicastIPAddressInformation

提供有关网络接口的单播地址的信息。Provides information about a network interface's unicast address.

UnicastIPAddressInformationCollection

存储一组 UnicastIPAddressInformation 类型。Stores a set of UnicastIPAddressInformation types.

枚举

DuplicateAddressDetectionState

指定 IP 地址的当前状态。Specifies the current state of an IP address.

IPStatus

报告向计算机发送 Internet 控制消息协议 (ICMP) 回送消息的状态。Reports the status of sending an Internet Control Message Protocol (ICMP) echo message to a computer.

NetBiosNodeType

指定网络基本输入/输出系统 (NetBIOS) 节点类型。Specifies the Network Basic Input/Output System (NetBIOS) node type.

NetworkInformationAccess

指定访问网络接口信息和通信统计数据的权限。Specifies permission to access information about network interfaces and traffic statistics.

NetworkInterfaceComponent

指定网络接口支持的 Internet 协议版本。Specifies the Internet Protocol versions that are supported by a network interface.

NetworkInterfaceType

指定网络接口的类型。Specifies types of network interfaces.

OperationalStatus

指定网络接口的操作状态。Specifies the operational state of a network interface.

PrefixOrigin

指定如何定位 IP 地址网络前缀。Specifies how an IP address network prefix was located.

ScopeLevel

IPv6 地址的范围级别。The scope level for an IPv6 address.

SuffixOrigin

指定如何定位 IP 地址主机后缀。Specifies how an IP address host suffix was located.

TcpState

指定传输控制协议 (TCP) 连接的状态。Specifies the states of a Transmission Control Protocol (TCP) connection.

委托

NetworkAddressChangedEventHandler

引用在网络接口地址更改时调用的一个或多个方法。References one or more methods to be called when the address of a network interface changes.

NetworkAvailabilityChangedEventHandler

引用在网络可用性更改时调用的一个或多个方法。References one or more methods to be called when the availability of the network changes.

PingCompletedEventHandler

表示将处理 Ping 对象的 PingCompleted 事件的方法。Represents the method that will handle the PingCompleted event of a Ping object.