From de06e5715e780baade318f3490ac7a4c9ce84e32 Mon Sep 17 00:00:00 2001 From: Michael Biebl Date: Sat, 24 Mar 2012 01:37:02 +0100 Subject: Imported Upstream version 0.9.4.0 --- libnm-util/nm-utils.h | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) (limited to 'libnm-util/nm-utils.h') diff --git a/libnm-util/nm-utils.h b/libnm-util/nm-utils.h index 6a179268..7bc536ac 100644 --- a/libnm-util/nm-utils.h +++ b/libnm-util/nm-utils.h @@ -29,6 +29,7 @@ #include #include "nm-connection.h" +#include "nm-utils-enum-types.h" G_BEGIN_DECLS @@ -118,6 +119,21 @@ guint32 nm_utils_wifi_channel_to_freq (guint32 channel, const char *band); guint32 nm_utils_wifi_find_next_channel (guint32 channel, int direction, char *band); gboolean nm_utils_wifi_is_channel_valid (guint32 channel, const char *band); +/** + * NM_UTILS_HWADDR_LEN_MAX: + * + * The maximum length of a hardware address of a type known by + * nm_utils_hwaddr_len() or nm_utils_hwaddr_aton(). This can be used + * as the size of the buffer passed to nm_utils_hwaddr_aton(). + */ +#define NM_UTILS_HWADDR_LEN_MAX 20 /* INFINIBAND_ALEN */ + +int nm_utils_hwaddr_len (int type) G_GNUC_PURE; +int nm_utils_hwaddr_type (int len) G_GNUC_PURE; +char *nm_utils_hwaddr_ntoa (gconstpointer addr, int type); +GByteArray *nm_utils_hwaddr_atoba (const char *asc, int type); +guint8 *nm_utils_hwaddr_aton (const char *asc, int type, gpointer buffer); + G_END_DECLS #endif /* NM_UTILS_H */ -- cgit 1.3.0-6-gf8a5