Ver código fonte

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

tags/v0.9.3
Marty Connor 18 anos atrás
pai
commit
be0b19a690
1 arquivos alterados com 25 adições e 13 exclusões
  1. 25
    13
      src/core/nic.c

+ 25
- 13
src/core/nic.c Ver arquivo

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
 Etherboot -  Network Bootstrap Program
10
 Etherboot -  Network Bootstrap Program
3
 
11
 
17
 #include "etherboot.h"
25
 #include "etherboot.h"
18
 #include "console.h"
26
 #include "console.h"
19
 #include "url.h"
27
 #include "url.h"
28
+#include "gpxe/in.h"
29
+#include "gpxe/netdevice.h"
20
 #include "proto.h"
30
 #include "proto.h"
21
 #include "resolv.h"
31
 #include "resolv.h"
22
 #include "dev.h"
32
 #include "dev.h"
271
 		return 0;
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
 #ifndef NO_DHCP_SUPPORT
287
 #ifndef NO_DHCP_SUPPORT
276
-	printf(", DHCP: %@", dhcp_server );
288
+	printf( ", DHCP: %s", inet_ntoa (dhcp_server) );
277
 #ifdef PXE_EXPORT       
289
 #ifdef PXE_EXPORT       
278
 	if (arptable[ARP_PROXYDHCP].ipaddr.s_addr)
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
 #endif /* PXE_EXPORT */
292
 #endif /* PXE_EXPORT */
282
 #endif /* ! NO_DHCP_SUPPORT */
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
 	if (bootp_data.bootp_reply.bp_giaddr.s_addr)
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
 	if (arptable[ARP_GATEWAY].ipaddr.s_addr)
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
 	if (arptable[ARP_NAMESERVER].ipaddr.s_addr)
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
 	putchar('\n');
301
 	putchar('\n');
291
 
302
 
292
 #ifdef	MDEBUG
303
 #ifdef	MDEBUG
372
 	struct nic *nic = ( struct nic * ) type_dev;
383
 	struct nic *nic = ( struct nic * ) type_dev;
373
 	static char nic_description[] = "MAC 00:00:00:00:00:00";
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
 	return nic_description;
387
 	return nic_description;
377
 }
388
 }
378
 
389
 
471
 		for(arpentry = 0; arpentry<MAX_ARP; arpentry++)
482
 		for(arpentry = 0; arpentry<MAX_ARP; arpentry++)
472
 			if (arptable[arpentry].ipaddr.s_addr == destip) break;
483
 			if (arptable[arpentry].ipaddr.s_addr == destip) break;
473
 		if (arpentry == MAX_ARP) {
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
 			return(0);
486
 			return(0);
476
 		}
487
 		}
477
 		for (i = 0; i < ETH_ALEN; i++)
488
 		for (i = 0; i < ETH_ALEN; i++)
813
 				memcpy(ip.bp.bp_vend, rfc1533_cookie, sizeof rfc1533_cookie);
824
 				memcpy(ip.bp.bp_vend, rfc1533_cookie, sizeof rfc1533_cookie);
814
 				memcpy(ip.bp.bp_vend + sizeof rfc1533_cookie, proxydhcprequest, sizeof proxydhcprequest);
825
 				memcpy(ip.bp.bp_vend + sizeof rfc1533_cookie, proxydhcprequest, sizeof proxydhcprequest);
815
 				for (reqretry = 0; reqretry < MAX_BOOTP_RETRIES; ) {
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
 					udp_transmit(arptable[ARP_PROXYDHCP].ipaddr.s_addr, BOOTP_CLIENT, PROXYDHCP_SERVER,
829
 					udp_transmit(arptable[ARP_PROXYDHCP].ipaddr.s_addr, BOOTP_CLIENT, PROXYDHCP_SERVER,
818
 						     sizeof(struct bootpip_t), &ip);
830
 						     sizeof(struct bootpip_t), &ip);
819
 					timeout = rfc2131_sleep_interval(TIMEOUT, reqretry++);
831
 					timeout = rfc2131_sleep_interval(TIMEOUT, reqretry++);
987
 					arpreply);
999
 					arpreply);
988
 #ifdef	MDEBUG
1000
 #ifdef	MDEBUG
989
 				memcpy(&tmp, arpreply->tipaddr, sizeof(in_addr));
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
 #endif	/* MDEBUG */
1003
 #endif	/* MDEBUG */
992
 			}
1004
 			}
993
 		}
1005
 		}
1195
 	return tmo;
1207
 	return tmo;
1196
 }
1208
 }
1197
 
1209
 
1198
-
1210
+#endif

Carregando…
Cancelar
Salvar