#
# For a description of the syntax of this configuration file,
# see scripts/kbuild/config-language.txt.
#

config APP_UDHCPD
	bool "udhcp Server (udhcpd)"
	default n
	help
	  uDHCPd is a DHCP server geared primarily toward embedded systems,
	  while striving to be fully functional and RFC compliant.

	  See http://udhcp.busybox.net for further details.

config APP_DHCPRELAY
	bool "dhcprelay"
	default n
	depends on APP_UDHCPD
	help
	  dhcprelay listens for dhcp requests on one or more interfaces
	  and forwards these requests to a different interface or dhcp
	  server.

config APP_DUMPLEASES
	bool "Lease display utility (dumpleases)"
	default n
	depends on APP_UDHCPD
	help
	  dumpleases displays the leases written out by the udhcpd server.
	  Lease times are stored in the file by time remaining in lease, or
	  by the absolute time that it expires in seconds from epoch.

	  See http://udhcp.busybox.net for further details.

config FEATURE_UDHCPD_WRITE_LEASES_EARLY
	bool "Rewrite the lease file at every new acknowledge"
	default n
	depends on APP_UDHCPD
	help
	  If selected, udhcpd will write a new file with leases every
	  time a new lease has been accepted, thus eleminating the need
	  to send SIGUSR1 for the initial writing, or updating. Any timed
	  rewriting remains undisturbed

config APP_UDHCPC
	bool "udhcp Client (udhcpc)"
	default n
	help
	  uDHCPc is a DHCP client geared primarily toward embedded systems,
	  while striving to be fully functional and RFC compliant.

	  The udhcp client negotiates a lease with the DHCP server and
	  notifies a set of scripts when a lease is obtained or lost.

	  See http://udhcp.busybox.net for further details.

config FEATURE_UDHCPC_ARPING
	bool "Ask udhcpc to verify that the offered address is free, using arpping"
	default y
	depends on APP_UDHCPC
	help
	  If selected, udhcpc will use arpping to make sure the offered address
	  is really available. The client will DHCPDECLINE the offer if the
	  address is in use, and restart the discover process.

config FEATURE_UDHCP_PORT
	bool "Enable '-P port' option for udhcpd and udhcpc"
	default n
	depends on APP_UDHCPD || APP_UDHCPC
	help
	  At the cost of ~300 bytes, enables -P port option.
	  This feature is typically not needed.

config FEATURE_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.  If using
	  this option, compile uDHCP with "-g", and do not fork the daemon to
	  the background.

	  See http://udhcp.busybox.net for further details.

config FEATURE_RFC3397
	bool "Support for RFC3397 domain search (experimental)"
	default n
	depends on APP_UDHCPD || APP_UDHCPC
	help
	  If selected, both client and server will support passing of domain
	  search lists via option 119, specified in RFC3397.

config UDHCPC_SLACK_FOR_BUGGY_SERVERS
	int "DHCP options slack buffer size"
	default 80
	range 0 924
	depends on APP_UDHCPD || APP_UDHCPC
	help
	  Some buggy DHCP servers will send DHCP offer packets with option
	  field larger than we expect (which might also be considered a
	  buffer overflow attempt). These packets are normally discarded.
	  If circumstances beyond your control force you to support such
	  servers, this may help. The upper limit (924) makes dhcpc accept
	  even 1500 byte packets (maximum-sized ethernet packets).

	  This options does not make dhcp[cd] emit non-standard
	  sized packets.

	  Known buggy DHCP servers:
	  3Com OfficeConnect Remote 812 ADSL Router:
	    seems to confuse maximum allowed UDP packet size with
	    maximum size of entire IP packet, and sends packets which are
	    28 bytes too large.
	  Seednet (ISP) VDSL: sends packets 2 bytes too big.
