From d55fe3e595eb0aad60484d273e251cfee4ef8aa5 Mon Sep 17 00:00:00 2001 From: Denis Vlasenko Date: Mon, 4 Feb 2008 13:12:16 +0000 Subject: udhcp: optional support for non-standard DHCP ports (+300 bytes when selected) --- networking/udhcp/dhcpd.h | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'networking/udhcp/dhcpd.h') diff --git a/networking/udhcp/dhcpd.h b/networking/udhcp/dhcpd.h index 216b7ab64..fe45ca312 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; -- cgit v1.2.3