Home
last modified time | relevance | path

Searched refs:dstPort (Results 1 – 25 of 79) sorted by relevance

1234

/packages/modules/Connectivity/tests/cts/net/src/android/net/cts/
DDscpPolicyTest.kt301 dstPort: Int = 0 in <lambda>()
313 if (sendV6) TEST_TARGET_IPV6_ADDR else TEST_TARGET_IPV4_ADDR, dstPort) in <lambda>()
381 dstPort: Int in <lambda>()
383 if (srcPort == 0 && dstPort == 0) return true in <lambda>()
391 (dstPort == 0 || (dstPort != 0 && dstPort == packetDstPort))) { in <lambda>()
403 dstPort: Int = 0 in <lambda>()
406 sendPacket(agent, sendV6, dstPort) in <lambda>()
424 if (parsePacketIp(buffer, sendV6) && parsePacketPort(buffer, 0, dstPort)) { in <lambda>()
456 validatePacket(agent, dscpValue = 1, dstPort = 4444) in <lambda>()
459 validatePacket(agent, dscpValue = 1, dstPort = 4444) in <lambda>()
[all …]
DIkeTunUtils.java63 final int dstPort = getSrcPort(request); in awaitReqAndInjectResp() local
66 buildIkePacket(srcAddr, dstAddr, srcPort, dstPort, encapExpected, respIkePkt); in awaitReqAndInjectResp()
172 int dstPort, in buildIkePacket() argument
184 final UdpHeader udpPkt = new UdpHeader(srcPort, dstPort, new BytePayload(payload)); in buildIkePacket()
DPacketUtils.java278 public final short dstPort; field in PacketUtils.UdpHeader
281 public UdpHeader(int srcPort, int dstPort, Payload payload) { in UdpHeader() argument
283 this.dstPort = (short) dstPort; in UdpHeader()
305 resultBuffer.putShort(dstPort); in addPacketBytes()
338 newChecksum = addAndWrapForChecksum(newChecksum, dstPort); in calculateChecksum()
/packages/modules/Connectivity/tests/unit/java/android/net/
DKeepalivePacketDataUtilTest.java65 final int dstPort = 4321; in testFromTcpKeepaliveStableParcelable() local
77 testInfo.dstPort = dstPort; in testFromTcpKeepaliveStableParcelable()
93 assertEquals(testInfo.dstPort, resultData.getDstPort()); in testFromTcpKeepaliveStableParcelable()
124 assertEquals(buf.getShort(), dstPort); in testFromTcpKeepaliveStableParcelable() local
139 final int dstPort = 4321; in testToTcpKeepaliveStableParcelable() local
150 testInfo.dstPort = dstPort; in testToTcpKeepaliveStableParcelable()
164 assertEquals(resultData.dstPort, dstPort); in testToTcpKeepaliveStableParcelable()
182 final int dstPort = 4321; in testParseTcpKeepalivePacketData() local
193 testParcel.dstPort = dstPort; in testParseTcpKeepalivePacketData()
/packages/modules/Connectivity/framework/src/android/net/
DNattKeepalivePacketData.java46 @NonNull InetAddress dstAddress, int dstPort, @NonNull byte[] data) throws in NattKeepalivePacketData() argument
48 super(srcAddress, srcPort, dstAddress, dstPort, data); in NattKeepalivePacketData()
56 InetAddress srcAddress, int srcPort, InetAddress dstAddress, int dstPort) in nattKeepalivePacket() argument
63 if (dstPort != NattSocketKeepalive.NATT_PORT) { in nattKeepalivePacket()
80 buf.putShort((short) dstPort); in nattKeepalivePacket()
88 return new NattKeepalivePacketData(srcAddress, srcPort, dstAddress, dstPort, buf.array()); in nattKeepalivePacket()
113 final int dstPort = in.readInt();
116 dstAddress, dstPort);
DTcpKeepalivePacketData.java71 @NonNull final InetAddress dstAddress, int dstPort, @NonNull final byte[] data, in TcpKeepalivePacketData() argument
74 super(srcAddress, srcPort, dstAddress, dstPort, data); in TcpKeepalivePacketData()
188 int dstPort = in.readInt(); in readFromParcel() local
196 return new TcpKeepalivePacketData(srcAddress, srcPort, dstAddress, dstPort, packet, tcpSeq, in readFromParcel()
DKeepalivePacketData.java67 @IntRange(from = 0, to = 65535) int dstPort, in KeepalivePacketData()
72 this.mDstPort = dstPort; in KeepalivePacketData()
83 if (!IpUtils.isValidUdpOrTcpPort(srcPort) || !IpUtils.isValidUdpOrTcpPort(dstPort)) { in KeepalivePacketData()
/packages/modules/Connectivity/common/src/com/android/net/module/util/bpf/
DTether4Key.java52 public final int dstPort; field in Tether4Key
56 final int dstPort) { in Tether4Key() argument
65 this.dstPort = dstPort; in Tether4Key()
76 Short.toUnsignedInt((short) srcPort), Short.toUnsignedInt((short) dstPort)); in toString()
DTether4Value.java57 public final int dstPort; field in Tether4Value
66 final int dstPort, final long lastUsed) { in Tether4Value() argument
78 this.dstPort = dstPort; in Tether4Value()
91 Short.toUnsignedInt((short) srcPort), Short.toUnsignedInt((short) dstPort), in toString()
/packages/modules/Connectivity/service/src/com/android/server/connectivity/
DDscpPolicyValue.java140 final int srcPort, final Range<Integer> dstPort, final short proto, in DscpPolicyValue() argument
142 this(src46, dst46, ifIndex, srcPort, dstPort != null ? dstPort.getLower() : -1, in DscpPolicyValue()
143 dstPort != null ? dstPort.getUpper() : -1, proto, dscp); in DscpPolicyValue()
DAutomaticOnOffKeepaliveTracker.java568 int dstPort, boolean automaticOnOffKeepalives, @Nullable Network underpinnedNetwork) { in startNattKeepalive() argument
570 intervalSeconds, cb, srcAddrString, srcPort, dstAddrString, dstPort); in startNattKeepalive()
577 + " → " + dstAddrString + ":" + dstPort in startNattKeepalive()
600 int dstPort, in startNattKeepalive() argument
604 resourceId, intervalSeconds, cb, srcAddrString, dstAddrString, dstPort); in startNattKeepalive()
611 + " → " + dstAddrString + ":" + dstPort in startNattKeepalive()
DTcpKeepaliveController.java162 tcpDetails.dstPort, in fromStableParcelable()
192 buf.putShort((short) tcpDetails.dstPort); in buildV4Packet()
247 tcpDetails.dstPort = getPort((InetSocketAddress) dstSockAddr); in switchToRepairMode()
/packages/modules/Connectivity/tests/common/java/android/net/
DKeepalivePacketDataTest.kt56 dstPort: Int = TEST_DST_PORT, in address()
58 ) : KeepalivePacketData(srcAddress, srcPort, dstAddress, dstPort, data) in address()
94 data = TestKeepalivePacketData(dstPort = INVALID_PORT) in address()
115 fun testDstPort() = assertEquals(TEST_DST_PORT, TestKeepalivePacketData().dstPort)
DTcpKeepalivePacketDataTest.kt38 dstPort: Int = 4321, in <lambda>()
46 ) = TcpKeepalivePacketData(srcAddress, srcPort, dstAddress, dstPort, data, tcpSeq, tcpAck, in <lambda>()
62 assertNotEquals(makeData(dstPort = 4322), makeData()) in <lambda>()
88 assertTrue(str.contains(data.dstPort.toString())) in <lambda>()
DNattKeepalivePacketDataTest.kt59 dstPort: Int = NATT_PORT in address()
60 ) = NattKeepalivePacketData.nattKeepalivePacket(srcAddress, srcPort, dstAddress, dstPort) in address()
65 nattKeepalivePacket(dstPort = TEST_PORT) in address()
/packages/modules/IPsec/tests/cts/src/android/ipsec/ike/cts/
DIkeTunUtils.java140 int dstPort = getPort(request, true /* shouldGetSource */); in awaitReqAndInjectResp() local
147 dstPort, in awaitReqAndInjectResp()
309 public final int dstPort; field in PortPair
313 dstPort = destinationPort; in PortPair()
348 int dstPort, in buildIkePacket() argument
359 UdpHeader udpPkt = new UdpHeader(srcPort, dstPort, new BytePayload(ikePacket)); in buildIkePacket()
DPacketUtils.java238 public final short dstPort; field in PacketUtils.UdpHeader
241 public UdpHeader(int srcPort, int dstPort, Payload payload) { in UdpHeader() argument
243 this.dstPort = (short) dstPort; in UdpHeader()
265 resultBuffer.putShort(dstPort); in addPacketBytes()
298 newChecksum = addAndWrapForChecksum(newChecksum, dstPort); in calculateChecksum()
/packages/modules/Wifi/service/java/com/android/server/wifi/util/
DFrameParser.java180 int dstPort = getUnsignedShort(data); in parseTcpPacket() local
182 if (dstPort == HTTPS_PORT) { in parseTcpPacket()
184 } else if (HTTP_PORTS.contains(dstPort)) { in parseTcpPacket()
197 int dstPort = getUnsignedShort(data); in parseUdpPacket() local
201 if ((srcPort == UDP_PORT_BOOTPC && dstPort == UDP_PORT_BOOTPS) in parseUdpPacket()
202 || (srcPort == UDP_PORT_BOOTPS && dstPort == UDP_PORT_BOOTPC)) { in parseUdpPacket()
206 if (srcPort == UDP_PORT_NTP || dstPort == UDP_PORT_NTP) { in parseUdpPacket()
/packages/modules/Connectivity/bpf_progs/
Doffload.h119 __be16 dstPort; // destination tcp/udp/... ports member
150 __be16 dstPort; // destination TCP/UDP/... ports member
161 __be16 dstPort; // destination tcp/udp/... ports member
/packages/modules/NetworkStack/common/networkstackclient/src/android/net/util/
DKeepalivePacketDataUtil.java58 parcel.dstPort = pkt.getDstPort(); in toStableParcelable()
74 parcel.dstPort = pkt.getDstPort(); in toStableParcelable()
137 p.dstPort = data.getDstPort(); in parseTcpKeepalivePacketData()
/packages/modules/Connectivity/Tethering/src/com/android/networkstack/tethering/
DOffloadController.java290 String dstAddr, int dstPort) { in start()
292 updateNatTimeout(proto, srcAddr, srcPort, dstAddr, dstPort); in start()
786 int proto, String srcAddr, int srcPort, String dstAddr, int dstPort) { in updateNatTimeout() argument
810 if (!isValidUdpOrTcpPort(dstPort)) { in updateNatTimeout()
811 mLog.e("Invalid dst port: " + dstPort); in updateNatTimeout()
817 protoName, srcAddr, srcPort, dstAddr, dstPort); in updateNatTimeout()
824 proto, src, srcPort, dst, dstPort, timeoutSec); in updateNatTimeout()
DBpfCoordinator.java1302 publicPort = key.dstPort; in ipv4RuleToString()
1317 public4, publicPort, dst4, value.dstPort, value.ethDstMac, value.pmtu, ageStr); in ipv4RuleToString()
1776 e.tupleOrig.dstIp.getAddress(), e.tupleOrig.srcPort, e.tupleOrig.dstPort); in makeTetherUpstream4Key()
1784 e.tupleReply.dstIp.getAddress(), e.tupleReply.srcPort, e.tupleReply.dstPort); in makeTetherDownstream4Key()
1794 toIpv4MappedAddressBytes(e.tupleReply.srcIp), e.tupleReply.dstPort, in makeTetherUpstream4Value()
1805 e.tupleOrig.dstPort, e.tupleOrig.srcPort, in makeTetherDownstream4Value()
1812 NON_OFFLOADED_UPSTREAM_IPV4_TCP_PORTS, e.tupleOrig.dstPort); in allowOffload()
2134 Inet4Address dst4, short dstPort) { in updateConntrackTimeout() argument
2141 + "dstPort: " + Short.toUnsignedInt(dstPort) + ")"); in updateConntrackTimeout()
2153 proto, src4, (int) srcPort, dst4, (int) dstPort, timeoutSec); in updateConntrackTimeout()
[all …]
/packages/modules/NetworkStack/tests/unit/src/android/net/apf/
DApfTest.java2075 final int dstPort = 54321; in testApfFilterKeepaliveAck() local
2096 parcel.dstPort = dstPort; in testApfFilterKeepaliveAck()
2108 dstPort, srcPort, ackNum, seqNum + 1, 0 /* dataLength */)); in testApfFilterKeepaliveAck()
2112 dstPort, srcPort, ackNum + 100, seqNum, 0 /* dataLength */)); in testApfFilterKeepaliveAck()
2115 dstPort, srcPort, ackNum, seqNum + 1, 10 /* dataLength */)); in testApfFilterKeepaliveAck()
2135 ipv6Parcel.dstPort = dstPort; in testApfFilterKeepaliveAck()
2147 dstPort, srcPort, ackNum, seqNum + 1)); in testApfFilterKeepaliveAck()
2151 dstPort, srcPort, ackNum + 100, seqNum)); in testApfFilterKeepaliveAck()
2170 dstPort, srcPort, ackNum, seqNum + 1, 0 /* dataLength */)); in testApfFilterKeepaliveAck()
2174 dstPort, srcPort, ackNum + 100, seqNum, 0 /* dataLength */)); in testApfFilterKeepaliveAck()
[all …]
/packages/modules/NetworkStack/src/android/net/apf/
DApfFilter.java1042 public final int dstPort; field in ApfFilter.NattKeepaliveResponse.NattKeepaliveResponseData
1046 srcPort = sentKeepalivePacket.dstPort; in NattKeepaliveResponseData()
1048 dstPort = sentKeepalivePacket.srcPort; in NattKeepaliveResponseData()
1061 mPortFingerprint = generatePortFingerprint(mPacket.srcPort, mPacket.dstPort); in NattKeepaliveResponse()
1064 byte[] generatePortFingerprint(int srcPort, int dstPort) { in generatePortFingerprint() argument
1068 fp.putShort((short) dstPort); in generatePortFingerprint()
1109 InetAddress.getByAddress(mPacket.dstAddress), mPacket.dstPort)); in toString()
1122 public final int dstPort; field in ApfFilter.TcpKeepaliveAck.TcpKeepaliveAckData
1129 srcPort = sentKeepalivePacket.dstPort; in TcpKeepaliveAckData()
1131 dstPort = sentKeepalivePacket.srcPort; in TcpKeepaliveAckData()
[all …]
/packages/modules/Connectivity/Tethering/tests/integration/base/android/net/
DEthernetTetheringTestBase.java669 short srcPort, short dstPort, @Nullable final ByteBuffer payload) in buildUdpPacket() argument
693 packetBuilder.writeUdpHeader(srcPort, dstPort); in buildUdpPacket()
708 @NonNull final InetAddress dstIp, short srcPort, short dstPort, in buildUdpPacket() argument
711 dstPort, payload); in buildUdpPacket()
769 short srcPort, short dstPort, final short seq, final short ack, in buildTcpPacket() argument
792 packetBuilder.writeTcpHeader(srcPort, dstPort, seq, ack, tcpFlags, WINDOW, URGENT_POINTER); in buildTcpPacket()

1234