Lines Matching refs:ifindex
25 int dns_synthesize_ifindex(int ifindex) {
33 if (ifindex > 0)
34 return ifindex;
75 static int synthesize_localhost_rr(Manager *m, const DnsResourceKey *key, int ifindex, DnsAnswer **answer) {
95 r = dns_answer_add(*answer, rr, dns_synthesize_ifindex(ifindex), DNS_ANSWER_AUTHENTICATED);
109 r = dns_answer_add(*answer, rr, dns_synthesize_ifindex(ifindex), DNS_ANSWER_AUTHENTICATED);
117 static int answer_add_ptr(DnsAnswer **answer, const char *from, const char *to, int ifindex, DnsAnswerFlags flags) {
128 return dns_answer_add(*answer, rr, ifindex, flags);
131 static int synthesize_localhost_ptr(Manager *m, const DnsResourceKey *key, int ifindex, DnsAnswer **answer) {
143 r = answer_add_ptr(answer, DNS_RESOURCE_KEY_NAME(key), "localhost", dns_synthesize_ifindex(ifindex), DNS_ANSWER_AUTHENTICATED);
174 r = dns_answer_add(*answer, rr, addresses[j].ifindex, DNS_ANSWER_AUTHENTICATED);
215 r = dns_answer_add(*answer, rr, addresses[j].ifindex, DNS_ANSWER_AUTHENTICATED);
223 static int synthesize_system_hostname_rr(Manager *m, const DnsResourceKey *key, int ifindex, DnsAnswer **answer) {
233 n = local_addresses(m->rtnl, ifindex, af, &addresses);
246 .ifindex = dns_synthesize_ifindex(ifindex),
253 .ifindex = dns_synthesize_ifindex(ifindex),
264 static int synthesize_system_hostname_ptr(Manager *m, int af, const union in_addr_union *address, int ifindex, DnsAnswer **answer) {
281 r = answer_add_ptr(answer, "2.0.0.127.in-addr.arpa", m->llmnr_hostname, dns_synthesize_ifindex(ifindex), DNS_ANSWER_AUTHENTICATED);
285 r = answer_add_ptr(answer, "2.0.0.127.in-addr.arpa", m->mdns_hostname, dns_synthesize_ifindex(ifindex), DNS_ANSWER_AUTHENTICATED);
289 r = answer_add_ptr(answer, "2.0.0.127.in-addr.arpa", "localhost", dns_synthesize_ifindex(ifindex), DNS_ANSWER_AUTHENTICATED);
296 n = local_addresses(m->rtnl, ifindex, af, &addresses);
307 static int synthesize_gateway_rr(Manager *m, const DnsResourceKey *key, int ifindex, DnsAnswer **answer) {
317 n = local_gateways(m->rtnl, ifindex, af, &addresses);
325 static int synthesize_gateway_ptr(Manager *m, int af, const union in_addr_union *address, int ifindex, DnsAnswer **answer) {
333 n = local_gateways(m->rtnl, ifindex, af, &addresses);
343 int ifindex,
367 r = synthesize_localhost_rr(m, key, ifindex, &answer);
373 r = synthesize_system_hostname_rr(m, key, ifindex, &answer);
379 r = synthesize_gateway_rr(m, key, ifindex, &answer);
386 r = synthesize_localhost_ptr(m, key, ifindex, &answer);
392 r = synthesize_system_hostname_ptr(m, af, &address, ifindex, &answer);
396 r = synthesize_gateway_ptr(m, af, &address, ifindex, &answer);