Home
last modified time | relevance | path

Searched refs:transportLen (Results 1 – 2 of 2) sorted by relevance

/frameworks/base/core/java/android/net/util/
DIpUtils.java83 ByteBuffer buf, int headerOffset, int protocol, int transportLen) { in pseudoChecksumIPv4() argument
84 int partial = protocol + transportLen; in pseudoChecksumIPv4()
93 ByteBuffer buf, int headerOffset, int protocol, int transportLen) { in pseudoChecksumIPv6() argument
94 int partial = protocol + transportLen; in pseudoChecksumIPv6()
111 int ipOffset, int transportOffset, int transportLen) { in transportChecksum() argument
112 if (transportLen < 0) { in transportChecksum()
113 throw new IllegalArgumentException("Transport length < 0: " + transportLen); in transportChecksum()
118 sum = pseudoChecksumIPv4(buf, ipOffset, protocol, transportLen); in transportChecksum()
120 sum = pseudoChecksumIPv6(buf, ipOffset, protocol, transportLen); in transportChecksum()
125 sum = checksum(buf, sum, transportOffset, transportOffset + transportLen); in transportChecksum()
[all …]
/frameworks/base/tests/net/java/android/net/util/
DIpUtilsTest.java103 int transportLen = packet.limit() - IPV6_HEADER_LENGTH; in testIpv6TcpChecksum() local
104 assertEquals(0, IpUtils.tcpChecksum(packet, 0, IPV6_HEADER_LENGTH, transportLen)); in testIpv6TcpChecksum()
113 assertChecksumEquals(sum, IpUtils.tcpChecksum(packet, 0, IPV6_HEADER_LENGTH, transportLen)); in testIpv6TcpChecksum()
118 IpUtils.tcpChecksum(packet, 0, IPV6_HEADER_LENGTH, transportLen)); in testIpv6TcpChecksum()
119 assertEquals(0, IpUtils.tcpChecksum(packet, 0, IPV6_HEADER_LENGTH, transportLen)); in testIpv6TcpChecksum()