1 #include "no_warn_host.h"
2 #include "lwip/opt.h"
3 #include "lwip/stats.h"
4 #include "lwip/mem.h"
5 #include "lwip/udp.h"
6 #include "lwip/ip_addr.h"
7 #include "lwip/netif.h"
8 #include "lwip/def.h"
9 #include "lwip/dhcp.h"
10 #include "lwip/autoip.h"
11 #include "lwip/dns.h"
12 #include "netif/etharp.h"
13
14 #ifndef BUILDING_DEF
15
__assert_func(const char * file,int line,const char * func,const char * expr)16 void __assert_func(const char *file, int line, const char *func, const char *expr)
17 {
18 printf("Assert failed in %s, %s:%d (%s)", func, file, line, expr);
19 abort();
20 }
21
22 static void dhcp_recv(void *arg, struct udp_pcb *pcb, struct pbuf *p, const ip_addr_t *addr, u16_t port);
23
24 void (*dhcp_test_static_dhcp_recv)(void *arg, struct udp_pcb *pcb, struct pbuf *p, const ip_addr_t *addr, u16_t port) = NULL;
25
dhcp_test_init_di(void)26 void dhcp_test_init_di(void)
27 {
28 dhcp_test_static_dhcp_recv = dhcp_recv;
29 }
30
dhcp_test_dhcp_recv(void * arg,struct udp_pcb * pcb,struct pbuf * p,const ip_addr_t * addr,u16_t port)31 void dhcp_test_dhcp_recv(void *arg, struct udp_pcb *pcb, struct pbuf *p, const ip_addr_t *addr, u16_t port)
32 {
33 dhcp_test_static_dhcp_recv(arg, pcb, p, addr, port);
34 }
35
36 #endif /* BUILDING_DEF */
37