Ejemplo n.º 1
0
        public static HW.Network.MACAddress Resolve(IPv4Address ipAddress)
        {
            ensureCacheExists();
            if (cache.ContainsKey(ipAddress.To32BitNumber()) == false)
            {
                return(null);
            }

            return(cache[ipAddress.To32BitNumber()]);
        }
Ejemplo n.º 2
0
        public static void Update(IPv4Address ipAddress, HW.Network.MACAddress macAddress)
        {
            ensureCacheExists();
            UInt32 ip_hash = ipAddress.To32BitNumber();

            if (ip_hash == 0)
            {
                return;
            }

            if (cache.ContainsKey(ip_hash) == false)
            {
                cache.Add(ip_hash, macAddress);
            }
            else
            {
                cache[ip_hash] = macAddress;
            }
        }
Ejemplo n.º 3
0
 public static bool Contains(IPv4Address ipAddress)
 {
     ensureCacheExists();
     return(cache.ContainsKey(ipAddress.To32BitNumber()));
 }