IPGlobalProperties IPGlobalProperties IPGlobalProperties IPGlobalProperties Class

定義

提供本機電腦之網路連接的相關資訊。Provides information about the network connectivity of the local computer.

public ref class IPGlobalProperties abstract
public abstract class IPGlobalProperties
type IPGlobalProperties = class
Public MustInherit Class IPGlobalProperties
繼承
IPGlobalPropertiesIPGlobalPropertiesIPGlobalPropertiesIPGlobalProperties

範例

下列程式碼範例顯示使用此類別的執行個體的本機電腦的相關資訊。The following code example displays information about the local computer using an instance of this class.

void ShowInboundIPStatistics()
{
   IPGlobalProperties ^ properties = IPGlobalProperties::GetIPGlobalProperties();
   IPGlobalStatistics ^ ipstat = properties->GetIPv4GlobalStatistics();
   Console::WriteLine( "  Inbound Packet Data:" );
   Console::WriteLine( "      Received ............................ : {0}", 
      ipstat->ReceivedPackets );
   Console::WriteLine( "      Forwarded ........................... : {0}", 
      ipstat->ReceivedPacketsForwarded );
   Console::WriteLine( "      Delivered ........................... : {0}", 
      ipstat->ReceivedPacketsDelivered );
   Console::WriteLine( "      Discarded ........................... : {0}", 
      ipstat->ReceivedPacketsDiscarded );
}
public static void ShowInboundIPStatistics()
{
     IPGlobalProperties properties = IPGlobalProperties.GetIPGlobalProperties();
     IPGlobalStatistics ipstat = properties.GetIPv4GlobalStatistics();
     Console.WriteLine("  Inbound Packet Data:");
     Console.WriteLine("      Received ............................ : {0}", 
     ipstat.ReceivedPackets);
     Console.WriteLine("      Forwarded ........................... : {0}", 
     ipstat.ReceivedPacketsForwarded);
     Console.WriteLine("      Delivered ........................... : {0}", 
     ipstat.ReceivedPacketsDelivered);
     Console.WriteLine("      Discarded ........................... : {0}", 
     ipstat.ReceivedPacketsDiscarded);   
}
Public Shared Sub ShowInboundIPStatistics() 
    Dim properties As IPGlobalProperties = IPGlobalProperties.GetIPGlobalProperties()
    Dim ipstat As IPGlobalStatistics = properties.GetIPv4GlobalStatistics()
    Console.WriteLine("  Inbound Packet Data:")
    Console.WriteLine("      Received ............................ : {0}", ipstat.ReceivedPackets)
    Console.WriteLine("      Forwarded ........................... : {0}", ipstat.ReceivedPacketsForwarded)
    Console.WriteLine("      Delivered ........................... : {0}", ipstat.ReceivedPacketsDelivered)
    Console.WriteLine("      Discarded ........................... : {0}", ipstat.ReceivedPacketsDiscarded)

End Sub 'ShowInboundIPStatistics

備註

這個類別會提供設定和本機電腦的網路介面和網路連線的統計資訊。This class provides configuration and statistical information about the local computer's network interfaces and network connections.

這個類別所提供的資訊是類似於網際網路通訊協定協助程式 API 函數所提供。The information provided by this class is similar to that provided by the Internet Protocol Helper API functions. 如網際網路通訊協定協助程式的相關資訊,請參閱 MSDN Library 中的文件。For information about the Internet Protocol Helper, see the documentation in the MSDN Library.

建構函式

IPGlobalProperties() IPGlobalProperties() IPGlobalProperties() IPGlobalProperties()

初始化 IPGlobalProperties 類別的新執行個體。Initializes a new instance of the IPGlobalProperties class.

屬性

DhcpScopeName DhcpScopeName DhcpScopeName DhcpScopeName

取得動態主機設定通訊協定 (DHCP) 範圍名稱。Gets the Dynamic Host Configuration Protocol (DHCP) scope name.

DomainName DomainName DomainName DomainName

取得本機電腦註冊的網域。Gets the domain in which the local computer is registered.

HostName HostName HostName HostName

取得本機電腦的主機名稱。Gets the host name for the local computer.

IsWinsProxy IsWinsProxy IsWinsProxy IsWinsProxy

取得 Boolean 值,指定本機電腦是否當做 Windows 網際網路名稱服務 (WINS) Proxy 來使用。Gets a Boolean value that specifies whether the local computer is acting as a Windows Internet Name Service (WINS) proxy.

NodeType NodeType NodeType NodeType

取得本機電腦的網路基本輸入輸出系統 (NetBIOS) 節點型別。Gets the Network Basic Input/Output System (NetBIOS) node type of the local computer.

方法

BeginGetUnicastAddresses(AsyncCallback, Object) BeginGetUnicastAddresses(AsyncCallback, Object) BeginGetUnicastAddresses(AsyncCallback, Object) BeginGetUnicastAddresses(AsyncCallback, Object)

開始非同步要求,以便從本機電腦擷取穩定單點傳播 IP 位址表格。Begins an asynchronous request to retrieve the stable unicast IP address table on the local computer.

EndGetUnicastAddresses(IAsyncResult) EndGetUnicastAddresses(IAsyncResult) EndGetUnicastAddresses(IAsyncResult) EndGetUnicastAddresses(IAsyncResult)

結束暫止的非同步要求,以便從本機電腦擷取穩定單點傳播 IP 位址表格。Ends a pending asynchronous request to retrieve the stable unicast IP address table on the local computer.

Equals(Object) Equals(Object) Equals(Object) Equals(Object)

判斷指定的物件是否等於目前的物件。Determines whether the specified object is equal to the current object.

(Inherited from Object)
GetActiveTcpConnections() GetActiveTcpConnections() GetActiveTcpConnections() GetActiveTcpConnections()

傳回本機電腦上之網際網路通訊協定第 4 版 (IPv4) 和 IPv6 傳輸控制通訊協定 (TCP) 連線的相關資訊。Returns information about the Internet Protocol version 4 (IPv4) and IPv6 Transmission Control Protocol (TCP) connections on the local computer.

GetActiveTcpListeners() GetActiveTcpListeners() GetActiveTcpListeners() GetActiveTcpListeners()

傳回本機電腦上之網際網路通訊協定第 4 版 (IPv4) 和 IPv6 傳輸控制通訊協定 (TCP) 接聽程式的端點資訊。Returns endpoint information about the Internet Protocol version 4 (IPv4) and IPv6 Transmission Control Protocol (TCP) listeners on the local computer.

GetActiveUdpListeners() GetActiveUdpListeners() GetActiveUdpListeners() GetActiveUdpListeners()

傳回本機電腦上之網際網路通訊協定第 4 版 (IPv4) 和 IPv6 使用者資料包通訊協定 (User Datagram Protocol,UDP) 接聽程式的相關資訊。Returns information about the Internet Protocol version 4 (IPv4) and IPv6 User Datagram Protocol (UDP) listeners on the local computer.

GetHashCode() GetHashCode() GetHashCode() GetHashCode()

做為預設雜湊函式。Serves as the default hash function.

(Inherited from Object)
GetIcmpV4Statistics() GetIcmpV4Statistics() GetIcmpV4Statistics() GetIcmpV4Statistics()

提供本機電腦的網際網路控制訊息通訊協定 (Internet Control Message Protocol,ICMP) 第 4 版統計資料。Provides Internet Control Message Protocol (ICMP) version 4 statistical data for the local computer.

GetIcmpV6Statistics() GetIcmpV6Statistics() GetIcmpV6Statistics() GetIcmpV6Statistics()

提供本機電腦的網際網路控制訊息通訊協定 (Internet Control Message Protocol,ICMP) 第 6 版統計資料。Provides Internet Control Message Protocol (ICMP) version 6 statistical data for the local computer.

GetIPGlobalProperties() GetIPGlobalProperties() GetIPGlobalProperties() GetIPGlobalProperties()

取得物件,提供本機電腦之網路連接和流量統計資料的相關資訊。Gets an object that provides information about the local computer's network connectivity and traffic statistics.

GetIPv4GlobalStatistics() GetIPv4GlobalStatistics() GetIPv4GlobalStatistics() GetIPv4GlobalStatistics()

提供本機電腦的網際網路通訊協定第 4 版 (IPv4) 統計資料。Provides Internet Protocol version 4 (IPv4) statistical data for the local computer.

GetIPv6GlobalStatistics() GetIPv6GlobalStatistics() GetIPv6GlobalStatistics() GetIPv6GlobalStatistics()

提供本機電腦的網際網路通訊協定第 6 版 (IPv6) 統計資料。Provides Internet Protocol version 6 (IPv6) statistical data for the local computer.

GetTcpIPv4Statistics() GetTcpIPv4Statistics() GetTcpIPv4Statistics() GetTcpIPv4Statistics()

提供本機電腦的傳輸控制通訊協定/網際網路通訊協定第 4 版 (TCP/IPv4) 統計資料。Provides Transmission Control Protocol/Internet Protocol version 4 (TCP/IPv4) statistical data for the local computer.

GetTcpIPv6Statistics() GetTcpIPv6Statistics() GetTcpIPv6Statistics() GetTcpIPv6Statistics()

提供本機電腦的傳輸控制通訊協定/網際網路通訊協定第 6 版 (TCP/IPv6) 統計資料。Provides Transmission Control Protocol/Internet Protocol version 6 (TCP/IPv6) statistical data for the local computer.

GetType() GetType() GetType() GetType()

取得目前執行個體的 TypeGets the Type of the current instance.

(Inherited from Object)
GetUdpIPv4Statistics() GetUdpIPv4Statistics() GetUdpIPv4Statistics() GetUdpIPv4Statistics()

提供本機電腦的使用者資料包通訊協定/網際網路通訊協定第 4 版 (UDP/IPv4) 統計資料。Provides User Datagram Protocol/Internet Protocol version 4 (UDP/IPv4) statistical data for the local computer.

GetUdpIPv6Statistics() GetUdpIPv6Statistics() GetUdpIPv6Statistics() GetUdpIPv6Statistics()

提供本機電腦的使用者資料包通訊協定/網際網路通訊協定第 6 版 (UDP/IPv6) 統計資料。Provides User Datagram Protocol/Internet Protocol version 6 (UDP/IPv6) statistical data for the local computer.

GetUnicastAddresses() GetUnicastAddresses() GetUnicastAddresses() GetUnicastAddresses()

從本機電腦擷取穩定單點傳播 IP 位址表格。Retrieves the stable unicast IP address table on the local computer.

GetUnicastAddressesAsync() GetUnicastAddressesAsync() GetUnicastAddressesAsync() GetUnicastAddressesAsync()

以非同步作業的方式,從本機電腦擷取穩定單點傳播 IP 位址表格。Retrieves the stable unicast IP address table on the local computer as an asynchronous operation.

MemberwiseClone() MemberwiseClone() MemberwiseClone() MemberwiseClone()

建立目前 Object 的淺層複本 (Shallow Copy)。Creates a shallow copy of the current Object.

(Inherited from Object)
ToString() ToString() ToString() ToString()

傳回代表目前物件的字串。Returns a string that represents the current object.

(Inherited from Object)

適用於