Finally retire cmd_confdefs.h and CONFIG_BOOTP_MASK!
PATCH 30/30 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_<x>
statements in the board port config files now.
Signed-off-by Jon Loeliger <[email protected]>
--- README | 28 ++++++++++++++++-------- common/cmd_net.c | 6 ++-- include/cmd_confdefs.h | 33 ----------------------------- include/config_bootp.h | 41 ------------------------------------ include/net.h | 2 +- net/bootp.c | 54 ++++++++++++++++++++++++------------------------ net/net.c | 2 +- 7 files changed, 51 insertions(+), 115 deletions(-) delete mode 100644 include/cmd_confdefs.h delete mode 100644 include/config_bootp.h
README +19 -9
@@ -1125,10 +1125,21 @@ The following options need to be configured: BOOTP requests: delay 0 ... 8 sec - DHCP Advanced Options: - CONFIG_BOOTP_MASK - - You can fine tune the DHCP functionality by adding - these flags to the CONFIG_BOOTP_MASK define: + You can fine tune the DHCP functionality by defining + CONFIG_BOOTP_* symbols: + + CONFIG_BOOTP_SUBNETMASK + CONFIG_BOOTP_GATEWAY + CONFIG_BOOTP_HOSTNAME + CONFIG_BOOTP_NISDOMAIN + CONFIG_BOOTP_BOOTPATH + CONFIG_BOOTP_BOOTFILESIZE + CONFIG_BOOTP_DNS + CONFIG_BOOTP_DNS2 + CONFIG_BOOTP_SEND_HOSTNAME + CONFIG_BOOTP_NTPSERVER + CONFIG_BOOTP_TIMEOFFSET + CONFIG_BOOTP_VENDOREX CONFIG_BOOTP_DNS2 - If a DHCP client requests the DNS serverip from a DHCP server, it is possible that more
@@ -1137,15 +1148,14 @@ The following options need to be configured: serverip will be stored in the additional environment variable "dnsip2". The first DNS serverip is always stored in the variable "dnsip", when CONFIG_BOOTP_DNS - is added to the CONFIG_BOOTP_MASK. + is defined. CONFIG_BOOTP_SEND_HOSTNAME - Some DHCP servers are capable to do a dynamic update of a DNS server. To do this, they need the hostname of the DHCP requester. - If CONFIG_BOOP_SEND_HOSTNAME is added to the - CONFIG_BOOTP_MASK, the content of the "hostname" - environment variable is passed as option 12 to - the DHCP server. + If CONFIG_BOOP_SEND_HOSTNAME is defined, the content + of the "hostname" environment variable is passed as + option 12 to the DHCP server. - CDP Options: CONFIG_CDP_DEVICE_ID
common/cmd_net.c +3 -3
@@ -128,7 +128,7 @@ static void netboot_update_env (void)ip_to_string (NetOurDNSIP, tmp);setenv ("dnsip" , tmp); } -#if (CONFIG_BOOTP_MASK &CONFIG_BOOTP_DNS2 ) +#if defined(CONFIG_BOOTP_DNS2 )if (NetOurDNS2IP) {ip_to_string (NetOurDNS2IP, tmp);setenv ("dnsip2" , tmp);
@@ -138,14 +138,14 @@ static void netboot_update_env (void)setenv ("domain" , NetOurNISDomain);#if defined(CONFIG_CMD_SNTP ) \ - && (CONFIG_BOOTP_MASK &CONFIG_BOOTP_TIMEOFFSET ) + && defined(CONFIG_BOOTP_TIMEOFFSET )if (NetTimeOffset) {sprintf (tmp,"%d" , NetTimeOffset);setenv ("timeoffset" , tmp); }#endif #if defined(CONFIG_CMD_SNTP ) \ - && (CONFIG_BOOTP_MASK &CONFIG_BOOTP_NTPSERVER ) + && defined(CONFIG_BOOTP_NTPSERVER )if (NetNtpServerIP) {ip_to_string (NetNtpServerIP, tmp);setenv ("ntpserverip" , tmp);
include/cmd_confdefs.h deleted +0 -33
@@ -1,33 +0,0 @@ -/* -* (C) Copyright 2000-2002 -* Wolfgang Denk, DENX Software Engineering, wd at denx.de. -* -* See file CREDITS for list of people who contributed to this -* project. -* -* This program is free software; you can redistribute it and/or -* modify it under the terms of the GNU General Public License as -* published by the Free Software Foundation; either version 2 of -* the License, or (at your option) any later version. -* -* This program is distributed in the hope that it will be useful, -* but WITHOUT ANY WARRANTY; without even the implied warranty of -* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -* GNU General Public License for more details. -* -* You should have received a copy of the GNU General Public License -* along with this program; if not, write to the Free Software -* Foundation, Inc., 59 Temple Place, Suite 330, Boston, -* MA 02111-1307 USA -*/ - -#ifndef _CMD_CONFIG_H -#define _CMD_CONFIG_H - -/* -* Temporary placeholder until all users directly -* include the proper include file, "config_bootp.h". -*/ -#include "config_bootp.h" - -#endif /* _CMD_CONFIG_H */
include/config_bootp.h deleted +0 -41
41 lines not on this page · raw message
include/net.h +1 -1
@@ -296,7 +296,7 @@ typedef struct icmphdr {extern IPaddr_t NetOurGatewayIP;/* Our gateway IP addresse */ extern IPaddr_t NetOurSubnetMask;/* Our subnet mask (0 = unknown)*/ extern IPaddr_t NetOurDNSIP;/* Our Domain Name Server (0 = unknown)*/ -#if (CONFIG_BOOTP_MASK &CONFIG_BOOTP_DNS2 ) +#if defined(CONFIG_BOOTP_DNS2 )extern IPaddr_t NetOurDNS2IP;/* Our 2nd Domain Name Server (0 = unknown)*/ #endif extern char NetOurNISDomain[32 ];/* Our NIS domain */
net/bootp.c +27 -27
182 lines not on this page · raw message
net/net.c +1 -1
@@ -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 */
Signature · 1 line
1.5.2.2.249.g45fd