/// <summary> /// ICMP layers are equal if they have the same message type, code, checksum, variable and payload. /// </summary> public bool Equals(IcmpLayer other) { return(other != null && MessageType == other.MessageType && CodeValue == other.CodeValue && Checksum == other.Checksum && Variable == other.Variable && EqualPayload(other)); }
/// <summary> /// True iff the ICMP payload is equal to the other ICMP payload. /// </summary> protected virtual bool EqualPayload(IcmpLayer other) { return(true); }
/// <summary> /// True iff the OriginateTimestamp, ReceiveTimestamp and the TransmitTimestamp fields are equal. /// </summary> protected sealed override bool EqualPayload(IcmpLayer other) { return(EqualPayload(other as IcmpTimestampLayer)); }
/// <summary> /// True iff the address mask is equal to the other address mask. /// </summary> protected sealed override bool EqualPayload(IcmpLayer other) { return(EqualPayload(other as IcmpAddressMaskRequestLayer)); }
/// <summary> /// True iff the Entries are equal to the other ICMP entries. /// </summary> protected override bool EqualPayload(IcmpLayer other) { return(EqualPayload(other as IcmpRouterAdvertisementLayer)); }