/* SPDX-License-Identifier: GPL-2.0-or-later * Copyright (c) 2021 Red Hat GmbH * Author: Stefano Brivio */ #ifndef DHCP_H #define DHCP_H /** * enum dhcp_opt_type - DHCP option value types per RFC 2132 * @DHCP_OPT_NONE: Unsupported or unknown option * @DHCP_OPT_STR: Variable-length string * @DHCP_OPT_IPV4: Single IPv4 address * @DHCP_OPT_IPV4_LIST:Multiple IPv4 addresses, comma-separated * @DHCP_OPT_INTEGER: Unsigned integer (1, 2, or 4 bytes) */ enum dhcp_opt_type { DHCP_OPT_NONE, DHCP_OPT_STR, DHCP_OPT_IPV4, DHCP_OPT_IPV4_LIST, DHCP_OPT_INTEGER, }; 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 */