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
17
extern
"C"
{
18
#endif
19
20
typedef
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;
27
}
DhcpServerConfig
;
28
29
bool
dhserv_init(
const
DhcpServerConfig
* config);
30
31
void
dhserv_deinit(
void
);
32
33
bool
dhserv_has_lease(ip4_addr_t addr);
34
35
#ifdef __cplusplus
36
}
37
#endif
DhcpServerConfig
Definition
dhserver.h:20
lib
network
dhserver
dhserver.h
Generated by
1.12.0