mirror of
https://gitlab.freedesktop.org/NetworkManager/NetworkManager.git
synced 2025-12-30 21:20:10 +01:00
shared: add nm_sd_dns_name_to_wire_format()
Add nm_sd_dns_name_to_wire_format() based on systemd utilities to convert a name into its wire format according to RFC 1035 section 3.1. It will be used to build the content of the DHCP FQDN option.
This commit is contained in:
parent
7d3098ff90
commit
0280fd1a80
2 changed files with 14 additions and 0 deletions
|
|
@ -24,6 +24,7 @@
|
|||
|
||||
#include "path-util.h"
|
||||
#include "hexdecoct.h"
|
||||
#include "dns-domain.h"
|
||||
|
||||
/*****************************************************************************/
|
||||
|
||||
|
|
@ -83,3 +84,11 @@ nm_sd_utils_unbase64mem (const char *p,
|
|||
{
|
||||
return unbase64mem_full (p, l, secure, (void **) mem, len);
|
||||
}
|
||||
|
||||
int nm_sd_dns_name_to_wire_format (const char *domain,
|
||||
guint8 *buffer,
|
||||
size_t len,
|
||||
gboolean canonical)
|
||||
{
|
||||
return dns_name_to_wire_format (domain, buffer, len, canonical);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -39,4 +39,9 @@ int nm_sd_utils_unbase64mem (const char *p,
|
|||
|
||||
/*****************************************************************************/
|
||||
|
||||
int nm_sd_dns_name_to_wire_format (const char *domain,
|
||||
guint8 *buffer,
|
||||
size_t len,
|
||||
gboolean canonical);
|
||||
|
||||
#endif /* __NM_SD_UTILS_SHARED_H__ */
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue