/libcore/ojluni/src/main/native/ |
D | UnixDomainSockets.c | 53 jbyteArray sockaddrToUnixAddressBytes(JNIEnv *env, struct sockaddr_un *sa, socklen_t len) in sockaddrToUnixAddressBytes() argument 55 if (sa->sun_family == AF_UNIX) { in sockaddrToUnixAddressBytes() 60 namelen = strlen(sa->sun_path); in sockaddrToUnixAddressBytes() 64 (*env)->SetByteArrayRegion(env, name, 0, namelen, (jbyte*)sa->sun_path); in sockaddrToUnixAddressBytes() 74 jint unixSocketAddressToSockaddr(JNIEnv *env, jbyteArray path, struct sockaddr_un *sa, int *len) in unixSocketAddressToSockaddr() argument 76 memset(sa, 0, sizeof(struct sockaddr_un)); in unixSocketAddressToSockaddr() 77 sa->sun_family = AF_UNIX; in unixSocketAddressToSockaddr() 89 memcpy(sa->sun_path, pname, name_len); in unixSocketAddressToSockaddr() 116 struct sockaddr_un sa; in Java_sun_nio_ch_UnixDomainSockets_bind0() local 120 if (unixSocketAddressToSockaddr(env, path, &sa, &sa_len) != 0) in Java_sun_nio_ch_UnixDomainSockets_bind0() [all …]
|
D | DatagramChannelImpl.c | 104 SOCKADDR sa; in Java_sun_nio_ch_DatagramChannelImpl_disconnect0() local 106 memset(&sa, 0, sizeof(sa)); in Java_sun_nio_ch_DatagramChannelImpl_disconnect0() 110 struct sockaddr_in6 *him6 = (struct sockaddr_in6 *)&sa; in Java_sun_nio_ch_DatagramChannelImpl_disconnect0() 120 struct sockaddr_in *him4 = (struct sockaddr_in*)&sa; in Java_sun_nio_ch_DatagramChannelImpl_disconnect0() 129 rv = connect(fd, (struct sockaddr *)&sa, len); in Java_sun_nio_ch_DatagramChannelImpl_disconnect0() 158 SOCKADDR sa; in Java_sun_nio_ch_DatagramChannelImpl_receive0() local 168 memset(&sa, 0, sa_len); in Java_sun_nio_ch_DatagramChannelImpl_receive0() 172 n = recvfrom(fd, buf, len, 0, (struct sockaddr *)&sa, &sa_len); in Java_sun_nio_ch_DatagramChannelImpl_receive0() 196 if (n == 0 && ((struct sockaddr *)&sa)->sa_family == 0) { in Java_sun_nio_ch_DatagramChannelImpl_receive0() 210 if (!NET_SockaddrEqualsInetAddress(env, (struct sockaddr *)&sa, in Java_sun_nio_ch_DatagramChannelImpl_receive0() [all …]
|
D | ServerSocketChannelImpl.c | 89 struct sockaddr *sa; in Java_sun_nio_ch_ServerSocketChannelImpl_accept0() local 95 NET_AllocSockaddr(&sa, &alloc_len); in Java_sun_nio_ch_ServerSocketChannelImpl_accept0() 96 if (sa == NULL) { in Java_sun_nio_ch_ServerSocketChannelImpl_accept0() 108 newfd = accept(ssfd, sa, &sa_len); in Java_sun_nio_ch_ServerSocketChannelImpl_accept0() 119 free((void *)sa); in Java_sun_nio_ch_ServerSocketChannelImpl_accept0() 129 remote_ia = NET_SockaddrToInetAddress(env, sa, (int *)&remote_port); in Java_sun_nio_ch_ServerSocketChannelImpl_accept0() 130 free((void *)sa); in Java_sun_nio_ch_ServerSocketChannelImpl_accept0()
|
D | NativeThread.c | 87 struct sigaction sa, osa; in NativeThread_init() local 88 sa.sa_handler = nullHandler; in NativeThread_init() 89 sa.sa_flags = 0; in NativeThread_init() 90 sigemptyset(&sa.sa_mask); in NativeThread_init() 91 if (sigaction(INTERRUPT_SIGNAL, &sa, &osa) < 0) in NativeThread_init()
|
D | Net.c | 314 SOCKADDR sa; in Java_sun_nio_ch_Net_bind0() local 318 … if (NET_InetAddressToSockaddr(env, iao, port, (struct sockaddr *)&sa, &sa_len, preferIPv6) != 0) { in Java_sun_nio_ch_Net_bind0() 322 rv = NET_Bind(fdval(env, fdo), (struct sockaddr *)&sa, sa_len); in Java_sun_nio_ch_Net_bind0() 339 SOCKADDR sa; in Java_sun_nio_ch_Net_connect0() local 343 if (NET_InetAddressToSockaddr(env, iao, port, (struct sockaddr *) &sa, in Java_sun_nio_ch_Net_connect0() 349 rv = connect(fdval(env, fdo), (struct sockaddr *)&sa, sa_len); in Java_sun_nio_ch_Net_connect0() 364 SOCKADDR sa; in Java_sun_nio_ch_Net_localPort() local 366 if (getsockname(fdval(env, fdo), (struct sockaddr *)&sa, &sa_len) < 0) { in Java_sun_nio_ch_Net_localPort() 377 sin = (struct sockaddr_in *) &sa; in Java_sun_nio_ch_Net_localPort() 398 return NET_GetPortFromSockaddr((struct sockaddr *)&sa); in Java_sun_nio_ch_Net_localPort() [all …]
|
D | nio_util.h | 80 struct sockaddr_un *sa, 85 struct sockaddr_un *sa,
|
D | UNIXProcess_md.c | 206 struct sigaction sa; in setSIGCHLDHandler() local 207 sa.sa_handler = SIG_DFL; in setSIGCHLDHandler() 208 sigemptyset(&sa.sa_mask); in setSIGCHLDHandler() 209 sa.sa_flags = SA_NOCLDSTOP | SA_RESTART; in setSIGCHLDHandler() 210 if (sigaction(SIGCHLD, &sa, NULL) < 0) in setSIGCHLDHandler()
|
/libcore/ojluni/src/main/java/java/net/ |
D | Proxy.java | 61 private SocketAddress sa; field in Proxy 77 sa = null; in Proxy() 93 public Proxy(Type type, SocketAddress sa) { in Proxy() argument 94 if ((type == Type.DIRECT) || !(sa instanceof InetSocketAddress)) in Proxy() 95 … throw new IllegalArgumentException("type " + type + " is not compatible with address " + sa); in Proxy() 97 this.sa = sa; in Proxy() 117 return sa; in address()
|
D | ProxySelector.java | 164 public abstract void connectFailed(URI uri, SocketAddress sa, IOException ioe); in connectFailed() argument
|
/libcore/luni/src/test/java/libcore/android/system/ |
D | UnixSocketAddressTest.java | 30 UnixSocketAddress sa = UnixSocketAddress.createFileSystem(path); in testFilesystemSunPath() local 36 assertTrue(Arrays.equals(expected, sa.getSunPath())); in testFilesystemSunPath() 40 UnixSocketAddress sa = UnixSocketAddress.createUnnamed(); in testUnnamedSunPath() local 41 assertEquals(0, sa.getSunPath().length); in testUnnamedSunPath() 46 UnixSocketAddress sa = UnixSocketAddress.createAbstract(abstractName); in testAbstractSunPath() local 51 assertTrue(Arrays.equals(expected, sa.getSunPath())); in testAbstractSunPath()
|
/libcore/ojluni/src/main/java/sun/nio/ch/ |
D | UnixDomainSockets.java | 70 static UnixDomainSocketAddress getRevealedLocalAddress(SocketAddress sa) { in getRevealedLocalAddress() argument 71 UnixDomainSocketAddress addr = (UnixDomainSocketAddress) sa; in getRevealedLocalAddress() 90 static String getRevealedLocalAddressAsString(SocketAddress sa) { in getRevealedLocalAddressAsString() argument 91 return (System.getSecurityManager() != null) ? sa.toString() : ""; in getRevealedLocalAddressAsString() 94 static UnixDomainSocketAddress checkAddress(SocketAddress sa) { in checkAddress() argument 95 if (sa == null) in checkAddress() 97 if (!(sa instanceof UnixDomainSocketAddress)) in checkAddress() 99 return (UnixDomainSocketAddress) sa; in checkAddress() 146 static int connect(FileDescriptor fd, SocketAddress sa) throws IOException { in connect() argument 147 return UnixDomainSockets.connect(fd, ((UnixDomainSocketAddress) sa).getPath()); in connect()
|
D | Net.java | 96 public static InetSocketAddress checkAddress(SocketAddress sa) { in checkAddress() argument 97 if (sa == null) in checkAddress() 103 if (!(sa instanceof InetSocketAddress)) in checkAddress() 105 InetSocketAddress isa = (InetSocketAddress)sa; in checkAddress() 114 static InetSocketAddress asInetSocketAddress(SocketAddress sa) { in asInetSocketAddress() argument 115 if (!(sa instanceof InetSocketAddress)) in asInetSocketAddress() 117 return (InetSocketAddress)sa; in asInetSocketAddress()
|
/libcore/luni/src/main/native/ |
D | AsynchronousCloseMonitor.cpp | 83 struct sigaction sa; in init() local 84 memset(&sa, 0, sizeof(sa)); in init() 85 sa.sa_handler = blockedThreadSignalHandler; in init() 86 sa.sa_flags = 0; in init() 87 int rc = sigaction(BLOCKED_THREAD_SIGNAL, &sa, NULL); in init()
|
D | NetworkUtilities.cpp | 38 jobject sockaddrToInetAddress(JNIEnv* env, const sockaddr* sa, jint* port) { in sockaddrToInetAddress() argument 41 if (sa->sa_family == AF_INET6) { in sockaddrToInetAddress() 42 const sockaddr_in6& sin6 = *reinterpret_cast<const sockaddr_in6*>(sa); in sockaddrToInetAddress() 46 memcpy(&tmp, sa, sizeof(sockaddr_in6)); in sockaddrToInetAddress() 61 if (sa->sa_family == AF_INET) { in sockaddrToInetAddress() 62 const sockaddr_in& sin = *reinterpret_cast<const sockaddr_in*>(sa); in sockaddrToInetAddress() 66 } else if (sa->sa_family == AF_INET6) { in sockaddrToInetAddress() 67 const sockaddr_in6& sin6 = *reinterpret_cast<const sockaddr_in6*>(sa); in sockaddrToInetAddress() 76 "sockaddrToInetAddress unsupported family: %d", sa->sa_family); in sockaddrToInetAddress()
|
D | NetworkUtilities.h | 24 jobject sockaddrToInetAddress(JNIEnv* env, const sockaddr* sa, int* port);
|
D | libcore_io_Linux.cpp | 110 static bool isIPv4MappedAddress(const sockaddr *sa) { in isIPv4MappedAddress() argument 111 const sockaddr_in6 *sin6 = reinterpret_cast<const sockaddr_in6*>(sa); in isIPv4MappedAddress() 112 return sa != NULL && sa->sa_family == AF_INET6 && in isIPv4MappedAddress() 825 sockaddr* sa = reinterpret_cast<sockaddr*>(&ss); in doGetSockName() local 828 int rc = is_sockname ? TEMP_FAILURE_RETRY(getsockname(fd, sa, &byteCount)) in doGetSockName() 829 : TEMP_FAILURE_RETRY(getpeername(fd, sa, &byteCount)); in doGetSockName() 1074 const sockaddr* sa = reinterpret_cast<const sockaddr*>(&ss); in Linux_bindSocketAddress() local 1076 (void) NET_FAILURE_RETRY(env, int, bind, javaFd, sa, sa_len); in Linux_bindSocketAddress() 1259 const sockaddr* sa = reinterpret_cast<const sockaddr*>(&ss); in Linux_connectSocketAddress() local 1261 (void) NET_FAILURE_RETRY(env, int, connect, javaFd, sa, sa_len); in Linux_connectSocketAddress() [all …]
|
/libcore/ojluni/src/test/java/util/Arrays/ |
D | CopyMethods.java | 119 String[] sa = (String[]) makeArray(3, String.class); in simpleTests() local 121 System.out.println("String[] sa = "+Arrays.toString(sa)); in simpleTests() 122 check(sa[0].equals(Integer.toHexString(testValues[0]))); in simpleTests() 123 check(sa[1].equals(Integer.toHexString(testValues[1]))); in simpleTests() 124 check(sa[2].equals(Integer.toHexString(testValues[2]))); in simpleTests() 125 checkArray(sa, String.class, sa.length, 0, sa.length); in simpleTests() 126 String[] sa4 = Arrays.copyOf(sa, sa.length+1); in simpleTests() 127 check(sa4[0] == sa[0]); in simpleTests() 128 check(sa4[1] == sa[1]); in simpleTests() 129 check(sa4[2] == sa[2]); in simpleTests() [all …]
|
/libcore/ojluni/src/test/java/util/Collections/ |
D | NCopies.java | 82 String[] sa = x.toArray(new String[x.size()]); in checkFoos() local 83 check(sa.getClass() == String[].class); in checkFoos() 84 check(sa[0].equals("foo")); in checkFoos() 85 check(sa[sa.length-1].equals("foo")); in checkFoos()
|
/libcore/ojluni/annotations/hiddenapi/java/net/ |
D | Proxy.java | 38 public Proxy(java.net.Proxy.Type type, java.net.SocketAddress sa) { in Proxy() argument 68 private java.net.SocketAddress sa; field in Proxy
|
/libcore/harmony-tests/src/test/java/org/apache/harmony/tests/java/net/ |
D | ProxySelectorTest.java | 471 SocketAddress sa = InetSocketAddress.createUnresolved("127.0.0.1", 0); in test_connectionFailedLjava_net_URILjava_net_SocketAddressLjava_io_IOException_IllegalArguement() local 473 selector.connectFailed(null, sa, new SocketException()); in test_connectionFailedLjava_net_URILjava_net_SocketAddressLjava_io_IOException_IllegalArguement() 485 selector.connectFailed(httpUri, sa, null); in test_connectionFailedLjava_net_URILjava_net_SocketAddressLjava_io_IOException_IllegalArguement() 526 SocketAddress sa = InetSocketAddress.createUnresolved(host, port); in assertProxyEquals() local 527 Proxy proxy = new Proxy(type, sa); in assertProxyEquals() 536 public void connectFailed(URI uri, SocketAddress sa, IOException ioe) { in connectFailed() argument
|
/libcore/ojluni/src/main/java/java/lang/ |
D | Package.java | 236 String [] sa = specVersion.split("\\.", -1); in isCompatibleWith() local 237 int [] si = new int[sa.length]; in isCompatibleWith() 238 for (int i = 0; i < sa.length; i++) { in isCompatibleWith() 239 si[i] = Integer.parseInt(sa[i]); in isCompatibleWith()
|
/libcore/luni/src/test/java/libcore/java/util/ |
D | SpliteratorTester.java | 206 Spliterator<T> sa = spliterable.spliterator(); in runOrderedTests() local 208 Spliterator<T> saSplit = sa.trySplit(); in runOrderedTests() 222 assertEquals(toList(sa), toList(sb)); in runOrderedTests() 224 assertEquals(elements, toList(sa)); in runOrderedTests()
|
/libcore/ojluni/src/test/java/util/Collection/ |
D | SetFactories.java | 62 String[] sa = new String[NUM_STRINGS]; 64 sa[i] = String.valueOf((char)('a' + i)); 66 stringArray = sa;
|
/libcore/ojluni/src/test/java/util/List/ |
D | ListFactories.java | 63 String[] sa = new String[NUM_STRINGS]; 65 sa[i] = String.valueOf((char)('a' + i)); 67 stringArray = sa;
|
/libcore/ojluni/src/main/java/sun/net/spi/ |
D | DefaultProxySelector.java | 337 public void connectFailed(URI uri, SocketAddress sa, IOException ioe) { in connectFailed() argument 338 if (uri == null || sa == null || ioe == null) { in connectFailed()
|