Ondrej Kosta
4051b80b4d
esp_netif: remove dependency of L2 TAP Interface from netif_lwip
...
esp_eth: extended infrastructure to optionally provide more advanced access to MAC/PHY layers
2022-04-08 16:40:29 +02:00
David Cermak
27375c7917
esp_netif: Cleanup dhcp-server allocations
2022-03-13 19:40:00 +01:00
David Cermak
3d1c05aefb
lwip/dhcps: Add dhcps callback argument for associated netif
2022-03-13 19:40:00 +01:00
David Cermak
5f135741a1
lwip/dhcpserver: Add return value to API that could fail
2022-03-13 19:40:00 +01:00
David Cermak
c005b04d1c
lwip/dhcps: Support for dynamic dhcp server instances
2022-03-13 19:39:21 +01:00
David Cermak
fabad2a13a
esp_netif: Extend unit test to validate route_prio
...
Also updates the auto routing loop after a netif is destroyed
2022-03-11 14:02:17 +01:00
David Cermak
f8907b7884
esp_netif: Support for manual set-default-netif
...
Closes https://github.com/espressif/esp-idf/issues/8330
2022-03-11 14:02:17 +01:00
Sagar Bijwe
6501eff7f5
Remove legacy system event framework.
2022-03-09 15:53:45 +05:30
Sudeep Mohanty
a9fda54d39
esp_hw_support/esp_system: Re-evaluate header inclusions and include directories
...
This commit updates the visibility of various header files and cleans up
some unnecessary inclusions. Also, this commit removes certain header
include paths which were maintained for backward compatibility.
2022-03-07 11:18:08 +05:30
David Cermak
e3d71c984a
lwip: Add client's MAC addr to dhcp server cb
...
* Extended storage for staipassigned events to pass client's MAC address.
* Added client's MAC to dhcp server callback
* Posting the staipassigned events with clients IP and MAC address
2022-01-25 13:08:43 +01:00
Ondrej Kosta
3a7a67f174
netif: added ESP-NETIF L2 TAP interface
2021-11-23 11:17:22 +01:00
Liu Han
49cd81ccf3
lwip/dhcp: add configure for enable vendor class identify option
...
Closes https://github.com/espressif/esp-idf/issues/6786
2021-10-22 11:17:59 +08:00
David Cermak
825bbb08e3
esp_netif: Added argument checks for PPP public API
2021-09-07 09:03:15 +02:00
David Cermak
2f6c60573e
esp_netif: Extend PPP netif API to control connection failure
2021-09-07 09:03:15 +02:00
xueyunfei
0d07569fff
optimization config option LWIP_TCPIP_CORE_LOCKING
2021-08-18 21:32:13 +08:00
David Cermak
9f17f586f4
esp_netif: Set default netif with lwip_netif
...
Make use of lwip_netif pointer for setting the default interface in lwip,
since the is a generic pointer used in I/O functions wheras the former is always the type.
More importantly the netif_handle could be set to another context ptr
used in I/O functions, as as for the SLIP netif.
This change fixes the issue of incorrect settings of a default interface
if any SLIP netif is involved.
Closes https://github.com/espressif/esp-idf/issues/7246
2021-08-17 19:10:49 +08:00
David Cermak
d542edbb3d
esp_netif: Fix dhcps state transitions
...
When the DHCP server is stopped before starting the netif,
it should remain stopped -- as per compatibility with previous tcpip_adapter behavior
2021-07-01 10:17:19 +02:00
yuanjm
56b9bebe41
esp_netif: Correct spelling mistakes
2021-06-25 14:52:34 +08:00
yuanjm
bda8cf0c14
esp_netif: Add CONFIG_PPP_SUPPORT and CONFIG_LWIP_SLIP_SUPPORT to sperate the code
2021-06-25 14:51:24 +08:00
liuhan
7d5ae1ee26
esp_netif: Add CONFIG_LWIP_DHCPS to sperate the code
2021-06-24 09:49:45 +08:00
Shu Chen
e470e7c4c3
Merge branch 'feature/ot-lwip-interface' into 'master'
...
openthread: add lwIP network interface
See merge request espressif/esp-idf!13188
2021-06-03 01:46:17 +00:00
Jiacheng Guo
52a68cb7fe
openthread: integrate OpenThread network interface with esp_netif
2021-06-02 17:03:54 +08:00
David Cermak
8ae19ed332
esp_netif: Fix failing ppp_set_auth() due to wrong arg check
...
Closes https://github.com/espressif/esp-idf/issues/7047
2021-06-01 05:32:39 +00:00
yuanjm
7256cfe5a4
ppp: Fix disable IPv6 will make esp_netif_lwip_ppp build fail
...
Closes https://github.com/espressif/esp-idf/issues/6935
2021-05-20 09:45:17 +00:00
yuanjm
dd30222c46
esp_netif: Add CONFIG_LWIP_SLIP_SUPPORT to sperate slip component
2021-04-01 17:10:50 +08:00
yuanjm
da58235a0e
components: Use CONFIG_LWIP_IPV6 to strip IPv6 function in components
2021-02-23 18:26:03 +08:00
Jiri Schiebel
d1356bca68
esp-netif: Added methods for conversion IP4/IP6 addresses from their string interpretation
...
Closes https://github.com/espressif/esp-idf/issues/5545
2021-02-02 16:07:32 +01:00
Paweł pidpawel Kozubal
cf60ec0ffc
lwip: Added support for configurable LwIP hooks
...
Added lwIP hooks which could be optionally overwritten in the
application code. These three options are provided in Kconfig:
* NONE: No hook support
* DEFAULT: Default implementation is provided. If IDF doesn't
have a specific hook implementation, an empty stub is provided, which
could be overwritten by strong implementation in application code.
* CUSTOM: Hooks are declared only to be implemented in application code.
Merges https://github.com/espressif/esp-idf/pull/6034
2020-11-26 12:02:00 +00:00
David Cermak
7c4d3fbf8b
esp_netif: Fixed possible use of hostname pointer after its freed
...
When setting hostname using esp_netif_set_hostname_api() failed for some reason, the netif pointer might be freed while lwip pointer stil point to that location and could be used. Fixed by moving the freeing and string duplication to the block where lwip hostname is set.
Closes https://github.com/espressif/esp-idf/issues/6048
2020-11-20 10:06:53 +00:00
Angus Gratton
66fb5a29bb
Whitespace: Automated whitespace fixes (large commit)
...
Apply the pre-commit hook whitespace fixes to all files in the repo.
(Line endings, blank lines at end of file, trailing whitespace)
2020-11-11 07:36:35 +00:00
David Čermák
97ac37378f
Merge branch 'bugfix/esp_netif_ppp_event_data' into 'master'
...
esp-netif: Fix PPP netif event posting to include esp_netif data
Closes IDFGH-4147
See merge request espressif/esp-idf!10958
2020-10-27 05:27:24 +08:00
David Čermák
25530d2247
Merge branch 'bugfix/slip_input_longer_u8' into 'master'
...
esp_netif: Fixed SLIP input to support size longer than 256
Closes IDFGH-4057
See merge request espressif/esp-idf!10959
2020-10-27 04:03:06 +08:00
Rob Connolly
a92ae03b1e
esp_netif: Fixed SLIP input to support size longer than 256
...
Implement batch processing of incoming slip data.
Merges https://github.com/espressif/esp-idf/pull/5928
2020-10-26 17:53:17 +01:00
David Cermak
8a143fcf40
esp-netif: Fix PPP netif event posting to include esp_netif data
...
Closes https://github.com/espressif/esp-idf/issues/6009
2020-10-26 16:00:42 +00:00
Mahavir Jain
0fc4249dd5
esp_netif: initialize TCP ISN hook if enabled in configuration
2020-10-23 05:11:33 +00:00
xueyunfei
91fd587fb7
lwip/ipv6:ipv6 address get fail after wifi disconnect
2020-10-12 10:40:22 +08:00
cnlohr
507c08251e
esp_netif: Enable use of the ESP-IDF with a non-LWIP (and non-BSD-style) IP stack.
...
Note: besides the esp-netif component, this commit also disables
net_sockets.c from mbedtls, which is one of the base components and uses BSD API (not specifically lwIP). This might be refactored to use CONFIG_SUPPORT_BSD_API instead of CONFIG_ESP_NETIF_TCPIP_LWIP
in the future.
It also disables smartconfig_ack.c and wifi_init.c from esp_wifi
component for referencing some lwIP config options (smartconfig_ack.c changes might be also
updated to check CONFIG_SUPPORT_BSD_API)
Merges https://github.com/espressif/esp-idf/pull/5856
2020-09-18 15:10:55 +02:00
David Cermak
5dae28069f
esp-netif: Fix SLIP interface to start with correct IPv6 addr
...
Merges https://github.com/espressif/esp-idf/pull/4985
2020-09-03 18:11:09 +00:00
liu zhifu
fa9a5c0be5
esp_wifi: optimize WiFi TX performance
2020-08-13 12:26:21 +08:00
David Cermak
8cfeae15fd
esp_netif: Remove restarting DHCP client and server if it has already been started
...
To be in line with previous behaviour in tcpip_adapter, do nothing and return appropriate error if the DHCP client/server has already been started
2020-07-29 11:50:27 +00:00
David Cermak
bb9a7356ac
esp-netif: removing SLIP related events as the slip-modem set state synchronously
2020-07-15 15:46:46 +02:00
David Cermak
1a41545c3e
esp-netif: SLIP interface refactor to isolate interface from drivers
2020-07-15 15:46:46 +02:00
ryan
266be00254
esp-netif: Added esp_netif slip support, slip_modem component and example
...
Merges https://github.com/espressif/esp-idf/pull/4985
2020-07-15 15:46:46 +02:00
David Cermak
1183b95cc4
esp-netif: Fix compilation if ESP_GRATUITOUS_ARP not enabled
...
Closes https://github.com/espressif/esp-idf/issues/5294
2020-05-19 08:34:36 +00:00
David Cermak
8a45f074fc
esp-netif: Added API to get the underlying interface name
...
The interface name can be used in socket API, i.e. setsockopt(). The API esp_netif_get_netif_impl_name() shoudl be used to populate standard
interface structure struct ifreq.
2020-05-18 09:26:24 +02:00
David Cermak
06711c7c36
examples: common connect component to use both interfaces at once
2020-05-18 09:26:24 +02:00
David Cermak
acdadebfff
esp-netif: ppp netif to use netif_is_link_up() to update interface state
...
Closes https://github.com/espressif/esp-idf/issues/5069
2020-05-04 06:46:35 +00:00
David Cermak
2fce539d1e
esp-netif: use dhcp server netmask
...
Use the configured esp-netif netmask to update the dhcp struct when
starting the server or starting the netif itself.
Use the netmask in dhcps setters and getters.
2020-04-30 14:04:22 +00:00
xueyunfei
b2a3b2a4f4
fixbug for set dhcp time fail
2020-04-21 14:28:39 +08:00
David Cermak
6aabfd50d5
pppos_client: support for PPPAUTHTYPE_NONE
...
Closes https://github.com/espressif/esp-idf/issues/4616
Closes WIFI-1652
2020-04-14 21:46:07 +02:00
David Cermak
56725fa678
esp-netif: support for ipv6 addr types and indices
2020-03-23 12:19:38 +00:00
David Čermák
e7cd3b592e
Merge branch 'bugfix/esp_netif_ppp_setdefault_fix' into 'master'
...
ESP-NETIF: Set default interface for ppp netif must be called from lw_ip context
Closes IDFGH-2672
See merge request espressif/esp-idf!7555
2020-03-20 14:50:41 +08:00
xueyunfei
b1ca95ff22
bugfix for TCPv6 send ok when sta disconnect
2020-03-20 03:10:56 +00:00
David Cermak
fffdc1d789
esp-netif-ppp: support for setting ppp netif up and down
...
calling esp_netif_up() and esp_netif_down() was not supported if the
underlying netif wos of ppp type. Updated the code to enable setting
these interfaces up/down and registered actions in moden_netif glue for
connection/disconnection events to set the netif up/down.
2020-03-19 13:16:24 +00:00
David Cermak
e8ff22b5fb
esp-netif: set default interface for ppp netif must be called from lwip context
...
On update of any interface (set up/down) a routing preference is updated calling esp_netif_update_default_netif() that is called from
lwip context. But if the related netif was ppp type, the set_default api used user-mode, thus causing a dead lock.
Closes https://github.com/espressif/esp-idf/issues/4746
2020-03-19 13:16:24 +00:00
David Cermak
eae8eaa55f
esp-netif-ppp: support for posting GOT_IP event for IPv6
2020-03-05 18:46:48 +00:00
David Cermak
7c8cbe02e4
ESP-NETIF: fix get/set hostname API to reflect user settings
...
On startup of the common interface (ethernet, wifi), the lwip netif hostname was assigned to confg value .
Fixed to assign to esp-netif hostname if it exists
Closes https://github.com/espressif/esp-idf/issues/4737
2020-02-11 07:35:12 +01:00
David Cermak
d8da662dec
ESP-NETIF: Add unit test for additional API
2020-02-10 19:40:23 +01:00
David Cermak
7d45bfda21
esp_netif_lwip_ppp: fix posting ip-event data
...
Closes https://github.com/espressif/esp-idf/issues/4634
2020-01-31 15:21:30 +01:00
Axel Lin
3f5d19016a
esp_netif_lwip_ppp: Allow esp_netif_ppp_set_auth set auth_type with NETIF_PPP_AUTHTYPE_NONE
...
The ppp_set_auth() is guard by #if PPP_AUTH_SUPPORT in lwIP, so
make it consistent. This also simplify the code a bit because the code
in #if PAP_SUPPORT guard and #if CHAP_SUPPORT guard are exactly the same.
Once NETIF_PPP_AUTHTYPE_NONE added to esp_netif_auth_type_t, it also allows
setting NETIF_PPP_AUTHTYPE_NONE with this change.
Signed-off-by: Axel Lin <axel.lin@gmail.com>
Merges https://github.com/espressif/esp-idf/pull/4639
2020-01-31 15:19:09 +01:00
xiehang
c0148ef1e8
lwip: Enable IPv6 stateless address autoconfiguration
2020-01-14 07:15:26 +00:00
David Cermak
92087edbb8
esp_netif: fix esp_netif_get_dns_info() to copy the entire ip_addr_t
...
closes https://github.com/espressif/esp-idf/issues/4584
closes IDFGH-2472
2020-01-09 09:17:38 +01:00
David Cermak
b61b927008
esp_netif: minor log message fix in dhcps cb
...
To make it more general, since the DHCP server does not necessarily runs only on softAP.
2019-12-17 09:02:51 +01:00
David Cermak
25913af2cc
pppos_client: udated example code to use esp-netif in PPP configuration
2019-12-16 17:34:10 +00:00
David Cermak
52ca3a917d
esp_netif: Support for PPPoS in esp_netif using lwip ppp client
2019-12-16 17:34:10 +00:00
xueyunfei
2eea2dbeb4
Add feature for set dhcp time out
2019-11-22 17:24:16 +08:00
David Cermak
f91d69efb2
esp_netif: rename DHCP flags for client and server
2019-11-13 12:36:26 +01:00
David Cermak
064bed710e
esp_netif: fix esp_netif_stop() to stop DHCP client if configured
2019-11-13 12:36:26 +01:00
David Cermak
7ef385963c
esp_netif: minor update of coding style based on clang-tidy
...
guidelines and fix some copyright notices
2019-11-13 12:36:25 +01:00
David Cermak
f839a1328c
esp_netif: added locking for netif list management, unit tests to use unique if_keys, updated comments
2019-11-13 12:36:25 +01:00
David Cermak
359f6b3a21
esp_netif: add consistency checks for configs and interface key duplication
2019-11-13 12:36:25 +01:00
David Cermak
cf710a3cb1
esp_netif: include tcpip_adapter legacy header by default to provide *implicit* compatiblity
2019-11-13 12:36:25 +01:00
David Cermak
549ee87912
esp_netif: moving default netifs to wifi, moved sta_list to a separate header -- note will fail unit tests
2019-11-13 12:36:25 +01:00
David Cermak
d471266b46
esp_netif: documentation udpated and grouped the esp-netif API
...
structure. Updated rst documenentation and diagram of esp-netif
cooperation with other components.
2019-11-13 12:36:25 +01:00
David Cermak
eb94d87935
esp_netif: address failures on tcpip-task ipc call, deinit lwip netif and ip address issues
2019-11-13 12:36:25 +01:00
David Cermak
3a19bf055d
esp_netif and examples: using wifi driver handle, update examples and tests to pass the CI
2019-11-13 12:36:25 +01:00
David Cermak
ba13275c6b
esp_netif: update default DHCP IP addresses to be in line with old interface, added loopback implementation, explicit esp-netif init, sanity checks for parameters added
2019-11-13 12:36:25 +01:00
David Cermak
ffe043b1a8
esp_netif: Introduction of esp-netif component as a replacement of tcpip_adpter
...
- provides object oriented access to network intefaces
- not limited to default netifs
- more generic abstraction to network input output functions
- event handler registration removed from component responsibility
- backward compatibility layer for legacy tcpip_apapter APIs
Closes IDF-39
2019-11-13 12:36:25 +01:00