1 /*
2  * SPDX-FileCopyrightText: 2021-2022 Espressif Systems (Shanghai) CO LTD
3  *
4  * SPDX-License-Identifier: Apache-2.0
5  */
6 /**
7  * @file esp_pbuf reference interface file
8  */
9 
10 #pragma once
11 
12 #include <stddef.h>
13 #include "lwip/pbuf.h"
14 #include "esp_netif.h"
15 
16 #ifdef __cplusplus
17 extern "C" {
18 #endif
19 
20 /**
21  * @brief Allocate custom pbuf containing pointer to a private l2-free function
22  *
23  * @note pbuf_free() will deallocate this custom pbuf and call the driver assigned free function
24  */
25 struct pbuf* esp_pbuf_allocate(esp_netif_t *esp_netif, void *buffer, size_t len, void *l2_buff);
26 
27 #ifdef __cplusplus
28 }
29 #endif
30