kio Library: dhcp.h Source File (kio Library)

| # kio Library API Documentation
Overview | Class Hierarchy | Classes | Classes (annotated) | Members | Namespaces | 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
    00020 /* See RFC 2131 for details */
    00021
    00022 #ifndef __dhcp_h__
    00023 #define __dhcp_h__
    00024
    00025 #ifdef HAVE_STDINT_H
    00026 # include <stdint.h>
    00027 #endif
    00028
    00029 #define DHCP_OPT_LEN 312
    00030
    00031 struct dhcp_msg
    00032 {
    00033 #define DHCP_BOOTREQUEST 1
    00034 #define DHCP_BOOTREPLY   2
    00035     uint8_t op;           /* operation */
    00036     uint8_t htype;        /* hwaddr type */
    00037     uint8_t hlen;         /* hwaddr len */
    00038     uint8_t hops;
    00039     uint32_t xid;          /* transaction id */
    00040     uint16_t secs;        /* seconds since protocol start */
    00041 #define DHCP_BROADCAST 1
    00042     uint16_t flags;
    00043     uint32_t ciaddr;      /* client IP */
    00044     uint32_t yiaddr;      /* "your" IP */
    00045     uint32_t siaddr;      /* server IP */
    00046     uint32_t giaddr;      /* gateway IP */
    00047     uint8_t chaddr[16];   /* client hwaddr */
    00048     uint8_t sname[64];    /* server name */
    00049     uint8_t file[128];    /* bootstrap file */
    00050     uint8_t options[DHCP_OPT_LEN];
    00051 };
    00052
    00053 /* first four bytes in options */
    00054 #define DHCP_MAGIC1   0x63
    00055 #define DHCP_MAGIC2   0x82
    00056 #define DHCP_MAGIC3   0x53
    00057 #define DHCP_MAGIC4   0x63
    00058
    00059 /* DHCP message types */
    00060 #define DHCP_DISCOVER 1
    00061 #define DHCP_OFFER    2
    00062 #define DHCP_REQUEST  3
    00063 #define DHCP_DECLINE  4
    00064 #define DHCP_ACK      5
    00065 #define DHCP_NAK      6
    00066 #define DHCP_RELEASE  7
    00067 #define DHCP_INFORM   8
    00068
    00069 /* option types */
    00070 #define DHCP_OPT_MSGTYPE  0x35
    00071 #define DHCP_OPT_PARAMREQ 0x37
    00072 #define DHCP_OPT_WPAD     0xfc
    00073 #define DHCP_OPT_END      0xff
    00074
    00075 #endif
    00076
    00077 /* vim: ts=4 sw=4 noet
    00078  */

This file is part of the documentation for kio Library Version 3.4.1.
Documentation copyright © 1996-2004 the KDE developers.
Generated on Sat Jun 11 20:23:52 2005 by doxygen 1.4.1 written by Dimitri van Heesch, © 1997-2003