]> git.proxmox.com Git - qemu.git/blobdiff - slirp/bootp.h
qdev-properties-system.c: Allow vlan or netdev for -device, not both
[qemu.git] / slirp / bootp.h
index d3b2baa0419bd13a88b5e41e9ccf1835ade0bd7d..ec3b68704c30ed1a7a8bde9ff343a7d9cb7dbb06 100644 (file)
@@ -1,4 +1,6 @@
 /* bootp/dhcp defines */
+#ifndef SLIRP_BOOTP_H
+#define SLIRP_BOOTP_H 1
 
 #define BOOTP_SERVER   67
 #define BOOTP_CLIENT   68
@@ -63,6 +65,7 @@
 #define RFC2132_MSG_TYPE       53
 #define RFC2132_SRV_ID         54
 #define RFC2132_PARAM_LIST     55
+#define RFC2132_MESSAGE                56
 #define RFC2132_MAX_SIZE       57
 #define RFC2132_RENEWAL_TIME    58
 #define RFC2132_REBIND_TIME     59
@@ -71,6 +74,7 @@
 #define DHCPOFFER              2
 #define DHCPREQUEST            3
 #define DHCPACK                        5
+#define DHCPNAK                        6
 
 #define RFC1533_VENDOR_MAJOR   0
 #define RFC1533_VENDOR_MINOR   0
@@ -97,9 +101,9 @@ struct bootp_t {
     uint8_t bp_htype;
     uint8_t bp_hlen;
     uint8_t bp_hops;
-    unsigned long bp_xid;
-    unsigned short bp_secs;
-    unsigned short unused;
+    uint32_t bp_xid;
+    uint16_t bp_secs;
+    uint16_t unused;
     struct in_addr bp_ciaddr;
     struct in_addr bp_yiaddr;
     struct in_addr bp_siaddr;
@@ -110,4 +114,13 @@ struct bootp_t {
     uint8_t bp_vend[DHCP_OPT_LEN];
 };
 
+typedef struct {
+    uint16_t allocated;
+    uint8_t macaddr[6];
+} BOOTPClient;
+
+#define NB_BOOTP_CLIENTS 16
+
 void bootp_input(struct mbuf *m);
+
+#endif