Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.openwrt.org/project/libubox.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFelix Fietkau <nbd@openwrt.org>2011-01-23 22:06:03 +0300
committerFelix Fietkau <nbd@openwrt.org>2011-01-23 22:06:03 +0300
commitfcee2d56bca5ed08c4bfc996064e74e92ceb9137 (patch)
treeea9fdfbc7badc387da5bc26928201ddb086b003b /blobmsg.h
parent71f0be5e11b773ed4b09d1cc46099cdafacbd56a (diff)
add blobmsg_name()
Diffstat (limited to 'blobmsg.h')
-rw-r--r--blobmsg.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/blobmsg.h b/blobmsg.h
index 3085d00..8594add 100644
--- a/blobmsg.h
+++ b/blobmsg.h
@@ -49,6 +49,12 @@ static inline int blobmsg_hdrlen(int namelen)
return BLOBMSG_PADDING(sizeof(struct blobmsg_hdr) + namelen + 1);
}
+static inline void *blobmsg_name(struct blob_attr *attr)
+{
+ struct blobmsg_hdr *hdr = blob_data(attr);
+ return &hdr->name;
+}
+
static inline void *blobmsg_data(struct blob_attr *attr)
{
struct blobmsg_hdr *hdr = blob_data(attr);