summaryrefslogtreecommitdiff
path: root/networking/udhcp
diff options
context:
space:
mode:
authorDenis Vlasenko2008-11-06 00:49:59 +0000
committerDenis Vlasenko2008-11-06 00:49:59 +0000
commit35a064b67fc1954b95be06499a514a45c9f2e814 (patch)
treec3c2690d8c5c112ce744e17a906a860a0c6897d2 /networking/udhcp
parent202ac504e1addf0aa2debd53e7cd2411cc73ac8c (diff)
downloadbusybox-35a064b67fc1954b95be06499a514a45c9f2e814.zip
busybox-35a064b67fc1954b95be06499a514a45c9f2e814.tar.gz
build system: tidying up CONFIG_xxx names (suggested by Rob)
Diffstat (limited to 'networking/udhcp')
-rw-r--r--networking/udhcp/Config.in6
-rw-r--r--networking/udhcp/Kbuild2
-rw-r--r--networking/udhcp/common.h4
-rw-r--r--networking/udhcp/domain_codec.c4
-rw-r--r--networking/udhcp/files.c12
-rw-r--r--networking/udhcp/options.c6
-rw-r--r--networking/udhcp/options.h4
-rw-r--r--networking/udhcp/script.c4
-rw-r--r--networking/udhcp/static_leases.c2
9 files changed, 22 insertions, 22 deletions
diff --git a/networking/udhcp/Config.in b/networking/udhcp/Config.in
index 55cefb6..d4b76e1 100644
--- a/networking/udhcp/Config.in
+++ b/networking/udhcp/Config.in
@@ -74,14 +74,14 @@ config FEATURE_UDHCP_PORT
At the cost of ~300 bytes, enables -P port option.
This feature is typically not needed.
-config FEATURE_UDHCP_DEBUG
+config UDHCP_DEBUG
bool "Compile udhcp with noisy debugging messages"
default n
depends on APP_UDHCPD || APP_UDHCPC
help
If selected, udhcpd will output extra debugging output.
-config FEATURE_RFC3397
+config FEATURE_UDHCP_RFC3397
bool "Support for RFC3397 domain search (experimental)"
default n
depends on APP_UDHCPD || APP_UDHCPC
@@ -89,7 +89,7 @@ config FEATURE_RFC3397
If selected, both client and server will support passing of domain
search lists via option 119, specified in RFC3397.
-config DHCPC_DEFAULT_SCRIPT
+config UDHCPC_DEFAULT_SCRIPT
string "Absolute path to config script"
default "/usr/share/udhcpc/default.script"
depends on APP_UDHCPC
diff --git a/networking/udhcp/Kbuild b/networking/udhcp/Kbuild
index f4be6df..e938076 100644
--- a/networking/udhcp/Kbuild
+++ b/networking/udhcp/Kbuild
@@ -22,4 +22,4 @@ lib-$(CONFIG_APP_UDHCPD) += dhcpd.o arpping.o files.o leases.o \
lib-$(CONFIG_APP_DUMPLEASES) += dumpleases.o
lib-$(CONFIG_APP_DHCPRELAY) += dhcprelay.o
-lib-$(CONFIG_FEATURE_RFC3397) += domain_codec.o
+lib-$(CONFIG_FEATURE_UDHCP_RFC3397) += domain_codec.o
diff --git a/networking/udhcp/common.h b/networking/udhcp/common.h
index de4a8c7..15f0d9a 100644
--- a/networking/udhcp/common.h
+++ b/networking/udhcp/common.h
@@ -18,7 +18,7 @@
# pragma GCC visibility push(hidden)
#endif
-#define DEFAULT_SCRIPT CONFIG_DHCPC_DEFAULT_SCRIPT
+#define DEFAULT_SCRIPT CONFIG_UDHCPC_DEFAULT_SCRIPT
extern const uint8_t MAC_BCAST_ADDR[6]; /* six all-ones */
@@ -97,7 +97,7 @@ int udhcp_listen_socket(/*uint32_t ip,*/ int port, const char *inf) FAST_FUNC;
/* Returns 1 if no reply received */
int arpping(uint32_t test_ip, uint32_t from_ip, uint8_t *from_mac, const char *interface) FAST_FUNC;
-#if ENABLE_FEATURE_UDHCP_DEBUG
+#if ENABLE_UDHCP_DEBUG
# define DEBUG(str, args...) bb_info_msg("### " str, ## args)
#else
# define DEBUG(str, args...) do {;} while (0)
diff --git a/networking/udhcp/domain_codec.c b/networking/udhcp/domain_codec.c
index 6da4e8d..6f051c4 100644
--- a/networking/udhcp/domain_codec.c
+++ b/networking/udhcp/domain_codec.c
@@ -7,7 +7,7 @@
* Licensed under GPLv2 or later, see file LICENSE in this tarball for details.
*/
-#if ENABLE_FEATURE_RFC3397
+#if ENABLE_FEATURE_UDHCP_RFC3397
#include "common.h"
#include "options.h"
@@ -202,4 +202,4 @@ uint8_t* FAST_FUNC dname_enc(const uint8_t *cstr, int clen, const char *src, int
return dname;
}
-#endif /* ENABLE_FEATURE_RFC3397 */
+#endif /* ENABLE_FEATURE_UDHCP_RFC3397 */
diff --git a/networking/udhcp/files.c b/networking/udhcp/files.c
index b7bad33..0b97d76 100644
--- a/networking/udhcp/files.c
+++ b/networking/udhcp/files.c
@@ -90,7 +90,7 @@ static void attach_option(struct option_set **opt_list,
if (!existing) {
DEBUG("Attaching option %02x to list", option->code);
-#if ENABLE_FEATURE_RFC3397
+#if ENABLE_FEATURE_UDHCP_RFC3397
if ((option->flags & TYPE_MASK) == OPTION_STR1035)
/* reuse buffer and length for RFC1035-formatted string */
buffer = (char *)dname_enc(NULL, 0, buffer, &length);
@@ -109,7 +109,7 @@ static void attach_option(struct option_set **opt_list,
new->next = *curr;
*curr = new;
-#if ENABLE_FEATURE_RFC3397
+#if ENABLE_FEATURE_UDHCP_RFC3397
if ((option->flags & TYPE_MASK) == OPTION_STR1035 && buffer != NULL)
free(buffer);
#endif
@@ -119,7 +119,7 @@ static void attach_option(struct option_set **opt_list,
/* add it to an existing option */
DEBUG("Attaching option %02x to existing member of list", option->code);
if (option->flags & OPTION_LIST) {
-#if ENABLE_FEATURE_RFC3397
+#if ENABLE_FEATURE_UDHCP_RFC3397
if ((option->flags & TYPE_MASK) == OPTION_STR1035)
/* reuse buffer and length for RFC1035-formatted string */
buffer = (char *)dname_enc(existing->data + 2,
@@ -139,7 +139,7 @@ static void attach_option(struct option_set **opt_list,
memcpy(existing->data + existing->data[OPT_LEN] + 2, buffer, length);
existing->data[OPT_LEN] += length;
} /* else, ignore the data, we could put this in a second option in the future */
-#if ENABLE_FEATURE_RFC3397
+#if ENABLE_FEATURE_UDHCP_RFC3397
if ((option->flags & TYPE_MASK) == OPTION_STR1035 && buffer != NULL)
free(buffer);
#endif
@@ -190,7 +190,7 @@ static int read_opt(const char *const_line, void *arg)
retval = read_ip(val, buffer + 4);
break;
case OPTION_STRING:
-#if ENABLE_FEATURE_RFC3397
+#if ENABLE_FEATURE_UDHCP_RFC3397
case OPTION_STR1035:
#endif
length = strlen(val);
@@ -266,7 +266,7 @@ static int read_staticlease(const char *const_line, void *arg)
addStaticLease(arg, mac_bytes, ip);
- if (ENABLE_FEATURE_UDHCP_DEBUG) printStaticLeases(arg);
+ if (ENABLE_UDHCP_DEBUG) printStaticLeases(arg);
return 1;
}
diff --git a/networking/udhcp/options.c b/networking/udhcp/options.c
index b6e77e3..6bf99e2 100644
--- a/networking/udhcp/options.c
+++ b/networking/udhcp/options.c
@@ -43,7 +43,7 @@ const struct dhcp_option dhcp_options[] = {
{ OPTION_STRING , 0x42 }, /* tftp */
{ OPTION_STRING , 0x43 }, /* bootfile */
{ OPTION_STRING , 0x4D }, /* userclass */
-#if ENABLE_FEATURE_RFC3397
+#if ENABLE_FEATURE_UDHCP_RFC3397
{ OPTION_STR1035 | OPTION_LIST , 0x77 }, /* search */
#endif
/* MSIE's "Web Proxy Autodiscovery Protocol" support */
@@ -92,7 +92,7 @@ const char dhcp_option_strings[] ALIGN1 =
"tftp" "\0"
"bootfile" "\0"
"userclass" "\0"
-#if ENABLE_FEATURE_RFC3397
+#if ENABLE_FEATURE_UDHCP_RFC3397
"search" "\0"
#endif
/* MSIE's "Web Proxy Autodiscovery Protocol" support */
@@ -106,7 +106,7 @@ const uint8_t dhcp_option_lengths[] ALIGN1 = {
[OPTION_IP_PAIR] = 8,
[OPTION_BOOLEAN] = 1,
[OPTION_STRING] = 1,
-#if ENABLE_FEATURE_RFC3397
+#if ENABLE_FEATURE_UDHCP_RFC3397
[OPTION_STR1035] = 1,
#endif
[OPTION_U8] = 1,
diff --git a/networking/udhcp/options.h b/networking/udhcp/options.h
index fcf1c9a..d18a353 100644
--- a/networking/udhcp/options.h
+++ b/networking/udhcp/options.h
@@ -13,7 +13,7 @@ enum {
OPTION_IP = 1,
OPTION_IP_PAIR,
OPTION_STRING,
-#if ENABLE_FEATURE_RFC3397
+#if ENABLE_FEATURE_UDHCP_RFC3397
OPTION_STR1035, /* RFC1035 compressed domain name list */
#endif
OPTION_BOOLEAN,
@@ -109,7 +109,7 @@ uint8_t *get_option(struct dhcpMessage *packet, int code) FAST_FUNC;
int end_option(uint8_t *optionptr) FAST_FUNC;
int add_option_string(uint8_t *optionptr, uint8_t *string) FAST_FUNC;
int add_simple_option(uint8_t *optionptr, uint8_t code, uint32_t data) FAST_FUNC;
-#if ENABLE_FEATURE_RFC3397
+#if ENABLE_FEATURE_UDHCP_RFC3397
char *dname_dec(const uint8_t *cstr, int clen, const char *pre) FAST_FUNC;
uint8_t *dname_enc(const uint8_t *cstr, int clen, const char *src, int *retlen) FAST_FUNC;
#endif
diff --git a/networking/udhcp/script.c b/networking/udhcp/script.c
index 2324ea9..8dff9b7 100644
--- a/networking/udhcp/script.c
+++ b/networking/udhcp/script.c
@@ -18,7 +18,7 @@ static const uint8_t max_option_length[] = {
[OPTION_IP] = sizeof("255.255.255.255 "),
[OPTION_IP_PAIR] = sizeof("255.255.255.255 ") * 2,
[OPTION_STRING] = 1,
-#if ENABLE_FEATURE_RFC3397
+#if ENABLE_FEATURE_UDHCP_RFC3397
[OPTION_STR1035] = 1,
#endif
[OPTION_BOOLEAN] = sizeof("yes "),
@@ -109,7 +109,7 @@ static char *alloc_fill_opts(uint8_t *option, const struct dhcp_option *type_p,
memcpy(dest, option, len);
dest[len] = '\0';
return ret; /* Short circuit this case */
-#if ENABLE_FEATURE_RFC3397
+#if ENABLE_FEATURE_UDHCP_RFC3397
case OPTION_STR1035:
/* unpack option into dest; use ret for prefix (i.e., "optname=") */
dest = dname_dec(option, len, ret);
diff --git a/networking/udhcp/static_leases.c b/networking/udhcp/static_leases.c
index bd07c50..43f1c98 100644
--- a/networking/udhcp/static_leases.c
+++ b/networking/udhcp/static_leases.c
@@ -79,7 +79,7 @@ uint32_t FAST_FUNC reservedIp(struct static_lease *lease_struct, uint32_t ip)
return return_val;
}
-#if ENABLE_FEATURE_UDHCP_DEBUG
+#if ENABLE_UDHCP_DEBUG
/* Print out static leases just to check what's going on */
/* Takes the address of the pointer to the static_leases linked list */
void FAST_FUNC printStaticLeases(struct static_lease **arg)