From 6e2115acb6a892d53a6881bf253ae41d3df39156 Mon Sep 17 00:00:00 2001 From: Jon Loeliger Date: Mon, 11 Jun 2007 19:02:49 -0500 Subject: net/: Augment CONFIG_COMMANDS tests with defined(CONFIG_CMD_*). This is a compatibility step that allows both the older form and the new form to co-exist for a while until the older can be removed entirely. All transformations are of the form: Before: #if (CONFIG_COMMANDS & CFG_CMD_AUTOSCRIPT) After: #if (CONFIG_COMMANDS & CFG_CMD_AUTOSCRIPT) || defined(CONFIG_CMD_AUTOSCRIPT) Signed-off-by: Jon Loeliger --- net/net.c | 60 ++++++++++++++++++++++++++++++------------------------------ 1 file changed, 30 insertions(+), 30 deletions(-) (limited to 'net/net.c') diff --git a/net/net.c b/net/net.c index 2ff7bfc..250abcd 100644 --- a/net/net.c +++ b/net/net.c @@ -86,11 +86,11 @@ #include #include #endif -#if (CONFIG_COMMANDS & CFG_CMD_SNTP) +#if (CONFIG_COMMANDS & CFG_CMD_SNTP) || defined(CONFIG_CMD_SNTP) #include "sntp.h" #endif -#if (CONFIG_COMMANDS & CFG_CMD_NET) +#if (CONFIG_COMMANDS & CFG_CMD_NET) || defined(CONFIG_CMD_NET) DECLARE_GLOBAL_DATA_PTR; @@ -133,7 +133,7 @@ uchar NetBcastAddr[6] = /* Ethernet bcast address */ { 0xff, 0xff, 0xff, 0xff, 0xff, 0xff }; uchar NetEtherNullAddr[6] = { 0, 0, 0, 0, 0, 0 }; -#if (CONFIG_COMMANDS & CFG_CMD_CDP) +#if (CONFIG_COMMANDS & CFG_CMD_CDP) || defined(CONFIG_CMD_CDP) uchar NetCDPAddr[6] = /* Ethernet bcast address */ { 0x01, 0x00, 0x0c, 0xcc, 0xcc, 0xcc }; #endif @@ -150,17 +150,17 @@ ushort NetOurNativeVLAN = 0xFFFF; /* ditto */ char BootFile[128]; /* Boot File name */ -#if (CONFIG_COMMANDS & CFG_CMD_PING) +#if (CONFIG_COMMANDS & CFG_CMD_PING) || defined(CONFIG_CMD_PING) IPaddr_t NetPingIP; /* the ip address to ping */ static void PingStart(void); #endif -#if (CONFIG_COMMANDS & CFG_CMD_CDP) +#if (CONFIG_COMMANDS & CFG_CMD_CDP) || defined(CONFIG_CMD_CDP) static void CDPStart(void); #endif -#if (CONFIG_COMMANDS & CFG_CMD_SNTP) +#if (CONFIG_COMMANDS & CFG_CMD_SNTP) || defined(CONFIG_CMD_SNTP) IPaddr_t NetNtpServerIP; /* NTP server IP address */ int NetTimeOffset=0; /* offset time from UTC */ #endif @@ -326,13 +326,13 @@ restart: */ switch (protocol) { -#if (CONFIG_COMMANDS & CFG_CMD_NFS) +#if (CONFIG_COMMANDS & CFG_CMD_NFS) || defined(CONFIG_CMD_NFS) case NFS: #endif -#if (CONFIG_COMMANDS & CFG_CMD_PING) +#if (CONFIG_COMMANDS & CFG_CMD_PING) || defined(CONFIG_CMD_PING) case PING: #endif -#if (CONFIG_COMMANDS & CFG_CMD_SNTP) +#if (CONFIG_COMMANDS & CFG_CMD_SNTP) || defined(CONFIG_CMD_SNTP) case SNTP: #endif case NETCONS: @@ -344,19 +344,19 @@ restart: NetOurNativeVLAN = getenv_VLAN("nvlan"); switch (protocol) { -#if (CONFIG_COMMANDS & CFG_CMD_NFS) +#if (CONFIG_COMMANDS & CFG_CMD_NFS) || defined(CONFIG_CMD_NFS) case NFS: #endif case NETCONS: case TFTP: NetServerIP = getenv_IPaddr ("serverip"); break; -#if (CONFIG_COMMANDS & CFG_CMD_PING) +#if (CONFIG_COMMANDS & CFG_CMD_PING) || defined(CONFIG_CMD_PING) case PING: /* nothing */ break; #endif -#if (CONFIG_COMMANDS & CFG_CMD_SNTP) +#if (CONFIG_COMMANDS & CFG_CMD_SNTP) || defined(CONFIG_CMD_SNTP) case SNTP: /* nothing */ break; @@ -406,7 +406,7 @@ restart: TftpStart(); break; -#if (CONFIG_COMMANDS & CFG_CMD_DHCP) +#if (CONFIG_COMMANDS & CFG_CMD_DHCP) || defined(CONFIG_CMD_DHCP) case DHCP: /* Start with a clean slate... */ BootpTry = 0; @@ -425,17 +425,17 @@ restart: RarpTry = 0; RarpRequest (); break; -#if (CONFIG_COMMANDS & CFG_CMD_PING) +#if (CONFIG_COMMANDS & CFG_CMD_PING) || defined(CONFIG_CMD_PING) case PING: PingStart(); break; #endif -#if (CONFIG_COMMANDS & CFG_CMD_NFS) +#if (CONFIG_COMMANDS & CFG_CMD_NFS) || defined(CONFIG_CMD_NFS) case NFS: NfsStart(); break; #endif -#if (CONFIG_COMMANDS & CFG_CMD_CDP) +#if (CONFIG_COMMANDS & CFG_CMD_CDP) || defined(CONFIG_CMD_CDP) case CDP: CDPStart(); break; @@ -445,7 +445,7 @@ restart: NcStart(); break; #endif -#if (CONFIG_COMMANDS & CFG_CMD_SNTP) +#if (CONFIG_COMMANDS & CFG_CMD_SNTP) || defined(CONFIG_CMD_SNTP) case SNTP: SntpStart(); break; @@ -458,7 +458,7 @@ restart: break; } -#if defined(CONFIG_MII) || (CONFIG_COMMANDS & CFG_CMD_MII) +#if defined(CONFIG_MII) || (CONFIG_COMMANDS & CFG_CMD_MII) || defined(CONFIG_CMD_MII) #if defined(CFG_FAULT_ECHO_LINK_DOWN) && defined(CONFIG_STATUS_LED) && defined(STATUS_LED_RED) /* * Echo the inverted link state to the fault LED. @@ -507,7 +507,7 @@ restart: if (timeHandler && ((get_timer(0) - timeStart) > timeDelta)) { thand_f *x; -#if defined(CONFIG_MII) || (CONFIG_COMMANDS & CFG_CMD_MII) +#if defined(CONFIG_MII) || (CONFIG_COMMANDS & CFG_CMD_MII) || defined(CONFIG_CMD_MII) # if defined(CFG_FAULT_ECHO_LINK_DOWN) && \ defined(CONFIG_STATUS_LED) && \ defined(STATUS_LED_RED) @@ -687,7 +687,7 @@ NetSendUDPPacket(uchar *ether, IPaddr_t dest, int dport, int sport, int len) return 0; /* transmitted */ } -#if (CONFIG_COMMANDS & CFG_CMD_PING) +#if (CONFIG_COMMANDS & CFG_CMD_PING) || defined(CONFIG_CMD_PING) static ushort PingSeqNo; int PingSend(void) @@ -777,7 +777,7 @@ static void PingStart(void) } #endif /* CFG_CMD_PING */ -#if (CONFIG_COMMANDS & CFG_CMD_CDP) +#if (CONFIG_COMMANDS & CFG_CMD_CDP) || defined(CONFIG_CMD_CDP) #define CDP_DEVICE_ID_TLV 0x0001 #define CDP_ADDRESS_TLV 0x0002 @@ -1140,7 +1140,7 @@ NetReceive(volatile uchar * inpkt, int len) IPaddr_t tmp; int x; uchar *pkt; -#if (CONFIG_COMMANDS & CFG_CMD_CDP) +#if (CONFIG_COMMANDS & CFG_CMD_CDP) || defined(CONFIG_CMD_CDP) int iscdp; #endif ushort cti = 0, vlanid = VLAN_NONE, myvlanid, mynvlanid; @@ -1157,7 +1157,7 @@ NetReceive(volatile uchar * inpkt, int len) if (len < ETHER_HDR_SIZE) return; -#if (CONFIG_COMMANDS & CFG_CMD_CDP) +#if (CONFIG_COMMANDS & CFG_CMD_CDP) || defined(CONFIG_CMD_CDP) /* keep track if packet is CDP */ iscdp = memcmp(et->et_dest, NetCDPAddr, 6) == 0; #endif @@ -1200,7 +1200,7 @@ NetReceive(volatile uchar * inpkt, int len) /* if no VLAN active */ if ((ntohs(NetOurVLAN) & VLAN_IDMASK) == VLAN_NONE -#if (CONFIG_COMMANDS & CFG_CMD_CDP) +#if (CONFIG_COMMANDS & CFG_CMD_CDP) || defined(CONFIG_CMD_CDP) && iscdp == 0 #endif ) @@ -1218,7 +1218,7 @@ NetReceive(volatile uchar * inpkt, int len) printf("Receive from protocol 0x%x\n", x); #endif -#if (CONFIG_COMMANDS & CFG_CMD_CDP) +#if (CONFIG_COMMANDS & CFG_CMD_CDP) || defined(CONFIG_CMD_CDP) if (iscdp) { CDPHandler((uchar *)ip, len); return; @@ -1416,7 +1416,7 @@ NetReceive(volatile uchar * inpkt, int len) print_IPaddr(icmph->un.gateway); putc(' '); return; -#if (CONFIG_COMMANDS & CFG_CMD_PING) +#if (CONFIG_COMMANDS & CFG_CMD_PING) || defined(CONFIG_CMD_PING) case ICMP_ECHO_REPLY: /* * IP header OK. Pass the packet to the current handler. @@ -1516,7 +1516,7 @@ static int net_check_prereq (proto_t protocol) { switch (protocol) { /* Fall through */ -#if (CONFIG_COMMANDS & CFG_CMD_PING) +#if (CONFIG_COMMANDS & CFG_CMD_PING) || defined(CONFIG_CMD_PING) case PING: if (NetPingIP == 0) { puts ("*** ERROR: ping address not given\n"); @@ -1524,7 +1524,7 @@ static int net_check_prereq (proto_t protocol) } goto common; #endif -#if (CONFIG_COMMANDS & CFG_CMD_SNTP) +#if (CONFIG_COMMANDS & CFG_CMD_SNTP) || defined(CONFIG_CMD_SNTP) case SNTP: if (NetNtpServerIP == 0) { puts ("*** ERROR: NTP server address not given\n"); @@ -1532,7 +1532,7 @@ static int net_check_prereq (proto_t protocol) } goto common; #endif -#if (CONFIG_COMMANDS & CFG_CMD_NFS) +#if (CONFIG_COMMANDS & CFG_CMD_NFS) || defined(CONFIG_CMD_NFS) case NFS: #endif case NETCONS: @@ -1541,7 +1541,7 @@ static int net_check_prereq (proto_t protocol) puts ("*** ERROR: `serverip' not set\n"); return (1); } -#if (CONFIG_COMMANDS & (CFG_CMD_PING | CFG_CMD_SNTP)) +#if (CONFIG_COMMANDS & (CFG_CMD_PING | CFG_CMD_SNTP)) || defined(CONFIG_CMD_PING) || defined(CONFIG_CMD_SNTP) common: #endif -- cgit v1.1 From 643d1ab23960950b52e0a2803c2d3ea4c558fa01 Mon Sep 17 00:00:00 2001 From: Jon Loeliger Date: Mon, 9 Jul 2007 17:45:14 -0500 Subject: net/: Remove obsolete references to CONFIG_COMMANDS Signed-off-by: Jon Loeliger --- net/net.c | 60 ++++++++++++++++++++++++++++++------------------------------ 1 file changed, 30 insertions(+), 30 deletions(-) (limited to 'net/net.c') diff --git a/net/net.c b/net/net.c index 250abcd..1b7b4a8 100644 --- a/net/net.c +++ b/net/net.c @@ -86,11 +86,11 @@ #include #include #endif -#if (CONFIG_COMMANDS & CFG_CMD_SNTP) || defined(CONFIG_CMD_SNTP) +#if defined(CONFIG_CMD_SNTP) #include "sntp.h" #endif -#if (CONFIG_COMMANDS & CFG_CMD_NET) || defined(CONFIG_CMD_NET) +#if defined(CONFIG_CMD_NET) DECLARE_GLOBAL_DATA_PTR; @@ -133,7 +133,7 @@ uchar NetBcastAddr[6] = /* Ethernet bcast address */ { 0xff, 0xff, 0xff, 0xff, 0xff, 0xff }; uchar NetEtherNullAddr[6] = { 0, 0, 0, 0, 0, 0 }; -#if (CONFIG_COMMANDS & CFG_CMD_CDP) || defined(CONFIG_CMD_CDP) +#if defined(CONFIG_CMD_CDP) uchar NetCDPAddr[6] = /* Ethernet bcast address */ { 0x01, 0x00, 0x0c, 0xcc, 0xcc, 0xcc }; #endif @@ -150,17 +150,17 @@ ushort NetOurNativeVLAN = 0xFFFF; /* ditto */ char BootFile[128]; /* Boot File name */ -#if (CONFIG_COMMANDS & CFG_CMD_PING) || defined(CONFIG_CMD_PING) +#if defined(CONFIG_CMD_PING) IPaddr_t NetPingIP; /* the ip address to ping */ static void PingStart(void); #endif -#if (CONFIG_COMMANDS & CFG_CMD_CDP) || defined(CONFIG_CMD_CDP) +#if defined(CONFIG_CMD_CDP) static void CDPStart(void); #endif -#if (CONFIG_COMMANDS & CFG_CMD_SNTP) || defined(CONFIG_CMD_SNTP) +#if defined(CONFIG_CMD_SNTP) IPaddr_t NetNtpServerIP; /* NTP server IP address */ int NetTimeOffset=0; /* offset time from UTC */ #endif @@ -326,13 +326,13 @@ restart: */ switch (protocol) { -#if (CONFIG_COMMANDS & CFG_CMD_NFS) || defined(CONFIG_CMD_NFS) +#if defined(CONFIG_CMD_NFS) case NFS: #endif -#if (CONFIG_COMMANDS & CFG_CMD_PING) || defined(CONFIG_CMD_PING) +#if defined(CONFIG_CMD_PING) case PING: #endif -#if (CONFIG_COMMANDS & CFG_CMD_SNTP) || defined(CONFIG_CMD_SNTP) +#if defined(CONFIG_CMD_SNTP) case SNTP: #endif case NETCONS: @@ -344,19 +344,19 @@ restart: NetOurNativeVLAN = getenv_VLAN("nvlan"); switch (protocol) { -#if (CONFIG_COMMANDS & CFG_CMD_NFS) || defined(CONFIG_CMD_NFS) +#if defined(CONFIG_CMD_NFS) case NFS: #endif case NETCONS: case TFTP: NetServerIP = getenv_IPaddr ("serverip"); break; -#if (CONFIG_COMMANDS & CFG_CMD_PING) || defined(CONFIG_CMD_PING) +#if defined(CONFIG_CMD_PING) case PING: /* nothing */ break; #endif -#if (CONFIG_COMMANDS & CFG_CMD_SNTP) || defined(CONFIG_CMD_SNTP) +#if defined(CONFIG_CMD_SNTP) case SNTP: /* nothing */ break; @@ -406,7 +406,7 @@ restart: TftpStart(); break; -#if (CONFIG_COMMANDS & CFG_CMD_DHCP) || defined(CONFIG_CMD_DHCP) +#if defined(CONFIG_CMD_DHCP) case DHCP: /* Start with a clean slate... */ BootpTry = 0; @@ -425,17 +425,17 @@ restart: RarpTry = 0; RarpRequest (); break; -#if (CONFIG_COMMANDS & CFG_CMD_PING) || defined(CONFIG_CMD_PING) +#if defined(CONFIG_CMD_PING) case PING: PingStart(); break; #endif -#if (CONFIG_COMMANDS & CFG_CMD_NFS) || defined(CONFIG_CMD_NFS) +#if defined(CONFIG_CMD_NFS) case NFS: NfsStart(); break; #endif -#if (CONFIG_COMMANDS & CFG_CMD_CDP) || defined(CONFIG_CMD_CDP) +#if defined(CONFIG_CMD_CDP) case CDP: CDPStart(); break; @@ -445,7 +445,7 @@ restart: NcStart(); break; #endif -#if (CONFIG_COMMANDS & CFG_CMD_SNTP) || defined(CONFIG_CMD_SNTP) +#if defined(CONFIG_CMD_SNTP) case SNTP: SntpStart(); break; @@ -458,7 +458,7 @@ restart: break; } -#if defined(CONFIG_MII) || (CONFIG_COMMANDS & CFG_CMD_MII) || defined(CONFIG_CMD_MII) +#if defined(CONFIG_MII) || defined(CONFIG_CMD_MII) #if defined(CFG_FAULT_ECHO_LINK_DOWN) && defined(CONFIG_STATUS_LED) && defined(STATUS_LED_RED) /* * Echo the inverted link state to the fault LED. @@ -507,7 +507,7 @@ restart: if (timeHandler && ((get_timer(0) - timeStart) > timeDelta)) { thand_f *x; -#if defined(CONFIG_MII) || (CONFIG_COMMANDS & CFG_CMD_MII) || defined(CONFIG_CMD_MII) +#if defined(CONFIG_MII) || defined(CONFIG_CMD_MII) # if defined(CFG_FAULT_ECHO_LINK_DOWN) && \ defined(CONFIG_STATUS_LED) && \ defined(STATUS_LED_RED) @@ -687,7 +687,7 @@ NetSendUDPPacket(uchar *ether, IPaddr_t dest, int dport, int sport, int len) return 0; /* transmitted */ } -#if (CONFIG_COMMANDS & CFG_CMD_PING) || defined(CONFIG_CMD_PING) +#if defined(CONFIG_CMD_PING) static ushort PingSeqNo; int PingSend(void) @@ -777,7 +777,7 @@ static void PingStart(void) } #endif /* CFG_CMD_PING */ -#if (CONFIG_COMMANDS & CFG_CMD_CDP) || defined(CONFIG_CMD_CDP) +#if defined(CONFIG_CMD_CDP) #define CDP_DEVICE_ID_TLV 0x0001 #define CDP_ADDRESS_TLV 0x0002 @@ -1140,7 +1140,7 @@ NetReceive(volatile uchar * inpkt, int len) IPaddr_t tmp; int x; uchar *pkt; -#if (CONFIG_COMMANDS & CFG_CMD_CDP) || defined(CONFIG_CMD_CDP) +#if defined(CONFIG_CMD_CDP) int iscdp; #endif ushort cti = 0, vlanid = VLAN_NONE, myvlanid, mynvlanid; @@ -1157,7 +1157,7 @@ NetReceive(volatile uchar * inpkt, int len) if (len < ETHER_HDR_SIZE) return; -#if (CONFIG_COMMANDS & CFG_CMD_CDP) || defined(CONFIG_CMD_CDP) +#if defined(CONFIG_CMD_CDP) /* keep track if packet is CDP */ iscdp = memcmp(et->et_dest, NetCDPAddr, 6) == 0; #endif @@ -1200,7 +1200,7 @@ NetReceive(volatile uchar * inpkt, int len) /* if no VLAN active */ if ((ntohs(NetOurVLAN) & VLAN_IDMASK) == VLAN_NONE -#if (CONFIG_COMMANDS & CFG_CMD_CDP) || defined(CONFIG_CMD_CDP) +#if defined(CONFIG_CMD_CDP) && iscdp == 0 #endif ) @@ -1218,7 +1218,7 @@ NetReceive(volatile uchar * inpkt, int len) printf("Receive from protocol 0x%x\n", x); #endif -#if (CONFIG_COMMANDS & CFG_CMD_CDP) || defined(CONFIG_CMD_CDP) +#if defined(CONFIG_CMD_CDP) if (iscdp) { CDPHandler((uchar *)ip, len); return; @@ -1416,7 +1416,7 @@ NetReceive(volatile uchar * inpkt, int len) print_IPaddr(icmph->un.gateway); putc(' '); return; -#if (CONFIG_COMMANDS & CFG_CMD_PING) || defined(CONFIG_CMD_PING) +#if defined(CONFIG_CMD_PING) case ICMP_ECHO_REPLY: /* * IP header OK. Pass the packet to the current handler. @@ -1516,7 +1516,7 @@ static int net_check_prereq (proto_t protocol) { switch (protocol) { /* Fall through */ -#if (CONFIG_COMMANDS & CFG_CMD_PING) || defined(CONFIG_CMD_PING) +#if defined(CONFIG_CMD_PING) case PING: if (NetPingIP == 0) { puts ("*** ERROR: ping address not given\n"); @@ -1524,7 +1524,7 @@ static int net_check_prereq (proto_t protocol) } goto common; #endif -#if (CONFIG_COMMANDS & CFG_CMD_SNTP) || defined(CONFIG_CMD_SNTP) +#if defined(CONFIG_CMD_SNTP) case SNTP: if (NetNtpServerIP == 0) { puts ("*** ERROR: NTP server address not given\n"); @@ -1532,7 +1532,7 @@ static int net_check_prereq (proto_t protocol) } goto common; #endif -#if (CONFIG_COMMANDS & CFG_CMD_NFS) || defined(CONFIG_CMD_NFS) +#if defined(CONFIG_CMD_NFS) case NFS: #endif case NETCONS: @@ -1541,7 +1541,7 @@ static int net_check_prereq (proto_t protocol) puts ("*** ERROR: `serverip' not set\n"); return (1); } -#if (CONFIG_COMMANDS & (CFG_CMD_PING | CFG_CMD_SNTP)) || defined(CONFIG_CMD_PING) || defined(CONFIG_CMD_SNTP) +#if defined(CONFIG_CMD_PING) || defined(CONFIG_CMD_SNTP) common: #endif -- cgit v1.1 From 1fe80d79c5c4e52d3410a7ab4b8515da095cdab3 Mon Sep 17 00:00:00 2001 From: Jon Loeliger Date: Mon, 9 Jul 2007 22:08:34 -0500 Subject: Finally retire cmd_confdefs.h and CONFIG_BOOTP_MASK! All of the choices for CONFIG_BOOTP_ are now documented in the README file. You must now individually select exactly the set that you want using a series of #define CONFIG_BOOTP_ statements in the board port config files now. Signed-off-by: Jon Loeliger --- net/net.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'net/net.c') diff --git a/net/net.c b/net/net.c index 1b7b4a8..f96eb28 100644 --- a/net/net.c +++ b/net/net.c @@ -110,7 +110,7 @@ DECLARE_GLOBAL_DATA_PTR; IPaddr_t NetOurSubnetMask=0; /* Our subnet mask (0=unknown) */ IPaddr_t NetOurGatewayIP=0; /* Our gateways IP address */ IPaddr_t NetOurDNSIP=0; /* Our DNS IP address */ -#if (CONFIG_BOOTP_MASK & CONFIG_BOOTP_DNS2) +#if defined(CONFIG_BOOTP_DNS2) IPaddr_t NetOurDNS2IP=0; /* Our 2nd DNS IP address */ #endif char NetOurNISDomain[32]={0,}; /* Our NIS domain */ -- cgit v1.1 From 610f2e9c28a9c101e09fa1b78143cf5f00ed1593 Mon Sep 17 00:00:00 2001 From: Jon Loeliger Date: Tue, 10 Jul 2007 11:05:02 -0500 Subject: net/: Remove lingering references to CFG_CMD_* symbols. Fixed some broken instances of "#ifdef CMD_CFG_IDE" too. Those always evaluated TRUE, and thus were always compiled even when IDE really wasn't defined/wanted. Signed-off-by: Jon Loeliger --- net/net.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'net/net.c') diff --git a/net/net.c b/net/net.c index f96eb28..e9d7757 100644 --- a/net/net.c +++ b/net/net.c @@ -414,7 +414,7 @@ restart: NetServerIP = getenv_IPaddr ("serverip"); DhcpRequest(); /* Basically same as BOOTP */ break; -#endif /* CFG_CMD_DHCP */ +#endif case BOOTP: BootpTry = 0; @@ -775,7 +775,7 @@ static void PingStart(void) PingSend(); } -#endif /* CFG_CMD_PING */ +#endif #if defined(CONFIG_CMD_CDP) @@ -1128,7 +1128,7 @@ static void CDPStart(void) CDPSendTrigger(); } -#endif /* CFG_CMD_CDP */ +#endif void @@ -1693,7 +1693,7 @@ void copy_filename (char *dst, char *src, int size) *dst = '\0'; } -#endif /* CFG_CMD_NET */ +#endif void ip_to_string (IPaddr_t x, char *s) { -- cgit v1.1 From 53a5c424bf8655b7b4e2c305a441963259a26a81 Mon Sep 17 00:00:00 2001 From: David Updegraff Date: Mon, 11 Jun 2007 10:41:07 -0500 Subject: multicast tftp: RFC2090 Implemented IETF RFC2090, Multicast TFTP. Initial implementation on Realtek RTL8139 and Freescale TSEC. Signed-off-by: David Updegraff Signed-off-by: Ben Warren --- net/net.c | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'net/net.c') diff --git a/net/net.c b/net/net.c index e9d7757..2b11a13 100644 --- a/net/net.c +++ b/net/net.c @@ -118,6 +118,10 @@ char NetOurHostName[32]={0,}; /* Our hostname */ char NetOurRootPath[64]={0,}; /* Our bootpath */ ushort NetBootFileSize=0; /* Our bootfile size in blocks */ +#ifdef CONFIG_MCAST_TFTP /* Multicast TFTP */ +IPaddr_t Mcast_addr; +#endif + /** END OF BOOTP EXTENTIONS **/ ulong NetBootFileXferSize; /* The actual transferred size of the bootfile (in bytes) */ @@ -1386,6 +1390,9 @@ NetReceive(volatile uchar * inpkt, int len) } tmp = NetReadIP(&ip->ip_dst); if (NetOurIP && tmp != NetOurIP && tmp != 0xFFFFFFFF) { +#ifdef CONFIG_MCAST_TFTP + if (Mcast_addr != tmp) +#endif return; } /* @@ -1492,6 +1499,7 @@ NetReceive(volatile uchar * inpkt, int len) } #endif + #ifdef CONFIG_NETCONSOLE nc_input_packet((uchar *)ip +IP_HDR_SIZE, ntohs(ip->udp_dst), -- cgit v1.1 From 85eb5caf6b906f7ec5b54814e8c7c74f55986bb7 Mon Sep 17 00:00:00 2001 From: Wolfgang Denk Date: Tue, 14 Aug 2007 09:47:27 +0200 Subject: Coding style cleanup; rebuild CHANGELOG --- net/net.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'net/net.c') diff --git a/net/net.c b/net/net.c index 2b11a13..c47610e 100644 --- a/net/net.c +++ b/net/net.c @@ -1391,7 +1391,7 @@ NetReceive(volatile uchar * inpkt, int len) tmp = NetReadIP(&ip->ip_dst); if (NetOurIP && tmp != NetOurIP && tmp != 0xFFFFFFFF) { #ifdef CONFIG_MCAST_TFTP - if (Mcast_addr != tmp) + if (Mcast_addr != tmp) #endif return; } -- cgit v1.1