Lines Matching refs:cmptr
830 struct cmsghdr *cmptr;
882 for (cmptr = CMSG_FIRSTHDR(&msg); cmptr != NULL;
883 cmptr = CMSG_NXTHDR(&msg, cmptr)) {
894 if (cmptr->cmsg_level == IPPROTO_IP &&
895 cmptr->cmsg_type == IP_PKTINFO) {
899 tmp = (struct in_pktinfo *) CMSG_DATA(cmptr);
909 if (cmptr->cmsg_level == IPPROTO_IP &&
910 cmptr->cmsg_type == IP_RECVDSTADDR) {
914 sin->sin_addr = *(struct in_addr*)CMSG_DATA(cmptr);
921 if (cmptr->cmsg_level == IPPROTO_IP &&
922 cmptr->cmsg_type == IP_RECVIF) {
923 struct sockaddr_dl *sdl = (struct sockaddr_dl *) CMSG_DATA(cmptr);
932 (void) memcpy(&pktp->ipi_ifindex, CMSG_DATA(cmptr), sizeof(uint_t));
945 if (cmptr->cmsg_level == IPPROTO_IP &&
946 cmptr->cmsg_type == IP_RECVTTL) {
947 *ttl = *(u_char*)CMSG_DATA(cmptr);
950 else if (cmptr->cmsg_level == IPPROTO_IP &&
951 cmptr->cmsg_type == IP_TTL) { // some implementations seem to send IP_TTL instead of IP_RECVTTL
952 *ttl = *(int*)CMSG_DATA(cmptr);
958 if (cmptr->cmsg_level == IPPROTO_IPV6 &&
959 cmptr->cmsg_type == IPV6_PKTINFO) {
961 struct in6_pktinfo *ip6_info = (struct in6_pktinfo*)CMSG_DATA(cmptr);
977 if (cmptr->cmsg_level == IPPROTO_IPV6 &&
978 cmptr->cmsg_type == IPV6_HOPLIMIT) {
979 *ttl = *(int*)CMSG_DATA(cmptr);