mirror of
https://github.com/espressif/esp-idf.git
synced 2025-08-09 12:35:28 +00:00
lwip/linux: Add lwip support for networking component under linux
linux/lwip: Wrap some IO posix functions * to workaourd the FreeRTOS EINTR issue (when building without lwip) * to correctly choose the sub-system based on fd (when building with lwip) -- passing control to either linux/system or to lwip This commit also addapts tapio-if to provide DHCP client by default and configurable settings for static IP
This commit is contained in:

committed by
David Čermák

parent
0bfffa0160
commit
b2af4d9689
@@ -4,26 +4,25 @@
|
||||
* SPDX-License-Identifier: Apache-2.0
|
||||
*/
|
||||
#include <stdlib.h>
|
||||
#include "esp_err.h"
|
||||
#include "esp_log.h"
|
||||
#include <stdlib.h>
|
||||
#include "esp_netif.h"
|
||||
#include <fcntl.h>
|
||||
#include <stdlib.h>
|
||||
#include <stdio.h>
|
||||
#include <unistd.h>
|
||||
#include <string.h>
|
||||
#include "esp_err.h"
|
||||
#include "esp_log.h"
|
||||
#include "esp_netif.h"
|
||||
|
||||
// Use linux system sockets to connect to tap interface
|
||||
#define LWIP_HDR_LINUX_SYS_SOCKETS_H
|
||||
#include <sys/socket.h>
|
||||
#include <fcntl.h>
|
||||
|
||||
#include <sys/ioctl.h>
|
||||
#include <sys/types.h>
|
||||
#include <sys/ioctl.h>
|
||||
#include <lwip/sys.h>
|
||||
#include "errno.h"
|
||||
|
||||
#define LWIP_HDR_LINUX_SYS_SOCKETS_H
|
||||
|
||||
#include <linux/if.h>
|
||||
#include <linux/if_tun.h>
|
||||
#include <esp_netif_net_stack.h>
|
||||
|
||||
#define DEVTAP "/dev/net/tun"
|
||||
#define DEVTAP_NAME "tap0"
|
||||
|
Reference in New Issue
Block a user