Lines Matching defs:key

75 static int synthesize_localhost_rr(Manager *m, const DnsResourceKey *key, int ifindex, DnsAnswer **answer) {
79 assert(key);
86 if (IN_SET(key->type, DNS_TYPE_A, DNS_TYPE_ANY)) {
89 rr = dns_resource_record_new_full(DNS_CLASS_IN, DNS_TYPE_A, DNS_RESOURCE_KEY_NAME(key));
100 if (IN_SET(key->type, DNS_TYPE_AAAA, DNS_TYPE_ANY)) {
103 rr = dns_resource_record_new_full(DNS_CLASS_IN, DNS_TYPE_AAAA, DNS_RESOURCE_KEY_NAME(key));
131 static int synthesize_localhost_ptr(Manager *m, const DnsResourceKey *key, int ifindex, DnsAnswer **answer) {
135 assert(key);
138 if (IN_SET(key->type, DNS_TYPE_PTR, DNS_TYPE_ANY)) {
143 r = answer_add_ptr(answer, DNS_RESOURCE_KEY_NAME(key), "localhost", dns_synthesize_ifindex(ifindex), DNS_ANSWER_AUTHENTICATED);
223 static int synthesize_system_hostname_rr(Manager *m, const DnsResourceKey *key, int ifindex, DnsAnswer **answer) {
228 assert(key);
231 af = dns_type_to_af(key->type);
257 return answer_add_addresses_rr(answer, DNS_RESOURCE_KEY_NAME(key), buffer, n);
261 return answer_add_addresses_rr(answer, DNS_RESOURCE_KEY_NAME(key), addresses, n);
307 static int synthesize_gateway_rr(Manager *m, const DnsResourceKey *key, int ifindex, DnsAnswer **answer) {
312 assert(key);
315 af = dns_type_to_af(key->type);
322 return answer_add_addresses_rr(answer, DNS_RESOURCE_KEY_NAME(key), addresses, n);
347 DnsResourceKey *key;
354 DNS_QUESTION_FOREACH(key, q) {
359 if (key->class != DNS_CLASS_IN &&
360 key->class != DNS_CLASS_ANY)
363 name = DNS_RESOURCE_KEY_NAME(key);
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);