diff options
author | Patrick McHardy <kaber@trash.net> | 2009-08-25 10:07:40 -0400 |
---|---|---|
committer | Patrick McHardy <kaber@trash.net> | 2009-08-25 10:07:40 -0400 |
commit | 3a6c2b419b7768703cfb2cabdb894517c5065e33 (patch) | |
tree | d8d8dc9ad34ffdd2f0f56876e9d3b6f0e6d5eceb /include/net | |
parent | 74f7a6552c8d76ffc5e11eb8d9d6c07238b9ae77 (diff) |
netlink: constify nlmsghdr arguments
Consitfy nlmsghdr arguments to a couple of functions as preparation
for the next patch, which will constify the netlink message data in
all nfnetlink users.
Signed-off-by: Patrick McHardy <kaber@trash.net>
Diffstat (limited to 'include/net')
-rw-r--r-- | include/net/netlink.h | 4 | ||||
-rw-r--r-- | include/net/rtnetlink.h | 2 |
2 files changed, 3 insertions, 3 deletions
diff --git a/include/net/netlink.h b/include/net/netlink.h index 007bdb07dabb..a63b2192ac1c 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) | |||
365 | * | 365 | * |
366 | * See nla_parse() | 366 | * See nla_parse() |
367 | */ | 367 | */ |
368 | static inline int nlmsg_parse(struct nlmsghdr *nlh, int hdrlen, | 368 | static inline int nlmsg_parse(const struct nlmsghdr *nlh, int hdrlen, |
369 | struct nlattr *tb[], int maxtype, | 369 | struct nlattr *tb[], int maxtype, |
370 | const struct nla_policy *policy) | 370 | const struct nla_policy *policy) |
371 | { | 371 | { |
@@ -414,7 +414,7 @@ static inline int nlmsg_validate(struct nlmsghdr *nlh, int hdrlen, int maxtype, | |||
414 | * | 414 | * |
415 | * Returns 1 if a report back to the application is requested. | 415 | * Returns 1 if a report back to the application is requested. |
416 | */ | 416 | */ |
417 | static inline int nlmsg_report(struct nlmsghdr *nlh) | 417 | static inline int nlmsg_report(const struct nlmsghdr *nlh) |
418 | { | 418 | { |
419 | return !!(nlh->nlmsg_flags & NLM_F_ECHO); | 419 | return !!(nlh->nlmsg_flags & NLM_F_ECHO); |
420 | } | 420 | } |
diff --git a/include/net/rtnetlink.h b/include/net/rtnetlink.h index 3c1895e54b7f..85ba560332ed 100644 --- a/include/net/rtnetlink.h +++ b/include/net/rtnetlink.h | |||
@@ -14,7 +14,7 @@ extern void rtnl_register(int protocol, int msgtype, | |||
14 | extern int rtnl_unregister(int protocol, int msgtype); | 14 | extern int rtnl_unregister(int protocol, int msgtype); |
15 | extern void rtnl_unregister_all(int protocol); | 15 | extern void rtnl_unregister_all(int protocol); |
16 | 16 | ||
17 | static inline int rtnl_msg_family(struct nlmsghdr *nlh) | 17 | static inline int rtnl_msg_family(const struct nlmsghdr *nlh) |
18 | { | 18 | { |
19 | if (nlmsg_len(nlh) >= sizeof(struct rtgenmsg)) | 19 | if (nlmsg_len(nlh) >= sizeof(struct rtgenmsg)) |
20 | return ((struct rtgenmsg *) nlmsg_data(nlh))->rtgen_family; | 20 | return ((struct rtgenmsg *) nlmsg_data(nlh))->rtgen_family; |