From bd8a4451da1483f2eca8344fcd8d8bbdc5b33bc4 Mon Sep 17 00:00:00 2001 From: patacongo Date: Thu, 19 Mar 2009 00:22:41 +0000 Subject: [PATCH] Add configuration checking git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@1630 42af7a65-404d-4744-a932-0658087f49c3 --- examples/dhcpd/target.c | 34 ++++++++++++++++++++++++++++++++++ 1 file changed, 34 insertions(+) diff --git a/examples/dhcpd/target.c b/examples/dhcpd/target.c index 6977bf46a3..7e2104dd7b 100644 --- a/examples/dhcpd/target.c +++ b/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 ****************************************************************************/