Lines Matching defs:ifindex
86 if (s->local.sa.sa_family == AF_INET6 && s->ifindex <= 0)
87 s->ifindex = s->local.in6.sin6_scope_id;
94 if (s->peer.sa.sa_family == AF_INET6 && s->ifindex <= 0)
95 s->ifindex = s->peer.in6.sin6_scope_id;
128 if (s->ifindex <= 0)
129 s->ifindex = i->ipi6_ifindex;
146 if (s->ifindex <= 0)
147 s->ifindex = i->ipi_ifindex;
162 if (s->ifindex == LOOPBACK_IFINDEX)
163 s->ifindex = 0;
167 if (s->ifindex <= 0)
168 s->ifindex = manager_find_ifindex(s->manager, s->local.sa.sa_family, s->local.sa.sa_family == AF_INET ? (union in_addr_union*) &s->local.in.sin_addr : (union in_addr_union*) &s->local.in6.sin6_addr);
170 if (s->protocol == DNS_PROTOCOL_LLMNR && s->ifindex > 0) {
171 uint32_t ifindex = htobe32(s->ifindex);
175 r = setsockopt(s->fd, IPPROTO_IP, IP_UNICAST_IF, &ifindex, sizeof(ifindex));
179 r = setsockopt(s->fd, IPPROTO_IPV6, IPV6_UNICAST_IF, &ifindex, sizeof(ifindex));
271 s->read_packet->ifindex = s->ifindex;
285 if (s->read_packet->ifindex == 0)
286 s->read_packet->ifindex = s->peer.in6.sin6_scope_id;
287 if (s->read_packet->ifindex == 0)
288 s->read_packet->ifindex = s->local.in6.sin6_scope_id;