Commit 38f942e0 authored by Beniamino Galvani's avatar Beniamino Galvani

shared: export systemd dns and hostname validation functions

parent 319a39ca
......@@ -9,9 +9,10 @@
#include "nm-sd-adapt-shared.h"
#include "path-util.h"
#include "hexdecoct.h"
#include "dns-domain.h"
#include "hexdecoct.h"
#include "hostname-util.h"
#include "path-util.h"
/*****************************************************************************/
......@@ -83,3 +84,13 @@ int nm_sd_dns_name_to_wire_format (const char *domain,
{
return dns_name_to_wire_format (domain, buffer, len, canonical);
}
int nm_sd_dns_name_is_valid (const char *s)
{
return dns_name_is_valid (s);
}
gboolean nm_sd_hostname_is_valid (const char *s, bool allow_trailing_dot)
{
return hostname_is_valid (s, allow_trailing_dot);
}
......@@ -31,4 +31,7 @@ int nm_sd_dns_name_to_wire_format (const char *domain,
size_t len,
gboolean canonical);
int nm_sd_dns_name_is_valid (const char *s);
gboolean nm_sd_hostname_is_valid(const char *s, bool allow_trailing_dot);
#endif /* __NM_SD_UTILS_SHARED_H__ */
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment