esp-netif: Added API to get the underlying interface name

The interface name can be used in socket API, i.e. setsockopt(). The API esp_netif_get_netif_impl_name() shoudl be used to populate standard
interface structure struct ifreq.
This commit is contained in:
David Cermak
2020-04-23 14:13:56 +02:00
parent 06711c7c36
commit 8a45f074fc
4 changed files with 51 additions and 3 deletions

View File

@@ -13,4 +13,12 @@ menu "Example Configuration"
help
host port
config EXAMPLE_BIND_SOCKET_TO_NETIF_NAME
bool "Bind to interface by its name"
default y
help
By default example uses setsockopt() to bind the tcp-client's socket
to specific interface. Setting this option to true demonstrates binding
the socket to the local ip address of the network interface.
endmenu