Inheritance: IPv4InterfaceStatistics
Exemplo n.º 1
0
 internal Win32NetworkInterface2(Win32_IP_ADAPTER_ADDRESSES addr)
 {
     this.addr  = addr;
     mib4       = default(Win32_MIB_IFROW);
     mib4.Index = addr.Alignment.IfIndex;
     if (GetIfEntry(ref mib4) != 0)
     {
         mib4.Index = -1;                 // unavailable;
     }
     mib6       = default(Win32_MIB_IFROW);
     mib6.Index = addr.Ipv6IfIndex;
     if (GetIfEntry(ref mib6) != 0)
     {
         mib6.Index = -1;                 // unavailable;
     }
     ip4stats    = new Win32IPv4InterfaceStatistics(mib4);
     ip_if_props = new Win32IPInterfaceProperties2(addr, mib4, mib6);
 }
 private Win32NetworkInterface2(Win32_IP_ADAPTER_ADDRESSES addr)
 {
     this.addr       = addr;
     this.mib4       = default(Win32_MIB_IFROW);
     this.mib4.Index = addr.Alignment.IfIndex;
     if (Win32NetworkInterface2.GetIfEntry(ref this.mib4) != 0)
     {
         this.mib4.Index = -1;
     }
     this.mib6       = default(Win32_MIB_IFROW);
     this.mib6.Index = addr.Ipv6IfIndex;
     if (Win32NetworkInterface2.GetIfEntry(ref this.mib6) != 0)
     {
         this.mib6.Index = -1;
     }
     this.ip4stats    = new Win32IPv4InterfaceStatistics(this.mib4);
     this.ip_if_props = new Win32IPInterfaceProperties2(addr, this.mib4, this.mib6);
 }
Exemplo n.º 3
0
		Win32NetworkInterface2 (Win32_IP_ADAPTER_ADDRESSES addr)
		{
			this.addr = addr;
			mib4 = default (Win32_MIB_IFROW);
			mib4.Index = addr.Alignment.IfIndex;
			if (GetIfEntry (ref mib4) != 0)
				mib4.Index = -1; // unavailable;
			mib6 = default (Win32_MIB_IFROW);
			mib6.Index = addr.Ipv6IfIndex;
			if (GetIfEntry (ref mib6) != 0)
				mib6.Index = -1; // unavailable;
			ip4stats = new Win32IPv4InterfaceStatistics (mib4);
			ip_if_props = new Win32IPInterfaceProperties2 (addr, mib4, mib6);
		}