Ejemplo n.º 1
0
 private void SetAfapterInfo(IPHelper.IP_ADAPTER_INFO adapterInfo)
 {
     m_adapterInfo=adapterInfo;
     m_ipAddressList = GetIpAddressList( adapterInfo.IpAddressList );
     m_gatewaysList = GetIpGateways( adapterInfo.GatewayList );
 }
Ejemplo n.º 2
0
 private StringList GetIpGateways(IPHelper.IP_ADDR_STRING addr)
 {
     StringList result = new StringList();
     result.Add(addr.IpAddress.address);
     while(addr.Next != 0)
     {
         addr = (IPHelper.IP_ADDR_STRING)Marshal.PtrToStructure((IntPtr)addr.Next,typeof(IPHelper.IP_ADDR_STRING));
         result.Add( addr.IpAddress.address );
     }
     return result;
 }