Lines Matching refs:mh
617 struct msghdr mh = {};
640 mh.msg_name = &sa.sa;
641 mh.msg_namelen = sizeof(sa);
642 mh.msg_iov = &iov;
643 mh.msg_iovlen = 1;
644 mh.msg_control = &control;
645 mh.msg_controllen = sizeof(control);
647 l = recvmsg(fd, &mh, 0);
658 assert(!(mh.msg_flags & MSG_CTRUNC));
659 assert(!(mh.msg_flags & MSG_TRUNC));
675 CMSG_FOREACH(cmsg, &mh) {
739 static int sendmsg_loop(int fd, struct msghdr *mh, int flags) {
743 assert(mh);
746 if (sendmsg(fd, mh, flags) >= 0)
807 struct msghdr mh = {};
822 mh.msg_iov = &iov;
823 mh.msg_iovlen = 1;
824 mh.msg_name = &sa.sa;
825 mh.msg_namelen = sizeof(sa.in);
833 mh.msg_control = &control;
834 mh.msg_controllen = CMSG_LEN(sizeof(struct in_pktinfo));
836 cmsg = CMSG_FIRSTHDR(&mh);
837 cmsg->cmsg_len = mh.msg_controllen;
845 return sendmsg_loop(fd, &mh, 0);
856 struct msghdr mh = {};
872 mh.msg_iov = &iov;
873 mh.msg_iovlen = 1;
874 mh.msg_name = &sa.sa;
875 mh.msg_namelen = sizeof(sa.in6);
883 mh.msg_control = &control;
884 mh.msg_controllen = CMSG_LEN(sizeof(struct in6_pktinfo));
886 cmsg = CMSG_FIRSTHDR(&mh);
887 cmsg->cmsg_len = mh.msg_controllen;
895 return sendmsg_loop(fd, &mh, 0);