mirror of
https://gitlab.freedesktop.org/NetworkManager/NetworkManager.git
synced 2026-02-15 13:50:36 +01:00
dhcp: add nm_dhcp_option_add_option_in_addr() helper
This commit is contained in:
parent
41634d5199
commit
fc83acbd99
2 changed files with 15 additions and 0 deletions
|
|
@ -267,6 +267,17 @@ nm_dhcp_option_add_option_u64(GHashTable * options,
|
|||
g_strdup_printf("%" G_GUINT64_FORMAT, value));
|
||||
}
|
||||
|
||||
void
|
||||
nm_dhcp_option_add_option_in_addr(GHashTable * options,
|
||||
const NMDhcpOption *requests,
|
||||
guint option,
|
||||
in_addr_t value)
|
||||
{
|
||||
char sbuf[NM_UTILS_INET_ADDRSTRLEN];
|
||||
|
||||
nm_dhcp_option_add_option(options, requests, option, _nm_utils_inet4_ntop(value, sbuf));
|
||||
}
|
||||
|
||||
void
|
||||
nm_dhcp_option_add_requests_to_options(GHashTable *options, const NMDhcpOption *requests)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -200,6 +200,10 @@ void nm_dhcp_option_add_option_utf8safe_escape(GHashTable * option
|
|||
guint option,
|
||||
const guint8 * data,
|
||||
gsize n_data);
|
||||
void nm_dhcp_option_add_option_in_addr(GHashTable * options,
|
||||
const NMDhcpOption *requests,
|
||||
guint option,
|
||||
in_addr_t value);
|
||||
void nm_dhcp_option_add_option_u64(GHashTable * options,
|
||||
const NMDhcpOption *requests,
|
||||
guint option,
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue