1 /* SPDX-License-Identifier: LGPL-2.1-or-later */ 2 #pragma once 3 4 #include "conf-parser.h" 5 6 typedef struct Link Link; 7 typedef struct Network Network; 8 9 typedef enum DHCPClientIdentifier { 10 DHCP_CLIENT_ID_MAC, 11 DHCP_CLIENT_ID_DUID, 12 /* The following option may not be good for RFC regarding DHCP (3315 and 4361). 13 * But some setups require this. E.g., Sky Broadband, the second largest provider in the UK 14 * requires the client id to be set to a custom string, reported at 15 * https://github.com/systemd/systemd/issues/7828 */ 16 DHCP_CLIENT_ID_DUID_ONLY, 17 _DHCP_CLIENT_ID_MAX, 18 _DHCP_CLIENT_ID_INVALID = -EINVAL, 19 } DHCPClientIdentifier; 20 21 void network_adjust_dhcp4(Network *network); 22 int dhcp4_update_mac(Link *link); 23 int dhcp4_start(Link *link); 24 int dhcp4_lease_lost(Link *link); 25 int dhcp4_check_ready(Link *link); 26 27 int link_request_dhcp4_client(Link *link); 28 29 CONFIG_PARSER_PROTOTYPE(config_parse_dhcp_client_identifier); 30 CONFIG_PARSER_PROTOTYPE(config_parse_dhcp_max_attempts); 31 CONFIG_PARSER_PROTOTYPE(config_parse_dhcp_ip_service_type); 32 CONFIG_PARSER_PROTOTYPE(config_parse_dhcp_mud_url); 33 CONFIG_PARSER_PROTOTYPE(config_parse_dhcp_fallback_lease_lifetime); 34 CONFIG_PARSER_PROTOTYPE(config_parse_dhcp_label); 35