#include <dhcp.h>
Data Fields | |
| uint8_t | op |
| Operation. | |
| uint8_t | htype |
| Hardware address type. | |
| uint8_t | hlen |
| Hardware address length. | |
| uint8_t | hops |
| Number of hops from server. | |
| uint32_t | xid |
| Transaction ID. | |
| uint16_t | secs |
| Seconds since start of acquisition. | |
| uint16_t | flags |
| Flags. | |
| struct in_addr | ciaddr |
| "Client" IP address | |
| struct in_addr | yiaddr |
| "Your" IP address | |
| struct in_addr | siaddr |
| "Server" IP address | |
| struct in_addr | giaddr |
| "Gateway" IP address | |
| uint8_t | chaddr [16] |
| Client hardware address. | |
| char | sname [64] |
| Server host name (null terminated). | |
| char | file [128] |
| Boot file name (null terminated). | |
| uint32_t | magic |
| DHCP magic cookie. | |
| uint8_t | options [0] |
| DHCP options. | |
Definition at line 502 of file dhcp.h.
Operation.
This must be either BOOTP_REQUEST or BOOTP_REPLY.
Definition at line 507 of file dhcp.h.
Referenced by dhcp_create_packet(), and pxenv_get_cached_info().
Hardware address type.
This is an ARPHRD_XXX constant. Note that ARPHRD_XXX constants are nominally 16 bits wide; this could be considered to be a bug in the BOOTP/DHCP specification.
Definition at line 514 of file dhcp.h.
Referenced by dhcp_create_packet().
Transaction ID.
Definition at line 520 of file dhcp.h.
Referenced by dhcp_create_packet(), and dhcp_deliver_iob().
struct in_addr dhcphdr::ciaddr [read] |
"Client" IP address
This is filled in if the client already has an IP address assigned and can respond to ARP requests.
Definition at line 530 of file dhcp.h.
Referenced by dhcp_create_request().
struct in_addr dhcphdr::yiaddr [read] |
"Your" IP address
This is the IP address assigned by the server to the client.
Definition at line 535 of file dhcp.h.
Referenced by dhcp_request_rx(), and dhcp_rx_offer().
struct in_addr dhcphdr::siaddr [read] |
struct in_addr dhcphdr::giaddr [read] |
| char dhcphdr::sname[64] |
| char dhcphdr::file[128] |
DHCP magic cookie.
Must have the value DHCP_MAGIC_COOKIE.
Definition at line 563 of file dhcp.h.
Referenced by dhcp_create_packet().
DHCP options.
Variable length; extends to the end of the packet. Minimum length (for the sake of sanity) is 1, to allow for a single DHCP_END tag.
Definition at line 570 of file dhcp.h.
Referenced by dhcp_create_packet(), and dhcppkt_init().
1.5.7.1