Searched refs:cmptr (Results 1 – 5 of 5) sorted by relevance
94 struct cmsghdr *cmptr; in tftp_request() local99 for (cmptr = CMSG_FIRSTHDR(&msg); cmptr; cmptr = CMSG_NXTHDR(&msg, cmptr)) in tftp_request()100 if (cmptr->cmsg_level == SOL_IP && cmptr->cmsg_type == IP_PKTINFO) in tftp_request()102 addr.sin_addr = ((struct in_pktinfo *)CMSG_DATA(cmptr))->ipi_spec_dst; in tftp_request()103 if_index = ((struct in_pktinfo *)CMSG_DATA(cmptr))->ipi_ifindex; in tftp_request()107 for (cmptr = CMSG_FIRSTHDR(&msg); cmptr; cmptr = CMSG_NXTHDR(&msg, cmptr)) in tftp_request()108 if (cmptr->cmsg_level == IPPROTO_IP && cmptr->cmsg_type == IP_RECVDSTADDR) in tftp_request()109 addr.sin_addr = *((struct in_addr *)CMSG_DATA(cmptr)); in tftp_request()110 else if (cmptr->cmsg_level == IPPROTO_IP && cmptr->cmsg_type == IP_RECVIF) in tftp_request()111 if_index = *((unsigned int *)CMSG_DATA(cmptr)); in tftp_request()[all …]
60 struct cmsghdr *cmptr; in send_from() local63 cmptr = CMSG_FIRSTHDR(&msg); in send_from()68 struct in_pktinfo *pkt = (struct in_pktinfo *)CMSG_DATA(cmptr); in send_from()71 msg.msg_controllen = cmptr->cmsg_len = CMSG_LEN(sizeof(struct in_pktinfo)); in send_from()72 cmptr->cmsg_level = SOL_IP; in send_from()73 cmptr->cmsg_type = IP_PKTINFO; in send_from()75 struct in_addr *a = (struct in_addr *)CMSG_DATA(cmptr); in send_from()77 msg.msg_controllen = cmptr->cmsg_len = CMSG_LEN(sizeof(struct in_addr)); in send_from()78 cmptr->cmsg_level = IPPROTO_IP; in send_from()79 cmptr->cmsg_type = IP_SENDSRCADDR; in send_from()[all …]
110 struct cmsghdr *cmptr; in dhcp_packet() local175 for (cmptr = CMSG_FIRSTHDR(&msg); cmptr; cmptr = CMSG_NXTHDR(&msg, cmptr)) in dhcp_packet()176 if (cmptr->cmsg_level == SOL_IP && cmptr->cmsg_type == IP_PKTINFO) in dhcp_packet()178 iface_index = ((struct in_pktinfo *)CMSG_DATA(cmptr))->ipi_ifindex; in dhcp_packet()179 if (((struct in_pktinfo *)CMSG_DATA(cmptr))->ipi_addr.s_addr != INADDR_BROADCAST) in dhcp_packet()185 for (cmptr = CMSG_FIRSTHDR(&msg); cmptr; cmptr = CMSG_NXTHDR(&msg, cmptr)) in dhcp_packet()186 if (cmptr->cmsg_level == IPPROTO_IP && cmptr->cmsg_type == IP_RECVIF) in dhcp_packet()187 iface_index = ((struct sockaddr_dl *)CMSG_DATA(cmptr))->sdl_index; in dhcp_packet()192 for (cmptr = CMSG_FIRSTHDR(&msg); cmptr; cmptr = CMSG_NXTHDR(&msg, cmptr)) in dhcp_packet()193 if (cmptr->cmsg_level == IPPROTO_IP && cmptr->cmsg_type == IP_RECVIF) in dhcp_packet()[all …]
524 struct cmsghdr *cmptr; in recvfrom_flags() local575 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()[all …]
1150 - (NSArray *)sortedArrayUsingComparator:(NSComparator)cmptr;