dhcp.h revision 677833bc953b6cb418c701facbdcf4aa18d6c44e
2N/A * TAP-Win32 -- A kernel driver to provide virtual tap device functionality 2N/A * on Windows. Originally derived from the CIPE-Win32 2N/A * project by Damion K. Wilson, with extensive modifications by 2N/A * All source code which derives from the CIPE-Win32 project is 2N/A * Copyright (C) Damion K. Wilson, 2003, and is released under the 2N/A * GPL version 2 (see below). 2N/A * All other source code is Copyright (C) 2002-2005 OpenVPN Solutions LLC, 2N/A * and is released under the GPL version 2 (see below). 2N/A * This program is free software; you can redistribute it and/or modify 2N/A * it under the terms of the GNU General Public License version 2 2N/A * as published by the Free Software Foundation. 2N/A * This program is distributed in the hope that it will be useful, 2N/A * but WITHOUT ANY WARRANTY; without even the implied warranty of 2N/A * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 2N/A * GNU General Public License for more details. 2N/A * You should have received a copy of the GNU General Public License 2N/A * along with this program (see the file COPYING included with this 2N/A * distribution); if not, write to the Free Software Foundation, Inc., 2N/A * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA //=================================================== // How many bad DHCPREQUESTs do we receive before we // A bad DHCPREQUEST is defined to be one where the // requestor doesn't know its IP address. //=================================================== //============================================== // Maximum number of DHCP options bytes supplied //============================================== //=================================== // UDP port numbers of DHCP messages. //=================================== //=========================== // The DHCP message structure //=========================== UCHAR htype;
/* hardware address type (e.g. '1' = 10Mb Ethernet) */ UCHAR hlen;
/* hardware address length (e.g. '6' for 10Mb Ethernet) */ UCHAR hops;
/* client sets to 0, may be used by relay agents */ ULONG xid;
/* transaction ID, chosen by client */ USHORT secs;
/* seconds since request process began, set by client */ ULONG ciaddr;
/* client IP address, client sets if known */ ULONG yiaddr;
/* 'your' IP address -- server's response to client */ ULONG magic;
/* must be 0x63825363 (network order) */ //======================================== // structs to hold individual DHCP options //======================================== #
define DHCP_PARM_REQ 55 /* parameter request list: c1 (u8), ... */#
define DHCP_IP 50 /* requested IP addr (u32) */