mirror of
https://github.com/espressif/esp-idf.git
synced 2025-09-24 09:25:48 +00:00
examples: Add common linux component tapif_io
That can be used with linux target on lwip to pass packets from lwip to linux host networking stack, e.g. routing the trafic to internet.
This commit is contained in:
@@ -0,0 +1,25 @@
|
||||
/*
|
||||
* SPDX-FileCopyrightText: 2001-2003 Swedish Institute of Computer Science
|
||||
*
|
||||
* SPDX-License-Identifier: BSD-3-Clause
|
||||
*
|
||||
* SPDX-FileContributor: 2022-2023 Espressif Systems (Shanghai) CO LTD
|
||||
*/
|
||||
#pragma once
|
||||
#include "lwip/esp_netif_net_stack.h"
|
||||
|
||||
/**
|
||||
* @brief lwip netif init API
|
||||
* @param netif pointer to lwip's netif
|
||||
* @return ERR_OK on success
|
||||
*/
|
||||
err_t lwip_tapif_init(struct netif *netif);
|
||||
|
||||
/**
|
||||
* @brief Input data path
|
||||
* @param h pointer to network stack handle (stuct netif* in our case)
|
||||
* @param buffer Data
|
||||
* @param len Data size
|
||||
* @param l2_buff Data L2 buffer
|
||||
*/
|
||||
void lwip_tapif_input(void *h, void *buffer, size_t len, void *l2_buff);
|
Reference in New Issue
Block a user