Lines Matching refs:cmptr
524 struct cmsghdr *cmptr; in recvfrom_flags() local
575 for (cmptr = CMSG_FIRSTHDR(&msg); cmptr != NULL; in recvfrom_flags()
576 cmptr = CMSG_NXTHDR(&msg, cmptr)) { in recvfrom_flags()
587 if (cmptr->cmsg_level == IPPROTO_IP && in recvfrom_flags()
588 cmptr->cmsg_type == IP_PKTINFO) { in recvfrom_flags()
592 tmp = (struct in_pktinfo *) CMSG_DATA(cmptr); in recvfrom_flags()
602 if (cmptr->cmsg_level == IPPROTO_IP && in recvfrom_flags()
603 cmptr->cmsg_type == IP_RECVDSTADDR) { in recvfrom_flags()
607 sin->sin_addr = *(struct in_addr*)CMSG_DATA(cmptr); in recvfrom_flags()
614 if (cmptr->cmsg_level == IPPROTO_IP && in recvfrom_flags()
615 cmptr->cmsg_type == IP_RECVIF) { in recvfrom_flags()
616 struct sockaddr_dl *sdl = (struct sockaddr_dl *) CMSG_DATA(cmptr); in recvfrom_flags()
634 if (cmptr->cmsg_level == IPPROTO_IP && in recvfrom_flags()
635 cmptr->cmsg_type == IP_RECVTTL) { in recvfrom_flags()
636 *ttl = *(u_char*)CMSG_DATA(cmptr); in recvfrom_flags()
639 else if (cmptr->cmsg_level == IPPROTO_IP && in recvfrom_flags()
640 … cmptr->cmsg_type == IP_TTL) { // some implementations seem to send IP_TTL instead of IP_RECVTTL in recvfrom_flags()
641 *ttl = *(int*)CMSG_DATA(cmptr); in recvfrom_flags()
647 if (cmptr->cmsg_level == IPPROTO_IPV6 && in recvfrom_flags()
648 cmptr->cmsg_type == IPV6_2292_PKTINFO) { in recvfrom_flags()
650 struct in6_pktinfo *ip6_info = (struct in6_pktinfo*)CMSG_DATA(cmptr); in recvfrom_flags()
666 if (cmptr->cmsg_level == IPPROTO_IPV6 && in recvfrom_flags()
667 cmptr->cmsg_type == IPV6_2292_HOPLIMIT) { in recvfrom_flags()
668 *ttl = *(int*)CMSG_DATA(cmptr); in recvfrom_flags()