Browse Source

commented out contents of core/nic.c, which should now be obsolete.

tags/v0.9.3
Marty Connor 18 years ago
parent
commit
be0b19a690
1 changed files with 25 additions and 13 deletions
  1. 25
    13
      src/core/nic.c

+ 25
- 13
src/core/nic.c View File

@@ -1,3 +1,11 @@
1
+#if 0
2
+
3
+/* 
4
+   This file is (or should be) completely obsolete.  It is thus
5
+   commented out with the "#if 0" above, to make sure that no
6
+   functions from it are in use. --mdc 2006-09-18
7
+*/
8
+
1 9
 /**************************************************************************
2 10
 Etherboot -  Network Bootstrap Program
3 11
 
@@ -17,6 +25,8 @@ Literature dealing with the network protocols:
17 25
 #include "etherboot.h"
18 26
 #include "console.h"
19 27
 #include "url.h"
28
+#include "gpxe/in.h"
29
+#include "gpxe/netdevice.h"
20 30
 #include "proto.h"
21 31
 #include "resolv.h"
22 32
 #include "dev.h"
@@ -271,22 +281,23 @@ static int nic_configure ( struct type_dev *type_dev ) {
271 281
 		return 0;
272 282
 	}
273 283
 
274
-	printf("\nMe: %@", arptable[ARP_CLIENT].ipaddr.s_addr );
284
+#if 0
285
+	printf( "\nMe: %s", inet_ntoa ( arptable[ARP_CLIENT].ipaddr ) );
286
+#endif
275 287
 #ifndef NO_DHCP_SUPPORT
276
-	printf(", DHCP: %@", dhcp_server );
288
+	printf( ", DHCP: %s", inet_ntoa (dhcp_server) );
277 289
 #ifdef PXE_EXPORT       
278 290
 	if (arptable[ARP_PROXYDHCP].ipaddr.s_addr)
279
-		printf(" (& %@)",
280
-		       arptable[ARP_PROXYDHCP].ipaddr.s_addr);
291
+		printf ( " (& %s)", inet_ntoa ( arptable[ARP_PROXYDHCP].ipaddr ) );
281 292
 #endif /* PXE_EXPORT */
282 293
 #endif /* ! NO_DHCP_SUPPORT */
283
-	printf(", TFTP: %@", arptable[ARP_SERVER].ipaddr.s_addr);
294
+	printf(", TFTP: %s", inet_ntoa ( arptable[ARP_SERVER].ipaddr ) );
284 295
 	if (bootp_data.bootp_reply.bp_giaddr.s_addr)
285
-		printf(", Relay: %@", bootp_data.bootp_reply.bp_giaddr.s_addr);
296
+		printf ( ", Relay: %s", inet_ntoa ( bootp_data.bootp_reply.bp_giaddr ) );
286 297
 	if (arptable[ARP_GATEWAY].ipaddr.s_addr)
287
-		printf(", Gateway %@", arptable[ARP_GATEWAY].ipaddr.s_addr);
298
+		printf ( ", Gateway %s", inet_ntoa (arptable[ARP_GATEWAY].ipaddr ) );
288 299
 	if (arptable[ARP_NAMESERVER].ipaddr.s_addr)
289
-		printf(", Nameserver %@", arptable[ARP_NAMESERVER].ipaddr.s_addr);
300
+		printf ( ", Nameserver %s", inet_ntoa ( arptable[ARP_NAMESERVER].ipaddr ) );
290 301
 	putchar('\n');
291 302
 
292 303
 #ifdef	MDEBUG
@@ -372,7 +383,7 @@ static char * nic_describe_device ( struct type_dev *type_dev ) {
372 383
 	struct nic *nic = ( struct nic * ) type_dev;
373 384
 	static char nic_description[] = "MAC 00:00:00:00:00:00";
374 385
 	
375
-	sprintf ( nic_description + 4, "%!", nic->node_addr );
386
+	sprintf ( nic_description + 4, "%s", netdev_name ( nic ) );
376 387
 	return nic_description;
377 388
 }
378 389
 
@@ -471,7 +482,7 @@ int ip_transmit(int len, const void *buf)
471 482
 		for(arpentry = 0; arpentry<MAX_ARP; arpentry++)
472 483
 			if (arptable[arpentry].ipaddr.s_addr == destip) break;
473 484
 		if (arpentry == MAX_ARP) {
474
-			printf("%@ is not in my arp table!\n", destip);
485
+			printf ( "%s is not in my arp table!\n", inet_ntoa (destip) );
475 486
 			return(0);
476 487
 		}
477 488
 		for (i = 0; i < ETH_ALEN; i++)
@@ -813,7 +824,8 @@ static int bootp(void)
813 824
 				memcpy(ip.bp.bp_vend, rfc1533_cookie, sizeof rfc1533_cookie);
814 825
 				memcpy(ip.bp.bp_vend + sizeof rfc1533_cookie, proxydhcprequest, sizeof proxydhcprequest);
815 826
 				for (reqretry = 0; reqretry < MAX_BOOTP_RETRIES; ) {
816
-					printf ( "\nSending ProxyDHCP request to %@...", arptable[ARP_PROXYDHCP].ipaddr.s_addr);
827
+					printf ( "\nSending ProxyDHCP request to %s...", 
828
+						 inet_ntoa ( arptable[ARP_PROXYDHCP].ipaddr ) );
817 829
 					udp_transmit(arptable[ARP_PROXYDHCP].ipaddr.s_addr, BOOTP_CLIENT, PROXYDHCP_SERVER,
818 830
 						     sizeof(struct bootpip_t), &ip);
819 831
 					timeout = rfc2131_sleep_interval(TIMEOUT, reqretry++);
@@ -987,7 +999,7 @@ int await_reply(reply_t reply, int ival, void *ptr, long timeout)
987 999
 					arpreply);
988 1000
 #ifdef	MDEBUG
989 1001
 				memcpy(&tmp, arpreply->tipaddr, sizeof(in_addr));
990
-				printf("Sent ARP reply to: %@\n",tmp);
1002
+				printf( "Sent ARP reply to: %s\n", inet_ntoa ( tmp ) );
991 1003
 #endif	/* MDEBUG */
992 1004
 			}
993 1005
 		}
@@ -1195,4 +1207,4 @@ long rfc2131_sleep_interval(long base, int exp)
1195 1207
 	return tmo;
1196 1208
 }
1197 1209
 
1198
-
1210
+#endif

Loading…
Cancel
Save