Exemplo n.º 1
0
 /// <summary>
 /// true iff the GroupAddress, IsSuppressRouterSideProcessing, QueryRobustnessVariable and SourceAddresses fields are equal
 /// and the QueryInterval is similar.
 /// </summary>
 private bool EqualFields(IgmpQueryVersion3Layer other)
 {
     return(other != null &&
            GroupAddress == other.GroupAddress &&
            IsSuppressRouterSideProcessing == other.IsSuppressRouterSideProcessing &&
            QueryRobustnessVariable == other.QueryRobustnessVariable &&
            QueryInterval.Divide(2) <= other.QueryInterval && QueryInterval.Multiply(2) >= other.QueryInterval &&
            SourceAddresses.SequenceEqual(other.SourceAddresses));
 }
Exemplo n.º 2
0
        /// <summary>
        /// Two records are equal if the record type, multicast address, source addresses and auxiliary data are equal.
        /// </summary>
        public bool Equals(IgmpGroupRecord other)
        {
            if (other == null)
            {
                return(false);
            }

            return(RecordType == other.RecordType &&
                   MulticastAddress == other.MulticastAddress &&
                   SourceAddresses.SequenceEqual(other.SourceAddresses) &&
                   AuxiliaryData.Equals(other.AuxiliaryData));
        }