Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 32666
b: refs/heads/master
c: fb0ba6b
h: refs/heads/master
v: v3
  • Loading branch information
Balbir Singh authored and Linus Torvalds committed Jul 15, 2006
1 parent ca0db03 commit 129ee19
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 1 deletion.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 52f17b6c2bd443e7806a161e9d10a983650db01d
refs/heads/master: fb0ba6bd021248b6bdc58a7b1213a55a6776a38a
20 changes: 20 additions & 0 deletions trunk/include/net/genetlink.h
Original file line number Diff line number Diff line change
Expand Up @@ -150,4 +150,24 @@ static inline int genlmsg_unicast(struct sk_buff *skb, u32 pid)
return nlmsg_unicast(genl_sock, skb, pid);
}

/**
* gennlmsg_data - head of message payload
* @gnlh: genetlink messsage header
*/
static inline void *genlmsg_data(const struct genlmsghdr *gnlh)
{
return ((unsigned char *) gnlh + GENL_HDRLEN);
}

/**
* genlmsg_len - length of message payload
* @gnlh: genetlink message header
*/
static inline int genlmsg_len(const struct genlmsghdr *gnlh)
{
struct nlmsghdr *nlh = (struct nlmsghdr *)((unsigned char *)gnlh -
NLMSG_HDRLEN);
return (nlh->nlmsg_len - GENL_HDRLEN - NLMSG_HDRLEN);
}

#endif /* __NET_GENERIC_NETLINK_H */

0 comments on commit 129ee19

Please sign in to comment.