2018-05-15 09:49:10 -04:00
|
|
|
#include "no_warn_host.h"
|
2022-04-28 16:43:14 -04:00
|
|
|
#include <stdlib.h> // For abort()
|
|
|
|
#include <stdio.h> // For printf()
|
2018-05-15 09:49:10 -04:00
|
|
|
#include "lwip/opt.h"
|
|
|
|
#include "lwip/stats.h"
|
|
|
|
#include "lwip/mem.h"
|
|
|
|
#include "lwip/udp.h"
|
|
|
|
#include "lwip/ip_addr.h"
|
|
|
|
#include "lwip/netif.h"
|
|
|
|
#include "lwip/def.h"
|
|
|
|
#include "lwip/dhcp.h"
|
|
|
|
#include "lwip/autoip.h"
|
|
|
|
#include "lwip/dns.h"
|
|
|
|
#include "netif/etharp.h"
|
|
|
|
|
2018-09-14 08:30:03 -04:00
|
|
|
#ifndef BUILDING_DEF
|
|
|
|
|
2018-05-15 09:49:10 -04:00
|
|
|
void __assert_func(const char *file, int line, const char *func, const char *expr)
|
|
|
|
{
|
|
|
|
printf("Assert failed in %s, %s:%d (%s)", func, file, line, expr);
|
|
|
|
abort();
|
|
|
|
}
|
|
|
|
|
|
|
|
static void dhcp_recv(void *arg, struct udp_pcb *pcb, struct pbuf *p, const ip_addr_t *addr, u16_t port);
|
|
|
|
|
|
|
|
void (*dhcp_test_static_dhcp_recv)(void *arg, struct udp_pcb *pcb, struct pbuf *p, const ip_addr_t *addr, u16_t port) = NULL;
|
|
|
|
|
2019-07-16 05:33:30 -04:00
|
|
|
void dhcp_test_init_di(void)
|
2018-05-15 09:49:10 -04:00
|
|
|
{
|
|
|
|
dhcp_test_static_dhcp_recv = dhcp_recv;
|
|
|
|
}
|
|
|
|
|
|
|
|
void dhcp_test_dhcp_recv(void *arg, struct udp_pcb *pcb, struct pbuf *p, const ip_addr_t *addr, u16_t port)
|
|
|
|
{
|
|
|
|
dhcp_test_static_dhcp_recv(arg, pcb, p, addr, port);
|
|
|
|
}
|
2018-09-14 08:30:03 -04:00
|
|
|
|
2020-11-10 02:40:01 -05:00
|
|
|
#endif /* BUILDING_DEF */
|