提交 6b8c92ba 编写于 作者: N Nelson Elhage 提交者: David S. Miller

netlink: Make nlmsg_find_attr take a const nlmsghdr*.

This will let us use it on a nlmsghdr stored inside a netlink_callback.
Signed-off-by: NNelson Elhage <nelhage@ksplice.com>
Signed-off-by: NDavid S. Miller <davem@davemloft.net>
上级 1f1b9c99
...@@ -384,7 +384,7 @@ static inline int nlmsg_parse(const struct nlmsghdr *nlh, int hdrlen, ...@@ -384,7 +384,7 @@ static inline int nlmsg_parse(const struct nlmsghdr *nlh, int hdrlen,
* *
* Returns the first attribute which matches the specified type. * Returns the first attribute which matches the specified type.
*/ */
static inline struct nlattr *nlmsg_find_attr(struct nlmsghdr *nlh, static inline struct nlattr *nlmsg_find_attr(const struct nlmsghdr *nlh,
int hdrlen, int attrtype) int hdrlen, int attrtype)
{ {
return nla_find(nlmsg_attrdata(nlh, hdrlen), return nla_find(nlmsg_attrdata(nlh, hdrlen),
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册