diff options
author | Lennart Poettering <lennart@poettering.net> | 2015-11-23 21:21:13 +0100 |
---|---|---|
committer | Lennart Poettering <lennart@poettering.net> | 2015-11-23 21:31:29 +0100 |
commit | 0e8eedbb490b8928d4fa4e33f565a3cda5013018 (patch) | |
tree | 0b5a15e7944c1d726af9fb59845b1634253347fa /src/shared/dns-domain.h | |
parent | a5ef363808b100856783784654de9b6bf2110173 (diff) |
dns-domain: add calls to join/split SRV/DNS-SD service domains
This adds dns_service_join() and dns_service_split() which may be used
to concatenate a DNS-SD service name, am SRV service type string, and a
domain name into a full resolvable DNS domain name string. If the
service name is specified as NULL, only the type and domain are
appended, to implement classic, non-DNS-SD SRV lookups.
The reverse is dns_service_split() which takes the full name, and split
it into the three components again.
Diffstat (limited to 'src/shared/dns-domain.h')
-rw-r--r-- | src/shared/dns-domain.h | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/shared/dns-domain.h b/src/shared/dns-domain.h index 22c394443b..c6d7623e09 100644 --- a/src/shared/dns-domain.h +++ b/src/shared/dns-domain.h @@ -73,3 +73,6 @@ int dns_name_to_wire_format(const char *domain, uint8_t *buffer, size_t len); int dns_srv_type_verify(const char *name); bool dns_service_name_is_valid(const char *name); + +int dns_service_join(const char *name, const char *type, const char *domain, char **ret); +int dns_service_split(const char *joined, char **name, char **type, char **domain); |