Home
last modified time | relevance | path

Searched refs:getPort (Results 1 – 25 of 65) sorted by relevance

123

/packages/modules/Connectivity/tests/cts/net/src/android/net/cts/
DIpSecBaseTest.java155 protected static int getPort(FileDescriptor sock) throws Exception { in getPort() method in IpSecBaseTest
156 return ((InetSocketAddress) Os.getsockname(sock)).getPort(); in getPort()
164 int getPort() throws Exception; in getPort() method
219 public int getPort() throws Exception { in getPort() method in IpSecBaseTest.NativeSocket
220 return IpSecBaseTest.getPort(mFd); in getPort()
248 return new JavaTcpSocket(new AcceptedTcpFileDescriptorSocket(newFd, peer, getPort())); in acceptToJavaSocket()
299 public int getPort() throws Exception { in getPort() method in IpSecBaseTest.JavaUdpSocket
354 public int getPort() throws Exception { in getPort() method in IpSecBaseTest.JavaTcpSocket
389 this.port = remote.getPort(); in FileDescriptorSocketImpl()
539 Os.connect(leftSock.mFd, localAddr, rightSock.getPort()); in getNativeUdpSocketPair()
[all …]
DProxyInfoTest.java70 assertEquals(TEST_PORT, proxy1.getPort()); in testBuildDirectProxy()
80 assertEquals(TEST_PORT, proxy2.getPort()); in testBuildDirectProxy()
90 assertEquals(LOCAL_PORT, proxy1.getPort()); in testBuildPacProxy()
98 assertEquals(TEST_PORT, proxy2.getPort()); in testBuildPacProxy()
131 assertEquals(0, proxy.getPort()); in checkEmpty()
DUriTest.java105 assertEquals(42, uri.getPort()); in testStringUri()
110 assertEquals(42, uri.getPort()); in testStringUri()
118 assertEquals(-1, uri.getPort()); in testStringUri()
123 assertEquals(-1, uri.getPort()); in testStringUri()
128 assertEquals(-1, uri.getPort()); in testStringUri()
135 assertEquals(-1, uri.getPort()); in testStringUri()
144 assertEquals(-1, uri.getPort()); in testStringUri()
154 assertEquals(1234, uri.getPort()); in testStringUri()
367 assertEquals(-1, uri.getPort()); in testOpaqueUri()
DIpSecManagerTunnelTest.java337 int innerSocketPort = socket.getPort(); in getIpSecTunnelTestRunnable()
347 socket.sendTo(TEST_DATA, remoteInner, socket.getPort()); in getIpSecTunnelTestRunnable()
450 socket.getPort(),
460 socket.getPort(),
595 transformBuilder.setIpv4Encapsulation(encapSocket, encapSocket.getPort());
622 useEncap ? encapSocket.getPort() : 0,
718 useEncap ? encapSocket.getPort() : 0,
743 useEncap ? encapSocket.getPort() : 0,
804 useEncap ? encapSocket.getPort() : 0,
853 transformBuilder.setIpv4Encapsulation(encapSocket, encapSocket.getPort());
DIkeTunUtils.java147 return getPort(pkt, true); in getSrcPort()
151 return getPort(pkt, false); in getDstPort()
154 private static int getPort(byte[] pkt, boolean getSrcPort) { in getPort() method in IkeTunUtils
DIpSecManagerTest.java194 sockLeft.sendTo(TEST_DATA, local, sockRight.getPort()); in checkUnconnectedUdp()
198 sockRight.sendTo(TEST_DATA, local, sockLeft.getPort()); in checkUnconnectedUdp()
518 transformBuilder.setIpv4Encapsulation(encapSocket, encapSocket.getPort()); in checkTransform()
622 remoteSocket.sendTo(dataWithEspHeader, localAddr, wrappedEncapSocket.getPort()); in checkIkePacket()
627 wrappedEncapSocket.sendTo(dataWithEspHeader, localAddr, remoteSocket.getPort()); in checkIkePacket()
668 .setIpv4Encapsulation(encapSocket, encapSocket.getPort()) in testIkeOverUdpEncapSocket()
1520 assertTrue("Returned invalid port", encapSocket.getPort() == port); in testOpenUdpEncapSocketSpecificPort()
1526 assertTrue("Returned invalid port", encapSocket.getPort() != 0); in testOpenUdpEncapSocketRandomPort()
/packages/modules/NetworkStack/common/netlinkclient/src/android/net/netlink/
DStructInetDiagSockId.java60 byteBuffer.putShort((short) mLocSocketAddress.getPort()); in pack()
61 byteBuffer.putShort((short) mRemSocketAddress.getPort()); in pack()
78 + "idiag_sport{" + mLocSocketAddress.getPort() + "}, " in toString()
79 + "idiag_dport{" + mRemSocketAddress.getPort() + "}, " in toString()
/packages/modules/IPsec/tests/cts/src/android/ipsec/ike/cts/
DIkeTunUtils.java139 int srcPort = getPort(request, false /* shouldGetSource */); in awaitReqAndInjectResp()
140 int dstPort = getPort(request, true /* shouldGetSource */); in awaitReqAndInjectResp()
319 getPort(outboundIkePkt, true /* shouldGetSource */), in getSrcDestPortPair()
320 getPort(outboundIkePkt, false /* shouldGetSource */)); in getSrcDestPortPair()
335 private static int getPort(byte[] pkt, boolean shouldGetSource) { in getPort() method
/packages/modules/Connectivity/service/src/com/android/server/connectivity/
DTcpKeepaliveController.java145 tcpDetails.srcPort = getPort((InetSocketAddress) srcSockAddr); in switchToRepairMode()
159 tcpDetails.dstPort = getPort((InetSocketAddress) dstSockAddr); in switchToRepairMode()
298 private static int getPort(InetSocketAddress inetAddr) { in getPort() method in TcpKeepaliveController
299 return inetAddr.getPort(); in getPort()
/packages/services/Car/tests/carservice_unit_test/src/com/android/car/audio/
DCarAudioDeviceInfoTest.java51 when(audioDeviceInfo.getPort()).thenReturn(null); in constructor_requiresNonNullGain()
140 assertThat(info.getAudioDevicePort()).isEqualTo(audioDeviceInfo.getPort()); in getAudioDevicePort_returnsValueFromDeviceInfo()
225 AudioGain expectedGain = audioDeviceInfo.getPort().gains()[0]; in getAudioGain_returnsGainFromDeviceInfo()
238 when(mockInfo.getPort()).thenReturn(mockPort); in getMockAudioDeviceInfo()
/packages/modules/Connectivity/framework/src/android/net/
DConnectionInfo.java52 out.writeInt(local.getPort()); in writeToParcel()
54 out.writeInt(remote.getPort()); in writeToParcel()
DQosSocketFilter.java175 return startPort <= filterSocketAddress.getPort() in matchesAddress()
176 && endPort >= filterSocketAddress.getPort() in matchesAddress()
DQosSocketInfo.java163 dest.writeInt(mLocalSocketAddress.getPort()); in writeToParcel()
171 dest.writeInt(mRemoteSocketAddress.getPort()); in writeToParcel()
DProxyInfo.java169 mPort = source.getPort(); in ProxyInfo()
213 public int getPort() { in getPort() method in ProxyInfo
/packages/modules/Wifi/service/java/com/android/server/wifi/hotspot2/soap/
DHttpsServiceConnection.java126 public int getPort() { in getPort() method in HttpsServiceConnection
127 return mConnection.getURL().getPort(); in getPort()
/packages/services/BuiltInPrintService/src/com/android/bips/ipp/
DGetCapabilitiesTask.java58 InetSocketAddress a = new InetSocketAddress(uri.getHost(), uri.getPort()); in isDeviceOnline()
116 mUri.getPort(), mUri.getPath(), mUri.getScheme(), mTimeout, printerCaps); in doInBackground()
DStartJobTask.java173 + " port=" + mDestination.getPort() + " mime=" + MIME_TYPE_PDF in doInBackground()
177 result = mBackend.nativeStartJob(Backend.getIp(address), mDestination.getPort(), in doInBackground()
/packages/apps/Settings/src/com/android/settings/development/
DAdbIpAddressPreferenceController.java94 protected int getPort() { in getPort() method in AdbIpAddressPreferenceController
111 int port = getPort(); in updateConnectivity()
/packages/modules/Connectivity/tests/unit/java/android/net/nsd/
DNsdServiceInfoTest.java174 assertTrue(original.getPort() == result.getPort()); in checkParcelable()
/packages/modules/Wifi/service/tests/wifitests/src/com/android/server/wifi/hotspot2/soap/
DHttpsServiceConnectionTest.java197 assertEquals(mUrl.getPort(), mHttpsServiceConnection.getPort()); in verifyGetPort()
/packages/services/BuiltInPrintService/src/com/android/bips/discovery/
DManualDiscovery.java99 int givenPort = printerUri.getPort(); in addManualPrinter()
112 String authority = hostname + ":" + (givenPort == -1 ? uri.getPort() : givenPort); in addManualPrinter()
/packages/services/Car/service/src/com/android/car/audio/
DCarAudioDeviceInfo.java68 AudioGain audioGain = Objects.requireNonNull(getAudioGain(audioDeviceInfo.getPort()), in CarAudioDeviceInfo()
83 return mAudioDeviceInfo.getPort(); in getAudioDevicePort()
/packages/modules/NetworkStack/tests/integration/src/android/net/netlink/
DInetDiagSocketIntegrationTest.java112 int remotePort = ((InetSocketAddress) Os.getsockname(remoteFd)).getPort(); in TcpConnection()
157 final int localPort = udp.local.getPort(); in findLikelyFreeUdpPort()
/packages/modules/Connectivity/tests/cts/hostside/app/src/com/android/cts/net/hostside/
DVpnTest.java383 port = local.getPort(); in checkPing()
489 InetSocketAddress rem = new InetSocketAddress(s.getInetAddress(), s.getPort()); in checkConnectionOwnerUidUdp()
497 InetSocketAddress rem = new InetSocketAddress(s.getInetAddress(), s.getPort()); in checkConnectionOwnerUidTcp()
841 InetSocketAddress rem = new InetSocketAddress(s.getInetAddress(), s.getPort()); in testGetConnectionOwnerUidSecurity()
1160 String expectedPort = expected == null ? null : String.valueOf(expected.getPort()); in assertDefaultProxy()
/packages/modules/Connectivity/tests/unit/java/android/net/
DIpSecManagerTest.java196 assertEquals(TEST_UDP_ENCAP_PORT, encapSocket.getPort()); in testOpenEncapsulationSocket()
246 assertEquals(TEST_UDP_ENCAP_PORT, encapSocket.getPort()); in testOpenEncapsulationSocketOnRandomPort()

123