mirror of
https://github.com/systemd/systemd.git
synced 2025-01-26 14:04:03 +03:00
resolved: rr - introduce dns_resource_key_new_cname()
Creates a new CNAME RR key with the same class and name as an existing key.
This commit is contained in:
parent
04f9320120
commit
7c1ff6ac3d
@ -48,6 +48,12 @@ DnsResourceKey* dns_resource_key_new(uint16_t class, uint16_t type, const char *
|
||||
return k;
|
||||
}
|
||||
|
||||
DnsResourceKey* dns_resource_key_new_cname(const DnsResourceKey *key) {
|
||||
assert(key);
|
||||
|
||||
return dns_resource_key_new(key->class, DNS_TYPE_CNAME, DNS_RESOURCE_KEY_NAME(key));
|
||||
}
|
||||
|
||||
DnsResourceKey* dns_resource_key_new_consume(uint16_t class, uint16_t type, char *name) {
|
||||
DnsResourceKey *k;
|
||||
|
||||
|
@ -177,6 +177,7 @@ static inline const char* DNS_RESOURCE_KEY_NAME(const DnsResourceKey *key) {
|
||||
}
|
||||
|
||||
DnsResourceKey* dns_resource_key_new(uint16_t class, uint16_t type, const char *name);
|
||||
DnsResourceKey* dns_resource_key_new_cname(const DnsResourceKey *key);
|
||||
DnsResourceKey* dns_resource_key_new_consume(uint16_t class, uint16_t type, char *name);
|
||||
DnsResourceKey* dns_resource_key_ref(DnsResourceKey *key);
|
||||
DnsResourceKey* dns_resource_key_unref(DnsResourceKey *key);
|
||||
|
Loading…
x
Reference in New Issue
Block a user