X-Git-Url: http://pileus.org/git/?a=blobdiff_plain;f=include%2Fnet%2Fnetlink.h;h=a63b2192ac1cdf83dfc636ba362e58bd5da8b9ad;hb=3a6c2b419b7768703cfb2cabdb894517c5065e33;hp=eddb50289d6d12b8cb8a234c373f8574a0cb5562;hpb=3a20ac2c52b1317f5a5f0bd9cd3cbe8495ddd026;p=~andy%2Flinux diff --git a/include/net/netlink.h b/include/net/netlink.h index eddb50289d6..a63b2192ac1 100644 --- a/include/net/netlink.h +++ b/include/net/netlink.h @@ -365,7 +365,7 @@ static inline struct nlmsghdr *nlmsg_next(struct nlmsghdr *nlh, int *remaining) * * See nla_parse() */ -static inline int nlmsg_parse(struct nlmsghdr *nlh, int hdrlen, +static inline int nlmsg_parse(const struct nlmsghdr *nlh, int hdrlen, struct nlattr *tb[], int maxtype, const struct nla_policy *policy) { @@ -414,7 +414,7 @@ static inline int nlmsg_validate(struct nlmsghdr *nlh, int hdrlen, int maxtype, * * Returns 1 if a report back to the application is requested. */ -static inline int nlmsg_report(struct nlmsghdr *nlh) +static inline int nlmsg_report(const struct nlmsghdr *nlh) { return !!(nlh->nlmsg_flags & NLM_F_ECHO); } @@ -939,6 +939,15 @@ static inline u64 nla_get_u64(const struct nlattr *nla) return tmp; } +/** + * nla_get_be64 - return payload of __be64 attribute + * @nla: __be64 netlink attribute + */ +static inline __be64 nla_get_be64(const struct nlattr *nla) +{ + return *(__be64 *) nla_data(nla); +} + /** * nla_get_flag - return payload of flag attribute * @nla: flag netlink attribute