mirror of
https://gitlab.freedesktop.org/NetworkManager/NetworkManager.git
synced 2026-05-04 23:28:08 +02:00
shared: export systemd dns and hostname validation functions
This commit is contained in:
parent
319a39cac6
commit
38f942e038
2 changed files with 16 additions and 2 deletions
|
|
@ -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__ */
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue