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