public static NCIInfo GetNICInfo(string MAC) { List <NCIInfo> ips = NetworkCardInterface.GetNCIInfoList(); foreach (NCIInfo ip in ips) { if (ip.MAC == MAC) { return(ip); } } return(null); }
public static IPAddress GetIPAddress(string MAC) { List <NCIInfo> ips = NetworkCardInterface.GetNCIInfoList(); foreach (NCIInfo ip in ips) { if (ip.MAC == MAC) { return(ip.Address); } } return(null); }
public static List <NCIInfo> GetNICInfo(NCIType type) { List <NCIInfo> ret = new List <NCIInfo>(); List <NCIInfo> ips = NetworkCardInterface.GetNCIInfoList(); foreach (NCIInfo ip in ips) { if ((type & ip.Type) != 0) { ret.Add(ip); } } return(ret); }