Lines Matching refs:msg

149 static int dgram_sendmmsg(BIO *b, BIO_MSG *msg,
152 static int dgram_recvmmsg(BIO *b, BIO_MSG *msg,
1040 unsigned char *control, BIO_MSG *msg) in translate_msg_win() argument
1042 iov->len = msg->data_len; in translate_msg_win()
1043 iov->buf = msg->data; in translate_msg_win()
1046 mh->name = msg->peer != NULL ? &msg->peer->sa : NULL; in translate_msg_win()
1047 if (msg->peer != NULL && dgram_get_sock_family(b) == AF_INET) in translate_msg_win()
1050 else if (msg->peer != NULL && dgram_get_sock_family(b) == AF_INET6) in translate_msg_win()
1074 unsigned char *control, BIO_MSG *msg) in translate_msg() argument
1078 iov->iov_base = msg->data; in translate_msg()
1079 iov->iov_len = msg->data_len; in translate_msg()
1084 mh->msg_name = msg->peer != NULL ? &msg->peer->sa : NULL; in translate_msg()
1085 if (msg->peer != NULL && dgram_get_sock_family(b) == AF_INET) in translate_msg()
1088 else if (msg->peer != NULL && dgram_get_sock_family(b) == AF_INET6) in translate_msg()
1100 mh->msg_control = msg->local != NULL ? control : NULL; in translate_msg()
1101 mh->msg_controllen = msg->local != NULL ? BIO_CMSG_ALLOC_LEN : 0; in translate_msg()
1314 static int dgram_sendmmsg(BIO *b, BIO_MSG *msg, size_t stride, in dgram_sendmmsg() argument
1374 control[i], &BIO_MSG_N(msg, stride, i)); in dgram_sendmmsg()
1377 if (BIO_MSG_N(msg, stride, i).local != NULL) { in dgram_sendmmsg()
1385 BIO_MSG_N(msg, stride, i).local) < 1) { in dgram_sendmmsg()
1402 BIO_MSG_N(msg, stride, i).data_len = mh[i].msg_len; in dgram_sendmmsg()
1403 BIO_MSG_N(msg, stride, i).flags = 0; in dgram_sendmmsg()
1413 translate_msg(b, &mh, &iov, control, msg); in dgram_sendmmsg()
1415 if (msg->local != NULL) { in dgram_sendmmsg()
1422 if (pack_local(b, &mh, msg->local) < 1) { in dgram_sendmmsg()
1436 msg->data_len = (size_t)l; in dgram_sendmmsg()
1437 msg->flags = 0; in dgram_sendmmsg()
1445 translate_msg_win(b, &wmsg, &wbuf, control, msg); in dgram_sendmmsg()
1447 if (msg[0].local != NULL) { in dgram_sendmmsg()
1454 if (pack_local(b, &wmsg, msg[0].local) < 1) { in dgram_sendmmsg()
1468 msg[0].data_len = num_bytes_sent; in dgram_sendmmsg()
1469 msg[0].flags = 0; in dgram_sendmmsg()
1478 if (msg[0].local != NULL) { in dgram_sendmmsg()
1488 ret = sendto(b->num, msg[0].data, in dgram_sendmmsg()
1490 (int)msg[0].data_len, in dgram_sendmmsg()
1492 msg[0].data_len, in dgram_sendmmsg()
1495 msg[0].peer != NULL ? BIO_ADDR_sockaddr(msg[0].peer) : NULL, in dgram_sendmmsg()
1496 msg[0].peer != NULL ? BIO_ADDR_sockaddr_size(msg[0].peer) : 0); in dgram_sendmmsg()
1503 msg[0].data_len = ret; in dgram_sendmmsg()
1504 msg[0].flags = 0; in dgram_sendmmsg()
1515 static int dgram_recvmmsg(BIO *b, BIO_MSG *msg, in dgram_recvmmsg() argument
1576 control[i], &BIO_MSG_N(msg, stride, i)); in dgram_recvmmsg()
1579 if (BIO_MSG_N(msg, stride, i).local != NULL && !have_local_enabled) { in dgram_recvmmsg()
1595 BIO_MSG_N(msg, stride, i).data_len = mh[i].msg_len; in dgram_recvmmsg()
1596 BIO_MSG_N(msg, stride, i).flags = 0; in dgram_recvmmsg()
1601 if (BIO_MSG_N(msg, stride, i).local != NULL) in dgram_recvmmsg()
1603 BIO_MSG_N(msg, stride, i).local) < 1) in dgram_recvmmsg()
1610 BIO_ADDR_clear(msg->local); in dgram_recvmmsg()
1620 translate_msg(b, &mh, &iov, control, msg); in dgram_recvmmsg()
1623 if (msg->local != NULL && !have_local_enabled) { in dgram_recvmmsg()
1640 msg->data_len = (size_t)l; in dgram_recvmmsg()
1641 msg->flags = 0; in dgram_recvmmsg()
1643 if (msg->local != NULL) in dgram_recvmmsg()
1644 if (extract_local(b, &mh, msg->local) < 1) in dgram_recvmmsg()
1666 BIO_ADDR_clear(msg->local); in dgram_recvmmsg()
1675 translate_msg_win(b, &wmsg, &wbuf, control, msg); in dgram_recvmmsg()
1678 if (msg[0].local != NULL && !have_local_enabled) { in dgram_recvmmsg()
1691 msg[0].data_len = num_bytes_received; in dgram_recvmmsg()
1692 msg[0].flags = 0; in dgram_recvmmsg()
1693 if (msg[0].local != NULL) in dgram_recvmmsg()
1694 if (extract_local(b, &wmsg, msg[0].local) < 1) in dgram_recvmmsg()
1711 BIO_ADDR_clear(msg[0].local); in dgram_recvmmsg()
1721 if (msg[0].local != NULL) { in dgram_recvmmsg()
1731 slen = sizeof(*msg[0].peer); in dgram_recvmmsg()
1732 ret = recvfrom(b->num, msg[0].data, in dgram_recvmmsg()
1734 (int)msg[0].data_len, in dgram_recvmmsg()
1736 msg[0].data_len, in dgram_recvmmsg()
1739 msg[0].peer != NULL ? &msg[0].peer->sa : NULL, in dgram_recvmmsg()
1740 msg[0].peer != NULL ? &slen : NULL); in dgram_recvmmsg()
1746 msg[0].data_len = ret; in dgram_recvmmsg()
1747 msg[0].flags = 0; in dgram_recvmmsg()
1956 struct msghdr msg; in dgram_sctp_read() local
1968 msg.msg_name = NULL; in dgram_sctp_read()
1969 msg.msg_namelen = 0; in dgram_sctp_read()
1970 msg.msg_iov = &iov; in dgram_sctp_read()
1971 msg.msg_iovlen = 1; in dgram_sctp_read()
1972 msg.msg_control = cmsgbuf; in dgram_sctp_read()
1973 msg.msg_controllen = 512; in dgram_sctp_read()
1974 msg.msg_flags = 0; in dgram_sctp_read()
1975 n = recvmsg(b->num, &msg, 0); in dgram_sctp_read()
1983 if (msg.msg_controllen > 0) { in dgram_sctp_read()
1984 for (cmsg = CMSG_FIRSTHDR(&msg); cmsg; in dgram_sctp_read()
1985 cmsg = CMSG_NXTHDR(&msg, cmsg)) { in dgram_sctp_read()
2020 if (msg.msg_flags & MSG_NOTIFICATION) { in dgram_sctp_read()
2078 while ((msg.msg_flags & MSG_NOTIFICATION) && (msg.msg_flags & MSG_EOR) in dgram_sctp_read()
2081 if (ret > 0 && !(msg.msg_flags & MSG_EOR)) { in dgram_sctp_read()
2114 OPENSSL_assert(!(msg.msg_flags & MSG_NOTIFICATION)); in dgram_sctp_read()
2187 struct msghdr msg; in dgram_sctp_write() local
2227 msg.msg_name = NULL; in dgram_sctp_write()
2228 msg.msg_namelen = 0; in dgram_sctp_write()
2229 msg.msg_iov = iov; in dgram_sctp_write()
2230 msg.msg_iovlen = 1; in dgram_sctp_write()
2231 msg.msg_control = (caddr_t) cmsgbuf; in dgram_sctp_write()
2232 msg.msg_controllen = 0; in dgram_sctp_write()
2233 msg.msg_flags = 0; in dgram_sctp_write()
2245 msg.msg_controllen += CMSG_SPACE(sizeof(struct sctp_sndinfo)); in dgram_sctp_write()
2256 msg.msg_controllen += CMSG_SPACE(sizeof(struct sctp_prinfo)); in dgram_sctp_write()
2272 msg.msg_controllen += CMSG_SPACE(sizeof(struct sctp_sndrcvinfo)); in dgram_sctp_write()
2275 ret = sendmsg(b->num, &msg, 0); in dgram_sctp_write()
2566 struct msghdr msg; in dgram_sctp_wait_for_dry() local
2604 msg.msg_name = NULL; in dgram_sctp_wait_for_dry()
2605 msg.msg_namelen = 0; in dgram_sctp_wait_for_dry()
2606 msg.msg_iov = &iov; in dgram_sctp_wait_for_dry()
2607 msg.msg_iovlen = 1; in dgram_sctp_wait_for_dry()
2608 msg.msg_control = NULL; in dgram_sctp_wait_for_dry()
2609 msg.msg_controllen = 0; in dgram_sctp_wait_for_dry()
2610 msg.msg_flags = 0; in dgram_sctp_wait_for_dry()
2612 n = recvmsg(b->num, &msg, MSG_PEEK); in dgram_sctp_wait_for_dry()
2622 while (msg.msg_flags & MSG_NOTIFICATION) { in dgram_sctp_wait_for_dry()
2626 msg.msg_name = NULL; in dgram_sctp_wait_for_dry()
2627 msg.msg_namelen = 0; in dgram_sctp_wait_for_dry()
2628 msg.msg_iov = &iov; in dgram_sctp_wait_for_dry()
2629 msg.msg_iovlen = 1; in dgram_sctp_wait_for_dry()
2630 msg.msg_control = NULL; in dgram_sctp_wait_for_dry()
2631 msg.msg_controllen = 0; in dgram_sctp_wait_for_dry()
2632 msg.msg_flags = 0; in dgram_sctp_wait_for_dry()
2634 n = recvmsg(b->num, &msg, 0); in dgram_sctp_wait_for_dry()
2685 msg.msg_name = NULL; in dgram_sctp_wait_for_dry()
2686 msg.msg_namelen = 0; in dgram_sctp_wait_for_dry()
2687 msg.msg_iov = &iov; in dgram_sctp_wait_for_dry()
2688 msg.msg_iovlen = 1; in dgram_sctp_wait_for_dry()
2689 msg.msg_control = NULL; in dgram_sctp_wait_for_dry()
2690 msg.msg_controllen = 0; in dgram_sctp_wait_for_dry()
2691 msg.msg_flags = 0; in dgram_sctp_wait_for_dry()
2699 n = recvmsg(b->num, &msg, MSG_PEEK); in dgram_sctp_wait_for_dry()
2727 struct msghdr msg; in dgram_sctp_msg_waiting() local
2736 msg.msg_name = NULL; in dgram_sctp_msg_waiting()
2737 msg.msg_namelen = 0; in dgram_sctp_msg_waiting()
2738 msg.msg_iov = &iov; in dgram_sctp_msg_waiting()
2739 msg.msg_iovlen = 1; in dgram_sctp_msg_waiting()
2740 msg.msg_control = NULL; in dgram_sctp_msg_waiting()
2741 msg.msg_controllen = 0; in dgram_sctp_msg_waiting()
2742 msg.msg_flags = 0; in dgram_sctp_msg_waiting()
2746 n = recvmsg(b->num, &msg, MSG_PEEK); in dgram_sctp_msg_waiting()
2750 if (n > 0 && (msg.msg_flags & MSG_NOTIFICATION)) { in dgram_sctp_msg_waiting()
2759 msg.msg_name = NULL; in dgram_sctp_msg_waiting()
2760 msg.msg_namelen = 0; in dgram_sctp_msg_waiting()
2761 msg.msg_iov = &iov; in dgram_sctp_msg_waiting()
2762 msg.msg_iovlen = 1; in dgram_sctp_msg_waiting()
2763 msg.msg_control = NULL; in dgram_sctp_msg_waiting()
2764 msg.msg_controllen = 0; in dgram_sctp_msg_waiting()
2765 msg.msg_flags = 0; in dgram_sctp_msg_waiting()
2766 n = recvmsg(b->num, &msg, 0); in dgram_sctp_msg_waiting()
2773 } while (n > 0 && (msg.msg_flags & MSG_NOTIFICATION)); in dgram_sctp_msg_waiting()