diff options
author | Denys Vlasenko <vda.linux@googlemail.com> | 2019-05-23 15:24:03 +0200 |
---|---|---|
committer | Denys Vlasenko <vda.linux@googlemail.com> | 2019-05-23 15:24:03 +0200 |
commit | 1115e40c887fc4d9ddddbe2b0d71c091065ee997 (patch) | |
tree | e0793d3a5f7b7bc04eb313b93cc38817b1429458 /networking | |
parent | 58d998d2f927c20f2ba728611df587ac8ec8bda9 (diff) | |
download | busybox-w32-1115e40c887fc4d9ddddbe2b0d71c091065ee997.tar.gz busybox-w32-1115e40c887fc4d9ddddbe2b0d71c091065ee997.tar.bz2 busybox-w32-1115e40c887fc4d9ddddbe2b0d71c091065ee997.zip |
dhcp: tweak comments, no code changes
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
Diffstat (limited to 'networking')
-rw-r--r-- | networking/udhcp/common.h | 52 |
1 files changed, 22 insertions, 30 deletions
diff --git a/networking/udhcp/common.h b/networking/udhcp/common.h index a897837f9..bba3d6037 100644 --- a/networking/udhcp/common.h +++ b/networking/udhcp/common.h | |||
@@ -40,7 +40,7 @@ struct dhcp_packet { | |||
40 | uint32_t yiaddr; /* 'your' (client) IP address */ | 40 | uint32_t yiaddr; /* 'your' (client) IP address */ |
41 | /* IP address of next server to use in bootstrap, returned in DHCPOFFER, DHCPACK by server */ | 41 | /* IP address of next server to use in bootstrap, returned in DHCPOFFER, DHCPACK by server */ |
42 | uint32_t siaddr_nip; | 42 | uint32_t siaddr_nip; |
43 | uint32_t gateway_nip; /* relay agent IP address */ | 43 | uint32_t gateway_nip; /* aka 'giaddr': relay agent IP address */ |
44 | uint8_t chaddr[16]; /* link-layer client hardware address (MAC) */ | 44 | uint8_t chaddr[16]; /* link-layer client hardware address (MAC) */ |
45 | uint8_t sname[64]; /* server host name (ASCIZ) */ | 45 | uint8_t sname[64]; /* server host name (ASCIZ) */ |
46 | uint8_t file[128]; /* boot file name (ASCIZ) */ | 46 | uint8_t file[128]; /* boot file name (ASCIZ) */ |
@@ -222,10 +222,9 @@ uint8_t *dname_enc(const uint8_t *cstr, int clen, const char *src, int *retlen) | |||
222 | #endif | 222 | #endif |
223 | struct option_set *udhcp_find_option(struct option_set *opt_list, uint8_t code) FAST_FUNC; | 223 | struct option_set *udhcp_find_option(struct option_set *opt_list, uint8_t code) FAST_FUNC; |
224 | 224 | ||
225 | |||
226 | // RFC 2131 Table 5: Fields and options used by DHCP clients | 225 | // RFC 2131 Table 5: Fields and options used by DHCP clients |
227 | // | 226 | // |
228 | // Fields 'hops', 'yiaddr', 'siaddr', 'giaddr' are always zero | 227 | // Fields 'hops', 'yiaddr', 'siaddr', 'giaddr' are always zero, 'chaddr' is always client's MAC |
229 | // | 228 | // |
230 | // Field DHCPDISCOVER DHCPINFORM DHCPREQUEST DHCPDECLINE DHCPRELEASE | 229 | // Field DHCPDISCOVER DHCPINFORM DHCPREQUEST DHCPDECLINE DHCPRELEASE |
231 | // ----- ------------ ------------ ----------- ----------- ----------- | 230 | // ----- ------------ ------------ ----------- ----------- ----------- |
@@ -234,40 +233,33 @@ struct option_set *udhcp_find_option(struct option_set *opt_list, uint8_t code) | |||
234 | // 'secs' 0 or seconds since 0 or seconds since 0 or seconds since 0 0 | 233 | // 'secs' 0 or seconds since 0 or seconds since 0 or seconds since 0 0 |
235 | // DHCP process started DHCP process started DHCP process started | 234 | // DHCP process started DHCP process started DHCP process started |
236 | // 'flags' Set 'BROADCAST' Set 'BROADCAST' Set 'BROADCAST' 0 0 | 235 | // 'flags' Set 'BROADCAST' Set 'BROADCAST' Set 'BROADCAST' 0 0 |
237 | // flag if client flag if client flag if client | 236 | // flag if client needs flag if client needs flag if client needs |
238 | // requires broadcast requires broadcast requires broadcast | 237 | // broadcast reply broadcast reply broadcast reply |
239 | // reply reply reply | ||
240 | // 'ciaddr' 0 client's IP 0 or client's IP 0 client's IP | 238 | // 'ciaddr' 0 client's IP 0 or client's IP 0 client's IP |
241 | // (BOUND/RENEW/REBIND) | 239 | // (BOUND/RENEW/REBIND) |
242 | // 'chaddr' client's MAC client's MAC client's MAC client's MAC client's MAC | ||
243 | // 'sname' options or sname options or sname options or sname (unused) (unused) | 240 | // 'sname' options or sname options or sname options or sname (unused) (unused) |
244 | // 'file' options or file options or file options or file (unused) (unused) | 241 | // 'file' options or file options or file options or file (unused) (unused) |
245 | // 'options' options options options message type opt message type opt | 242 | // 'options' options options options message type opt message type opt |
246 | // | 243 | // |
247 | // Option DHCPDISCOVER DHCPINFORM DHCPREQUEST DHCPDECLINE DHCPRELEASE | 244 | // Option DHCPDISCOVER DHCPINFORM DHCPREQUEST DHCPDECLINE DHCPRELEASE |
248 | // ------ ------------ ---------- ----------- ----------- ----------- | 245 | // ------ ------------ ---------- ----------- ----------- ----------- |
249 | // Requested IP address MAY MUST NOT MUST (in MUST MUST NOT | 246 | // Requested IP address MAY MUST NOT MUST (in SELECTING MUST MUST NOT |
250 | // SELECTING or | 247 | // or INIT-REBOOT) |
251 | // INIT-REBOOT) | 248 | // MUST NOT (in BOUND |
252 | // MUST NOT (in | 249 | // or RENEWING) |
253 | // BOUND or | 250 | // IP address lease time MAY MUST NOT MAY MUST NOT MUST NOT |
254 | // RENEWING) | 251 | // Use 'file'/'sname' fields MAY MAY MAY MAY MAY |
255 | // IP address lease time MAY MUST NOT MAY MUST NOT MUST NOT | 252 | // Client identifier MAY MAY MAY MAY MAY |
256 | // Use 'file'/'sname' fields MAY MAY MAY MAY MAY | 253 | // Vendor class identifier MAY MAY MAY MUST NOT MUST NOT |
257 | // Client identifier MAY MAY MAY MAY MAY | 254 | // Server identifier MUST NOT MUST NOT MUST (after SELECTING) MUST MUST |
258 | // Vendor class identifier MAY MAY MAY MUST NOT MUST NOT | ||
259 | // Server identifier MUST NOT MUST NOT MUST (after MUST MUST | ||
260 | // SELECTING) | ||
261 | // MUST NOT (after | 255 | // MUST NOT (after |
262 | // INIT-REBOOT, | 256 | // INIT-REBOOT, BOUND, |
263 | // BOUND, RENEWING | 257 | // RENEWING or REBINDING) |
264 | // or REBINDING) | 258 | // Parameter request list MAY MAY MAY MUST NOT MUST NOT |
265 | // Parameter request list MAY MAY MAY MUST NOT MUST NOT | 259 | // Maximum message size MAY MAY MAY MUST NOT MUST NOT |
266 | // Maximum message size MAY MAY MAY MUST NOT MUST NOT | 260 | // Message SHOULD NOT SHOULD NOT SHOULD NOT SHOULD SHOULD |
267 | // Message SHOULD NOT SHOULD NOT SHOULD NOT SHOULD SHOULD | 261 | // Site-specific MAY MAY MAY MUST NOT MUST NOT |
268 | // Site-specific MAY MAY MAY MUST NOT MUST NOT | 262 | // All others MAY MAY MAY MUST NOT MUST NOT |
269 | // All others MAY MAY MAY MUST NOT MUST NOT | ||
270 | |||
271 | 263 | ||
272 | /*** Logging ***/ | 264 | /*** Logging ***/ |
273 | 265 | ||