summaryrefslogtreecommitdiff
path: root/networking/udhcp/dhcpd.h
diff options
context:
space:
mode:
authorDenis Vlasenko2008-02-04 13:12:16 +0000
committerDenis Vlasenko2008-02-04 13:12:16 +0000
commitd55fe3e595eb0aad60484d273e251cfee4ef8aa5 (patch)
tree1b9ff57d70411902db36582da8dbaded99485eeb /networking/udhcp/dhcpd.h
parente8ef7ec7de0cd9906b42a94eddb800ed1229a614 (diff)
downloadbusybox-d55fe3e595eb0aad60484d273e251cfee4ef8aa5.zip
busybox-d55fe3e595eb0aad60484d273e251cfee4ef8aa5.tar.gz
udhcp: optional support for non-standard DHCP ports (+300 bytes when selected)
Diffstat (limited to 'networking/udhcp/dhcpd.h')
-rw-r--r--networking/udhcp/dhcpd.h9
1 files changed, 9 insertions, 0 deletions
diff --git a/networking/udhcp/dhcpd.h b/networking/udhcp/dhcpd.h
index 216b7ab..fe45ca3 100644
--- a/networking/udhcp/dhcpd.h
+++ b/networking/udhcp/dhcpd.h
@@ -1,5 +1,6 @@
/* vi: set sw=4 ts=4: */
/* dhcpd.h */
+
#ifndef _DHCPD_H
#define _DHCPD_H
@@ -27,6 +28,7 @@ struct static_lease {
struct server_config_t {
uint32_t server; /* Our IP, in network order */
+ uint16_t port;
/* start,end are in host order: we need to compare start <= ip <= end */
uint32_t start_ip; /* Start address of leases, in host order */
uint32_t end_ip; /* End of leases, in host order */
@@ -55,6 +57,13 @@ struct server_config_t {
};
#define server_config (*(struct server_config_t*)&bb_common_bufsiz1)
+/* client_config sits in 2nd half of bb_common_bufsiz1 */
+
+#if ENABLE_FEATURE_UDHCP_PORT
+#define SERVER_PORT (server_config.port)
+#else
+#define SERVER_PORT 67
+#endif
extern struct dhcpOfferedAddr *leases;