diff --git a/common/cmd_net.c b/common/cmd_net.c
index 53760a2..d75718c 100644
--- a/common/cmd_net.c
+++ b/common/cmd_net.c
@@ -201,11 +201,13 @@
 		if (end == (argv[1] + strlen(argv[1])))
 			load_addr = addr;
 		else
-			copy_filename(BootFile, argv[1], sizeof(BootFile));
+			copy_filename(net_boot_file_name, argv[1],
+				      sizeof(net_boot_file_name));
 		break;
 
 	case 3:	load_addr = simple_strtoul(argv[1], NULL, 16);
-		copy_filename(BootFile, argv[2], sizeof(BootFile));
+		copy_filename(net_boot_file_name, argv[2],
+			      sizeof(net_boot_file_name));
 
 		break;
 
@@ -216,7 +218,8 @@
 			printf("Invalid address/size\n");
 			return CMD_RET_USAGE;
 		}
-		copy_filename(BootFile, argv[3], sizeof(BootFile));
+		copy_filename(net_boot_file_name, argv[3],
+			      sizeof(net_boot_file_name));
 		break;
 #endif
 	default:
diff --git a/common/cmd_pxe.c b/common/cmd_pxe.c
index 9eac5c6..5cde5b6 100644
--- a/common/cmd_pxe.c
+++ b/common/cmd_pxe.c
@@ -1568,7 +1568,7 @@
 
 	destroy_pxe_menu(cfg);
 
-	copy_filename(BootFile, "", sizeof(BootFile));
+	copy_filename(net_boot_file_name, "", sizeof(net_boot_file_name));
 
 	return 0;
 }
diff --git a/common/update.c b/common/update.c
index cc830a7..bc0c48f 100644
--- a/common/update.c
+++ b/common/update.c
@@ -58,7 +58,7 @@
 	saved_timeout_msecs = TftpRRQTimeoutMSecs;
 	saved_timeout_count = TftpRRQTimeoutCountMax;
 	saved_netretry = strdup(getenv("netretry"));
-	saved_bootfile = strdup(BootFile);
+	saved_bootfile = strdup(net_boot_file_name);
 
 	/* set timeouts for auto-update */
 	TftpRRQTimeoutMSecs = msec_max;
@@ -69,7 +69,7 @@
 
 	/* download the update file */
 	load_addr = addr;
-	copy_filename(BootFile, filename, sizeof(BootFile));
+	copy_filename(net_boot_file_name, filename, sizeof(net_boot_file_name));
 	size = NetLoop(TFTPGET);
 
 	if (size < 0)
@@ -86,7 +86,8 @@
 		free(saved_netretry);
 
 	if (saved_bootfile != NULL) {
-		copy_filename(BootFile, saved_bootfile, sizeof(BootFile));
+		copy_filename(net_boot_file_name, saved_bootfile,
+			      sizeof(net_boot_file_name));
 		free(saved_bootfile);
 	}
 
diff --git a/include/net.h b/include/net.h
index a19f7a1..c16744a 100644
--- a/include/net.h
+++ b/include/net.h
@@ -476,9 +476,7 @@
 extern char	NetOurNISDomain[32];	/* Our NIS domain */
 extern char	NetOurHostName[32];	/* Our hostname */
 extern char	NetOurRootPath[64];	/* Our root path */
-extern ushort	NetBootFileSize;	/* Our boot file size in blocks */
 /** END OF BOOTP EXTENTIONS **/
-extern ulong		NetBootFileXferSize;	/* size of bootfile in bytes */
 extern uchar		NetOurEther[6];		/* Our ethernet address */
 extern uchar		NetServerEther[6];	/* Boot server enet address */
 extern struct in_addr	net_ip;		/* Our    IP addr (0 = unknown) */
@@ -507,8 +505,11 @@
 	TFTPSRV, TFTPPUT, LINKLOCAL
 };
 
-/* from net/net.c */
-extern char	BootFile[128];			/* Boot File name */
+extern char	net_boot_file_name[128];/* Boot File name */
+/* The actual transferred size of the bootfile (in bytes) */
+extern u32	net_boot_file_size;
+/* Boot file size in blocks as reported by the DHCP server */
+extern u32	net_boot_file_expected_size_in_blocks;
 
 #if defined(CONFIG_CMD_DNS)
 extern char *NetDNSResolve;		/* The host to resolve  */
diff --git a/net/bootp.c b/net/bootp.c
index a56ed4c..0148c19 100644
--- a/net/bootp.c
+++ b/net/bootp.c
@@ -146,16 +146,17 @@
 		net_copy_ip(&net_server_ip, &bp->bp_siaddr);
 	memcpy(NetServerEther, ((struct ethernet_hdr *)NetRxPacket)->et_src, 6);
 	if (strlen(bp->bp_file) > 0)
-		copy_filename(BootFile, bp->bp_file, sizeof(BootFile));
+		copy_filename(net_boot_file_name, bp->bp_file,
+			      sizeof(net_boot_file_name));
 
-	debug("Bootfile: %s\n", BootFile);
+	debug("net_boot_file_name: %s\n", net_boot_file_name);
 
 	/* Propagate to environment:
 	 * don't delete exising entry when BOOTP / DHCP reply does
 	 * not contain a new value
 	 */
-	if (*BootFile)
-		setenv("bootfile", BootFile);
+	if (*net_boot_file_name)
+		setenv("bootfile", net_boot_file_name);
 #endif
 	net_copy_ip(&net_ip, &bp->bp_yiaddr);
 }
@@ -179,7 +180,7 @@
 	debug("[BOOTP] Processing extension %d... (%d bytes)\n", *ext,
 		*(ext + 1));
 
-	NetBootFileSize = 0;
+	net_boot_file_expected_size_in_blocks = 0;
 
 	switch (*ext) {
 		/* Fixed length fields */
@@ -228,9 +229,11 @@
 		break;
 	case 13:		/* Boot file size */
 		if (size == 2)
-			NetBootFileSize = ntohs(*(ushort *) (ext + 2));
+			net_boot_file_expected_size_in_blocks =
+				ntohs(*(ushort *)(ext + 2));
 		else if (size == 4)
-			NetBootFileSize = ntohl(*(ulong *) (ext + 2));
+			net_boot_file_expected_size_in_blocks =
+				ntohl(*(ulong *)(ext + 2));
 		break;
 	case 14:		/* Merit dump file - Not yet supported */
 		break;
@@ -303,8 +306,9 @@
 	if (net_gateway.s_addr)
 		debug("net_gateway	: %pI4", &net_gateway);
 
-	if (NetBootFileSize)
-		debug("NetBootFileSize : %d\n", NetBootFileSize);
+	if (net_boot_file_expected_size_in_blocks)
+		debug("net_boot_file_expected_size_in_blocks : %d\n",
+		      net_boot_file_expected_size_in_blocks);
 
 	if (NetOurHostName[0])
 		debug("NetOurHostName  : %s\n", NetOurHostName);
@@ -315,9 +319,6 @@
 	if (NetOurNISDomain[0])
 		debug("NetOurNISDomain : %s\n", NetOurNISDomain);
 
-	if (NetBootFileSize)
-		debug("NetBootFileSize: %d\n", NetBootFileSize);
-
 #if defined(CONFIG_CMD_SNTP) && defined(CONFIG_BOOTP_NTPSERVER)
 	if (net_ntp_server)
 		debug("net_ntp_server : %pI4\n", &net_ntp_server);
@@ -716,7 +717,7 @@
 	net_write_ip(&bp->bp_siaddr, zero_ip);
 	net_write_ip(&bp->bp_giaddr, zero_ip);
 	memcpy(bp->bp_chaddr, NetOurEther, 6);
-	copy_filename(bp->bp_file, BootFile, sizeof(bp->bp_file));
+	copy_filename(bp->bp_file, net_boot_file_name, sizeof(bp->bp_file));
 
 	/* Request additional information from the BOOTP/DHCP server */
 #if defined(CONFIG_CMD_DHCP)
diff --git a/net/bootp.h b/net/bootp.h
index 16f40dc..8c591a6 100644
--- a/net/bootp.h
+++ b/net/bootp.h
@@ -60,7 +60,6 @@
 
 /* bootp.c */
 extern ulong	BootpID;		/* ID of cur BOOTP request	*/
-extern char	BootFile[128];		/* Boot file name		*/
 extern int	BootpTry;
 
 
diff --git a/net/eth.c b/net/eth.c
index c1d6b04..f06fdb2 100644
--- a/net/eth.c
+++ b/net/eth.c
@@ -66,7 +66,8 @@
 
 	s = getenv("bootfile");
 	if (s != NULL)
-		copy_filename(BootFile, s, sizeof(BootFile));
+		copy_filename(net_boot_file_name, s,
+			      sizeof(net_boot_file_name));
 }
 
 static int eth_mac_skip(int index)
diff --git a/net/net.c b/net/net.c
index b1b822d..f60998b 100644
--- a/net/net.c
+++ b/net/net.c
@@ -127,8 +127,6 @@
 char		NetOurHostName[32] = {0,};
 /* Our bootpath */
 char		NetOurRootPath[64] = {0,};
-/* Our bootfile size in blocks */
-ushort		NetBootFileSize;
 
 #ifdef CONFIG_MCAST_TFTP	/* Multicast TFTP */
 struct in_addr net_mcast_addr;
@@ -136,8 +134,6 @@
 
 /** END OF BOOTP EXTENTIONS **/
 
-/* The actual transferred size of the bootfile (in bytes) */
-ulong		NetBootFileXferSize;
 /* Our ethernet address */
 uchar		NetOurEther[6];
 /* Boot server enet address */
@@ -174,7 +170,11 @@
 ushort		NetOurNativeVLAN = 0xFFFF;
 
 /* Boot File name */
-char		BootFile[128];
+char net_boot_file_name[128];
+/* The actual transferred size of the bootfile (in bytes) */
+u32 net_boot_file_size;
+/* Boot file size in blocks as reported by the DHCP server */
+u32 net_boot_file_expected_size_in_blocks;
 
 #if defined(CONFIG_CMD_SNTP)
 /* NTP server IP address */
@@ -222,7 +222,8 @@
 	switch (op) {
 	case env_op_create:
 	case env_op_overwrite:
-		copy_filename(BootFile, value, sizeof(BootFile));
+		copy_filename(net_boot_file_name, value,
+			      sizeof(net_boot_file_name));
 		break;
 	default:
 		break;
@@ -380,7 +381,7 @@
 
 	case 0:
 		NetDevExists = 1;
-		NetBootFileXferSize = 0;
+		net_boot_file_size = 0;
 		switch (protocol) {
 		case TFTPGET:
 #ifdef CONFIG_CMD_TFTPPUT
@@ -551,11 +552,10 @@
 
 		case NETLOOP_SUCCESS:
 			net_cleanup_loop();
-			if (NetBootFileXferSize > 0) {
-				printf("Bytes transferred = %ld (%lx hex)\n",
-					NetBootFileXferSize,
-					NetBootFileXferSize);
-				setenv_hex("filesize", NetBootFileXferSize);
+			if (net_boot_file_size > 0) {
+				printf("Bytes transferred = %d (%x hex)\n",
+				       net_boot_file_size, net_boot_file_size);
+				setenv_hex("filesize", net_boot_file_size);
 				setenv_hex("fileaddr", load_addr);
 			}
 			if (protocol != NETCONS)
@@ -565,7 +565,7 @@
 
 			eth_set_last_protocol(protocol);
 
-			ret = NetBootFileXferSize;
+			ret = net_boot_file_size;
 			debug_cond(DEBUG_INT_STATE, "--- NetLoop Success!\n");
 			goto done;
 
diff --git a/net/nfs.c b/net/nfs.c
index 34e5051..1e5c1c3 100644
--- a/net/nfs.c
+++ b/net/nfs.c
@@ -100,8 +100,8 @@
 		unmap_sysmem(ptr);
 	}
 
-	if (NetBootFileXferSize < (offset+len))
-		NetBootFileXferSize = newsize;
+	if (net_boot_file_size < (offset + len))
+		net_boot_file_size = newsize;
 	return 0;
 }
 
@@ -724,7 +724,7 @@
 		return;
 	}
 
-	if (BootFile[0] == '\0') {
+	if (net_boot_file_name[0] == '\0') {
 		sprintf(default_filename, "/nfsroot/%02X%02X%02X%02X.img",
 			net_ip.s_addr & 0xFF,
 			(net_ip.s_addr >>  8) & 0xFF,
@@ -735,16 +735,16 @@
 		printf("*** Warning: no boot file name; using '%s'\n",
 			nfs_path);
 	} else {
-		char *p = BootFile;
+		char *p = net_boot_file_name;
 
 		p = strchr(p, ':');
 
 		if (p != NULL) {
-			nfs_server_ip = string_to_ip(BootFile);
+			nfs_server_ip = string_to_ip(net_boot_file_name);
 			++p;
 			strcpy(nfs_path, p);
 		} else {
-			strcpy(nfs_path, BootFile);
+			strcpy(nfs_path, net_boot_file_name);
 		}
 	}
 
@@ -769,9 +769,10 @@
 	}
 	printf("\nFilename '%s/%s'.", nfs_path, nfs_filename);
 
-	if (NetBootFileSize) {
-		printf(" Size is 0x%x Bytes = ", NetBootFileSize<<9);
-		print_size(NetBootFileSize<<9, "");
+	if (net_boot_file_expected_size_in_blocks) {
+		printf(" Size is 0x%x Bytes = ",
+		       net_boot_file_expected_size_in_blocks << 9);
+		print_size(net_boot_file_expected_size_in_blocks << 9, "");
 	}
 	printf("\nLoad address: 0x%lx\n"
 		"Loading: *\b", load_addr);
diff --git a/net/tftp.c b/net/tftp.c
index 4c985fa..bafc354 100644
--- a/net/tftp.c
+++ b/net/tftp.c
@@ -197,8 +197,8 @@
 		ext2_set_bit(block, Bitmap);
 #endif
 
-	if (NetBootFileXferSize < newsize)
-		NetBootFileXferSize = newsize;
+	if (net_boot_file_size < newsize)
+		net_boot_file_size = newsize;
 }
 
 /* Clear our state ready for a new transfer */
@@ -227,7 +227,7 @@
 	ulong offset = ((int)block - 1) * len + TftpBlockWrapOffset;
 	ulong tosend = len;
 
-	tosend = min(NetBootFileXferSize - offset, tosend);
+	tosend = min(net_boot_file_size - offset, tosend);
 	(void)memcpy(dst, (void *)(save_addr + offset), tosend);
 	debug("%s: block=%d, offset=%ld, len=%d, tosend=%ld\n", __func__,
 		block, offset, len, tosend);
@@ -311,7 +311,7 @@
 	time_start = get_timer(time_start);
 	if (time_start > 0) {
 		puts("\n\t ");	/* Line up with "Loading: " */
-		print_size(NetBootFileXferSize /
+		print_size(net_boot_file_size /
 			time_start * 1000, "/s");
 	}
 	puts("\ndone\n");
@@ -361,8 +361,8 @@
 		debug("send option \"timeout %s\"\n", (char *)pkt);
 		pkt += strlen((char *)pkt) + 1;
 #ifdef CONFIG_TFTP_TSIZE
-		pkt += sprintf((char *)pkt, "tsize%c%lu%c",
-				0, NetBootFileXferSize, 0);
+		pkt += sprintf((char *)pkt, "tsize%c%u%c",
+				0, net_boot_file_size, 0);
 #endif
 		/* try for more effic. blk size */
 		pkt += sprintf((char *)pkt, "blksize%c%d%c",
@@ -720,7 +720,7 @@
 		TftpBlkSizeOption, TftpTimeoutMSecs);
 
 	tftp_remote_ip = net_server_ip;
-	if (BootFile[0] == '\0') {
+	if (net_boot_file_name[0] == '\0') {
 		sprintf(default_filename, "%02X%02X%02X%02X.img",
 			net_ip.s_addr & 0xFF,
 			(net_ip.s_addr >>  8) & 0xFF,
@@ -733,13 +733,13 @@
 		printf("*** Warning: no boot file name; using '%s'\n",
 			tftp_filename);
 	} else {
-		char *p = strchr(BootFile, ':');
+		char *p = strchr(net_boot_file_name, ':');
 
 		if (p == NULL) {
-			strncpy(tftp_filename, BootFile, MAX_LEN);
+			strncpy(tftp_filename, net_boot_file_name, MAX_LEN);
 			tftp_filename[MAX_LEN-1] = 0;
 		} else {
-			tftp_remote_ip = string_to_ip(BootFile);
+			tftp_remote_ip = string_to_ip(net_boot_file_name);
 			strncpy(tftp_filename, p + 1, MAX_LEN);
 			tftp_filename[MAX_LEN-1] = 0;
 		}
@@ -768,9 +768,10 @@
 
 	printf("Filename '%s'.", tftp_filename);
 
-	if (NetBootFileSize) {
-		printf(" Size is 0x%x Bytes = ", NetBootFileSize<<9);
-		print_size(NetBootFileSize<<9, "");
+	if (net_boot_file_expected_size_in_blocks) {
+		printf(" Size is 0x%x Bytes = ",
+		       net_boot_file_expected_size_in_blocks << 9);
+		print_size(net_boot_file_expected_size_in_blocks << 9, "");
 	}
 
 	putc('\n');
@@ -779,7 +780,7 @@
 	if (TftpWriting) {
 		printf("Save address: 0x%lx\n", save_addr);
 		printf("Save size:    0x%lx\n", save_size);
-		NetBootFileXferSize = save_size;
+		net_boot_file_size = save_size;
 		puts("Saving: *\b");
 		TftpState = STATE_SEND_WRQ;
 		new_transfer();
