mirror of
https://gitlab.freedesktop.org/NetworkManager/NetworkManager.git
synced 2026-05-07 13:08:10 +02:00
shared: export systemd dns and hostname validation functions
(cherry picked from commit 38f942e038)
This commit is contained in:
parent
fddc57d60a
commit
7a08b29a3d
2 changed files with 16 additions and 2 deletions
|
|
@ -22,9 +22,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"
|
||||||
|
|
||||||
/*****************************************************************************/
|
/*****************************************************************************/
|
||||||
|
|
||||||
|
|
@ -96,3 +97,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);
|
||||||
|
}
|
||||||
|
|
|
||||||
|
|
@ -44,4 +44,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__ */
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue