Esempio n. 1
0
        public override bool Equals(object obj)
        {
            ArpAddressMapping that = obj as ArpAddressMapping;

            return(((that != null) &&
                    object.Equals(this.IpAddr, that.IpAddr)) &&
                   object.Equals(this.EthAddr, that.EthAddr));
        }
Esempio n. 2
0
        private void InfoAndEmit(IContext ctx, ArpPacket arp)
        {
            var mapping = new ArpAddressMapping {
                EthAddr = arp.ArpSrcHwMac, IpAddr = arp.ArpSrcProtoIpv4
            };

            ctx.Info($"ARP mapping: {mapping}");
            ctx.TryInsert(mapping);
        }