src/org/jnetpcap/protocol/network/Icmp.java
public int calculateChecksum() {

		if (getIndex() == -1) {
			throw new IllegalStateException("Oops index not set");
		}

		final int ipOffset = getPreviousHeaderOffset();

		return Checksum.inChecksumShouldBe(checksum(), Checksum.icmp(packet,
		    ipOffset, this.getOffset()));
	}
/**
	 * Calculates a checksum using protocol specification for a header. Checksums
	 * for partial headers or fragmented packets (unless the protocol alows it)
	 * are not calculated.
	 * 
	 * @return header's calculated checksum
	 */
Calculates a checksum using protocol specification for a header. Checksums
for partial headers or fragmented packets (unless the protocol alows it)
are not calculated.

@return header's calculated checksum
Calculates a checksum using protocol specification for a header . Checksums for partial headers or fragmented packets ( unless the protocol alows it ) are not calculated . @return header ' s calculated checksum
public int calculateChecksum() {
		if (getIndex() == -1) {
			throw new IllegalStateException("Oops index not set");
		}
		final int ipOffset = getPreviousHeaderOffset();
		return Checksum.inChecksumShouldBe(checksum(), Checksum.icmp(packet,
		    ipOffset, this.getOffset()));
	}
public int calculateChecksum ( ) { if ( getIndex ( ) == - 1 ) { throw new IllegalStateException ( "Oops index not set" ) ; } final int ipOffset = getPreviousHeaderOffset ( ) ; return Checksum . inChecksumShouldBe ( checksum ( ) , Checksum . icmp ( packet , ipOffset , this . getOffset ( ) ) ) ; }
Calculates a checksum using protocol specification for a header.
Calculates a checksum using protocol specification for a header .