dhcp.h
00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
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;
00037 uint8_t htype;
00038 uint8_t hlen;
00039 uint8_t hops;
00040 uint32_t xid;
00041 uint16_t secs;
00042 #define DHCP_BROADCAST 1
00043 uint16_t flags;
00044 uint32_t ciaddr;
00045 uint32_t yiaddr;
00046 uint32_t siaddr;
00047 uint32_t giaddr;
00048 uint8_t chaddr[16];
00049 uint8_t sname[64];
00050 uint8_t file[128];
00051 uint8_t options[DHCP_OPT_LEN];
00052 };
00053
00054
00055 #define DHCP_MAGIC1 0x63
00056 #define DHCP_MAGIC2 0x82
00057 #define DHCP_MAGIC3 0x53
00058 #define DHCP_MAGIC4 0x63
00059
00060
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
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
00079
This file is part of the documentation for kdelibs Version 3.1.5.