diff options
| author | Dave Airlie <airlied@redhat.com> | 2024-11-04 14:25:33 +1000 |
|---|---|---|
| committer | Dave Airlie <airlied@redhat.com> | 2024-11-04 14:25:33 +1000 |
| commit | 30169bb64580bd7bce9290c1952bf0aa6cc37fe5 (patch) | |
| tree | 94c6ab9dec68f5648a055752aad32d816bd27e11 /include/net/rtnetlink.h | |
| parent | bcfe43f0ea77c42c2154fb79b99b7d1d82ac3231 (diff) | |
| parent | 59b723cd2adbac2a34fc8e12c74ae26ae45bf230 (diff) | |
Backmerge v6.12-rc6 of git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux into drm-next
Backmerge Linus tree for some drm-fixes needed for msm and xe merges.
Signed-off-by: Dave Airlie <airlied@redhat.com>
Diffstat (limited to 'include/net/rtnetlink.h')
| -rw-r--r-- | include/net/rtnetlink.h | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/include/net/rtnetlink.h b/include/net/rtnetlink.h index b45d57b5968a..2d3eb7cb4dff 100644 --- a/include/net/rtnetlink.h +++ b/include/net/rtnetlink.h @@ -29,6 +29,15 @@ static inline enum rtnl_kinds rtnl_msgtype_kind(int msgtype) return msgtype & RTNL_KIND_MASK; } +struct rtnl_msg_handler { + struct module *owner; + int protocol; + int msgtype; + rtnl_doit_func doit; + rtnl_dumpit_func dumpit; + int flags; +}; + void rtnl_register(int protocol, int msgtype, rtnl_doit_func, rtnl_dumpit_func, unsigned int flags); int rtnl_register_module(struct module *owner, int protocol, int msgtype, @@ -36,6 +45,14 @@ int rtnl_register_module(struct module *owner, int protocol, int msgtype, int rtnl_unregister(int protocol, int msgtype); void rtnl_unregister_all(int protocol); +int __rtnl_register_many(const struct rtnl_msg_handler *handlers, int n); +void __rtnl_unregister_many(const struct rtnl_msg_handler *handlers, int n); + +#define rtnl_register_many(handlers) \ + __rtnl_register_many(handlers, ARRAY_SIZE(handlers)) +#define rtnl_unregister_many(handlers) \ + __rtnl_unregister_many(handlers, ARRAY_SIZE(handlers)) + static inline int rtnl_msg_family(const struct nlmsghdr *nlh) { if (nlmsg_len(nlh) >= sizeof(struct rtgenmsg)) |
