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


Field Documentation

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().

Hardware address length.

Definition at line 516 of file dhcp.h.

Referenced by dhcp_create_packet().

Number of hops from server.

Definition at line 518 of file dhcp.h.

Transaction ID.

Definition at line 520 of file dhcp.h.

Referenced by dhcp_create_packet(), and dhcp_deliver_iob().

Seconds since start of acquisition.

Definition at line 522 of file dhcp.h.

Flags.

Definition at line 524 of file dhcp.h.

Referenced by dhcp_create_packet().

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]

"Server" IP address

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

Definition at line 541 of file dhcp.h.

struct in_addr dhcphdr::giaddr [read]

"Gateway" IP address

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

Definition at line 546 of file dhcp.h.

Client hardware address.

Definition at line 548 of file dhcp.h.

Referenced by dhcp_create_packet().

char dhcphdr::sname[64]

Server host name (null terminated).

This field may be overridden and contain DHCP options

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

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().


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

Generated on Tue Apr 6 20:02:03 2010 for gPXE by  doxygen 1.5.7.1