More comment cleanups. Make the DHCP packet field comments more accurate.

This commit is contained in:
Nicholas J. Kain 2011-07-27 08:03:42 -04:00
parent f864a0317c
commit 45c76dd548

View File

@ -51,8 +51,8 @@ enum {
struct dhcpmsg { struct dhcpmsg {
uint8_t op; // Message type: 1 = BOOTREQUEST for clients. uint8_t op; // Message type: 1 = BOOTREQUEST for clients.
uint8_t htype; // ARP HW address type: always '1' for 10MB ethernet. uint8_t htype; // ARP HW address type: always '1' for ethernet.
uint8_t hlen; // Hardware address length: always '6' for 10MB ethernet. uint8_t hlen; // Hardware address length: always '6' for ethernet.
uint8_t hops; // Client sets to zero. uint8_t hops; // Client sets to zero.
uint32_t xid; // Transaction ID: random number identifying session uint32_t xid; // Transaction ID: random number identifying session
uint16_t secs; // Filled by client: seconds since client began address uint16_t secs; // Filled by client: seconds since client began address
@ -61,14 +61,13 @@ struct dhcpmsg {
uint32_t ciaddr; // Client IP: only filled in if client is in BOUND, RENEW, uint32_t ciaddr; // Client IP: only filled in if client is in BOUND, RENEW,
// or REBINDING and can reply to ARP requests // or REBINDING and can reply to ARP requests
uint32_t yiaddr; // 'your' (client) IP address uint32_t yiaddr; // 'your' (client) IP address
uint32_t siaddr; // IP address of next server to use in bootstrap; returned uint32_t siaddr; // Always zero -- unused.
// in DHCPOFFER or DHCPACK by server uint32_t giaddr; // Always zero -- unused.
uint32_t giaddr; // relay agent IP: used when booting via relay agent
uint8_t chaddr[16]; // Client MAC address uint8_t chaddr[16]; // Client MAC address
uint8_t sname[64]; // Server host name (optional); null-terminated string uint8_t sname[64]; // More DHCP options (#3)
uint8_t file[128]; // boot file name, null-terminated string uint8_t file[128]; // More DHCP options (#2)
uint32_t cookie; // Magic number cookie that starts DHCP options uint32_t cookie; // Magic number cookie that starts DHCP options
uint8_t options[308]; // Size of options excluding the cookie. uint8_t options[308]; // DHCP options field (#1)
}; };
struct ip_udp_dhcp_packet { struct ip_udp_dhcp_packet {