Finally external files working

This commit is contained in:
Florian Hoss 2022-07-25 16:01:07 +02:00
parent 2d36e41641
commit 0422eeeb9a
6 changed files with 31 additions and 28 deletions

View file

@ -1,3 +1,20 @@
#pragma once
#ifndef _LWIP_HOOKS_H_
#define _LWIP_HOOKS_H_
#define LWIP_HOOK_IP4_INPUT lwip_hook_ip4_input
#include "lwip/netif.h"
#include "lwip/pbuf.h"
#include "esp_log.h"
#ifdef __cplusplus
extern "C"
{
#endif
int lwip_hook_ip4_input(struct pbuf *pbuf, struct netif *input_netif);
#define LWIP_HOOK_IP4_INPUT lwip_hook_ip4_input
#ifdef __cplusplus
}
#endif
#endif /* _LWIP_HOOKS_H_ */

View file

@ -1,9 +0,0 @@
#include "lwip/netif.h"
#include "lwip/pbuf.h"
#include "esp_log.h"
int lwip_hook_ip4_input(struct pbuf *pbuf, struct netif *input_netif)
{
ESP_LOGI("HOOK", "Testing...");
return 0; // we don't consume the packet
}

View file

@ -1,15 +0,0 @@
#pragma once
#include "lwip/netif.h"
#include "lwip/pbuf.h"
#ifdef __cplusplus
extern "C"
{
#endif
int lwip_hook_ip4_input(struct pbuf *pbuf, struct netif *input_netif);
#ifdef __cplusplus
}
#endif