diff options
author | Thomas Haller <thaller@redhat.com> | 2013-10-28 11:54:22 +0100 |
---|---|---|
committer | Thomas Haller <thaller@redhat.com> | 2013-12-09 17:21:21 +0100 |
commit | 41f8114359404ae2cf14724d84eccfc378e9317c (patch) | |
tree | 8ecd3b67c09c105cfe294c00aea3eab39a2d99dd /libnm-util/nm-utils.h | |
parent | d40a499c01395f8e479cdaab80aee7a42b0caffa (diff) | |
download | NetworkManager-41f8114359404ae2cf14724d84eccfc378e9317c.tar.gz |
libnm-util: add nm_utils_inet[46]_ntop functions
https://bugzilla.gnome.org/show_bug.cgi?id=711684
Signed-off-by: Thomas Haller <thaller@redhat.com>
Diffstat (limited to 'libnm-util/nm-utils.h')
-rw-r--r-- | libnm-util/nm-utils.h | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/libnm-util/nm-utils.h b/libnm-util/nm-utils.h index 25f4a5609e..f6fdf36f99 100644 --- a/libnm-util/nm-utils.h +++ b/libnm-util/nm-utils.h @@ -154,6 +154,16 @@ gboolean nm_utils_iface_valid_name(const char *name); gboolean nm_utils_is_uuid (const char *str); +/** + * NM_UTILS_INET_ADDRSTRLEN: + * + * Defines the minimal length for a char buffer that is suitable as @dst argument + * for both nm_utils_inet4_ntop() and nm_utils_inet6_ntop(). + **/ +#define NM_UTILS_INET_ADDRSTRLEN INET6_ADDRSTRLEN +const char *nm_utils_inet4_ntop (in_addr_t inaddr, char *dst); +const char *nm_utils_inet6_ntop (const struct in6_addr *in6addr, char *dst); + G_END_DECLS #endif /* NM_UTILS_H */ |