summaryrefslogtreecommitdiff
path: root/src/network/networkd-dhcp-server-static-lease.h
blob: 9b8e78b90d817cc27482e404d91760fa220c92a5 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
/* SPDX-License-Identifier: LGPL-2.1-or-later */

#pragma once

#include <inttypes.h>

#include "conf-parser.h"
#include "in-addr-util.h"

typedef struct Network Network;
typedef struct ConfigSection ConfigSection;

typedef struct DHCPStaticLease {
        Network *network;
        ConfigSection *section;

        struct in_addr address;
        uint8_t *client_id;
        size_t client_id_size;
} DHCPStaticLease;

DHCPStaticLease *dhcp_static_lease_free(DHCPStaticLease *lease);
void network_drop_invalid_static_leases(Network *network);

CONFIG_PARSER_PROTOTYPE(config_parse_dhcp_static_lease_address);
CONFIG_PARSER_PROTOTYPE(config_parse_dhcp_static_lease_hwaddr);