network examples: Multiple ethernet interfaces and VLAN support.

Closes https://github.com/espressif/esp-idf/issues/8807
This commit is contained in:
Abhik Roy
2022-09-10 00:35:15 +05:30
parent 99f836e07a
commit f3cc6d4b59
9 changed files with 612 additions and 0 deletions
@@ -0,0 +1,60 @@
menu "Example Configuration"
comment "Virtual Ethernet Interface Configuration"
config EXAMPLE_ETHERNET_VLAN_ID
int "VLAN identifier"
range 1 4094
default 20
help
Set the VLAN Id to the virtual interface
config EXAMPLE_VLAN_STATIC_IPV4_ADDR
string "IPV4 Address"
default "192.168.20.10"
help
The example will set this IPV4 address to this interface.
config EXAMPLE_VLAN_STATIC_ADDR_MASK
string "Subnet Mask"
default "255.255.255.0"
config EXAMPLE_VLAN_STATIC_ADDR_DEF_GW
string "IPV4 Default Gateway"
default "192.168.20.1"
config EXAMPLE_EXTRA_VLAN_INTERFACE
bool "Additional Vlan Interface"
default n
help
Enables an additional VLAN interface
if EXAMPLE_EXTRA_VLAN_INTERFACE
config EXAMPLE_EXTRA_ETHERNET_VLAN_ID
int "VLAN identifier"
range 1 4094
default 30
depends on EXAMPLE_EXTRA_VLAN_INTERFACE
help
Set the VLAN Id to the additional virtual interface
config EXAMPLE_EXTRA_VLAN_STATIC_IPV4_ADDR
string "IPV4 Address"
default "192.168.30.10"
depends on EXAMPLE_EXTRA_VLAN_INTERFACE
help
The example will set this IPV4 address to this interface.
config EXAMPLE_EXTRA_VLAN_STATIC_ADDR_MASK
string "Subnet Mask"
default "255.255.255.0"
depends on EXAMPLE_EXTRA_VLAN_INTERFACE
config EXAMPLE_EXTRA_VLAN_STATIC_ADDR_DEF_GW
string "IPV4 Default Gateway"
default "192.168.30.1"
depends on EXAMPLE_EXTRA_VLAN_INTERFACE
endif #EXAMPLE_EXTRA_VLAN_INTERFACE
endmenu