Beispiel #1
0
        public override bool Equals(object obj)
        {
            IpSourceEndpoint that = obj as IpSourceEndpoint;

            return((that != null) &&
                   object.Equals(this.IpAddr, that.IpAddr));
        }
Beispiel #2
0
        public override void Define()
        {
            IpSourceEndpoint ipSrc   = null;
            AddressMapping   mapping = null;

            When()
            .Match(() => ipSrc, x => LanRulesHelper.IsLinkLocal(x.IpAddr))
            .Match(() => mapping, m => m.IpAddr == ipSrc.IpAddr);
            Then()
            .Yield(_ => new LinkLocalIpAddressUse {
                IpAddress = ipSrc.IpAddr, EthAddress = mapping.EthAddr
            });
        }
Beispiel #3
0
        public override void Define()
        {
            IpSourceEndpoint ipSrc   = null;
            AddressMapping   mapping = null;

            When()
            .Match(() => ipSrc)
            .Match(() => mapping, m => m.IpAddr == ipSrc.IpAddr)
            .Exists <ArpUnanswered>(x => x.Request.EthSrc == mapping.EthAddr)
            .Not <IpDestinationEndpoint>(d => ipSrc.IpAddr == d.IpAddr);
            Then()
            .Yield(_ => new IpAddressMismatch {
                IpAddress = ipSrc.IpAddr, EthAddress = mapping.EthAddr
            });
        }