Beispiel #1
0
		/// <summary>
		/// Computes the Frame-Check-Sequence (FCS) of the specified Ethernet
		/// frame.
		/// </summary>
		/// <param name="frame">The Ethernet frame to compute the FCS for.</param>
		/// <returns>The Frame-Check-Sequence of the specified Ethernet
		/// frame.</returns>
		public static uint ComputeCheckSequence(Frame frame) {
			frame.ThrowIfNull("frame");
			return Crc32.Compute(
				new ByteBuilder()
				.Append(frame.Destination.Bytes)
				.Append(frame.Source.Bytes)
				.Append((short) frame.Type)
				.Append(frame.Payload).ToArray()
			);
		}