summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorInaky Perez-Gonzalez <inaky@linux.intel.com>2009-04-01 09:36:22 -0700
committerInaky Perez-Gonzalez <inaky@linux.intel.com>2009-04-01 14:35:54 -0700
commit6aaf5c113f4c282d5900baddb699e3acc9bff12c (patch)
tree62491525efd03326c44f68f35e898e0bb2d5d205
parente34895f76037b8faff0646fa4e953bae4491497c (diff)
libwimaxll: make wimaxll_container_of() available for all
Signed-off-by: Inaky Perez-Gonzalez <inaky@linux.intel.com>
-rw-r--r--include/wimaxll.h7
-rw-r--r--lib/internal.h13
2 files changed, 11 insertions, 9 deletions
diff --git a/include/wimaxll.h b/include/wimaxll.h
index d44da2c..f8b2668 100644
--- a/include/wimaxll.h
+++ b/include/wimaxll.h
@@ -352,6 +352,13 @@ const char * wimaxll_state_to_name(enum wimax_st);
#define wimaxll_array_size(a) (sizeof(a)/sizeof(a[0]))
+#define wimaxll_container_of(pointer, type, member) \
+({ \
+ type *object = NULL; \
+ size_t offset = (void *) &object->member - (void *) object; \
+ (type *) ((void *) pointer - offset); \
+})
+
static inline // ugly hack for doxygen
/**
*
diff --git a/lib/internal.h b/lib/internal.h
index 5e00d6b..71e9ef2 100644
--- a/lib/internal.h
+++ b/lib/internal.h
@@ -39,6 +39,10 @@
#include <wimaxll.h>
+struct nl_msg;
+struct nlmsgerr;
+struct sockaddr_nl;
+
enum {
#define __WIMAXLL_IFNAME_LEN 32
/**
@@ -231,15 +235,6 @@ int wimaxll_gnl_handle_state_change(struct wimaxll_handle *, struct nl_msg *);
int wimaxll_gnl_error_cb(struct sockaddr_nl *, struct nlmsgerr *, void *);
int wimaxll_gnl_ack_cb(struct nl_msg *msg, void *_mch);
-
-#define wimaxll_container_of(pointer, type, member) \
-({ \
- type *object = NULL; \
- size_t offset = (void *) &object->member - (void *) object; \
- (type *) ((void *) pointer - offset); \
-})
-
-
/*
* wimaxll_family_id - Return the associated Generic Netlink family ID
*