summaryrefslogtreecommitdiffstats
path: root/sys/boot/common/dev_net.h
diff options
context:
space:
mode:
authorian <ian@FreeBSD.org>2015-05-18 15:46:43 +0000
committerian <ian@FreeBSD.org>2015-05-18 15:46:43 +0000
commite91cf73a565a9153e0926956798e8acb43f265eb (patch)
tree3dacbcae824cfb6a7617159c2605fc5e51692c1e /sys/boot/common/dev_net.h
parentaf369a5484f0ba2dd39bbe4b1e3566e14f23bb4e (diff)
downloadFreeBSD-src-e91cf73a565a9153e0926956798e8acb43f265eb.zip
FreeBSD-src-e91cf73a565a9153e0926956798e8acb43f265eb.tar.gz
Refactor net_getparams() to make it easier to get params from sources other
than bootp and rarp. The code which splits a serverip:/rootpath string into rootip and a plain pathname is now a separate net_parse_rootpath() function that can be called by others. The code that sets the kernel env vars needed for nfs_diskless is moved into net_open() so that the variables get set no matter where the params came from. There was already code in net_open() that allowed for the possibility that some other entity has set up the network-related global variables. It uses the rootip variable as the key, assuming that if it is set all the other required variables are set too. These changes don't alter the existing behavior, they just make it easier to actually write some new code to get the params from another source (such as the U-Boot environment).
Diffstat (limited to 'sys/boot/common/dev_net.h')
-rw-r--r--sys/boot/common/dev_net.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/sys/boot/common/dev_net.h b/sys/boot/common/dev_net.h
index 3b3d107..995b672 100644
--- a/sys/boot/common/dev_net.h
+++ b/sys/boot/common/dev_net.h
@@ -26,5 +26,11 @@
* $FreeBSD$
*/
+#ifndef _BOOT_DEV_NET_H_
+#define _BOOT_DEV_NET_H_
+
extern struct devsw netdev;
+uint32_t net_parse_rootpath(void);
+
+#endif
OpenPOWER on IntegriCloud