Click or drag to resize
IpPacketComputeChecksum Method
Computes the 16-bit checksum of the specified IPv4 packet.

Namespace: Network.Sim.Network.Ip
Assembly: Network.Sim (in Network.Sim.exe) Version: 1.0.0.0 (1.0.0.0)
Syntax
C#
public static ushort ComputeChecksum(
	IpPacket packet,
	bool withChecksumField = false
)

Parameters

packet
Type: Network.Sim.Network.IpIpPacket
The packet to compute the checksum for.
withChecksumField (Optional)
Type: SystemBoolean
true to include the packet's checksum field in the calculation; otherwise false.

Return Value

Type: UInt16
The checksum of the specified IPv4 packet.
Exceptions
ExceptionCondition
ArgumentNullExceptionThrown if the packet argument is null.
See Also