dhcp: tweak comments, no code changes

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
This commit is contained in:
Denys Vlasenko 2019-05-23 15:24:03 +02:00
parent 58d998d2f9
commit 1115e40c88

View File

@ -40,7 +40,7 @@ struct dhcp_packet {
uint32_t yiaddr; /* 'your' (client) IP address */ uint32_t yiaddr; /* 'your' (client) IP address */
/* IP address of next server to use in bootstrap, returned in DHCPOFFER, DHCPACK by server */ /* IP address of next server to use in bootstrap, returned in DHCPOFFER, DHCPACK by server */
uint32_t siaddr_nip; uint32_t siaddr_nip;
uint32_t gateway_nip; /* relay agent IP address */ uint32_t gateway_nip; /* aka 'giaddr': relay agent IP address */
uint8_t chaddr[16]; /* link-layer client hardware address (MAC) */ uint8_t chaddr[16]; /* link-layer client hardware address (MAC) */
uint8_t sname[64]; /* server host name (ASCIZ) */ uint8_t sname[64]; /* server host name (ASCIZ) */
uint8_t file[128]; /* boot file name (ASCIZ) */ 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)
#endif #endif
struct option_set *udhcp_find_option(struct option_set *opt_list, uint8_t code) FAST_FUNC; struct option_set *udhcp_find_option(struct option_set *opt_list, uint8_t code) FAST_FUNC;
// RFC 2131 Table 5: Fields and options used by DHCP clients // RFC 2131 Table 5: Fields and options used by DHCP clients
// //
// Fields 'hops', 'yiaddr', 'siaddr', 'giaddr' are always zero // Fields 'hops', 'yiaddr', 'siaddr', 'giaddr' are always zero, 'chaddr' is always client's MAC
// //
// Field DHCPDISCOVER DHCPINFORM DHCPREQUEST DHCPDECLINE DHCPRELEASE // Field DHCPDISCOVER DHCPINFORM DHCPREQUEST DHCPDECLINE DHCPRELEASE
// ----- ------------ ------------ ----------- ----------- ----------- // ----- ------------ ------------ ----------- ----------- -----------
@ -234,40 +233,33 @@ struct option_set *udhcp_find_option(struct option_set *opt_list, uint8_t code)
// 'secs' 0 or seconds since 0 or seconds since 0 or seconds since 0 0 // 'secs' 0 or seconds since 0 or seconds since 0 or seconds since 0 0
// DHCP process started DHCP process started DHCP process started // DHCP process started DHCP process started DHCP process started
// 'flags' Set 'BROADCAST' Set 'BROADCAST' Set 'BROADCAST' 0 0 // 'flags' Set 'BROADCAST' Set 'BROADCAST' Set 'BROADCAST' 0 0
// flag if client flag if client flag if client // flag if client needs flag if client needs flag if client needs
// requires broadcast requires broadcast requires broadcast // broadcast reply broadcast reply broadcast reply
// reply reply reply
// 'ciaddr' 0 client's IP 0 or client's IP 0 client's IP // 'ciaddr' 0 client's IP 0 or client's IP 0 client's IP
// (BOUND/RENEW/REBIND) // (BOUND/RENEW/REBIND)
// 'chaddr' client's MAC client's MAC client's MAC client's MAC client's MAC
// 'sname' options or sname options or sname options or sname (unused) (unused) // 'sname' options or sname options or sname options or sname (unused) (unused)
// 'file' options or file options or file options or file (unused) (unused) // 'file' options or file options or file options or file (unused) (unused)
// 'options' options options options message type opt message type opt // 'options' options options options message type opt message type opt
// //
// Option DHCPDISCOVER DHCPINFORM DHCPREQUEST DHCPDECLINE DHCPRELEASE // Option DHCPDISCOVER DHCPINFORM DHCPREQUEST DHCPDECLINE DHCPRELEASE
// ------ ------------ ---------- ----------- ----------- ----------- // ------ ------------ ---------- ----------- ----------- -----------
// Requested IP address MAY MUST NOT MUST (in MUST MUST NOT // Requested IP address MAY MUST NOT MUST (in SELECTING MUST MUST NOT
// SELECTING or // or INIT-REBOOT)
// INIT-REBOOT) // MUST NOT (in BOUND
// MUST NOT (in // or RENEWING)
// BOUND or // IP address lease time MAY MUST NOT MAY MUST NOT MUST NOT
// RENEWING) // Use 'file'/'sname' fields MAY MAY MAY MAY MAY
// IP address lease time MAY MUST NOT MAY MUST NOT MUST NOT // Client identifier MAY MAY MAY MAY MAY
// Use 'file'/'sname' fields MAY MAY MAY MAY MAY // Vendor class identifier MAY MAY MAY MUST NOT MUST NOT
// Client identifier MAY MAY MAY MAY MAY // Server identifier MUST NOT MUST NOT MUST (after SELECTING) MUST MUST
// Vendor class identifier MAY MAY MAY MUST NOT MUST NOT
// Server identifier MUST NOT MUST NOT MUST (after MUST MUST
// SELECTING)
// MUST NOT (after // MUST NOT (after
// INIT-REBOOT, // INIT-REBOOT, BOUND,
// BOUND, RENEWING // RENEWING or REBINDING)
// or REBINDING) // Parameter request list MAY MAY MAY MUST NOT MUST NOT
// Parameter request list MAY MAY MAY MUST NOT MUST NOT // Maximum message size MAY MAY MAY MUST NOT MUST NOT
// Maximum message size MAY MAY MAY MUST NOT MUST NOT // Message SHOULD NOT SHOULD NOT SHOULD NOT SHOULD SHOULD
// Message SHOULD NOT SHOULD NOT SHOULD NOT SHOULD SHOULD // Site-specific MAY MAY MAY MUST NOT MUST NOT
// Site-specific MAY MAY MAY MUST NOT MUST NOT // All others MAY MAY MAY MUST NOT MUST NOT
// All others MAY MAY MAY MUST NOT MUST NOT
/*** Logging ***/ /*** Logging ***/