Lines Matching refs:sa_len
336 * Returns a jbyteArray containing the sockaddr_un.sun_path from ss. As per unix(7) sa_len should be
342 const socklen_t& sa_len) {
350 // The length of sun_path is sa_len minus the length of the overhead (ss_family).
353 size_t pathLength = sa_len - offsetof(struct sockaddr_un, sun_path);
367 static jobject makeSocketAddress(JNIEnv* env, const sockaddr_storage& ss, const socklen_t sa_len) {
381 jbyteArray javaSunPath = getUnixSocketPath(env, ss, sa_len);
496 const sockaddr_storage& ss, const socklen_t& sa_len) {
500 jbyteArray javaSunPath = getUnixSocketPath(env, ss, sa_len);
535 const socklen_t& sa_len) {
543 return fillUnixSocketAddress(env, javaSocketAddress, ss, sa_len);
566 JNIEnv* env, jobject javaSocketAddress, sockaddr_storage& ss, socklen_t& sa_len) {
570 return inetAddressToSockaddr(env, javaInetAddress, port, ss, sa_len);
574 JNIEnv* env, jobject javaSocketAddress, sockaddr_storage& ss, socklen_t& sa_len) {
584 sa_len = sizeof(sockaddr_nl);
589 JNIEnv* env, jobject javaUnixSocketAddress, sockaddr_storage& ss, socklen_t& sa_len) {
606 // sa_len is sun_path plus the length of the overhead (ss_family_t). See unix(7) for
609 sa_len = offsetof(struct sockaddr_un, sun_path) + pathLength;
614 JNIEnv* env, jobject javaSocketAddress, sockaddr_storage& ss, socklen_t& sa_len) {
645 sa_len = sizeof(sockaddr_ll);
650 JNIEnv* env, jobject javaSocketAddress, sockaddr_storage& ss, socklen_t& sa_len) {
657 return javaNetlinkSocketAddressToSockaddr(env, javaSocketAddress, ss, sa_len);
659 return javaInetSocketAddressToSockaddr(env, javaSocketAddress, ss, sa_len);
661 return javaPacketSocketAddressToSockaddr(env, javaSocketAddress, ss, sa_len);
663 return javaUnixSocketAddressToSockaddr(env, javaSocketAddress, ss, sa_len);
918 socklen_t sa_len;
919 if (!javaSocketAddressToSockaddr(env, javaSocketAddress, ss, sa_len)) {
925 (void) NET_FAILURE_RETRY(env, int, bind, javaFd, sa, sa_len);
1040 socklen_t sa_len;
1041 if (!javaSocketAddressToSockaddr(env, javaSocketAddress, ss, sa_len)) {
1047 (void) NET_FAILURE_RETRY(env, int, connect, javaFd, sa, sa_len);
1269 socklen_t sa_len;
1270 if (!inetAddressToSockaddrVerbatim(env, javaAddress, 0, ss, sa_len)) {
1275 int rc = getnameinfo(reinterpret_cast<sockaddr*>(&ss), sa_len, buf, sizeof(buf), NULL, 0, flags);
2038 socklen_t sa_len;
2039 if (!javaSocketAddressToSockaddr(env, javaSocketAddress, ss, sa_len)) {
2045 return NET_FAILURE_RETRY(env, ssize_t, sendto, javaFd, bytes.get() + byteOffset, byteCount, flags, sa, sa_len);
2125 socklen_t sa_len;
2126 if (!inetAddressToSockaddrVerbatim(env, javaGroup.get(), 0, req.gr_group, sa_len)) {
2150 socklen_t sa_len;
2159 if (!inetAddressToSockaddrVerbatim(env, javaGroup.get(), 0, req.gsr_group, sa_len)) {
2166 if (!inetAddressToSockaddrVerbatim(env, javaSource.get(), 0, req.gsr_source, sa_len)) {