summaryrefslogtreecommitdiffstats
path: root/sys/compat/linuxkpi/common/include/linux/netdevice.h
diff options
context:
space:
mode:
Diffstat (limited to 'sys/compat/linuxkpi/common/include/linux/netdevice.h')
-rw-r--r--sys/compat/linuxkpi/common/include/linux/netdevice.h15
1 files changed, 15 insertions, 0 deletions
diff --git a/sys/compat/linuxkpi/common/include/linux/netdevice.h b/sys/compat/linuxkpi/common/include/linux/netdevice.h
index 1d50ac1..d79cdf2 100644
--- a/sys/compat/linuxkpi/common/include/linux/netdevice.h
+++ b/sys/compat/linuxkpi/common/include/linux/netdevice.h
@@ -58,6 +58,9 @@ extern struct net init_net;
#define dev_get_by_index(n, idx) ifnet_byindex_ref((idx))
#define dev_hold(d) if_ref((d))
#define dev_put(d) if_rele((d))
+#define dev_net(d) (&init_net)
+
+#define net_eq(a,b) ((a) == (b))
#define netif_running(dev) !!((dev)->if_drv_flags & IFF_DRV_RUNNING)
#define netif_oper_up(dev) !!((dev)->if_flags & IFF_UP)
@@ -69,6 +72,12 @@ netdev_priv(const struct net_device *dev)
return (dev->if_softc);
}
+static inline struct net_device *
+netdev_notifier_info_to_dev(void *ifp)
+{
+ return (ifp);
+}
+
int register_netdevice_notifier(struct notifier_block *);
int register_inetaddr_notifier(struct notifier_block *);
int unregister_netdevice_notifier(struct notifier_block *);
@@ -94,6 +103,12 @@ dev_mc_delete(struct net_device *dev, void *addr, int alen, int all)
}
static inline int
+dev_mc_del(struct net_device *dev, void *addr)
+{
+ return (dev_mc_delete(dev, addr, 6, 0));
+}
+
+static inline int
dev_mc_add(struct net_device *dev, void *addr, int alen, int newonly)
{
struct sockaddr_dl sdl;
OpenPOWER on IntegriCloud