u-boot/net/Kconfig
Lyle Franklin c8e251f82a Adds basic support for ProxyDHCP
- ProxyDHCP allows a second DHCP server to exist alongside your main
  DHCP server and supply additional BOOTP related options
- When u-boot sends out a DHCP request, the real DHCP server will
  respond with a normal response containing the new client IP address
  while simultaneously the ProxyDHCP server will respond with a blank
  client IP address and a `bootfile` option
- This patch adds CONFIG_SERVERIP_FROM_PROXYDHCP (default false) to
  enable this behavior and CONFIG_SERVERIP_FROM_PROXYDHCP_DELAY_MS
  (default 100) which tells u-boot to wait additional time after
  receiving the main DHCP response to give the ProxyDHCP response time
  to arrive
- The PXE spec for ProxyDHCP is more complicated than the solution
  added here as diagramed on page 16:
  http://www.pix.net/software/pxeboot/archive/pxespec.pdf:

```
DHCP Discover will be retried four times. The four timeouts are 4, 8, 16
and 32 seconds respectively. If a DHCPOFFER is received without an Option
timeouts in an attempt to receive a PXE response.
```

- Adding a simple delay worked for my purposes but let me know if a
  more robust solution is required

Signed-off-by: Lyle Franklin <lylejfranklin@gmail.com>
2020-12-01 10:33:37 -05:00

91 lines
2.5 KiB
Text

#
# Network configuration
#
menuconfig NET
bool "Networking support"
default y
if NET
config PROT_UDP
bool "Enable generic udp framework"
help
Enable a generic udp framework that allows defining a custom
handler for udp protocol.
config BOOTP_SEND_HOSTNAME
bool "Send hostname to DNS server"
help
Some DHCP servers are capable to do a dynamic update of a
DNS server. To do this, they need the hostname of the DHCP
requester.
If CONFIG_BOOTP_SEND_HOSTNAME is defined, the content
of the "hostname" environment variable is passed as
option 12 to the DHCP server.
config NET_RANDOM_ETHADDR
bool "Random ethaddr if unset"
help
Selecting this will allow the Ethernet interface to function
even when the ethaddr variable for that interface is unset.
A new MAC address will be generated on every boot and it will
not be added to the environment.
config NETCONSOLE
bool "NetConsole support"
help
Support the 'nc' input/output device for networked console.
See README.NetConsole for details.
config IP_DEFRAG
bool "Support IP datagram reassembly"
default n
help
Selecting this will enable IP datagram reassembly according
to the algorithm in RFC815.
config NET_MAXDEFRAG
int "Size of buffer used for IP datagram reassembly"
depends on IP_DEFRAG
default 16384
range 1024 65536
help
This defines the size of the statically allocated buffer
used for reassembly, and thus an upper bound for the size of
IP datagrams that can be received.
config TFTP_BLOCKSIZE
int "TFTP block size"
default 1468
help
Default TFTP block size.
The MTU is typically 1500 for ethernet, so a TFTP block of
1468 (MTU minus eth.hdrs) provides a good throughput with
almost-MTU block sizes.
You can also activate CONFIG_IP_DEFRAG to set a larger block.
config TFTP_WINDOWSIZE
int "TFTP window size"
default 1
help
Default TFTP window size.
RFC7440 defines an optional window size of transmits,
before an ack response is required.
The default TFTP implementation implies a window size of 1.
config SERVERIP_FROM_PROXYDHCP
bool "Get serverip value from Proxy DHCP response"
help
Allows bootfile config to be fetched from Proxy DHCP server
while IP is obtained from main DHCP server.
config SERVERIP_FROM_PROXYDHCP_DELAY_MS
int "# of additional milliseconds to wait for ProxyDHCP response"
default 100
help
Amount of additional time to wait for ProxyDHCP response after
receiving response from main DHCP server. Has no effect if
SERVERIP_FROM_PROXYDHCP is false.
endif # if NET