Lines Matching refs:cm
193 struct cmsghdr *cm;
206 cm = CMSG_FIRSTHDR(&sndhdr);
207 cm->cmsg_level = IPPROTO_IPV6;
208 cm->cmsg_type = IPV6_PKTINFO;
209 cm->cmsg_len = CMSG_LEN(sizeof(pi));
212 memcpy(CMSG_DATA(cm), &pi, sizeof(pi));
215 cm = CMSG_NXTHDR(&sndhdr, cm);
216 cm->cmsg_level = IPPROTO_IPV6;
217 cm->cmsg_type = IPV6_HOPLIMIT;
218 cm->cmsg_len = CMSG_LEN(sizeof(hoplimit));
219 memcpy(CMSG_DATA(cm), &hoplimit, sizeof(hoplimit));
271 struct cmsghdr *cm;
307 for (cm = (struct cmsghdr *)CMSG_FIRSTHDR(&rcvhdr);
308 cm;
309 cm = (struct cmsghdr *)CMSG_NXTHDR(&rcvhdr, cm))
311 if (cm->cmsg_level != IPPROTO_IPV6)
313 switch(cm->cmsg_type) {
315 if (cm->cmsg_len == CMSG_LEN(sizeof(pkt)))
316 memcpy(&pkt, CMSG_DATA(cm), sizeof(pkt));
319 if (cm->cmsg_len == CMSG_LEN(sizeof(int)))
320 memcpy(&hoplimit, CMSG_DATA(cm), sizeof(int));