summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorJakub Kicinski2024-10-15 18:52:28 -0700
committerJakub Kicinski2024-10-15 18:52:29 -0700
commit53bac8330865417332d4cf80cb671b15956b049d (patch)
tree52e8a7c4c33b2e89e1485d7325c767ce4e23a938 /include
parentdf24129567f8458de3c0c7e08f9f0f1563f5dc75 (diff)
parente1c6c383123ab1caadbfe39b3362ce0cc09dd766 (diff)
Merge branch 'rtnetlink-use-rtnl_register_many'
Kuniyuki Iwashima says: ==================== rtnetlink: Use rtnl_register_many(). This series converts all rtnl_register() and rtnl_register_module() to rtnl_register_many() and finally removes them. Once this series is applied, I'll start converting doit() to per-netns RTNL. v1: https://lore.kernel.org/20241011220550.46040-1-kuniyu@amazon.com/ ==================== Link: https://patch.msgid.link/20241014201828.91221-1-kuniyu@amazon.com Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Diffstat (limited to 'include')
-rw-r--r--include/net/rtnetlink.h15
1 files changed, 10 insertions, 5 deletions
diff --git a/include/net/rtnetlink.h b/include/net/rtnetlink.h
index 2d3eb7cb4dff..bb49c5708ce7 100644
--- a/include/net/rtnetlink.h
+++ b/include/net/rtnetlink.h
@@ -29,6 +29,16 @@ static inline enum rtnl_kinds rtnl_msgtype_kind(int msgtype)
return msgtype & RTNL_KIND_MASK;
}
+/**
+ * struct rtnl_msg_handler - rtnetlink message type and handlers
+ *
+ * @owner: NULL for built-in, THIS_MODULE for module
+ * @protocol: Protocol family or PF_UNSPEC
+ * @msgtype: rtnetlink message type
+ * @doit: Function pointer called for each request message
+ * @dumpit: Function pointer called for each dump request (NLM_F_DUMP) message
+ * @flags: rtnl_link_flags to modify behaviour of doit/dumpit functions
+ */
struct rtnl_msg_handler {
struct module *owner;
int protocol;
@@ -38,11 +48,6 @@ struct rtnl_msg_handler {
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,
- rtnl_doit_func, rtnl_dumpit_func, unsigned int flags);
-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);