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