From 388ae87caafe6ea7d6378c564f8008671fb2ba3a Mon Sep 17 00:00:00 2001 From: patacongo Date: Thu, 19 Mar 2009 00:22:41 +0000 Subject: Add configuration checking git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@1630 42af7a65-404d-4744-a932-0658087f49c3 --- nuttx/examples/dhcpd/target.c | 34 ++++++++++++++++++++++++++++++++++ 1 file changed, 34 insertions(+) (limited to 'nuttx') diff --git a/nuttx/examples/dhcpd/target.c b/nuttx/examples/dhcpd/target.c index 6977bf46a..7e2104dd7 100644 --- a/nuttx/examples/dhcpd/target.c +++ b/nuttx/examples/dhcpd/target.c @@ -45,6 +45,40 @@ #include #include +/**************************************************************************** + * Preprocessor Definitions + ****************************************************************************/ + +/* Configuation Checkes *****************************************************/ +/* BEWARE: + * There are other configuration settings needed in netutitls/dhcpd/dhcpdc.s, + * but there are default values for those so we cannot check them here. + */ + +#ifndef CONFIG_EXAMPLE_DHCPD_IPADDR +# error "You must define CONFIG_EXAMPLE_DHCPD_IPADDR" +#endif + +#ifndef CONFIG_EXAMPLE_DHCPD_DRIPADDR +# error "You must define " +#endif + +#ifndef CONFIG_EXAMPLE_DHCPD_NETMASK +# error "You must define CONFIG_EXAMPLE_DHCPD_NETMASK" +#endif + +#ifndef CONFIG_NET +# error "You must define CONFIG_NET" +#endif + +#ifndef CONFIG_NET_UDP +# error "You must define CONFIG_NET_UDP" +#endif + +#ifndef CONFIG_NET_BROADCAST +# error "You must define CONFIG_NET_BROADCAST" +#endif + /**************************************************************************** * Private Data ****************************************************************************/ -- cgit v1.2.3