#define BOOT_HW_TYPE (1u) |
#define BOOT_LEN_OF_HW_TYPE (6u) |
#define BOOT_REPLY (2u) |
#define BOOT_REQUEST (1u) |
#define DHCP_ACK_MESSAGE (5u) |
#define DHCP_CLIENT_PORT (68) |
#define DHCP_DECLINE_MESSAGE (4u) |
#define DHCP_DISCOVER_MESSAGE (1u) |
#define DHCP_DNS (6u) |
#define DHCP_END_OPTION (255u) |
#define DHCP_HOST_NAME (12u) |
#define DHCP_IP_LEASE_TIME (51u) |
#define DHCP_MESSAGE_TYPE (53u) |
#define DHCP_MESSAGE_TYPE_LEN (1u) |
#define DHCP_NAK_MESSAGE (6u) |
#define DHCP_OFFER_MESSAGE (2u) |
#define DHCP_OPTION_ACK_MESSAGE (53u) |
#define DHCP_PARAM_REQUEST_IP_ADDRESS (50u) |
#define DHCP_PARAM_REQUEST_IP_ADDRESS_LEN (4u) |
#define DHCP_PARAM_REQUEST_LIST (55u) |
#define DHCP_PARAM_REQUEST_LIST_LEN (4u) |
#define DHCP_RELEASE_MESSAGE (7u) |
#define DHCP_REQUEST_MESSAGE (3u) |
#define DHCP_ROUTER (3u) |
#define DHCP_SERVER_IDENTIFIER (54u) |
#define DHCP_SERVER_IDENTIFIER_LEN (4u) |
#define DHCP_SERVER_PORT (67) |
#define DHCP_SUBNET_MASK (1u) |
#define DHCP_UNKNOWN_MESSAGE (0u) |
#define DHCPIsBound | ( | ) | (DHCPFlags.bits.bIsBound) |
Checks is DHCP is bound. This function is a MACRO to DHCPFlags.bits.bIsBound.
#define STACK_IS_DHCP_ENABLED (1) |
typedef union _DHCP_CLIENT_FLAGS DHCP_CLIENT_FLAGS |
enum _SM_DHCP |
void DHCPDisable | ( | void | ) |
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.
void DHCPEnable | ( | void | ) |
Enables the DHCP Client. Enables the DHCP client if it is disabled. If it is already enabled, nothing is done.
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 DHCPServerTask | ( | void | ) |
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() ... }