shared: export systemd dns and hostname validation functions
This commit is contained in:
@@ -9,9 +9,10 @@
|
|||||||
|
|
||||||
#include "nm-sd-adapt-shared.h"
|
#include "nm-sd-adapt-shared.h"
|
||||||
|
|
||||||
#include "path-util.h"
|
|
||||||
#include "hexdecoct.h"
|
|
||||||
#include "dns-domain.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);
|
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,
|
size_t len,
|
||||||
gboolean canonical);
|
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__ */
|
#endif /* __NM_SD_UTILS_SHARED_H__ */
|
||||||
|
Reference in New Issue
Block a user