Home
last modified time | relevance | path

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

/packages/modules/Connectivity/staticlibs/framework/com/android/net/module/util/
DIpUtils.java84 ByteBuffer buf, int headerOffset, int protocol, int transportLen) { in pseudoChecksumIPv4() argument
85 int partial = protocol + transportLen; in pseudoChecksumIPv4()
94 ByteBuffer buf, int headerOffset, int protocol, int transportLen) { in pseudoChecksumIPv6() argument
95 int partial = protocol + transportLen; in pseudoChecksumIPv6()
112 int ipOffset, int transportOffset, int transportLen) { in transportChecksum() argument
113 if (transportLen < 0) { in transportChecksum()
114 throw new IllegalArgumentException("Transport length < 0: " + transportLen); in transportChecksum()
119 sum = pseudoChecksumIPv4(buf, ipOffset, protocol, transportLen); in transportChecksum()
121 sum = pseudoChecksumIPv6(buf, ipOffset, protocol, transportLen); in transportChecksum()
126 sum = checksum(buf, sum, transportOffset, transportOffset + transportLen); in transportChecksum()
[all …]
/packages/modules/Connectivity/staticlibs/tests/unit/src/com/android/net/module/util/
DIpUtilsTest.java119 int transportLen = packet.limit() - IPV6_HEADER_LENGTH; in testIpv6TcpChecksum() local
120 assertEquals(0, IpUtils.tcpChecksum(packet, 0, IPV6_HEADER_LENGTH, transportLen)); in testIpv6TcpChecksum()
129 assertChecksumEquals(sum, IpUtils.tcpChecksum(packet, 0, IPV6_HEADER_LENGTH, transportLen)); in testIpv6TcpChecksum()
134 IpUtils.tcpChecksum(packet, 0, IPV6_HEADER_LENGTH, transportLen)); in testIpv6TcpChecksum()
135 assertEquals(0, IpUtils.tcpChecksum(packet, 0, IPV6_HEADER_LENGTH, transportLen)); in testIpv6TcpChecksum()
207 int transportLen = packet.limit() - IPV4_HEADER_LENGTH; in testIpv4IcmpChecksum() local
208 assertEquals(0, IpUtils.icmpChecksum(packet, IPV4_HEADER_LENGTH, transportLen)); in testIpv4IcmpChecksum()
217 assertChecksumEquals(sum, IpUtils.icmpChecksum(packet, IPV4_HEADER_LENGTH, transportLen)); in testIpv4IcmpChecksum()
222 IpUtils.icmpChecksum(packet, IPV4_HEADER_LENGTH, transportLen)); in testIpv4IcmpChecksum()
223 assertEquals(0, IpUtils.icmpChecksum(packet, IPV4_HEADER_LENGTH, transportLen)); in testIpv4IcmpChecksum()
/packages/modules/Connectivity/staticlibs/testutils/devicetests/com/android/testutils/
DPacketReflectorUtil.kt103 val transportLen: Int = len - transportOffset in fixPacketChecksum() constant
106 transportLen in fixPacketChecksum()