Lines Matching refs:cmsg
267 struct cmsghdr *cmsg; in coap_network_send() local
273 cmsg = CMSG_FIRSTHDR(&mhdr); in coap_network_send()
274 cmsg->cmsg_level = IPPROTO_IPV6; in coap_network_send()
275 cmsg->cmsg_type = IPV6_PKTINFO; in coap_network_send()
276 cmsg->cmsg_len = CMSG_LEN(sizeof(struct in6_pktinfo)); in coap_network_send()
278 pktinfo = (struct in6_pktinfo *)CMSG_DATA(cmsg); in coap_network_send()
296 struct cmsghdr *cmsg; in coap_network_send() local
302 cmsg = CMSG_FIRSTHDR(&mhdr); in coap_network_send()
303 cmsg->cmsg_level = SOL_IP; in coap_network_send()
304 cmsg->cmsg_type = IP_PKTINFO; in coap_network_send()
305 cmsg->cmsg_len = CMSG_LEN(sizeof(struct in_pktinfo)); in coap_network_send()
307 pktinfo = (struct in_pktinfo *)CMSG_DATA(cmsg); in coap_network_send()
456 struct cmsghdr *cmsg; in coap_network_read() local
471 for (cmsg = CMSG_FIRSTHDR(&mhdr); cmsg; cmsg = CMSG_NXTHDR(&mhdr, cmsg)) { in coap_network_read()
474 if (cmsg->cmsg_level == IPPROTO_IPV6 && cmsg->cmsg_type == IPV6_PKTINFO) { in coap_network_read()
479 u.c = CMSG_DATA(cmsg); in coap_network_read()
496 if (cmsg->cmsg_level == SOL_IP && cmsg->cmsg_type == IP_PKTINFO) { in coap_network_read()
502 u.c = CMSG_DATA(cmsg); in coap_network_read()