iPXE
Data Fields
dhcphdr Struct Reference

A DHCP header. More...

#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.

Detailed Description

A DHCP header.

Definition at line 591 of file dhcp.h.


Field Documentation

Operation.

This must be either BOOTP_REQUEST or BOOTP_REPLY.

Definition at line 596 of file dhcp.h.

Referenced by dhcp_create_packet().

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 603 of file dhcp.h.

Referenced by dhcp_create_packet().

Hardware address length.

Definition at line 605 of file dhcp.h.

Referenced by dhcp_create_packet().

Number of hops from server.

Definition at line 607 of file dhcp.h.

Transaction ID.

Definition at line 609 of file dhcp.h.

Referenced by dhcp_create_packet(), and dhcp_deliver().

Seconds since start of acquisition.

Definition at line 611 of file dhcp.h.

Referenced by dhcp_tx().

Flags.

Definition at line 613 of file dhcp.h.

Referenced by dhcp_create_packet().

"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 619 of file dhcp.h.

Referenced by create_fakepxebsack(), and dhcp_create_request().

"Your" IP address

This is the IP address assigned by the server to the client.

Definition at line 624 of file dhcp.h.

Referenced by dhcp_discovery_rx(), and dhcp_request_rx().

"Server" IP address

This is the IP address of the next server to be used in the boot process.

Definition at line 630 of file dhcp.h.

Referenced by dhcp_deliver(), and dhcp_has_pxeopts().

"Gateway" IP address

This is the IP address of the DHCP relay agent, if any.

Definition at line 635 of file dhcp.h.

Client hardware address.

Definition at line 637 of file dhcp.h.

Referenced by cachedhcp_probe(), dhcp_create_packet(), and dhcp_deliver().

char dhcphdr::sname[64]

Server host name (null terminated)

This field may be overridden and contain DHCP options

Definition at line 642 of file dhcp.h.

char dhcphdr::file[128]

Boot file name (null terminated)

This field may be overridden and contain DHCP options

Definition at line 647 of file dhcp.h.

DHCP magic cookie.

Must have the value DHCP_MAGIC_COOKIE.

Definition at line 652 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 659 of file dhcp.h.

Referenced by dhcp_create_packet(), and dhcppkt_init().


The documentation for this struct was generated from the following file: