BSB Developer Docs
Loading...
Searching...
No Matches
dhserver.h
1/*
2 * Copyright (C) 2015 by Sergey Fetisov <[email protected]>
3 *
4 * SPDX-License-Identifier: MIT
5 */
6
7/*
8 * version: 1.0 demo (7.02.2015)
9 * brief: tiny dhcp ipv4 server using lwip (pcb)
10 * ref: https://lists.gnu.org/archive/html/lwip-users/2012-12/msg00016.html
11 */
12#pragma once
13
14#include <lwip/netif.h>
15
16#ifdef __cplusplus
17extern "C" {
18#endif
19
20typedef struct {
21 struct netif* netif;
22 ip4_addr_t router;
23 uint16_t port;
24 ip4_addr_t dns;
25 const char* domain;
26 uint8_t max_lease_count;
28
29bool dhserv_init(const DhcpServerConfig* config);
30
31void dhserv_deinit(void);
32
33bool dhserv_has_lease(ip4_addr_t addr);
34
35#ifdef __cplusplus
36}
37#endif
Definition dhserver.h:20