patch-1.3.22 linux/net/ipv4/devinet.c

Next file: linux/net/ipv4/igmp.c
Previous file: linux/net/ipv4/arp.c
Back to the patch index
Back to the overall index

diff -u --recursive --new-file v1.3.21/linux/net/ipv4/devinet.c linux/net/ipv4/devinet.c
@@ -15,6 +15,7 @@
  *		Alan Cox, <gw4pts@gw4pts.ampr.org>
  */
  
+#include <linux/config.h>
 #include <asm/segment.h>
 #include <asm/system.h>
 #include <asm/bitops.h>
@@ -213,3 +214,17 @@
 	return NULL;
 }
 
+/*
+ *	Find the first device with a given source address.
+ */
+ 
+struct device *ip_dev_find(unsigned long addr)
+{
+	struct device *dev;
+	for(dev = dev_base; dev; dev=dev->next)
+	{
+		if((dev->flags&IFF_UP) && dev->pa_addr==addr)
+			return dev;
+	}
+	return NULL;
+}

FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen, slshen@lbl.gov with Sam's (original) version
of this