• Skip to content
  • Skip to link menu
KDE API Reference
  • KDE API Reference
  • kdelibs API Reference
  • KDE Home
  • Contact Us
 

KIO

  • sources
  • kde-4.12
  • kdelibs
  • kio
  • misc
  • kpac
dhcp.h
Go to the documentation of this file.
1 /* This file is part of the KDE Libraries
2  Copyright (c) 2001 Malte Starostik <malte@kde.org>
3 
4  This library is free software; you can redistribute it and/or
5  modify it under the terms of the GNU Library General Public
6  License version 2 as published by the Free Software Foundation.
7 
8  This library is distributed in the hope that it will be useful,
9  but WITHOUT ANY WARRANTY; without even the implied warranty of
10  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
11  Library General Public License for more details.
12 
13  You should have received a copy of the GNU Library General Public License
14  along with this library; see the file COPYING.LIB. If not, write to
15  the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
16  Boston, MA 02110-1301, USA.
17  */
18 
19 
20 /* See RFC 2131 for details */
21 
22 #ifndef __dhcp_h__
23 #define __dhcp_h__
24 
25 #ifdef HAVE_STDINT_H
26 # include <stdint.h>
27 #endif
28 
29 #define DHCP_OPT_LEN 312
30 
31 struct dhcp_msg
32 {
33 #define DHCP_BOOTREQUEST 1
34 #define DHCP_BOOTREPLY 2
35  uint8_t op; /* operation */
36  uint8_t htype; /* hwaddr type */
37  uint8_t hlen; /* hwaddr len */
38  uint8_t hops;
39  uint32_t xid; /* transaction id */
40  uint16_t secs; /* seconds since protocol start */
41 #define DHCP_BROADCAST 1
42  uint16_t flags;
43  uint32_t ciaddr; /* client IP */
44  uint32_t yiaddr; /* "your" IP */
45  uint32_t siaddr; /* server IP */
46  uint32_t giaddr; /* gateway IP */
47  uint8_t chaddr[16]; /* client hwaddr */
48  uint8_t sname[64]; /* server name */
49  uint8_t file[128]; /* bootstrap file */
50  uint8_t options[DHCP_OPT_LEN];
51 };
52 
53 /* first four bytes in options */
54 #define DHCP_MAGIC1 0x63
55 #define DHCP_MAGIC2 0x82
56 #define DHCP_MAGIC3 0x53
57 #define DHCP_MAGIC4 0x63
58 
59 /* DHCP message types */
60 #define DHCP_DISCOVER 1
61 #define DHCP_OFFER 2
62 #define DHCP_REQUEST 3
63 #define DHCP_DECLINE 4
64 #define DHCP_ACK 5
65 #define DHCP_NAK 6
66 #define DHCP_RELEASE 7
67 #define DHCP_INFORM 8
68 
69 /* option types */
70 #define DHCP_OPT_MSGTYPE 0x35
71 #define DHCP_OPT_PARAMREQ 0x37
72 #define DHCP_OPT_WPAD 0xfc
73 #define DHCP_OPT_END 0xff
74 
75 #endif
76 
77 /* vim: ts=4 sw=4 noet
78  */
dhcp_msg::op
uint8_t op
Definition: dhcp.h:35
dhcp_msg::yiaddr
uint32_t yiaddr
Definition: dhcp.h:44
dhcp_msg::chaddr
uint8_t chaddr[16]
Definition: dhcp.h:47
dhcp_msg::flags
uint16_t flags
Definition: dhcp.h:42
dhcp_msg::sname
uint8_t sname[64]
Definition: dhcp.h:48
DHCP_OPT_LEN
#define DHCP_OPT_LEN
Definition: dhcp.h:29
dhcp_msg::htype
uint8_t htype
Definition: dhcp.h:36
dhcp_msg::hlen
uint8_t hlen
Definition: dhcp.h:37
dhcp_msg::xid
uint32_t xid
Definition: dhcp.h:39
dhcp_msg::giaddr
uint32_t giaddr
Definition: dhcp.h:46
dhcp_msg::options
uint8_t options[DHCP_OPT_LEN]
Definition: dhcp.h:50
dhcp_msg::ciaddr
uint32_t ciaddr
Definition: dhcp.h:43
dhcp_msg::secs
uint16_t secs
Definition: dhcp.h:40
dhcp_msg::file
uint8_t file[128]
Definition: dhcp.h:49
dhcp_msg::hops
uint8_t hops
Definition: dhcp.h:38
dhcp_msg
Definition: dhcp.h:31
dhcp_msg::siaddr
uint32_t siaddr
Definition: dhcp.h:45
This file is part of the KDE documentation.
Documentation copyright © 1996-2014 The KDE developers.
Generated on Tue Oct 14 2014 22:50:01 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.

KIO

Skip menu "KIO"
  • Main Page
  • Namespace List
  • Namespace Members
  • Alphabetical List
  • Class List
  • Class Hierarchy
  • Class Members
  • File List
  • File Members
  • Related Pages

kdelibs API Reference

Skip menu "kdelibs API Reference"
  • DNSSD
  • Interfaces
  •   KHexEdit
  •   KMediaPlayer
  •   KSpeech
  •   KTextEditor
  • kconf_update
  • KDE3Support
  •   KUnitTest
  • KDECore
  • KDED
  • KDEsu
  • KDEUI
  • KDEWebKit
  • KDocTools
  • KFile
  • KHTML
  • KImgIO
  • KInit
  • kio
  • KIOSlave
  • KJS
  •   KJS-API
  • kjsembed
  •   WTF
  • KNewStuff
  • KParts
  • KPty
  • Kross
  • KUnitConversion
  • KUtils
  • Nepomuk
  • Nepomuk-Core
  • Nepomuk
  • Plasma
  • Solid
  • Sonnet
  • ThreadWeaver

Search



Report problems with this website to our bug tracking system.
Contact the specific authors with questions and comments about the page contents.

KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal