patch-1.3.42 linux/net/ipv4/devinet.c
Next file: linux/net/ipv4/icmp.c
Previous file: linux/net/ipv4/arp.c
Back to the patch index
Back to the overall index
- Lines: 17
- Date:
Tue Nov 14 16:03:57 1995
- Orig file:
v1.3.41/linux/net/ipv4/devinet.c
- Orig date:
Wed Nov 8 07:11:45 1995
diff -u --recursive --new-file v1.3.41/linux/net/ipv4/devinet.c linux/net/ipv4/devinet.c
@@ -227,3 +227,16 @@
}
return NULL;
}
+
+struct device *dev_getbytype(unsigned short type)
+{
+ struct device *dev;
+
+ for (dev = dev_base; dev != NULL; dev = dev->next)
+ {
+ if (dev->type == type && !(dev->flags&(IFF_LOOPBACK|IFF_NOARP)))
+ 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