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
27
| | /* SPDX-License-Identifier: GPL-2.0-or-later
* Copyright (c) 2021 Red Hat GmbH
* Author: Stefano Brivio <sbrivio@redhat.com>
*/
#ifndef DHCP_H
#define DHCP_H
/**
* enum dhcp_opt_type - DHCP option value types per RFC 2132
*/
enum dhcp_opt_type {
DHCP_OPT_NONE,
DHCP_OPT_STR,
DHCP_OPT_IPV4,
DHCP_OPT_IPV4_LIST,
DHCP_OPT_UINT8,
DHCP_OPT_UINT16,
DHCP_OPT_UINT32,
DHCP_OPT_ROUTES,
};
int dhcp(const struct ctx *c, struct iov_tail *data);
void dhcp_init(void);
int dhcp_opt_parse(uint8_t code, const char *str, uint8_t *buf, size_t buf_len);
#endif /* DHCP_H */
|