diff options
-rw-r--r-- | include/net/rtnetlink.h | 40 |
1 files changed, 19 insertions, 21 deletions
diff --git a/include/net/rtnetlink.h b/include/net/rtnetlink.h index 702664833a53..bb13a182fba6 100644 --- a/include/net/rtnetlink.h +++ b/include/net/rtnetlink.h | |||
@@ -8,14 +8,12 @@ typedef int (*rtnl_doit_func)(struct sk_buff *, struct nlmsghdr *); | |||
8 | typedef int (*rtnl_dumpit_func)(struct sk_buff *, struct netlink_callback *); | 8 | typedef int (*rtnl_dumpit_func)(struct sk_buff *, struct netlink_callback *); |
9 | typedef u16 (*rtnl_calcit_func)(struct sk_buff *, struct nlmsghdr *); | 9 | typedef u16 (*rtnl_calcit_func)(struct sk_buff *, struct nlmsghdr *); |
10 | 10 | ||
11 | extern int __rtnl_register(int protocol, int msgtype, | 11 | int __rtnl_register(int protocol, int msgtype, |
12 | rtnl_doit_func, rtnl_dumpit_func, | 12 | rtnl_doit_func, rtnl_dumpit_func, rtnl_calcit_func); |
13 | rtnl_calcit_func); | 13 | void rtnl_register(int protocol, int msgtype, |
14 | extern void rtnl_register(int protocol, int msgtype, | 14 | rtnl_doit_func, rtnl_dumpit_func, rtnl_calcit_func); |
15 | rtnl_doit_func, rtnl_dumpit_func, | 15 | int rtnl_unregister(int protocol, int msgtype); |
16 | rtnl_calcit_func); | 16 | void rtnl_unregister_all(int protocol); |
17 | extern int rtnl_unregister(int protocol, int msgtype); | ||
18 | extern void rtnl_unregister_all(int protocol); | ||
19 | 17 | ||
20 | static inline int rtnl_msg_family(const struct nlmsghdr *nlh) | 18 | static inline int rtnl_msg_family(const struct nlmsghdr *nlh) |
21 | { | 19 | { |
@@ -83,11 +81,11 @@ struct rtnl_link_ops { | |||
83 | unsigned int (*get_num_rx_queues)(void); | 81 | unsigned int (*get_num_rx_queues)(void); |
84 | }; | 82 | }; |
85 | 83 | ||
86 | extern int __rtnl_link_register(struct rtnl_link_ops *ops); | 84 | int __rtnl_link_register(struct rtnl_link_ops *ops); |
87 | extern void __rtnl_link_unregister(struct rtnl_link_ops *ops); | 85 | void __rtnl_link_unregister(struct rtnl_link_ops *ops); |
88 | 86 | ||
89 | extern int rtnl_link_register(struct rtnl_link_ops *ops); | 87 | int rtnl_link_register(struct rtnl_link_ops *ops); |
90 | extern void rtnl_link_unregister(struct rtnl_link_ops *ops); | 88 | void rtnl_link_unregister(struct rtnl_link_ops *ops); |
91 | 89 | ||
92 | /** | 90 | /** |
93 | * struct rtnl_af_ops - rtnetlink address family operations | 91 | * struct rtnl_af_ops - rtnetlink address family operations |
@@ -117,18 +115,18 @@ struct rtnl_af_ops { | |||
117 | const struct nlattr *attr); | 115 | const struct nlattr *attr); |
118 | }; | 116 | }; |
119 | 117 | ||
120 | extern int __rtnl_af_register(struct rtnl_af_ops *ops); | 118 | int __rtnl_af_register(struct rtnl_af_ops *ops); |
121 | extern void __rtnl_af_unregister(struct rtnl_af_ops *ops); | 119 | void __rtnl_af_unregister(struct rtnl_af_ops *ops); |
122 | 120 | ||
123 | extern int rtnl_af_register(struct rtnl_af_ops *ops); | 121 | int rtnl_af_register(struct rtnl_af_ops *ops); |
124 | extern void rtnl_af_unregister(struct rtnl_af_ops *ops); | 122 | void rtnl_af_unregister(struct rtnl_af_ops *ops); |
125 | 123 | ||
124 | struct net *rtnl_link_get_net(struct net *src_net, struct nlattr *tb[]); | ||
125 | struct net_device *rtnl_create_link(struct net *net, char *ifname, | ||
126 | const struct rtnl_link_ops *ops, | ||
127 | struct nlattr *tb[]); | ||
128 | int rtnl_configure_link(struct net_device *dev, const struct ifinfomsg *ifm); | ||
126 | 129 | ||
127 | extern struct net *rtnl_link_get_net(struct net *src_net, struct nlattr *tb[]); | ||
128 | extern struct net_device *rtnl_create_link(struct net *net, | ||
129 | char *ifname, const struct rtnl_link_ops *ops, struct nlattr *tb[]); | ||
130 | extern int rtnl_configure_link(struct net_device *dev, | ||
131 | const struct ifinfomsg *ifm); | ||
132 | extern const struct nla_policy ifla_policy[IFLA_MAX+1]; | 130 | extern const struct nla_policy ifla_policy[IFLA_MAX+1]; |
133 | 131 | ||
134 | #define MODULE_ALIAS_RTNL_LINK(kind) MODULE_ALIAS("rtnl-link-" kind) | 132 | #define MODULE_ALIAS_RTNL_LINK(kind) MODULE_ALIAS("rtnl-link-" kind) |