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, <[email protected]>
  */
  
+#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, [email protected]
TCL-scripts by Sam Shen, [email protected] with Sam's (original) version
of this