From be0b19a6905525604c3ce96de3f59ee31f4445b4 Mon Sep 17 00:00:00 2001 From: Marty Connor Date: Mon, 18 Sep 2006 15:08:08 +0000 Subject: [PATCH] commented out contents of core/nic.c, which should now be obsolete. --- src/core/nic.c | 38 +++++++++++++++++++++++++------------- 1 file changed, 25 insertions(+), 13 deletions(-) diff --git a/src/core/nic.c b/src/core/nic.c index 1debd06c..0ceb65eb 100644 --- a/src/core/nic.c +++ b/src/core/nic.c @@ -1,3 +1,11 @@ +#if 0 + +/* + This file is (or should be) completely obsolete. It is thus + commented out with the "#if 0" above, to make sure that no + functions from it are in use. --mdc 2006-09-18 +*/ + /************************************************************************** Etherboot - Network Bootstrap Program @@ -17,6 +25,8 @@ Literature dealing with the network protocols: #include "etherboot.h" #include "console.h" #include "url.h" +#include "gpxe/in.h" +#include "gpxe/netdevice.h" #include "proto.h" #include "resolv.h" #include "dev.h" @@ -271,22 +281,23 @@ static int nic_configure ( struct type_dev *type_dev ) { return 0; } - printf("\nMe: %@", arptable[ARP_CLIENT].ipaddr.s_addr ); +#if 0 + printf( "\nMe: %s", inet_ntoa ( arptable[ARP_CLIENT].ipaddr ) ); +#endif #ifndef NO_DHCP_SUPPORT - printf(", DHCP: %@", dhcp_server ); + printf( ", DHCP: %s", inet_ntoa (dhcp_server) ); #ifdef PXE_EXPORT if (arptable[ARP_PROXYDHCP].ipaddr.s_addr) - printf(" (& %@)", - arptable[ARP_PROXYDHCP].ipaddr.s_addr); + printf ( " (& %s)", inet_ntoa ( arptable[ARP_PROXYDHCP].ipaddr ) ); #endif /* PXE_EXPORT */ #endif /* ! NO_DHCP_SUPPORT */ - printf(", TFTP: %@", arptable[ARP_SERVER].ipaddr.s_addr); + printf(", TFTP: %s", inet_ntoa ( arptable[ARP_SERVER].ipaddr ) ); if (bootp_data.bootp_reply.bp_giaddr.s_addr) - printf(", Relay: %@", bootp_data.bootp_reply.bp_giaddr.s_addr); + printf ( ", Relay: %s", inet_ntoa ( bootp_data.bootp_reply.bp_giaddr ) ); if (arptable[ARP_GATEWAY].ipaddr.s_addr) - printf(", Gateway %@", arptable[ARP_GATEWAY].ipaddr.s_addr); + printf ( ", Gateway %s", inet_ntoa (arptable[ARP_GATEWAY].ipaddr ) ); if (arptable[ARP_NAMESERVER].ipaddr.s_addr) - printf(", Nameserver %@", arptable[ARP_NAMESERVER].ipaddr.s_addr); + printf ( ", Nameserver %s", inet_ntoa ( arptable[ARP_NAMESERVER].ipaddr ) ); putchar('\n'); #ifdef MDEBUG @@ -372,7 +383,7 @@ static char * nic_describe_device ( struct type_dev *type_dev ) { struct nic *nic = ( struct nic * ) type_dev; static char nic_description[] = "MAC 00:00:00:00:00:00"; - sprintf ( nic_description + 4, "%!", nic->node_addr ); + sprintf ( nic_description + 4, "%s", netdev_name ( nic ) ); return nic_description; } @@ -471,7 +482,7 @@ int ip_transmit(int len, const void *buf) for(arpentry = 0; arpentrytipaddr, sizeof(in_addr)); - printf("Sent ARP reply to: %@\n",tmp); + printf( "Sent ARP reply to: %s\n", inet_ntoa ( tmp ) ); #endif /* MDEBUG */ } } @@ -1195,4 +1207,4 @@ long rfc2131_sleep_interval(long base, int exp) return tmo; } - +#endif