Exemplo n.º 1
0
 /// <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));
 }
Exemplo n.º 2
0
 /// <summary>
 /// True iff the ICMP payload is equal to the other ICMP payload.
 /// </summary>
 protected virtual bool EqualPayload(IcmpLayer other)
 {
     return(true);
 }
Exemplo n.º 3
0
 /// <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));
 }
Exemplo n.º 4
0
 /// <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));
 }