forked from espressif/esp-idf
fix(sta2eth): Make some Ethernet options configurable
This commit is contained in:
@@ -86,4 +86,26 @@ menu "Example Configuration"
|
|||||||
the reconfiguration mode, i.e. to restart provisioning
|
the reconfiguration mode, i.e. to restart provisioning
|
||||||
or manual configuration of Wi-Fi settings (ssid, password)
|
or manual configuration of Wi-Fi settings (ssid, password)
|
||||||
|
|
||||||
|
if EXAMPLE_WIRED_INTERFACE_IS_ETHERNET
|
||||||
|
|
||||||
|
config EXAMPLE_MODIFY_DHCP_MESSAGES
|
||||||
|
bool "Modify DHCP messages"
|
||||||
|
default y
|
||||||
|
help
|
||||||
|
This is needed if the client uses 61 option and the DHCP server applies strict rules
|
||||||
|
on assigning addresses.
|
||||||
|
Set this to 'n' if you don't need DHCP or you're using simplified DHCP workflow
|
||||||
|
without HW address options in DHCP messages.
|
||||||
|
|
||||||
|
config EXAMPLE_ETHERNET_USE_PROMISCUOUS
|
||||||
|
bool "Enable promiscuous mode on Ethernet interface"
|
||||||
|
default n
|
||||||
|
help
|
||||||
|
Enable promiscuous mode on the Ethernet interface.
|
||||||
|
Note: Enabling promiscuous mode results in better throughput as MAC addresses
|
||||||
|
in frames are not rewritten with the Ethernet interface's actual MAC address.
|
||||||
|
Note: Enabling promiscuous mode may cause ARP conflicts if the PC
|
||||||
|
is also connected to the same network with another NIC.
|
||||||
|
endif
|
||||||
|
|
||||||
endmenu
|
endmenu
|
||||||
|
@@ -20,13 +20,13 @@
|
|||||||
* - this results in better throughput
|
* - this results in better throughput
|
||||||
* - might cause ARP conflicts if the PC is also connected to the same AP with another NIC
|
* - might cause ARP conflicts if the PC is also connected to the same AP with another NIC
|
||||||
*/
|
*/
|
||||||
#define ETH_BRIDGE_PROMISCUOUS 0
|
#define ETH_BRIDGE_PROMISCUOUS CONFIG_EXAMPLE_ETHERNET_USE_PROMISCUOUS
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Set this to 1 to runtime update HW addresses in DHCP messages
|
* Set this to 1 to runtime update HW addresses in DHCP messages
|
||||||
* (this is needed if the client uses 61 option and the DHCP server applies strict rules on assigning addresses)
|
* (this is needed if the client uses 61 option and the DHCP server applies strict rules on assigning addresses)
|
||||||
*/
|
*/
|
||||||
#define MODIFY_DHCP_MSGS 0
|
#define MODIFY_DHCP_MSGS CONFIG_EXAMPLE_MODIFY_DHCP_MESSAGES
|
||||||
|
|
||||||
static const char *TAG = "example_wired_ethernet";
|
static const char *TAG = "example_wired_ethernet";
|
||||||
static esp_eth_handle_t s_eth_handle = NULL;
|
static esp_eth_handle_t s_eth_handle = NULL;
|
||||||
|
Reference in New Issue
Block a user