Lines Matching defs:so

107 	struct sonode *so;
129 so = socket_create(family, type, protocol, buf, NULL,
133 so = socket_create(family, type, protocol, NULL, NULL,
136 if (so == NULL)
140 vp = SOTOV(so);
142 (void) socket_close(so, 0, CRED());
143 socket_destroy(so);
151 so->so_state |= SS_NDELAY;
155 so->so_state |= SS_NONBLOCK;
177 struct sonode *so;
200 so = VTOSO(vp);
201 if (so->so_version == SOV_STREAM) {
204 eprintsoline(so, *errorp);
208 so = VTOSO(vp);
212 return (so);
223 copyin_name(struct sonode *so, struct sockaddr *name, socklen_t *namelenp,
232 eprintsoline(so, *errorp);
240 eprintsoline(so, *errorp);
248 if (so->so_family == AF_UNIX && faddr[namelen - 1] != '\0') {
559 struct sonode *so;
565 if ((so = getsonode(sock, &error, NULL)) == NULL)
574 ASSERT(MUTEX_NOT_HELD(&so->so_lock));
575 name = copyin_name(so, name, &namelen, &error);
587 error = socket_bind(so, name, namelen, 0, CRED());
590 error = socket_bind(so, name, namelen, _SOBIND_XPG4_2, CRED());
593 error = socket_bind(so, name, namelen, _SOBIND_SOCKBSD, CRED());
610 struct sonode *so;
616 if ((so = getsonode(sock, &error, NULL)) == NULL)
619 error = socket_listen(so, backlog, CRED());
632 struct sonode *so;
658 if ((so = getsonode(sock, &error, &fp)) == NULL)
662 ASSERT(MUTEX_NOT_HELD(&so->so_lock));
684 eprintsoline(so, EMFILE);
688 error = socket_accept(so, fp->f_flag, CRED(), &nso);
699 addrlen = so->so_max_addr_len;
710 kmem_free(addrp, so->so_max_addr_len);
724 eprintsoline(so, error);
746 if ((ssflags | so->so_state) & (SS_NDELAY|SS_NONBLOCK)) {
750 if ((ssflags | so->so_state) & SS_NONBLOCK)
752 else if ((ssflags | so->so_state) & SS_NDELAY)
761 eprintsoline(so, error);
777 struct sonode *so;
784 if ((so = getsonode(sock, &error, &fp)) == NULL)
789 ASSERT(MUTEX_NOT_HELD(&so->so_lock));
790 name = copyin_name(so, name, &namelen, &error);
798 error = socket_connect(so, name, namelen, fp->f_flag,
812 struct sonode *so;
818 if ((so = getsonode(sock, &error, NULL)) == NULL)
821 error = socket_shutdown(so, how, CRED());
841 struct sonode *so;
850 if ((so = getsonode(sock, &error, &fp)) == NULL)
865 error = socket_recvmsg(so, msg, uiop, CRED());
1141 struct sonode *so;
1150 if ((so = getsonode(sock, &error, &fp)) == NULL)
1155 if (so->so_family == AF_UNIX)
1164 ASSERT(MUTEX_NOT_HELD(&so->so_lock));
1165 name = copyin_name(so,
1191 ASSERT(MUTEX_NOT_HELD(&so->so_lock));
1205 error = socket_sendmsg(so, msg, uiop, CRED());
1416 struct sonode *so;
1425 if ((so = getsonode(sock, &error, NULL)) == NULL)
1428 ASSERT(MUTEX_NOT_HELD(&so->so_lock));
1434 sock_addrlen = so->so_max_addr_len;
1437 if ((error = socket_getpeername(so, sock_addrp, &sock_addrlen,
1439 ASSERT(sock_addrlen <= so->so_max_addr_len);
1443 kmem_free(sock_addrp, so->so_max_addr_len);
1454 struct sonode *so;
1462 if ((so = getsonode(sock, &error, NULL)) == NULL)
1465 ASSERT(MUTEX_NOT_HELD(&so->so_lock));
1472 sock_addrlen = so->so_max_addr_len;
1474 if ((error = socket_getsockname(so, sock_addrp, &sock_addrlen,
1476 ASSERT(MUTEX_NOT_HELD(&so->so_lock));
1477 ASSERT(sock_addrlen <= so->so_max_addr_len);
1481 kmem_free(sock_addrp, so->so_max_addr_len);
1496 struct sonode *so;
1504 if ((so = getsonode(sock, &error, NULL)) == NULL)
1507 ASSERT(MUTEX_NOT_HELD(&so->so_lock));
1523 error = socket_getsockopt(so, level, option_name, optval,
1548 struct sonode *so;
1556 if ((so = getsonode(sock, &error, NULL)) == NULL)
1571 ASSERT(MUTEX_NOT_HELD(&so->so_lock));
1580 error = socket_setsockopt(so, level, option_name, optval,
1899 * maximum value so that all files are cached. In future, we may provide
1982 * We need to pick a high water mark so that the woken up thread would
2127 struct sonode *so;
2146 so = VTOSO(vp);
2149 wroff = so->so_proto_props.sopp_wroff;
2150 maxblk = so->so_proto_props.sopp_maxblk;
2151 extra = wroff + so->so_proto_props.sopp_tail;
2165 * so limit reads to maxblk if there are
2169 so->so_filter_active > 0 && maxblk != INFPSZ)
2458 * the last mblk is ack'ed by the transport before returning so that the
2505 * DEADLK, so wait and try again a little later using
2544 * mblks constructed so far.
2601 * DEADLK, so wait and try again a little later using
2692 struct sonode *so;
2693 so = VTOSO(vp);
2694 error = so_zcopy_wait(so);
2728 struct sonode *so;
2738 so = VTOSO(vp);
2741 wroff = so->so_proto_props.sopp_wroff;
2742 maxblk = so->so_proto_props.sopp_maxblk;
2743 extra = wroff + so->so_proto_props.sopp_tail;
2772 * so limit reads to maxblk if there are
2776 so->so_filter_active > 0 && maxblk != INFPSZ)
2939 sonode_t *so = VTOSO(vp);
2940 maxpsz = so->so_proto_props.sopp_maxpsz;
3003 soaccept(struct sonode *so, int fflag, struct sonode **nsop)
3005 return (socket_accept(so, fflag, CRED(), nsop));
3009 sobind(struct sonode *so, struct sockaddr *name, socklen_t namelen,
3014 error = socket_bind(so, name, namelen, flags, CRED());
3016 return (socket_listen(so, backlog, CRED()));
3022 solisten(struct sonode *so, int backlog)
3024 return (socket_listen(so, backlog, CRED()));
3028 soconnect(struct sonode *so, struct sockaddr *name, socklen_t namelen,
3031 return (socket_connect(so, name, namelen, fflag, flags, CRED()));
3035 sorecvmsg(struct sonode *so, struct nmsghdr *msg, struct uio *uiop)
3037 return (socket_recvmsg(so, msg, uiop, CRED()));
3041 sosendmsg(struct sonode *so, struct nmsghdr *msg, struct uio *uiop)
3043 return (socket_sendmsg(so, msg, uiop, CRED()));
3047 soshutdown(struct sonode *so, int how)
3049 return (socket_shutdown(so, how, CRED()));
3053 sogetsockopt(struct sonode *so, int level, int option_name, void *optval,
3056 return (socket_getsockopt(so, level, option_name, optval, optlenp,
3061 sosetsockopt(struct sonode *so, int level, int option_name, const void *optval,
3064 return (socket_setsockopt(so, level, option_name, optval, optlen,
3076 struct sonode *so;
3080 so = sp->sp_smod_info->smod_sock_create_func(sp, family, type, protocol,
3082 if (so == NULL) {
3085 if ((*errorp = SOP_INIT(so, NULL, CRED(), SOCKET_SLEEP)) == 0) {
3087 (void) VOP_OPEN(&SOTOV(so), FREAD|FWRITE, CRED(), NULL);
3089 socket_destroy(so);
3090 so = NULL;
3093 return (so);