summaryrefslogtreecommitdiff
path: root/nuttx/examples/dhcpd/target.c
diff options
context:
space:
mode:
authorpatacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3>2009-03-19 00:22:41 +0000
committerpatacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3>2009-03-19 00:22:41 +0000
commit388ae87caafe6ea7d6378c564f8008671fb2ba3a (patch)
treedf8f029b9661660de20f57ea010ed018f51fc4d7 /nuttx/examples/dhcpd/target.c
parentbb1366615ab6e96cd39ba953ba60c91c00a48bbf (diff)
downloadnuttx-388ae87caafe6ea7d6378c564f8008671fb2ba3a.tar.gz
nuttx-388ae87caafe6ea7d6378c564f8008671fb2ba3a.tar.bz2
nuttx-388ae87caafe6ea7d6378c564f8008671fb2ba3a.zip
Add configuration checking
git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@1630 42af7a65-404d-4744-a932-0658087f49c3
Diffstat (limited to 'nuttx/examples/dhcpd/target.c')
-rw-r--r--nuttx/examples/dhcpd/target.c34
1 files changed, 34 insertions, 0 deletions
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
@@ -46,6 +46,40 @@
#include <net/uip/dhcpd.h>
/****************************************************************************
+ * 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
****************************************************************************/