#define DHCP_CLIENT_PORT (68) |
#define DHCP_SERVER_PORT (67) |
#define DHCPDisable | ( | void | ) | (smDHCPState = SM_DHCP_DISABLED) |
Puts DHCPTask into unhandled state "SM_DHCP_DISABLED" and hence DHCP is effictively disabled. Note: This macro should be called before DHCPTask is called or else a UDP port will be kept open and there will be no task to process it.
#define DHCPIsBound | ( | ) | (DHCPState.bits.bIsBound) |
Checks is DHCP is bound
#define STACK_IS_DHCP_ENABLED (1) |
typedef union _DHCP_STATE DHCP_STATE |
enum _SM_DHCP |
void DHCPReset | ( | void | ) |
Closes any previously opened DHCP socket and resets DHCP state machine so that on next call to DHCPTask will result in new DHCP request.
void DHCPTask | ( | void | ) |
Fetches pending UDP packet from MAC receive buffer and dispatches it appropriate UDP socket. If not UDP socket is matched, UDP packet is silently discarded. Note: Caller must make sure that MAC receive buffer access pointer is set to begining of UDP packet. Required steps before calling this function is:
If ( MACIsRxReady() ) { MACGetHeader() If MACFrameType == IP IPGetHeader() if ( IPFrameType == IP_PROT_UDP ) Call DHCPTask() ... }