ESP8266
Public Member Functions | Private Member Functions | Private Attributes | List of all members
DhcpClass Class Reference

Public Member Functions

IPAddress getLocalIp ()
 
IPAddress getSubnetMask ()
 
IPAddress getGatewayIp ()
 
IPAddress getDhcpServerIp ()
 
IPAddress getDnsServerIp ()
 
int beginWithDHCP (uint8_t *, unsigned long timeout=60000, unsigned long responseTimeout=4000)
 
int checkLease ()
 

Private Member Functions

int request_DHCP_lease ()
 
void reset_DHCP_lease ()
 
void presend_DHCP ()
 
void send_DHCP_MESSAGE (uint8_t, uint16_t)
 
void printByte (char *, uint8_t)
 
uint8_t parseDHCPResponse (unsigned long responseTimeout, uint32_t &transactionId)
 

Private Attributes

uint32_t _dhcpInitialTransactionId
 
uint32_t _dhcpTransactionId
 
uint8_t _dhcpMacAddr [6]
 
uint8_t _dhcpLocalIp [4]
 
uint8_t _dhcpSubnetMask [4]
 
uint8_t _dhcpGatewayIp [4]
 
uint8_t _dhcpDhcpServerIp [4]
 
uint8_t _dhcpDnsServerIp [4]
 
uint32_t _dhcpLeaseTime
 
uint32_t _dhcpT1
 
uint32_t _dhcpT2
 
signed long _renewInSec
 
signed long _rebindInSec
 
signed long _lastCheck
 
unsigned long _timeout
 
unsigned long _responseTimeout
 
unsigned long _secTimeout
 
uint8_t _dhcp_state
 
EthernetUDP _dhcpUdpSocket
 

Member Function Documentation

int DhcpClass::beginWithDHCP ( uint8_t *  mac,
unsigned long  timeout = 60000,
unsigned long  responseTimeout = 4000 
)
int DhcpClass::checkLease ( )
IPAddress DhcpClass::getDhcpServerIp ( )
IPAddress DhcpClass::getDnsServerIp ( )
IPAddress DhcpClass::getGatewayIp ( )
IPAddress DhcpClass::getLocalIp ( )
IPAddress DhcpClass::getSubnetMask ( )
uint8_t DhcpClass::parseDHCPResponse ( unsigned long  responseTimeout,
uint32_t &  transactionId 
)
private
void DhcpClass::presend_DHCP ( )
private
void DhcpClass::printByte ( char *  buf,
uint8_t  n 
)
private
int DhcpClass::request_DHCP_lease ( )
private
void DhcpClass::reset_DHCP_lease ( )
private
void DhcpClass::send_DHCP_MESSAGE ( uint8_t  messageType,
uint16_t  secondsElapsed 
)
private

Member Data Documentation

uint8_t DhcpClass::_dhcp_state
private
uint8_t DhcpClass::_dhcpDhcpServerIp[4]
private
uint8_t DhcpClass::_dhcpDnsServerIp[4]
private
uint8_t DhcpClass::_dhcpGatewayIp[4]
private
uint32_t DhcpClass::_dhcpInitialTransactionId
private
uint32_t DhcpClass::_dhcpLeaseTime
private
uint8_t DhcpClass::_dhcpLocalIp[4]
private
uint8_t DhcpClass::_dhcpMacAddr[6]
private
uint8_t DhcpClass::_dhcpSubnetMask[4]
private
uint32_t DhcpClass::_dhcpT1
private
uint32_t DhcpClass::_dhcpT2
private
uint32_t DhcpClass::_dhcpTransactionId
private
EthernetUDP DhcpClass::_dhcpUdpSocket
private
signed long DhcpClass::_lastCheck
private
signed long DhcpClass::_rebindInSec
private
signed long DhcpClass::_renewInSec
private
unsigned long DhcpClass::_responseTimeout
private
unsigned long DhcpClass::_secTimeout
private
unsigned long DhcpClass::_timeout
private