dhcp-protocol.h revision 4f882b2a5007e51032459e29d15a86df6b5ea9f4
/*-*- Mode: C; c-basic-offset: 8; indent-tabs-mode: nil -*-*/
#pragma once
/***
This file is part of systemd.
Copyright (C) 2013 Intel Corporation. All rights reserved.
under the terms of the GNU Lesser General Public License as published by
the Free Software Foundation; either version 2.1 of the License, or
(at your option) any later version.
systemd is distributed in the hope that it will be useful, but
WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public License
along with systemd; If not, see <http://www.gnu.org/licenses/>.
***/
#include <stdint.h>
#include "macro.h"
#include "sparse-endian.h"
struct DHCPMessage {
} _packed_;
typedef struct DHCPMessage DHCPMessage;
struct DHCPPacket {
} _packed_;
typedef struct DHCPPacket DHCPPacket;
enum {
DHCP_PORT_SERVER = 67,
DHCP_PORT_CLIENT = 68,
};
enum DHCPState {
DHCP_STATE_INIT = 0,
DHCP_STATE_SELECTING = 1,
DHCP_STATE_REBOOTING = 3,
DHCP_STATE_BOUND = 5,
DHCP_STATE_RENEWING = 6,
DHCP_STATE_REBINDING = 7,
};
enum {
BOOTREQUEST = 1,
BOOTREPLY = 2,
};
enum {
DHCP_DISCOVER = 1,
DHCP_OFFER = 2,
DHCP_REQUEST = 3,
DHCP_DECLINE = 4,
DHCP_ACK = 5,
DHCP_NAK = 6,
DHCP_RELEASE = 7,
};
enum {
DHCP_OVERLOAD_FILE = 1,
DHCP_OVERLOAD_SNAME = 2,
};
enum {
DHCP_OPTION_PAD = 0,
DHCP_OPTION_ROUTER = 3,
DHCP_OPTION_HOST_NAME = 12,
DHCP_OPTION_DOMAIN_NAME = 15,
DHCP_OPTION_NTP_SERVER = 42,
DHCP_OPTION_OVERLOAD = 52,
DHCP_OPTION_MESSAGE_TYPE = 53,
DHCP_OPTION_END = 255,
};