diff options
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) |