Lines Matching refs:cmsg
1110 CMSGHDR_TYPE *cmsg; in extract_local() local
1113 for (cmsg = BIO_CMSG_FIRSTHDR(mh); cmsg != NULL; in extract_local()
1114 cmsg = BIO_CMSG_NXTHDR(mh, cmsg)) { in extract_local()
1116 if (cmsg->cmsg_level != IPPROTO_IP) in extract_local()
1120 if (cmsg->cmsg_type != IP_PKTINFO) in extract_local()
1124 ((struct in_pktinfo *)BIO_CMSG_DATA(cmsg))->ipi_addr; in extract_local()
1127 if (cmsg->cmsg_type != IP_RECVDSTADDR) in extract_local()
1130 local->s_in.sin_addr = *(struct in_addr *)BIO_CMSG_DATA(cmsg); in extract_local()
1145 if (cmsg->cmsg_level != IPPROTO_IPV6) in extract_local()
1149 if (cmsg->cmsg_type != IPV6_PKTINFO) in extract_local()
1156 ((struct in6_pktinfo *)BIO_CMSG_DATA(cmsg))->ipi6_addr; in extract_local()
1176 CMSGHDR_TYPE *cmsg; in pack_local() local
1185 cmsg = (CMSGHDR_TYPE *)mh->Control.buf; in pack_local()
1187 cmsg = (CMSGHDR_TYPE *)mh->msg_control; in pack_local()
1190 cmsg->cmsg_len = BIO_CMSG_LEN(sizeof(struct in_pktinfo)); in pack_local()
1191 cmsg->cmsg_level = IPPROTO_IP; in pack_local()
1192 cmsg->cmsg_type = IP_PKTINFO; in pack_local()
1194 info = (struct in_pktinfo *)BIO_CMSG_DATA(cmsg); in pack_local()
1236 cmsg = (struct cmsghdr *)mh->msg_control; in pack_local()
1237 cmsg->cmsg_len = BIO_CMSG_LEN(sizeof(struct in_addr)); in pack_local()
1238 cmsg->cmsg_level = IPPROTO_IP; in pack_local()
1239 cmsg->cmsg_type = IP_SENDSRCADDR; in pack_local()
1241 info = (struct in_addr *)BIO_CMSG_DATA(cmsg); in pack_local()
1261 cmsg = (CMSGHDR_TYPE *)mh->Control.buf; in pack_local()
1263 cmsg = (CMSGHDR_TYPE *)mh->msg_control; in pack_local()
1265 cmsg->cmsg_len = BIO_CMSG_LEN(sizeof(struct in6_pktinfo)); in pack_local()
1266 cmsg->cmsg_level = IPPROTO_IPV6; in pack_local()
1267 cmsg->cmsg_type = IPV6_PKTINFO; in pack_local()
1269 info = (struct in6_pktinfo *)BIO_CMSG_DATA(cmsg); in pack_local()
1958 struct cmsghdr *cmsg; in dgram_sctp_read() local
1984 for (cmsg = CMSG_FIRSTHDR(&msg); cmsg; in dgram_sctp_read()
1985 cmsg = CMSG_NXTHDR(&msg, cmsg)) { in dgram_sctp_read()
1986 if (cmsg->cmsg_level != IPPROTO_SCTP) in dgram_sctp_read()
1989 if (cmsg->cmsg_type == SCTP_RCVINFO) { in dgram_sctp_read()
1992 rcvinfo = (struct sctp_rcvinfo *)CMSG_DATA(cmsg); in dgram_sctp_read()
2003 if (cmsg->cmsg_type == SCTP_SNDRCV) { in dgram_sctp_read()
2007 (struct sctp_sndrcvinfo *)CMSG_DATA(cmsg); in dgram_sctp_read()
2188 struct cmsghdr *cmsg; in dgram_sctp_write() local
2235 cmsg = (struct cmsghdr *)cmsgbuf; in dgram_sctp_write()
2236 cmsg->cmsg_level = IPPROTO_SCTP; in dgram_sctp_write()
2237 cmsg->cmsg_type = SCTP_SNDINFO; in dgram_sctp_write()
2238 cmsg->cmsg_len = CMSG_LEN(sizeof(struct sctp_sndinfo)); in dgram_sctp_write()
2239 sndinfo = (struct sctp_sndinfo *)CMSG_DATA(cmsg); in dgram_sctp_write()
2247 cmsg = in dgram_sctp_write()
2249 cmsg->cmsg_level = IPPROTO_SCTP; in dgram_sctp_write()
2250 cmsg->cmsg_type = SCTP_PRINFO; in dgram_sctp_write()
2251 cmsg->cmsg_len = CMSG_LEN(sizeof(struct sctp_prinfo)); in dgram_sctp_write()
2252 prinfo = (struct sctp_prinfo *)CMSG_DATA(cmsg); in dgram_sctp_write()
2258 cmsg = (struct cmsghdr *)cmsgbuf; in dgram_sctp_write()
2259 cmsg->cmsg_level = IPPROTO_SCTP; in dgram_sctp_write()
2260 cmsg->cmsg_type = SCTP_SNDRCV; in dgram_sctp_write()
2261 cmsg->cmsg_len = CMSG_LEN(sizeof(struct sctp_sndrcvinfo)); in dgram_sctp_write()
2262 sndrcvinfo = (struct sctp_sndrcvinfo *)CMSG_DATA(cmsg); in dgram_sctp_write()