Thanks, I'm with you thus far. But how can I know what the pointer is supposed to point to?
Here are all the valid options:
Code: Select all
typedef enum{
ESP_NETIF_SUBNET_MASK = 1, /**< Network mask */
ESP_NETIF_DOMAIN_NAME_SERVER = 6, /**< Domain name server */
ESP_NETIF_ROUTER_SOLICITATION_ADDRESS = 32, /**< Solicitation router address */
ESP_NETIF_REQUESTED_IP_ADDRESS = 50, /**< Request specific IP address */
ESP_NETIF_IP_ADDRESS_LEASE_TIME = 51, /**< Request IP address lease time */
ESP_NETIF_IP_REQUEST_RETRY_TIME = 52, /**< Request IP address retry counter */
ESP_NETIF_VENDOR_CLASS_IDENTIFIER = 60, /**< Vendor Class Identifier of a DHCP client */
ESP_NETIF_VENDOR_SPECIFIC_INFO = 43, /**< Vendor Specific Information of a DHCP server */
} esp_netif_dhcp_option_id_t;
You are saying that for ESP_NETIF_IP_REQUEST_RETRY_TIME, opt_val is a pointer to one byte of uint8_t. But some of the others are IP addresses that are probably represented by one uint32_t. How do we know which one?
Specifically, in the case of ESP_NETIF_DOMAIN_NAME_SERVER, what is the opt_val? A 32-bit IP or something else?
Thanks