Skip to content

Commit d2761a9

Browse files
author
me-no-dev
committed
IDF release/v4.0 4c81978a3
1 parent 8c8d861 commit d2761a9

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

82 files changed

+464
-29
lines changed

platform.txt

+1-1
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ compiler.S.flags=-c -g3 -x assembler-with-cpp -MMD -mlongcalls
3535

3636
compiler.c.elf.cmd=xtensa-esp32-elf-gcc
3737
compiler.c.elf.flags=-nostdlib "-L{compiler.sdk.path}/lib" "-L{compiler.sdk.path}/ld" -T esp32_out.ld -T esp32.project.ld -T esp32.peripherals.ld -T esp32.rom.ld -T esp32.rom.libgcc.ld -T esp32.rom.syscalls.ld -T esp32.rom.newlib-data.ld -Wl,--gc-sections -Wl,-static -Wl,--undefined=uxTopUsedPriority -u call_user_start_cpu0 -u __cxa_guard_dummy -u ld_include_panic_highint_hdl -u newlib_include_locks_impl -u newlib_include_heap_impl -u newlib_include_syscalls_impl -u pthread_include_pthread_impl -u pthread_include_pthread_cond_impl -u pthread_include_pthread_local_storage_impl -fno-rtti -mfix-esp32-psram-cache-issue
38-
compiler.c.elf.libs=-lgcc -lexpat -ljson -lm -lmdns -lpthread -lrtc -lwear_levelling -limage_util -lfd -lmbedtls -lesp-tls -lnewlib -lhal -ltcpip_adapter -lesp_https_ota -lprotobuf-c -lesp_http_client -lesp_eth -lwifi_provisioning -lesp_common -lbt -lmesh -lvfs -lesp_websocket_client -lespcoredump -lasio -lheap -lesp_http_server -lnghttp -lcore -lsmartconfig -lxtensa -lcxx -lphy -lesp_gdbstub -lunity -lesp32 -lesp_local_ctrl -llwip -lcoap -lfreemodbus -llog -lprotocomm -lnet80211 -lmqtt -lesp_ringbuf -ldriver -lnvs_flash -lfreertos -lod -lfb_gfx -lsoc -lbootloader_support -lspiffs -lconsole -lesp_wifi -lesp_event -lfatfs -ltcp_transport -lesp32-camera -lspi_flash -lapp_update -llibsodium -lface_recognition -lpp -lbtdm_app -lfr -lespnow -lefuse -lsdmmc -lesp_adc_cal -lopenssl -lulp -lapp_trace -lwpa_supplicant -ljsmn -ldl -lcoexist -lface_detection -lesp_rom -lc -lstdc++
38+
compiler.c.elf.libs=-lgcc -lesp_event -lvfs -lmqtt -ldriver -lcoexist -lsoc -lxtensa -lwear_levelling -lprotobuf-c -lconsole -ldl -lespcoredump -lesp32 -lfb_gfx -lesp_local_ctrl -lulp -lesp_gdbstub -ltcpip_adapter -lopenssl -lbtdm_app -lesp_adc_cal -lmesh -lspiffs -lesp_common -lesp_websocket_client -lsdmmc -lapp_update -lesp_ringbuf -lesp_http_server -lspi_flash -lpp -lhal -lespnow -lbt -lexpat -lmdns -lesp_wifi -lfatfs -lesp-tls -ljsmn -lesp32-camera -lfreemodbus -llog -lwifi_provisioning -lunity -llwip -ljson -lwpa_supplicant -lcxx -lbootloader_support -lesp_rom -lface_recognition -lesp_https_ota -lface_detection -lphy -lm -lnghttp -lcoap -lnet80211 -llibsodium -lfr -lfd -lefuse -ltcp_transport -lmbedtls -lheap -lcore -lpthread -lprotocomm -lasio -lnvs_flash -lapp_trace -lnewlib -lod -lsmartconfig -lesp_http_client -lfreertos -limage_util -lrtc -lesp_eth -lc -lstdc++
3939

4040
compiler.as.cmd=xtensa-esp32-elf-as
4141

tools/platformio-build.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -186,7 +186,7 @@
186186
],
187187

188188
LIBS=[
189-
"-lgcc", "-lexpat", "-ljson", "-lm", "-lmdns", "-lpthread", "-lrtc", "-lwear_levelling", "-limage_util", "-lfd", "-lmbedtls", "-lesp-tls", "-lnewlib", "-lhal", "-ltcpip_adapter", "-lesp_https_ota", "-lprotobuf-c", "-lesp_http_client", "-lesp_eth", "-lwifi_provisioning", "-lesp_common", "-lbt", "-lmesh", "-lvfs", "-lesp_websocket_client", "-lespcoredump", "-lasio", "-lheap", "-lesp_http_server", "-lnghttp", "-lcore", "-lsmartconfig", "-lxtensa", "-lcxx", "-lphy", "-lesp_gdbstub", "-lunity", "-lesp32", "-lesp_local_ctrl", "-llwip", "-lcoap", "-lfreemodbus", "-llog", "-lprotocomm", "-lnet80211", "-lmqtt", "-lesp_ringbuf", "-ldriver", "-lnvs_flash", "-lfreertos", "-lod", "-lfb_gfx", "-lsoc", "-lbootloader_support", "-lspiffs", "-lconsole", "-lesp_wifi", "-lesp_event", "-lfatfs", "-ltcp_transport", "-lesp32-camera", "-lspi_flash", "-lapp_update", "-llibsodium", "-lface_recognition", "-lpp", "-lbtdm_app", "-lfr", "-lespnow", "-lefuse", "-lsdmmc", "-lesp_adc_cal", "-lopenssl", "-lulp", "-lapp_trace", "-lwpa_supplicant", "-ljsmn", "-ldl", "-lcoexist", "-lface_detection", "-lesp_rom", "-lc", "-lstdc++"
189+
"-lgcc", "-lesp_event", "-lvfs", "-lmqtt", "-ldriver", "-lcoexist", "-lsoc", "-lxtensa", "-lwear_levelling", "-lprotobuf-c", "-lconsole", "-ldl", "-lespcoredump", "-lesp32", "-lfb_gfx", "-lesp_local_ctrl", "-lulp", "-lesp_gdbstub", "-ltcpip_adapter", "-lopenssl", "-lbtdm_app", "-lesp_adc_cal", "-lmesh", "-lspiffs", "-lesp_common", "-lesp_websocket_client", "-lsdmmc", "-lapp_update", "-lesp_ringbuf", "-lesp_http_server", "-lspi_flash", "-lpp", "-lhal", "-lespnow", "-lbt", "-lexpat", "-lmdns", "-lesp_wifi", "-lfatfs", "-lesp-tls", "-ljsmn", "-lesp32-camera", "-lfreemodbus", "-llog", "-lwifi_provisioning", "-lunity", "-llwip", "-ljson", "-lwpa_supplicant", "-lcxx", "-lbootloader_support", "-lesp_rom", "-lface_recognition", "-lesp_https_ota", "-lface_detection", "-lphy", "-lm", "-lnghttp", "-lcoap", "-lnet80211", "-llibsodium", "-lfr", "-lfd", "-lefuse", "-ltcp_transport", "-lmbedtls", "-lheap", "-lcore", "-lpthread", "-lprotocomm", "-lasio", "-lnvs_flash", "-lapp_trace", "-lnewlib", "-lod", "-lsmartconfig", "-lesp_http_client", "-lfreertos", "-limage_util", "-lrtc", "-lesp_eth", "-lc", "-lstdc++"
190190
],
191191

192192
LIBSOURCE_DIRS=[

tools/sdk/include/config/sdkconfig.h

+197-1
Original file line numberDiff line numberDiff line change
@@ -1514,6 +1514,202 @@
15141514
#define CONFIG_MONITOR_BAUD_OTHER_VAL CONFIG_ESPTOOLPY_MONITOR_BAUD_OTHER_VAL
15151515
#endif
15161516

1517+
#ifdef CONFIG_BT_NIMBLE_ACL_BUF_COUNT
1518+
#define CONFIG_NIMBLE_ACL_BUF_COUNT CONFIG_BT_NIMBLE_ACL_BUF_COUNT
1519+
#endif
1520+
1521+
#ifdef CONFIG_BT_NIMBLE_ACL_BUF_SIZE
1522+
#define CONFIG_NIMBLE_ACL_BUF_SIZE CONFIG_BT_NIMBLE_ACL_BUF_SIZE
1523+
#endif
1524+
1525+
#ifdef CONFIG_BT_NIMBLE_ATT_PREFERRED_MTU
1526+
#define CONFIG_NIMBLE_ATT_PREFERRED_MTU CONFIG_BT_NIMBLE_ATT_PREFERRED_MTU
1527+
#endif
1528+
1529+
#ifdef CONFIG_BT_NIMBLE_CRYPTO_STACK_MBEDTLS
1530+
#define CONFIG_NIMBLE_CRYPTO_STACK_MBEDTLS CONFIG_BT_NIMBLE_CRYPTO_STACK_MBEDTLS
1531+
#endif
1532+
1533+
#ifdef CONFIG_BT_NIMBLE_DEBUG
1534+
#define CONFIG_NIMBLE_DEBUG CONFIG_BT_NIMBLE_DEBUG
1535+
#endif
1536+
1537+
#ifdef CONFIG_BT_NIMBLE_ENABLED
1538+
#define CONFIG_NIMBLE_ENABLED CONFIG_BT_NIMBLE_ENABLED
1539+
#endif
1540+
1541+
#ifdef CONFIG_BT_NIMBLE_GAP_DEVICE_NAME_MAX_LEN
1542+
#define CONFIG_NIMBLE_GAP_DEVICE_NAME_MAX_LEN CONFIG_BT_NIMBLE_GAP_DEVICE_NAME_MAX_LEN
1543+
#endif
1544+
1545+
#ifdef CONFIG_BT_NIMBLE_HCI_EVT_BUF_SIZE
1546+
#define CONFIG_NIMBLE_HCI_EVT_BUF_SIZE CONFIG_BT_NIMBLE_HCI_EVT_BUF_SIZE
1547+
#endif
1548+
1549+
#ifdef CONFIG_BT_NIMBLE_HCI_EVT_HI_BUF_COUNT
1550+
#define CONFIG_NIMBLE_HCI_EVT_HI_BUF_COUNT CONFIG_BT_NIMBLE_HCI_EVT_HI_BUF_COUNT
1551+
#endif
1552+
1553+
#ifdef CONFIG_BT_NIMBLE_HCI_EVT_LO_BUF_COUNT
1554+
#define CONFIG_NIMBLE_HCI_EVT_LO_BUF_COUNT CONFIG_BT_NIMBLE_HCI_EVT_LO_BUF_COUNT
1555+
#endif
1556+
1557+
#ifdef CONFIG_BT_NIMBLE_HS_FLOW_CTRL
1558+
#define CONFIG_NIMBLE_HS_FLOW_CTRL CONFIG_BT_NIMBLE_HS_FLOW_CTRL
1559+
#endif
1560+
1561+
#ifdef CONFIG_BT_NIMBLE_HS_FLOW_CTRL_ITVL
1562+
#define CONFIG_NIMBLE_HS_FLOW_CTRL_ITVL CONFIG_BT_NIMBLE_HS_FLOW_CTRL_ITVL
1563+
#endif
1564+
1565+
#ifdef CONFIG_BT_NIMBLE_HS_FLOW_CTRL_THRESH
1566+
#define CONFIG_NIMBLE_HS_FLOW_CTRL_THRESH CONFIG_BT_NIMBLE_HS_FLOW_CTRL_THRESH
1567+
#endif
1568+
1569+
#ifdef CONFIG_BT_NIMBLE_HS_FLOW_CTRL_TX_ON_DISCONNECT
1570+
#define CONFIG_NIMBLE_HS_FLOW_CTRL_TX_ON_DISCONNECT CONFIG_BT_NIMBLE_HS_FLOW_CTRL_TX_ON_DISCONNECT
1571+
#endif
1572+
1573+
#ifdef CONFIG_BT_NIMBLE_L2CAP_COC_MAX_NUM
1574+
#define CONFIG_NIMBLE_L2CAP_COC_MAX_NUM CONFIG_BT_NIMBLE_L2CAP_COC_MAX_NUM
1575+
#endif
1576+
1577+
#ifdef CONFIG_BT_NIMBLE_MAX_BONDS
1578+
#define CONFIG_NIMBLE_MAX_BONDS CONFIG_BT_NIMBLE_MAX_BONDS
1579+
#endif
1580+
1581+
#ifdef CONFIG_BT_NIMBLE_MAX_CCCDS
1582+
#define CONFIG_NIMBLE_MAX_CCCDS CONFIG_BT_NIMBLE_MAX_CCCDS
1583+
#endif
1584+
1585+
#ifdef CONFIG_BT_NIMBLE_MAX_CONNECTIONS
1586+
#define CONFIG_NIMBLE_MAX_CONNECTIONS CONFIG_BT_NIMBLE_MAX_CONNECTIONS
1587+
#endif
1588+
1589+
#ifdef CONFIG_BT_NIMBLE_MEM_ALLOC_MODE
1590+
#define CONFIG_NIMBLE_MEM_ALLOC_MODE CONFIG_BT_NIMBLE_MEM_ALLOC_MODE
1591+
#endif
1592+
1593+
#ifdef CONFIG_BT_NIMBLE_MEM_ALLOC_MODE_DEFAULT
1594+
#define CONFIG_NIMBLE_MEM_ALLOC_MODE_DEFAULT CONFIG_BT_NIMBLE_MEM_ALLOC_MODE_DEFAULT
1595+
#endif
1596+
1597+
#ifdef CONFIG_BT_NIMBLE_MEM_ALLOC_MODE_EXTERNAL
1598+
#define CONFIG_NIMBLE_MEM_ALLOC_MODE_EXTERNAL CONFIG_BT_NIMBLE_MEM_ALLOC_MODE_EXTERNAL
1599+
#endif
1600+
1601+
#ifdef CONFIG_BT_NIMBLE_MEM_ALLOC_MODE_INTERNAL
1602+
#define CONFIG_NIMBLE_MEM_ALLOC_MODE_INTERNAL CONFIG_BT_NIMBLE_MEM_ALLOC_MODE_INTERNAL
1603+
#endif
1604+
1605+
#ifdef CONFIG_BT_NIMBLE_MESH
1606+
#define CONFIG_NIMBLE_MESH CONFIG_BT_NIMBLE_MESH
1607+
#endif
1608+
1609+
#ifdef CONFIG_BT_NIMBLE_MESH_DEVICE_NAME
1610+
#define CONFIG_NIMBLE_MESH_DEVICE_NAME CONFIG_BT_NIMBLE_MESH_DEVICE_NAME
1611+
#endif
1612+
1613+
#ifdef CONFIG_BT_NIMBLE_MESH_FRIEND
1614+
#define CONFIG_NIMBLE_MESH_FRIEND CONFIG_BT_NIMBLE_MESH_FRIEND
1615+
#endif
1616+
1617+
#ifdef CONFIG_BT_NIMBLE_MESH_GATT_PROXY
1618+
#define CONFIG_NIMBLE_MESH_GATT_PROXY CONFIG_BT_NIMBLE_MESH_GATT_PROXY
1619+
#endif
1620+
1621+
#ifdef CONFIG_BT_NIMBLE_MESH_LOW_POWER
1622+
#define CONFIG_NIMBLE_MESH_LOW_POWER CONFIG_BT_NIMBLE_MESH_LOW_POWER
1623+
#endif
1624+
1625+
#ifdef CONFIG_BT_NIMBLE_MESH_PB_ADV
1626+
#define CONFIG_NIMBLE_MESH_PB_ADV CONFIG_BT_NIMBLE_MESH_PB_ADV
1627+
#endif
1628+
1629+
#ifdef CONFIG_BT_NIMBLE_MESH_PB_GATT
1630+
#define CONFIG_NIMBLE_MESH_PB_GATT CONFIG_BT_NIMBLE_MESH_PB_GATT
1631+
#endif
1632+
1633+
#ifdef CONFIG_BT_NIMBLE_MESH_PROV
1634+
#define CONFIG_NIMBLE_MESH_PROV CONFIG_BT_NIMBLE_MESH_PROV
1635+
#endif
1636+
1637+
#ifdef CONFIG_BT_NIMBLE_MESH_PROXY
1638+
#define CONFIG_NIMBLE_MESH_PROXY CONFIG_BT_NIMBLE_MESH_PROXY
1639+
#endif
1640+
1641+
#ifdef CONFIG_BT_NIMBLE_MESH_RELAY
1642+
#define CONFIG_NIMBLE_MESH_RELAY CONFIG_BT_NIMBLE_MESH_RELAY
1643+
#endif
1644+
1645+
#ifdef CONFIG_BT_NIMBLE_MSYS1_BLOCK_COUNT
1646+
#define CONFIG_NIMBLE_MSYS1_BLOCK_COUNT CONFIG_BT_NIMBLE_MSYS1_BLOCK_COUNT
1647+
#endif
1648+
1649+
#ifdef CONFIG_BT_NIMBLE_NVS_PERSIST
1650+
#define CONFIG_NIMBLE_NVS_PERSIST CONFIG_BT_NIMBLE_NVS_PERSIST
1651+
#endif
1652+
1653+
#ifdef CONFIG_BT_NIMBLE_PINNED_TO_CORE
1654+
#define CONFIG_NIMBLE_PINNED_TO_CORE CONFIG_BT_NIMBLE_PINNED_TO_CORE
1655+
#endif
1656+
1657+
#ifdef CONFIG_BT_NIMBLE_PINNED_TO_CORE_0
1658+
#define CONFIG_NIMBLE_PINNED_TO_CORE_0 CONFIG_BT_NIMBLE_PINNED_TO_CORE_0
1659+
#endif
1660+
1661+
#ifdef CONFIG_BT_NIMBLE_PINNED_TO_CORE_1
1662+
#define CONFIG_NIMBLE_PINNED_TO_CORE_1 CONFIG_BT_NIMBLE_PINNED_TO_CORE_1
1663+
#endif
1664+
1665+
#ifdef CONFIG_BT_NIMBLE_PINNED_TO_CORE_CHOICE
1666+
#define CONFIG_NIMBLE_PINNED_TO_CORE_CHOICE CONFIG_BT_NIMBLE_PINNED_TO_CORE_CHOICE
1667+
#endif
1668+
1669+
#ifdef CONFIG_BT_NIMBLE_ROLE_BROADCASTER
1670+
#define CONFIG_NIMBLE_ROLE_BROADCASTER CONFIG_BT_NIMBLE_ROLE_BROADCASTER
1671+
#endif
1672+
1673+
#ifdef CONFIG_BT_NIMBLE_ROLE_CENTRAL
1674+
#define CONFIG_NIMBLE_ROLE_CENTRAL CONFIG_BT_NIMBLE_ROLE_CENTRAL
1675+
#endif
1676+
1677+
#ifdef CONFIG_BT_NIMBLE_ROLE_OBSERVER
1678+
#define CONFIG_NIMBLE_ROLE_OBSERVER CONFIG_BT_NIMBLE_ROLE_OBSERVER
1679+
#endif
1680+
1681+
#ifdef CONFIG_BT_NIMBLE_ROLE_PERIPHERAL
1682+
#define CONFIG_NIMBLE_ROLE_PERIPHERAL CONFIG_BT_NIMBLE_ROLE_PERIPHERAL
1683+
#endif
1684+
1685+
#ifdef CONFIG_BT_NIMBLE_RPA_TIMEOUT
1686+
#define CONFIG_NIMBLE_RPA_TIMEOUT CONFIG_BT_NIMBLE_RPA_TIMEOUT
1687+
#endif
1688+
1689+
#ifdef CONFIG_BT_NIMBLE_SM_LEGACY
1690+
#define CONFIG_NIMBLE_SM_LEGACY CONFIG_BT_NIMBLE_SM_LEGACY
1691+
#endif
1692+
1693+
#ifdef CONFIG_BT_NIMBLE_SM_SC
1694+
#define CONFIG_NIMBLE_SM_SC CONFIG_BT_NIMBLE_SM_SC
1695+
#endif
1696+
1697+
#ifdef CONFIG_BT_NIMBLE_SM_SC_DEBUG_KEYS
1698+
#define CONFIG_NIMBLE_SM_SC_DEBUG_KEYS CONFIG_BT_NIMBLE_SM_SC_DEBUG_KEYS
1699+
#endif
1700+
1701+
#ifdef CONFIG_BT_NIMBLE_SVC_GAP_APPEARANCE
1702+
#define CONFIG_NIMBLE_SVC_GAP_APPEARANCE CONFIG_BT_NIMBLE_SVC_GAP_APPEARANCE
1703+
#endif
1704+
1705+
#ifdef CONFIG_BT_NIMBLE_SVC_GAP_DEVICE_NAME
1706+
#define CONFIG_NIMBLE_SVC_GAP_DEVICE_NAME CONFIG_BT_NIMBLE_SVC_GAP_DEVICE_NAME
1707+
#endif
1708+
1709+
#ifdef CONFIG_BT_NIMBLE_TASK_STACK_SIZE
1710+
#define CONFIG_NIMBLE_TASK_STACK_SIZE CONFIG_BT_NIMBLE_TASK_STACK_SIZE
1711+
#endif
1712+
15171713
#ifdef CONFIG_ESP32_NO_BLOBS
15181714
#define CONFIG_NO_BLOBS CONFIG_ESP32_NO_BLOBS
15191715
#endif
@@ -1990,5 +2186,5 @@
19902186
#define CONFIG_WIFI_LWIP_ALLOCATION_FROM_SPIRAM_FIRST CONFIG_SPIRAM_TRY_ALLOCATE_WIFI_LWIP
19912187
#endif
19922188

1993-
#define CONFIG_ARDUINO_IDF_COMMIT "b0f053d82"
2189+
#define CONFIG_ARDUINO_IDF_COMMIT "4c81978a3"
19942190
#define CONFIG_ARDUINO_IDF_BRANCH "release/v4.0"

tools/sdk/include/esp_wifi/esp_wifi_types.h

+1
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,7 @@ typedef enum {
5757
WIFI_AUTH_WPA_WPA2_PSK, /**< authenticate mode : WPA_WPA2_PSK */
5858
WIFI_AUTH_WPA2_ENTERPRISE, /**< authenticate mode : WPA2_ENTERPRISE */
5959
WIFI_AUTH_WPA3_PSK, /**< authenticate mode : WPA3_PSK */
60+
WIFI_AUTH_WPA2_WPA3_PSK, /**< authenticate mode : WPA2_WPA3_PSK */
6061
WIFI_AUTH_MAX
6162
} wifi_auth_mode_t;
6263

+96
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,96 @@
1+
/**
2+
* @file ip4_napt.h
3+
* This is a private interface of ip4_napt used from ip4.c
4+
*
5+
* @see ip4_napt.c
6+
*/
7+
8+
/*
9+
* Copyright (c) 2001-2004 Swedish Institute of Computer Science.
10+
* All rights reserved.
11+
*
12+
* Redistribution and use in source and binary forms, with or without modification,
13+
* are permitted provided that the following conditions are met:
14+
*
15+
* 1. Redistributions of source code must retain the above copyright notice,
16+
* this list of conditions and the following disclaimer.
17+
* 2. Redistributions in binary form must reproduce the above copyright notice,
18+
* this list of conditions and the following disclaimer in the documentation
19+
* and/or other materials provided with the distribution.
20+
* 3. The name of the author may not be used to endorse or promote products
21+
* derived from this software without specific prior written permission.
22+
*
23+
* THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED
24+
* WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
25+
* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT
26+
* SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
27+
* EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT
28+
* OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
29+
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
30+
* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING
31+
* IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY
32+
* OF SUCH DAMAGE.
33+
*
34+
* This file is part of the lwIP TCP/IP stack.
35+
*
36+
* original reassembly code by Adam Dunkels <[email protected]>
37+
*
38+
*/
39+
40+
#ifndef LWIP_HDR_IP4_NAPT_H
41+
#define LWIP_HDR_IP4_NAPT_H
42+
43+
#include "lwip/opt.h"
44+
45+
#if ESP_LWIP
46+
#if IP_FORWARD
47+
#if IP_NAPT
48+
49+
#include "lwip/def.h"
50+
#include "lwip/pbuf.h"
51+
#include "lwip/ip4_addr.h"
52+
#include "lwip/err.h"
53+
#include "lwip/netif.h"
54+
#include "lwip/prot/ip4.h"
55+
56+
#ifdef __cplusplus
57+
extern "C" {
58+
#endif
59+
60+
#include "lwip/err.h"
61+
#include "lwip/ip4.h"
62+
63+
/**
64+
* NAPT for a forwarded packet. It checks weather we need NAPT and modify
65+
* the packet source address and port if needed.
66+
*
67+
* @param p the packet to forward (p->payload points to IP header)
68+
* @param iphdr the IP header of the input packet
69+
* @param inp the netif on which this packet was received
70+
* @param outp the netif on which this packet will be sent
71+
* @return ERR_OK if packet should be sent, or ERR_RTE if it should be dropped
72+
*/
73+
err_t
74+
ip_napt_forward(struct pbuf *p, struct ip_hdr *iphdr, struct netif *inp, struct netif *outp);
75+
76+
/**
77+
* NAPT for an input packet. It checks weather the destination is on NAPT
78+
* table and modify the packet destination address and port if needed.
79+
*
80+
* @param p the packet to forward (p->payload points to IP header)
81+
* @param iphdr the IP header of the input packet
82+
* @param inp the netif on which this packet was received
83+
*/
84+
void
85+
ip_napt_recv(struct pbuf *p, struct ip_hdr *iphdr);
86+
87+
#ifdef __cplusplus
88+
}
89+
#endif
90+
91+
#endif /* IP_NAPT */
92+
#endif /* IP_FORWARD */
93+
#endif /* ESP_LWIP */
94+
95+
#endif /* LWIP_HDR_IP4_NAPT_H */
96+

0 commit comments

Comments
 (0)