Home
last modified time | relevance | path

Searched refs:srcPort (Results 1 – 25 of 59) sorted by relevance

123

/packages/modules/Connectivity/tests/unit/java/android/net/
DKeepalivePacketDataUtilTest.java63 final int srcPort = 1234; in testFromTcpKeepaliveStableParcelable() local
74 testInfo.srcPort = srcPort; in testFromTcpKeepaliveStableParcelable()
91 assertEquals(testInfo.srcPort, resultData.getSrcPort()); in testFromTcpKeepaliveStableParcelable()
121 assertEquals(buf.getShort(), srcPort); in testFromTcpKeepaliveStableParcelable() local
137 final int srcPort = 1234; in testToTcpKeepaliveStableParcelable() local
147 testInfo.srcPort = srcPort; in testToTcpKeepaliveStableParcelable()
162 assertEquals(resultData.srcPort, srcPort); in testToTcpKeepaliveStableParcelable()
180 final int srcPort = 1234; in testParseTcpKeepalivePacketData() local
190 testParcel.srcPort = srcPort; in testParseTcpKeepalivePacketData()
/packages/modules/NetworkStack/common/netlinkclient/src/android/net/netlink/
DConntrackMessage.java109 public final short srcPort; field in ConntrackMessage.Tuple
116 this.srcPort = proto.srcPort; in Tuple()
128 && this.srcPort == that.srcPort in equals()
135 return Objects.hash(srcIp, dstIp, srcPort, dstPort, protoNum); in hashCode()
146 + srcIpStr + ":" + Short.toUnsignedInt(srcPort) + " -> " in toString()
174 public final short srcPort; field in ConntrackMessage.TupleProto
177 public TupleProto(byte protoNum, short srcPort, short dstPort) { in TupleProto() argument
179 this.srcPort = srcPort; in TupleProto()
370 short srcPort = 0; in parseTupleProto() local
383 srcPort = nlAttr.getValueAsBe16((short) 0); in parseTupleProto()
[all …]
/packages/modules/Connectivity/framework/src/android/net/
DNattKeepalivePacketData.java45 public NattKeepalivePacketData(@NonNull InetAddress srcAddress, int srcPort, in NattKeepalivePacketData() argument
48 super(srcAddress, srcPort, dstAddress, dstPort, data); in NattKeepalivePacketData()
56 InetAddress srcAddress, int srcPort, InetAddress dstAddress, int dstPort) in nattKeepalivePacket() argument
79 buf.putShort((short) srcPort); in nattKeepalivePacket()
88 return new NattKeepalivePacketData(srcAddress, srcPort, dstAddress, dstPort, buf.array()); in nattKeepalivePacket()
112 final int srcPort = in.readInt();
115 return NattKeepalivePacketData.nattKeepalivePacket(srcAddress, srcPort,
DTcpKeepalivePacketData.java70 public TcpKeepalivePacketData(@NonNull final InetAddress srcAddress, int srcPort, in TcpKeepalivePacketData() argument
74 super(srcAddress, srcPort, dstAddress, dstPort, data); in TcpKeepalivePacketData()
187 int srcPort = in.readInt(); in readFromParcel() local
196 return new TcpKeepalivePacketData(srcAddress, srcPort, dstAddress, dstPort, packet, tcpSeq, in readFromParcel()
DKeepalivePacketData.java66 @IntRange(from = 0, to = 65535) int srcPort, @NonNull InetAddress dstAddress, in KeepalivePacketData()
71 this.mSrcPort = srcPort; in KeepalivePacketData()
83 if (!IpUtils.isValidUdpOrTcpPort(srcPort) || !IpUtils.isValidUdpOrTcpPort(dstPort)) { in KeepalivePacketData()
/packages/modules/Connectivity/Tethering/src/com/android/networkstack/tethering/
DTether4Key.java49 public final int srcPort; field in Tether4Key
55 final byte[] src4, final byte[] dst4, final int srcPort, in Tether4Key() argument
64 this.srcPort = srcPort; in Tether4Key()
76 Short.toUnsignedInt((short) srcPort), Short.toUnsignedInt((short) dstPort)); in toString()
DTether4Value.java54 public final int srcPort; field in Tether4Value
65 final byte[] src46, final byte[] dst46, final int srcPort, in Tether4Value() argument
77 this.srcPort = srcPort; in Tether4Value()
91 Short.toUnsignedInt((short) srcPort), Short.toUnsignedInt((short) dstPort), in toString()
DOffloadController.java299 String srcAddr, int srcPort, in start()
302 updateNatTimeout(proto, srcAddr, srcPort, dstAddr, dstPort); in start()
787 int proto, String srcAddr, int srcPort, String dstAddr, int dstPort) { in updateNatTimeout() argument
800 if (!isValidUdpOrTcpPort(srcPort)) { in updateNatTimeout()
801 mLog.e("Invalid src port: " + srcPort); in updateNatTimeout()
818 protoName, srcAddr, srcPort, dstAddr, dstPort); in updateNatTimeout()
825 proto, src, srcPort, dst, dstPort, timeoutSec); in updateNatTimeout()
DBpfCoordinator.java1071 publicPort = value.srcPort; in ipv4RuleToString()
1082 protoStr, key.dstMac, key.iif, getIfName(key.iif), src4, key.srcPort, in ipv4RuleToString()
1537 e.tupleOrig.dstIp.getAddress(), e.tupleOrig.srcPort, e.tupleOrig.dstPort); in makeTetherUpstream4Key()
1545 e.tupleReply.dstIp.getAddress(), e.tupleReply.srcPort, e.tupleReply.dstPort); in makeTetherDownstream4Key()
1556 e.tupleReply.srcPort, 0 /* lastUsed, filled by bpf prog only */); in makeTetherUpstream4Value()
1566 e.tupleOrig.dstPort, e.tupleOrig.srcPort, in makeTetherDownstream4Value()
1878 private void updateConntrackTimeout(byte proto, Inet4Address src4, short srcPort, in updateConntrackTimeout() argument
1890 proto, src4, (int) srcPort, dst4, (int) dstPort, timeoutSec); in updateConntrackTimeout()
1897 + "srcPort: " + Short.toUnsignedInt(srcPort) + ", " in updateConntrackTimeout()
1915 ipv4MappedAddressBytesToIpv4Address(v.src46), (short) v.srcPort); in maybeRefreshConntrackTimeout()
[all …]
/packages/modules/IPsec/tests/cts/src/android/ipsec/ike/cts/
DIkeTunUtils.java139 int srcPort = getPort(request, false /* shouldGetSource */); in awaitReqAndInjectResp() local
146 srcPort, in awaitReqAndInjectResp()
308 public final int srcPort; field in PortPair
312 srcPort = sourcePort; in PortPair()
347 int srcPort, in buildIkePacket() argument
359 UdpHeader udpPkt = new UdpHeader(srcPort, dstPort, new BytePayload(ikePacket)); in buildIkePacket()
DPacketUtils.java237 public final short srcPort; field in PacketUtils.UdpHeader
241 public UdpHeader(int srcPort, int dstPort, Payload payload) { in UdpHeader() argument
242 this.srcPort = (short) srcPort; in UdpHeader()
264 resultBuffer.putShort(srcPort); in addPacketBytes()
297 newChecksum = addAndWrapForChecksum(newChecksum, srcPort); in calculateChecksum()
/packages/modules/NetworkStack/common/networkstackclient/src/android/net/util/
DKeepalivePacketDataUtil.java64 parcel.srcPort = pkt.getSrcPort(); in toStableParcelable()
80 parcel.srcPort = pkt.getSrcPort(); in toStableParcelable()
110 tcpDetails.srcPort, in fromStableParcelable()
141 buf.putShort((short) tcpDetails.srcPort); in buildV4Packet()
210 p.srcPort = data.getSrcPort(); in parseTcpKeepalivePacketData()
/packages/modules/Connectivity/tests/common/java/android/net/
DKeepalivePacketDataTest.kt54 srcPort: Int = TEST_SRC_PORT, in address()
58 ) : KeepalivePacketData(srcAddress, srcPort, dstAddress, dstPort, data) in address()
87 data = TestKeepalivePacketData(srcPort = INVALID_PORT) in address()
111 fun testSrcPort() = assertEquals(TEST_SRC_PORT, TestKeepalivePacketData().srcPort)
DTcpKeepalivePacketDataTest.kt37 srcPort: Int = 1234, in <lambda>()
47 ) = TcpKeepalivePacketData(srcAddress, srcPort, dstAddress, dstPort, data, tcpSeq, tcpAck, in <lambda>()
61 assertNotEquals(makeData(srcPort = 1235), makeData()) in <lambda>()
91 assertTrue(str.contains(data.srcPort.toString())) in <lambda>()
DNattKeepalivePacketDataTest.kt58 srcPort: Int = TEST_PORT, in address()
61 ) = NattKeepalivePacketData.nattKeepalivePacket(srcAddress, srcPort, dstAddress, dstPort) in address()
105 assertNotEquals(nattKeepalivePacket(srcPort = TEST_PORT2), nattKeepalivePacket()) in testEquals()
/packages/modules/Connectivity/Tethering/bpf_progs/
Dbpf_tethering.h132 __be16 srcPort; // source & member
143 __be16 srcPort; // source & member
188 __be16 srcPort; // source & member
199 __be16 srcPort; // source & member
Doffload.c489 .srcPort = is_tcp ? tcph->source : udph->source, in do_forward4()
601 bpf_l4_csum_replace(skb, l4_offs_csum, k.srcPort, v->srcPort, sz2 | l4_flags); in do_forward4()
603 &v->srcPort, sz2, 0); in do_forward4()
/packages/modules/Connectivity/tests/cts/net/src/android/net/cts/
DIkeTunUtils.java62 final int srcPort = getDstPort(request); in awaitReqAndInjectResp() local
66 buildIkePacket(srcAddr, dstAddr, srcPort, dstPort, encapExpected, respIkePkt); in awaitReqAndInjectResp()
171 int srcPort, in buildIkePacket() argument
184 final UdpHeader udpPkt = new UdpHeader(srcPort, dstPort, new BytePayload(payload)); in buildIkePacket()
DPacketUtils.java277 public final short srcPort; field in PacketUtils.UdpHeader
281 public UdpHeader(int srcPort, int dstPort, Payload payload) { in UdpHeader() argument
282 this.srcPort = (short) srcPort; in UdpHeader()
304 resultBuffer.putShort(srcPort); in addPacketBytes()
337 newChecksum = addAndWrapForChecksum(newChecksum, srcPort); in calculateChecksum()
/packages/modules/NetworkStack/tests/unit/src/android/net/apf/
DApfTest.java1587 final int srcPort = 12345; in testApfFilterKeepaliveAck() local
1607 parcel.srcPort = srcPort; in testApfFilterKeepaliveAck()
1621 dstPort, srcPort, ackNum, seqNum + 1, 0 /* dataLength */)); in testApfFilterKeepaliveAck()
1625 dstPort, srcPort, ackNum + 100, seqNum, 0 /* dataLength */)); in testApfFilterKeepaliveAck()
1628 dstPort, srcPort, ackNum, seqNum + 1, 10 /* dataLength */)); in testApfFilterKeepaliveAck()
1646 ipv6Parcel.srcPort = srcPort; in testApfFilterKeepaliveAck()
1660 dstPort, srcPort, ackNum, seqNum + 1)); in testApfFilterKeepaliveAck()
1664 dstPort, srcPort, ackNum + 100, seqNum)); in testApfFilterKeepaliveAck()
1683 dstPort, srcPort, ackNum, seqNum + 1, 0 /* dataLength */)); in testApfFilterKeepaliveAck()
1687 dstPort, srcPort, ackNum + 100, seqNum, 0 /* dataLength */)); in testApfFilterKeepaliveAck()
[all …]
/packages/modules/NetworkStack/src/android/net/apf/
DApfFilter.java965 public final int srcPort; field in ApfFilter.NattKeepaliveResponse.NattKeepaliveResponseData
971 srcPort = sentKeepalivePacket.dstPort; in NattKeepaliveResponseData()
973 dstPort = sentKeepalivePacket.srcPort; in NattKeepaliveResponseData()
986 mPortFingerprint = generatePortFingerprint(mPacket.srcPort, mPacket.dstPort); in NattKeepaliveResponse()
989 byte[] generatePortFingerprint(int srcPort, int dstPort) { in generatePortFingerprint() argument
992 fp.putShort((short) srcPort); in generatePortFingerprint()
1032 InetAddress.getByAddress(mPacket.srcAddress), mPacket.srcPort), in toString()
1045 public final int srcPort; field in ApfFilter.TcpKeepaliveAck.TcpKeepaliveAckData
1054 srcPort = sentKeepalivePacket.dstPort; in TcpKeepaliveAckData()
1056 dstPort = sentKeepalivePacket.srcPort; in TcpKeepaliveAckData()
[all …]
/packages/modules/NetworkStack/tests/unit/src/android/net/netlink/
DConntrackMessageTest.java176 assertEquals((short) 44333, conntrackMessage.tupleOrig.srcPort); in testConntrackParseIPv4TcpTimeoutUpdate()
225 assertEquals((short) 37069, conntrackMessage.tupleOrig.srcPort); in testConntrackParseIPv4UdpTimeoutUpdate()
319 assertEquals((short) 62449, conntrackMessage.tupleOrig.srcPort); in testParseCtNew()
327 assertEquals((short) 443, conntrackMessage.tupleReply.srcPort); in testParseCtNew()
/packages/modules/Wifi/service/java/com/android/server/wifi/util/
DFrameParser.java196 int srcPort = 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/service/src/com/android/server/connectivity/
DKeepaliveTracker.java612 int srcPort, in startNattKeepalive() argument
632 srcAddress, srcPort, dstAddress, NATT_PORT); in startNattKeepalive()
714 int srcPort = 0; in startNattKeepalive() local
717 srcPort = ((InetSocketAddress) srcSockAddr).getPort(); in startNattKeepalive()
723 startNattKeepalive(nai, fd, intervalSeconds, cb, srcAddrString, srcPort, in startNattKeepalive()
/packages/modules/NetworkStack/src/android/net/util/
DConnectivityPacketSummary.java374 final int srcPort = asUint(mPacket.getShort()); in parseUDP() local
376 sj.add(asString(srcPort)).add(">").add(asString(dstPort)); in parseUDP()
379 if (srcPort == DHCP4_CLIENT_PORT || dstPort == DHCP4_CLIENT_PORT) { in parseUDP()

123