mirror of
				https://github.com/espressif/esp-idf.git
				synced 2025-10-31 21:14:37 +00:00 
			
		
		
		
	 8a45f074fc
			
		
	
	8a45f074fc
	
	
	
		
			
			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.
		
			
				
	
	
		
			25 lines
		
	
	
		
			648 B
		
	
	
	
		
			Plaintext
		
	
	
	
	
	
			
		
		
	
	
			25 lines
		
	
	
		
			648 B
		
	
	
	
		
			Plaintext
		
	
	
	
	
	
| menu "Example Configuration"
 | |
| 
 | |
|     config EXAMPLE_HOST_NAME
 | |
|         string "Host Name"
 | |
|         default "baidu.com"
 | |
|         help
 | |
|             host name
 | |
| 
 | |
|     config EXAMPLE_HOST_PORT
 | |
|         int "Host Port"
 | |
|         default 80
 | |
|         range 0 65535
 | |
|         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
 |