migration: unify error handling for process_incoming_migration_co
[qemu/ar7.git] / slirp / bootp.h
blob4043489835de95b9a0bb827986cc236ecf84e6bb
1 /* bootp/dhcp defines */
3 #ifndef SLIRP_BOOTP_H
4 #define SLIRP_BOOTP_H
6 #define BOOTP_SERVER 67
7 #define BOOTP_CLIENT 68
9 #define BOOTP_REQUEST 1
10 #define BOOTP_REPLY 2
12 #define RFC1533_COOKIE 99, 130, 83, 99
13 #define RFC1533_PAD 0
14 #define RFC1533_NETMASK 1
15 #define RFC1533_TIMEOFFSET 2
16 #define RFC1533_GATEWAY 3
17 #define RFC1533_TIMESERVER 4
18 #define RFC1533_IEN116NS 5
19 #define RFC1533_DNS 6
20 #define RFC1533_LOGSERVER 7
21 #define RFC1533_COOKIESERVER 8
22 #define RFC1533_LPRSERVER 9
23 #define RFC1533_IMPRESSSERVER 10
24 #define RFC1533_RESOURCESERVER 11
25 #define RFC1533_HOSTNAME 12
26 #define RFC1533_BOOTFILESIZE 13
27 #define RFC1533_MERITDUMPFILE 14
28 #define RFC1533_DOMAINNAME 15
29 #define RFC1533_SWAPSERVER 16
30 #define RFC1533_ROOTPATH 17
31 #define RFC1533_EXTENSIONPATH 18
32 #define RFC1533_IPFORWARDING 19
33 #define RFC1533_IPSOURCEROUTING 20
34 #define RFC1533_IPPOLICYFILTER 21
35 #define RFC1533_IPMAXREASSEMBLY 22
36 #define RFC1533_IPTTL 23
37 #define RFC1533_IPMTU 24
38 #define RFC1533_IPMTUPLATEAU 25
39 #define RFC1533_INTMTU 26
40 #define RFC1533_INTLOCALSUBNETS 27
41 #define RFC1533_INTBROADCAST 28
42 #define RFC1533_INTICMPDISCOVER 29
43 #define RFC1533_INTICMPRESPOND 30
44 #define RFC1533_INTROUTEDISCOVER 31
45 #define RFC1533_INTROUTESOLICIT 32
46 #define RFC1533_INTSTATICROUTES 33
47 #define RFC1533_LLTRAILERENCAP 34
48 #define RFC1533_LLARPCACHETMO 35
49 #define RFC1533_LLETHERNETENCAP 36
50 #define RFC1533_TCPTTL 37
51 #define RFC1533_TCPKEEPALIVETMO 38
52 #define RFC1533_TCPKEEPALIVEGB 39
53 #define RFC1533_NISDOMAIN 40
54 #define RFC1533_NISSERVER 41
55 #define RFC1533_NTPSERVER 42
56 #define RFC1533_VENDOR 43
57 #define RFC1533_NBNS 44
58 #define RFC1533_NBDD 45
59 #define RFC1533_NBNT 46
60 #define RFC1533_NBSCOPE 47
61 #define RFC1533_XFS 48
62 #define RFC1533_XDM 49
64 #define RFC2132_REQ_ADDR 50
65 #define RFC2132_LEASE_TIME 51
66 #define RFC2132_MSG_TYPE 53
67 #define RFC2132_SRV_ID 54
68 #define RFC2132_PARAM_LIST 55
69 #define RFC2132_MESSAGE 56
70 #define RFC2132_MAX_SIZE 57
71 #define RFC2132_RENEWAL_TIME 58
72 #define RFC2132_REBIND_TIME 59
73 #define RFC2132_TFTP_SERVER_NAME 66
75 #define DHCPDISCOVER 1
76 #define DHCPOFFER 2
77 #define DHCPREQUEST 3
78 #define DHCPACK 5
79 #define DHCPNAK 6
81 #define RFC1533_VENDOR_MAJOR 0
82 #define RFC1533_VENDOR_MINOR 0
84 #define RFC1533_VENDOR_MAGIC 128
85 #define RFC1533_VENDOR_ADDPARM 129
86 #define RFC1533_VENDOR_ETHDEV 130
87 #define RFC1533_VENDOR_HOWTO 132
88 #define RFC1533_VENDOR_MNUOPTS 160
89 #define RFC1533_VENDOR_SELECTION 176
90 #define RFC1533_VENDOR_MOTD 184
91 #define RFC1533_VENDOR_NUMOFMOTD 8
92 #define RFC1533_VENDOR_IMG 192
93 #define RFC1533_VENDOR_NUMOFIMG 16
95 #define RFC1533_END 255
96 #define BOOTP_VENDOR_LEN 64
97 #define DHCP_OPT_LEN 312
99 struct bootp_t {
100 struct ip ip;
101 struct udphdr udp;
102 uint8_t bp_op;
103 uint8_t bp_htype;
104 uint8_t bp_hlen;
105 uint8_t bp_hops;
106 uint32_t bp_xid;
107 uint16_t bp_secs;
108 uint16_t unused;
109 struct in_addr bp_ciaddr;
110 struct in_addr bp_yiaddr;
111 struct in_addr bp_siaddr;
112 struct in_addr bp_giaddr;
113 uint8_t bp_hwaddr[16];
114 uint8_t bp_sname[64];
115 uint8_t bp_file[128];
116 uint8_t bp_vend[DHCP_OPT_LEN];
119 typedef struct {
120 uint16_t allocated;
121 uint8_t macaddr[6];
122 } BOOTPClient;
124 #define NB_BOOTP_CLIENTS 16
126 void bootp_input(struct mbuf *m);
128 #endif