# kio Library API Documentation

Overview | Class Hierarchy | Classes | Classes (annotated) | Members | Source Files

# dhcp.h

    00001 /* This file is part of the KDE Libraries
    00002    Copyright (c) 2001 Malte Starostik <malte@kde.org>
    00003
    00004    This library is free software; you can redistribute it and/or
    00005    modify it under the terms of the GNU Library General Public
    00006    License version 2 as published by the Free Software Foundation.
    00007
    00008    This library is distributed in the hope that it will be useful,
    00009    but WITHOUT ANY WARRANTY; without even the implied warranty of
    00010    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
    00011    Library General Public License for more details.
    00012
    00013    You should have received a copy of the GNU Library General Public License
    00014    along with this library; see the file COPYING.LIB.  If not, write to
    00015    the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
    00016    Boston, MA 02111-1307, USA.
    00017  */
    00018
    00019 /* $Id: dhcp.h,v 1.3 2002/05/26 01:02:49 reed Exp $ */
    00020
    00021 /* See RFC 2131 for details */
    00022
    00023 #ifndef __dhcp_h__
    00024 #define __dhcp_h__
    00025
    00026 #ifdef HAVE_STDINT_H
    00027 # include <stdint.h>
    00028 #endif
    00029
    00030 #define DHCP_OPT_LEN 312
    00031
    00032 struct dhcp_msg
    00033 {
    00034 #define DHCP_BOOTREQUEST 1
    00035 #define DHCP_BOOTREPLY   2
    00036         uint8_t op;           /* operation */
    00037         uint8_t htype;        /* hwaddr type */
    00038         uint8_t hlen;         /* hwaddr len */
    00039         uint8_t hops;
    00040         uint32_t xid;          /* transaction id */
    00041         uint16_t secs;        /* seconds since protocol start */
    00042 #define DHCP_BROADCAST 1
    00043         uint16_t flags;
    00044         uint32_t ciaddr;      /* client IP */
    00045         uint32_t yiaddr;      /* "your" IP */
    00046         uint32_t siaddr;      /* server IP */
    00047         uint32_t giaddr;      /* gateway IP */
    00048         uint8_t chaddr[16];   /* client hwaddr */
    00049         uint8_t sname[64];    /* server name */
    00050         uint8_t file[128];    /* bootstrap file */
    00051         uint8_t options[DHCP_OPT_LEN];
    00052 };
    00053
    00054 /* first four bytes in options */
    00055 #define DHCP_MAGIC1   0x63
    00056 #define DHCP_MAGIC2   0x82
    00057 #define DHCP_MAGIC3   0x53
    00058 #define DHCP_MAGIC4   0x63
    00059
    00060 /* DHCP message types */
    00061 #define DHCP_DISCOVER 1
    00062 #define DHCP_OFFER    2
    00063 #define DHCP_REQUEST  3
    00064 #define DHCP_DECLINE  4
    00065 #define DHCP_ACK      5
    00066 #define DHCP_NAK      6
    00067 #define DHCP_RELEASE  7
    00068 #define DHCP_INFORM   8
    00069
    00070 /* option types */
    00071 #define DHCP_OPT_MSGTYPE  0x35
    00072 #define DHCP_OPT_PARAMREQ 0x37
    00073 #define DHCP_OPT_WPAD     0xfc
    00074 #define DHCP_OPT_END      0xff
    00075
    00076 #endif
    00077
    00078 /* vim: ts=4 sw=4 noet
    00079  */

This file is part of the documentation for kdelibs Version 3.1.5.
Documentation copyright © 1996-2002 the KDE developers.
Generated on Wed Jan 28 13:12:44 2004 by doxygen 1.3.4 written by Dimitri van Heesch, © 1997-2001