I want to use the ESP-IDF framework to make a program that will recieve UDP packets via ethernet. I am not using an ESP32-Ethernet-Kit, but an ESP32 alongside a PHY (DP83848) in order to gain access to ethernet.
Pretty much every example I can find about UDP and ESP32 is using Wifi instead of ethernet.
What I want to do is use the basic ethernet example available in the espressif esp-idf git repository as a starting point and then add the functionality to recieve the datagrams. If I'm not wrong, what I should do is create a new event handler and use the esp_eth_update_input_path API present in the esp_eth_driver.h, but I am not sure about how to use it. Can anyone help me with this?
esp_err_t esp_eth_update_input_path(
esp_eth_handle_t hdl,
esp_err_t (*stack_input)(esp_eth_handle_t hdl, uint8_t *buffer, uint32_t length, void *priv),
void *priv);