Lines Matching refs:cmptr
115 struct cmsghdr *cmptr; in dhcp_packet() local
180 for (cmptr = CMSG_FIRSTHDR(&msg); cmptr; cmptr = CMSG_NXTHDR(&msg, cmptr)) in dhcp_packet()
181 if (cmptr->cmsg_level == SOL_IP && cmptr->cmsg_type == IP_PKTINFO) in dhcp_packet()
183 iface_index = ((struct in_pktinfo *)CMSG_DATA(cmptr))->ipi_ifindex; in dhcp_packet()
184 if (((struct in_pktinfo *)CMSG_DATA(cmptr))->ipi_addr.s_addr != INADDR_BROADCAST) in dhcp_packet()
190 for (cmptr = CMSG_FIRSTHDR(&msg); cmptr; cmptr = CMSG_NXTHDR(&msg, cmptr)) in dhcp_packet()
191 if (cmptr->cmsg_level == IPPROTO_IP && cmptr->cmsg_type == IP_RECVIF) in dhcp_packet()
192 iface_index = ((struct sockaddr_dl *)CMSG_DATA(cmptr))->sdl_index; in dhcp_packet()
197 for (cmptr = CMSG_FIRSTHDR(&msg); cmptr; cmptr = CMSG_NXTHDR(&msg, cmptr)) in dhcp_packet()
198 if (cmptr->cmsg_level == IPPROTO_IP && cmptr->cmsg_type == IP_RECVIF) in dhcp_packet()
199 iface_index = *((unsigned int *)CMSG_DATA(cmptr)); in dhcp_packet()
299 cmptr = CMSG_FIRSTHDR(&msg); in dhcp_packet()
300 pkt = (struct in_pktinfo *)CMSG_DATA(cmptr); in dhcp_packet()
303 msg.msg_controllen = cmptr->cmsg_len = CMSG_LEN(sizeof(struct in_pktinfo)); in dhcp_packet()
304 cmptr->cmsg_level = SOL_IP; in dhcp_packet()
305 cmptr->cmsg_type = IP_PKTINFO; in dhcp_packet()