• Home
  • Raw
  • Download

Lines Matching refs:cmptr

56         struct cmsghdr* cmptr;  in send_from()  local
59 cmptr = CMSG_FIRSTHDR(&msg); in send_from()
63 struct in_pktinfo* pkt = (struct in_pktinfo*) CMSG_DATA(cmptr); in send_from()
66 msg.msg_controllen = cmptr->cmsg_len = CMSG_LEN(sizeof(struct in_pktinfo)); in send_from()
67 cmptr->cmsg_level = SOL_IP; in send_from()
68 cmptr->cmsg_type = IP_PKTINFO; in send_from()
70 struct in_addr* a = (struct in_addr*) CMSG_DATA(cmptr); in send_from()
72 msg.msg_controllen = cmptr->cmsg_len = CMSG_LEN(sizeof(struct in_addr)); in send_from()
73 cmptr->cmsg_level = IPPROTO_IP; in send_from()
74 cmptr->cmsg_type = IP_SENDSRCADDR; in send_from()
79 struct in6_pktinfo* pkt = (struct in6_pktinfo*) CMSG_DATA(cmptr); in send_from()
82 msg.msg_controllen = cmptr->cmsg_len = CMSG_LEN(sizeof(struct in6_pktinfo)); in send_from()
83 cmptr->cmsg_type = IPV6_PKTINFO; in send_from()
84 cmptr->cmsg_level = IPV6_LEVEL; in send_from()
508 struct cmsghdr* cmptr; in receive_query() local
559 for (cmptr = CMSG_FIRSTHDR(&msg); cmptr; cmptr = CMSG_NXTHDR(&msg, cmptr)) in receive_query()
560 if (cmptr->cmsg_level == SOL_IP && cmptr->cmsg_type == IP_PKTINFO) { in receive_query()
562 ((struct in_pktinfo*) CMSG_DATA(cmptr))->ipi_spec_dst; in receive_query()
563 if_index = ((struct in_pktinfo*) CMSG_DATA(cmptr))->ipi_ifindex; in receive_query()
567 for (cmptr = CMSG_FIRSTHDR(&msg); cmptr; cmptr = CMSG_NXTHDR(&msg, cmptr)) in receive_query()
568 if (cmptr->cmsg_level == IPPROTO_IP && cmptr->cmsg_type == IP_RECVDSTADDR) in receive_query()
569 dst_addr_4 = dst_addr.addr.addr4 = *((struct in_addr*) CMSG_DATA(cmptr)); in receive_query()
570 else if (cmptr->cmsg_level == IPPROTO_IP && cmptr->cmsg_type == IP_RECVIF) in receive_query()
571 if_index = ((struct sockaddr_dl*) CMSG_DATA(cmptr))->sdl_index; in receive_query()
577 for (cmptr = CMSG_FIRSTHDR(&msg); cmptr; cmptr = CMSG_NXTHDR(&msg, cmptr)) in receive_query()
578 if (cmptr->cmsg_level == IPV6_LEVEL && cmptr->cmsg_type == IPV6_PKTINFO) { in receive_query()
579 dst_addr.addr.addr6 = ((struct in6_pktinfo*) CMSG_DATA(cmptr))->ipi6_addr; in receive_query()
580 if_index = ((struct in6_pktinfo*) CMSG_DATA(cmptr))->ipi6_ifindex; in receive_query()