aboutsummaryrefslogtreecommitdiffstats
path: root/com32/include/dhcp.h
diff options
context:
space:
mode:
authorErwan Velu <erwanaliasr1@gmail.com>2012-05-29 21:45:47 +0200
committerErwan Velu <erwanaliasr1@gmail.com>2012-05-29 21:45:47 +0200
commit39b84929805d8ea62a2876d1741c32a62fa29229 (patch)
treec308b28880719e13c505bef0731dfe6ea86eb62e /com32/include/dhcp.h
parent871650dd981da850bc05eae6de7471b3069926e9 (diff)
parent2c2c75abc360c4803902f3effa84a28746e34fde (diff)
downloadsyslinux-39b84929805d8ea62a2876d1741c32a62fa29229.tar.gz
syslinux-39b84929805d8ea62a2876d1741c32a62fa29229.tar.xz
syslinux-39b84929805d8ea62a2876d1741c32a62fa29229.zip
Merge branch 'master' of git://git.zytor.com/syslinux/syslinux
Diffstat (limited to 'com32/include/dhcp.h')
-rw-r--r--com32/include/dhcp.h40
1 files changed, 40 insertions, 0 deletions
diff --git a/com32/include/dhcp.h b/com32/include/dhcp.h
new file mode 100644
index 00000000..afef9242
--- /dev/null
+++ b/com32/include/dhcp.h
@@ -0,0 +1,40 @@
+#ifndef DHCP_H
+#define DHCP_H
+
+#include <inttypes.h>
+
+struct dhcp_option {
+ void *data;
+ int len;
+};
+
+struct dhcp_packet {
+ uint8_t op; /* 0 */
+ uint8_t htype; /* 1 */
+ uint8_t hlen; /* 2 */
+ uint8_t hops; /* 3 */
+ uint32_t xid; /* 4 */
+ uint16_t secs; /* 8 */
+ uint16_t flags; /* 10 */
+ uint32_t ciaddr; /* 12 */
+ uint32_t yiaddr; /* 16 */
+ uint32_t siaddr; /* 20 */
+ uint32_t giaddr; /* 24 */
+ uint8_t chaddr[16]; /* 28 */
+ uint8_t sname[64]; /* 44 */
+ uint8_t file[128]; /* 108 */
+ uint32_t magic; /* 236 */
+ uint8_t options[4]; /* 240 */
+};
+
+#define DHCP_VENDOR_MAGIC 0x63825363
+
+int dhcp_pack_packet(void *packet, size_t *len,
+ const struct dhcp_option opt[256]);
+
+int dhcp_unpack_packet(const void *packet, size_t len,
+ struct dhcp_option opt[256]);
+
+#endif /* DHCP_H */
+
+