From e71992889ee289a87f6641cfa40d64a5699bcb53 Mon Sep 17 00:00:00 2001 From: Pavel Emelianov Date: Wed, 8 Aug 2007 22:16:38 -0700 Subject: [RTNETLINK]: Introduce generic rtnl_create_link(). This routine gets the parsed rtnl attributes and creates a new link with generic info (IFLA_LINKINFO policy). Its intention is to help the drivers, that need to create several links at once (like VETH). This is nothing but a copy-paste-ed part of rtnl_newlink() function that is responsible for creation of new device. Signed-off-by: Pavel Emelianov Acked-by: Patrick McHardy Signed-off-by: David S. Miller --- include/net/rtnetlink.h | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'include/net/rtnetlink.h') diff --git a/include/net/rtnetlink.h b/include/net/rtnetlink.h index 3861c05cdf0f..8218288ab7ee 100644 --- a/include/net/rtnetlink.h +++ b/include/net/rtnetlink.h @@ -78,6 +78,10 @@ extern void __rtnl_link_unregister(struct rtnl_link_ops *ops); extern int rtnl_link_register(struct rtnl_link_ops *ops); extern void rtnl_link_unregister(struct rtnl_link_ops *ops); +extern struct net_device *rtnl_create_link(char *ifname, + const struct rtnl_link_ops *ops, struct nlattr *tb[]); +extern const struct nla_policy ifla_policy[IFLA_MAX+1]; + #define MODULE_ALIAS_RTNL_LINK(kind) MODULE_ALIAS("rtnl-link-" kind) #endif -- cgit v1.2.3-59-g8ed1b