friendev EtherDune TCP/IP library
Public Attributes | List of all members
DHCPHeader Struct Reference

Holds a DHCP header. More...

#include <inet.h>

Public Attributes

uint8_t op
 Operation Code. More...
 
uint8_t htype
 Hardware Type. More...
 
uint8_t hlen
 Hardware Address Length. More...
 
uint8_t hops
 Hops. More...
 
nint32_t xid
 Transaction Identifier. More...
 
nint16_t secs
 Number of seconds elapsed since a client began an attempt to acquire or renew a lease. More...
 
uint16_t broadcastFlag
 Broadcast flag. More...
 
IPAddress ciaddr
 Client IP Address. More...
 
IPAddress yiaddr
 Your IP Address. More...
 
IPAddress siaddr
 Server IP address: the address of the server that the client should use for the next step in the bootstrap process, which may or may not be the server sending this reply. More...
 
IPAddress giaddr
 Gateway for DHCP request routing. More...
 
union {
   MACAddress   mac
 The hardware (layer two) address of the client, which is used for identification and communication. More...
 
   byte   chaddr [16]
 
}; 
 
byte sname [64]
 Server Name. More...
 
byte filename [128]
 
IPAddress magicCookie
 

Detailed Description

Holds a DHCP header.

Definition at line 465 of file inet.h.

Member Data Documentation

union { ... }
uint16_t DHCPHeader::broadcastFlag

Broadcast flag.

Set when the client doesn't know its own IP Address (server must respond via broadcast). Set to 0x0100.

Definition at line 473 of file inet.h.

byte DHCPHeader::chaddr[16]

Definition at line 481 of file inet.h.

IPAddress DHCPHeader::ciaddr

Client IP Address.

The client puts its own current IP address in this field if and only if it has a valid IP address while in the BOUND, RENEWING or REBINDING states; otherwise, it sets the field to 0. The client can only use this field when its address is actually valid and usable, not during the process of acquiring an address

Definition at line 474 of file inet.h.

byte DHCPHeader::filename[128]

Definition at line 484 of file inet.h.

IPAddress DHCPHeader::giaddr

Gateway for DHCP request routing.

Definition at line 477 of file inet.h.

uint8_t DHCPHeader::hlen

Hardware Address Length.

Specifies how long hardware addresses are in this message. For Ethernet or other networks using IEEE 802 MAC addresses, the value is 6

Definition at line 469 of file inet.h.

uint8_t DHCPHeader::hops

Hops.

Set to 0 by a client before transmitting a request and used by relay agents to control the forwarding of BOOTP and/or DHCP messages

Definition at line 470 of file inet.h.

uint8_t DHCPHeader::htype

Hardware Type.

Type of hardware used in the network.

Definition at line 468 of file inet.h.

MACAddress DHCPHeader::mac

The hardware (layer two) address of the client, which is used for identification and communication.

Definition at line 480 of file inet.h.

IPAddress DHCPHeader::magicCookie

Definition at line 485 of file inet.h.

uint8_t DHCPHeader::op

Operation Code.

Specifies the general type of message. A value of 1 indicates a request message, while a value of 2 is a reply message.

Definition at line 467 of file inet.h.

nint16_t DHCPHeader::secs

Number of seconds elapsed since a client began an attempt to acquire or renew a lease.

This may be used by a busy DHCP server to prioritize replies when multiple client requests are outstanding.

Definition at line 472 of file inet.h.

IPAddress DHCPHeader::siaddr

Server IP address: the address of the server that the client should use for the next step in the bootstrap process, which may or may not be the server sending this reply.

Definition at line 476 of file inet.h.

byte DHCPHeader::sname[64]

Server Name.

The server sending a DHCPOFFER or DHCPACK message may optionally put its name in this field. This can be a simple text “nickname” or a fully-qualified DNS domain name (such as “myserver.organization.org”).

Definition at line 483 of file inet.h.

nint32_t DHCPHeader::xid

Transaction Identifier.

A 32-bit identification field generated by the client, to allow it to match up the request with replies received from DHCP servers.

Definition at line 471 of file inet.h.

IPAddress DHCPHeader::yiaddr

Your IP Address.

The IP address that the server is assigning to the client.

Definition at line 475 of file inet.h.


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