Home
last modified time | relevance | path

Searched refs:tcpHeader (Results 1 – 4 of 4) sorted by relevance

/packages/modules/Connectivity/staticlibs/tests/unit/src/com/android/net/module/util/
DPacketBuilderTest.java683 final TcpHeader tcpHeader = Struct.parse(TcpHeader.class, actual); in checkTcpPacket() local
684 assertEquals(SRC_PORT, tcpHeader.srcPort); in checkTcpPacket()
685 assertEquals(DST_PORT, tcpHeader.dstPort); in checkTcpPacket()
686 assertEquals(SEQ_NO, tcpHeader.seq); in checkTcpPacket()
687 assertEquals(ACK_NO, tcpHeader.ack); in checkTcpPacket()
689 tcpHeader.dataOffsetAndControlBits); in checkTcpPacket()
690 assertEquals(WINDOW, tcpHeader.window); in checkTcpPacket()
691 assertEquals(URGENT_POINTER, tcpHeader.urgentPointer); in checkTcpPacket()
693 assertEquals(hasData ? (short) 0x4844 : (short) 0xe5e5, tcpHeader.checksum); in checkTcpPacket()
695 assertEquals(hasData ? (short) 0xd905 : (short) 0x76a7, tcpHeader.checksum); in checkTcpPacket()
/packages/modules/DnsResolver/tests/
Dtun_forwarder.cpp303 const tcphdr* const tcpHeader = reinterpret_cast<tcphdr*>(tcpPacket.base()); in validateTcpPacket() local
304 if (tcpHeader->doff < 5) { in validateTcpPacket()
307 if (tcpHeader->doff * 4 > tcpPacket.size()) { in validateTcpPacket()
308 return Error() << "TCP header length set too large: " << tcpHeader->doff; in validateTcpPacket()
411 tcphdr* tcpHeader = reinterpret_cast<tcphdr*>(tcpPacket.base()); in translateTcpPacket() local
412 tcpHeader->check = ip_checksum_adjust(tcpHeader->check, oldPseudoSum, newPseudoSum); in translateTcpPacket()
/packages/modules/Connectivity/staticlibs/device/com/android/net/module/util/
DPacketBuilder.java180 final TcpHeader tcpHeader = new TcpHeader(srcPort, dstPort, seq, ack, in writeTcpHeader() local
187 tcpHeader.writeToByteBuffer(mBuffer); in writeTcpHeader()
/packages/modules/Connectivity/Tethering/tests/integration/base/android/net/
DTetheringTester.java650 private static boolean isTcpSynPacket(@NonNull final TcpHeader tcpHeader) {
651 return (tcpHeader.dataOffsetAndControlBits & TCPHDR_SYN) != 0;
662 final TcpHeader tcpHeader = Struct.parse(TcpHeader.class, buf);
663 if (tcpHeader.seq != seq) return false;
671 if (isTcpSynPacket(tcpHeader)) {