1 /*-*- Mode: C; c-basic-offset: 8; indent-tabs-mode: nil -*-*/
6 This file is part of systemd.
8 Copyright (C) 2013 Intel Corporation. All rights reserved.
10 systemd is free software; you can redistribute it and/or modify it
11 under the terms of the GNU Lesser General Public License as published by
12 the Free Software Foundation; either version 2.1 of the License, or
13 (at your option) any later version.
15 systemd is distributed in the hope that it will be useful, but
16 WITHOUT ANY WARRANTY; without even the implied warranty of
17 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
18 Lesser General Public License for more details.
20 You should have received a copy of the GNU Lesser General Public License
21 along with systemd; If not, see <http://www.gnu.org/licenses/>.
24 #include <netinet/udp.h>
25 #include <netinet/ip.h>
29 #include "sparse-endian.h"
48 typedef struct DHCPMessage DHCPMessage;
56 typedef struct DHCPPacket DHCPPacket;
60 DHCP_STATE_SELECTING = 1,
61 DHCP_STATE_INIT_REBOOT = 2,
62 DHCP_STATE_REBOOTING = 3,
63 DHCP_STATE_REQUESTING = 4,
65 DHCP_STATE_RENEWING = 6,
66 DHCP_STATE_REBINDING = 7,
69 typedef enum DHCPState DHCPState;
87 DHCP_OVERLOAD_FILE = 1,
88 DHCP_OVERLOAD_SNAME = 2,
93 DHCP_OPTION_SUBNET_MASK = 1,
94 DHCP_OPTION_ROUTER = 3,
95 DHCP_OPTION_DOMAIN_NAME_SERVER = 6,
96 DHCP_OPTION_HOST_NAME = 12,
97 DHCP_OPTION_DOMAIN_NAME = 15,
98 DHCP_OPTION_NTP_SERVER = 42,
99 DHCP_OPTION_REQUESTED_IP_ADDRESS = 50,
100 DHCP_OPTION_OVERLOAD = 52,
101 DHCP_OPTION_MESSAGE_TYPE = 53,
102 DHCP_OPTION_PARAMETER_REQUEST_LIST = 55,
103 DHCP_OPTION_END = 255,