1
6
7
8
9
10
11
12
17
18
19
20
21
22
23
27
30
31
39
40
49
50
51
58
59
60
69
70
71
72
73
/* ... */
#pragma once
#include "esp_err.h"
#define L2TAP_VFS_DEFAULT_PATH "/dev/net/tap"
#define L2TAP_VFS_CONFIG_DEFAULT() \
{ \
.base_path = L2TAP_VFS_DEFAULT_PATH, \
}{...}
...
#ifdef __cplusplus
extern "C" {
#endif
typedef void *l2tap_iodriver_handle;
/* ... */
typedef struct {
const char* base_path;
}{ ... } l2tap_vfs_config_t;
typedef enum {
L2TAP_S_RCV_FILTER,
L2TAP_G_RCV_FILTER,
L2TAP_S_INTF_DEVICE,
L2TAP_G_INTF_DEVICE,
L2TAP_S_DEVICE_DRV_HNDL,
L2TAP_G_DEVICE_DRV_HNDL
}{ ... } l2tap_ioctl_opt_t;
/* ... */
esp_err_t esp_vfs_l2tap_intf_register(l2tap_vfs_config_t *config);
/* ... */
esp_err_t esp_vfs_l2tap_intf_unregister(const char *base_path);
/* ... */
esp_err_t esp_vfs_l2tap_eth_filter(l2tap_iodriver_handle driver_handle, void *buff, size_t *size);
#ifdef __cplusplus
}{...}
#endif