diff options
author | patacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3> | 2011-12-13 17:25:23 +0000 |
---|---|---|
committer | patacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3> | 2011-12-13 17:25:23 +0000 |
commit | f65c5cf1f7ca0ea9fb5a284da2b126aa6dcbae98 (patch) | |
tree | 3a0ef6dd84a82f722a6d042569629be6a9956d2d /apps/examples/dhcpd/target.c | |
parent | 8c2168cef52239100d8822d2d8eca412689c8ed3 (diff) | |
download | px4-nuttx-f65c5cf1f7ca0ea9fb5a284da2b126aa6dcbae98.tar.gz px4-nuttx-f65c5cf1f7ca0ea9fb5a284da2b126aa6dcbae98.tar.bz2 px4-nuttx-f65c5cf1f7ca0ea9fb5a284da2b126aa6dcbae98.zip |
STM32 Ethernet bugfixes; STM3240G-EVAL DHCPD configuration; fixes for IP address order bugs in DHCPD
git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@4168 42af7a65-404d-4744-a932-0658087f49c3
Diffstat (limited to 'apps/examples/dhcpd/target.c')
-rw-r--r-- | apps/examples/dhcpd/target.c | 22 |
1 files changed, 17 insertions, 5 deletions
diff --git a/apps/examples/dhcpd/target.c b/apps/examples/dhcpd/target.c index d394da02e..350bfe15f 100644 --- a/apps/examples/dhcpd/target.c +++ b/apps/examples/dhcpd/target.c @@ -2,7 +2,7 @@ * examples/dhcpd/target.c * * Copyright (C) 2009, 2011 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt <spudmonkey@racsa.co.cr> + * Author: Gregory Nutt <gnutt@nuttx.org> * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions @@ -53,7 +53,7 @@ /* Configuation Checkes *****************************************************/ /* BEWARE: - * There are other configuration settings needed in netutitls/dhcpd/dhcpdc.s, + * There are other configuration settings needed in netutils/dhcpd/dhcpdc.c, * but there are default values for those so we cannot check them here. */ @@ -62,7 +62,7 @@ #endif #ifndef CONFIG_EXAMPLE_DHCPD_DRIPADDR -# error "You must define " +# error "You must define CONFIG_EXAMPLE_DHCPD_DRIPADDR" #endif #ifndef CONFIG_EXAMPLE_DHCPD_NETMASK @@ -81,15 +81,27 @@ # error "You must define CONFIG_NET_BROADCAST" #endif +/* If CONFIG_NSH_BUILTIN_APPS is defined, then it is assumed that you want + * to execute the DHCPD daemon as an NSH built-in task. + */ + +#ifdef CONFIG_NSH_BUILTIN_APPS +# define MAIN_NAME dhcpd_main +# define MAIN_NAME_STRING "dhcpd_main" +#else +# define MAIN_NAME user_start +# define MAIN_NAME_STRING "user_start" +#endif + /**************************************************************************** * Private Data ****************************************************************************/ /**************************************************************************** - * user_start + * Name: user_start/dhcpd_main ****************************************************************************/ -int user_start(int argc, char *argv[]) +int MAIN_NAME(int argc, char *argv[]) { struct in_addr addr; #if defined(CONFIG_EXAMPLE_DHCPD_NOMAC) |