IPInterfacePropertiesとは? わかりやすく解説

IPInterfaceProperties クラス

メモ : このクラスは、.NET Framework version 2.0新しく追加されたものです。

インターネット プロトコル Version 4 (IPv4) またはインターネット プロトコル Version 6 (IPv6) をサポートしているネットワーク インターフェイスに関する情報提供します

名前空間: System.Net.NetworkInformation
アセンブリ: System (system.dll 内)
構文構文

Public MustInherit Class
 IPInterfaceProperties
Dim instance As IPInterfaceProperties
public abstract class IPInterfaceProperties
public ref class IPInterfaceProperties abstract
public abstract class IPInterfaceProperties
public abstract class IPInterfaceProperties
解説解説
使用例使用例

アドレス情報表示するコード例次に示します

public static void ShowIPAddresses(IPInterfaceProperties
 adapterProperties)
{
    IPAddressCollection dnsServers = adapterProperties.DnsAddresses;
    if (dnsServers != null)
    {
        foreach (IPAddress dns in dnsServers)
        {
            Console.WriteLine("  DNS Servers ............................. :
 {0}", 
                dns.ToString()
           );
        }
    }
    IPAddressInformationCollection anyCast = adapterProperties.AnycastAddresses;
    if (anyCast != null)
    {
        foreach (IPAddressInformation any in
 anyCast)
        {
            Console.WriteLine("  Anycast Address ..........................
 : {0} {1} {2}", 
                any.Address,
                any.IsTransient ? "Transient" : "", 
                any.IsDnsEligible ? "DNS Eligible" : ""
            );
        }
        Console.WriteLine();
    }
        
    MulticastIPAddressInformationCollection multiCast = adapterProperties.MulticastAddresses;
    if (multiCast != null)
    {
        foreach (IPAddressInformation multi in
 multiCast)
        {
            Console.WriteLine("  Multicast Address ....................... :
 {0} {1} {2}", 
                multi.Address,
                multi.IsTransient ? "Transient" : "", 
                multi.IsDnsEligible ? "DNS Eligible" : ""
            );
        }
        Console.WriteLine();
    }
    UnicastIPAddressInformationCollection uniCast = adapterProperties.UnicastAddresses;
    if (uniCast != null)
    {
        string lifeTimeFormat = "dddd, MMMM dd, yyyy  hh:mm:ss
 tt";
        foreach (UnicastIPAddressInformation uni in
 uniCast)
        {
            DateTime when;
            
            Console.WriteLine("  Unicast Address ......................... :
 {0}", uni.Address);
            Console.WriteLine("     Prefix Origin ........................ :
 {0}", uni.PrefixOrigin);
            Console.WriteLine("     Suffix Origin ........................ :
 {0}", uni.SuffixOrigin);
            Console.WriteLine("     Duplicate Address Detection .......... :
 {0}", 
                uni.DuplicateAddressDetectionState);
                
            // Format the lifetimes as Sunday, February 16, 2003 11:33:44
 PM
            // if en-us is the current culture.
            
            // Calculate the date and time at the end of the lifetimes.
    
            when = DateTime.UtcNow + TimeSpan.FromSeconds(uni.AddressValidLifetime);
            when = when.ToLocalTime();    
            Console.WriteLine("     Valid Life Time ...................... :
 {0}", 
                when.ToString(lifeTimeFormat,System.Globalization.CultureInfo.CurrentCulture)
            );
            when = DateTime.UtcNow + TimeSpan.FromSeconds(uni.AddressPreferredLifetime);
   
            when = when.ToLocalTime();      
            Console.WriteLine("     Preferred life time .................. :
 {0}", 
                when.ToString(lifeTimeFormat,System.Globalization.CultureInfo.CurrentCulture)
            ); 
            
            when = DateTime.UtcNow + TimeSpan.FromSeconds(uni.DhcpLeaseLifetime);
            when = when.ToLocalTime(); 
            Console.WriteLine("     DHCP Leased Life Time ................ :
 {0}", 
                when.ToString(lifeTimeFormat,System.Globalization.CultureInfo.CurrentCulture)
            );
        }
        Console.WriteLine();
    }
}
継承階層継承階層
System.Object
  System.Net.NetworkInformation.IPInterfaceProperties
スレッド セーフスレッド セーフ
この型の public static (Visual Basic では Shared) メンバはすべて、スレッド セーフです。インスタンス メンバ場合は、スレッド セーフであるとは限りません。
プラットフォームプラットフォーム
バージョン情報バージョン情報
参照参照
関連項目
IPInterfaceProperties メンバ
System.Net.NetworkInformation 名前空間

IPInterfaceProperties コンストラクタ


IPInterfaceProperties プロパティ


パブリック プロパティパブリック プロパティ

  名前 説明
パブリック プロパティ AnycastAddresses このインターフェイス割り当てられているエニーキャスト IP アドレス取得します
パブリック プロパティ DhcpServerAddresses このインターフェイスDHCP (Dynamic Host Configuration Protocol) サーバーアドレス取得します
パブリック プロパティ DnsAddresses このインターフェイスドメイン ネーム システム (DNS) サーバーアドレス取得します
パブリック プロパティ DnsSuffix このインターフェイス関連付けられているドメイン ネーム システム (DNS) サフィックス取得します
パブリック プロパティ GatewayAddresses このインターフェイスネットワーク ゲートウェイアドレス取得します
パブリック プロパティ IsDnsEnabled このインターフェイスドメイン ネーム システム (DNS) サーバー名前解決クエリ送信するように構成されているかどうかを示す Boolean 値を取得します
パブリック プロパティ IsDynamicDnsEnabled このインターフェイスドメイン ネーム システム (DNS) を使用して自動的に IP アドレス情報登録するように構成されているかどうかを示す Boolean 値を取得します
パブリック プロパティ MulticastAddresses このインターフェイス割り当てられているマルチキャスト アドレス取得します
パブリック プロパティ UnicastAddresses このインターフェイス割り当てられているユニキャスト アドレス取得します
パブリック プロパティ WinsServersAddresses WINS (Windows Internet Name Service) サーバーアドレス取得します
参照参照

関連項目

IPInterfaceProperties クラス
System.Net.NetworkInformation 名前空間

IPInterfaceProperties メソッド


パブリック メソッドパブリック メソッド

プロテクト メソッドプロテクト メソッド
参照参照

関連項目

IPInterfaceProperties クラス
System.Net.NetworkInformation 名前空間

IPInterfaceProperties メンバ

インターネット プロトコル Version 4 (IPv4) またはインターネット プロトコル Version 6 (IPv6) をサポートしているネットワーク インターフェイスに関する情報提供します

IPInterfaceProperties データ型公開されるメンバを以下の表に示します


プロテクト コンストラクタプロテクト コンストラクタ
  名前 説明
プロテクト メソッド IPInterfaceProperties IPInterfaceProperties クラス新しインスタンス初期化します。
パブリック プロパティパブリック プロパティ
  名前 説明
パブリック プロパティ AnycastAddresses このインターフェイス割り当てられているエニーキャスト IP アドレス取得します
パブリック プロパティ DhcpServerAddresses このインターフェイスDHCP (Dynamic Host Configuration Protocol) サーバーアドレス取得します
パブリック プロパティ DnsAddresses このインターフェイスドメイン ネーム システム (DNS) サーバーアドレス取得します
パブリック プロパティ DnsSuffix このインターフェイス関連付けられているドメイン ネーム システム (DNS) サフィックス取得します
パブリック プロパティ GatewayAddresses このインターフェイスネットワーク ゲートウェイアドレス取得します
パブリック プロパティ IsDnsEnabled このインターフェイスドメイン ネーム システム (DNS) サーバー名前解決クエリ送信するように構成されているかどうかを示す Boolean 値を取得します
パブリック プロパティ IsDynamicDnsEnabled このインターフェイスドメイン ネーム システム (DNS) を使用して自動的に IP アドレス情報登録するように構成されているかどうかを示す Boolean 値を取得します
パブリック プロパティ MulticastAddresses このインターフェイス割り当てられているマルチキャスト アドレス取得します
パブリック プロパティ UnicastAddresses このインターフェイス割り当てられているユニキャスト アドレス取得します
パブリック プロパティ WinsServersAddresses WINS (Windows Internet Name Service) サーバーアドレス取得します
パブリック メソッドパブリック メソッド
プロテクト メソッドプロテクト メソッド
参照参照

関連項目

IPInterfaceProperties クラス
System.Net.NetworkInformation 名前空間



英和和英テキスト翻訳>> Weblio翻訳
英語⇒日本語日本語⇒英語
  

辞書ショートカット

すべての辞書の索引

「IPInterfaceProperties」の関連用語

IPInterfacePropertiesのお隣キーワード
検索ランキング

   

英語⇒日本語
日本語⇒英語
   



IPInterfacePropertiesのページの著作権
Weblio 辞書 情報提供元は 参加元一覧 にて確認できます。

   
日本マイクロソフト株式会社日本マイクロソフト株式会社
© 2025 Microsoft.All rights reserved.

©2025 GRAS Group, Inc.RSS