Home
last modified time | relevance | path

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

/frameworks/base/tests/net/java/android/net/util/
DIpUtilsTest.java29 private static final int IPV4_HEADER_LENGTH = 20; field in IpUtilsTest
137 assertEquals((short) 0xffff, IpUtils.udpChecksum(packet, 0, IPV4_HEADER_LENGTH)); in testIpv4UdpChecksum()
148 final int udpSumOffset = IPV4_HEADER_LENGTH + UDP_CHECKSUM_OFFSET; in testIpv4UdpChecksum()
154 assertChecksumEquals(udpSum, IpUtils.udpChecksum(packet, 0, IPV4_HEADER_LENGTH)); in testIpv4UdpChecksum()
158 packet.putShort(udpSumOffset, IpUtils.udpChecksum(packet, 0, IPV4_HEADER_LENGTH)); in testIpv4UdpChecksum()
160 assertEquals((short) 0xffff, IpUtils.udpChecksum(packet, 0, IPV4_HEADER_LENGTH)); in testIpv4UdpChecksum()
/frameworks/base/services/core/java/com/android/server/connectivity/
DKeepalivePacketData.java60 private static final int IPV4_HEADER_LENGTH = 20; field in KeepalivePacketData
114 int length = IPV4_HEADER_LENGTH + UDP_HEADER_LENGTH + 1; in nattKeepalivePacket()
133 buf.putShort(udpChecksumOffset, IpUtils.udpChecksum(buf, 0, IPV4_HEADER_LENGTH)); in nattKeepalivePacket()