Skip to main content

esp_netif_dhcpc_option

Function esp_netif_dhcpc_option 

Source
pub unsafe extern "C" fn esp_netif_dhcpc_option(
    esp_netif: *mut esp_netif_t,
    opt_op: esp_netif_dhcp_option_mode_t,
    opt_id: esp_netif_dhcp_option_id_t,
    opt_val: *mut c_void,
    opt_len: u32,
) -> esp_err_t
Expand description

@brief Set or Get DHCP client option

@note Please note that not all combinations of identifiers and options are supported.

Get operations:

  • ESP_NETIF_IP_REQUEST_RETRY_TIME
  • ESP_NETIF_VENDOR_SPECIFIC_INFO – only available if ESP_DHCP_DISABLE_VENDOR_CLASS_IDENTIFIER=n

Set operations:

  • ESP_NETIF_IP_REQUEST_RETRY_TIME
  • ESP_NETIF_VENDOR_SPECIFIC_INFO – only available if ESP_DHCP_DISABLE_VENDOR_CLASS_IDENTIFIER=n lwip layer creates its own copy of the supplied identifier. (the internal copy could be feed by calling dhcp_free_vendor_class_identifier())

@param[in] esp_netif Handle to esp-netif instance @param[in] opt_op ESP_NETIF_OP_SET to set an option, ESP_NETIF_OP_GET to get an option. @param[in] opt_id Option index to get or set, must be one of the supported enum values. @param[inout] opt_val Pointer to the option parameter. @param[in] opt_len Length of the option parameter.

@return - ESP_OK - ESP_ERR_ESP_NETIF_INVALID_PARAMS - ESP_ERR_ESP_NETIF_DHCP_ALREADY_STOPPED - ESP_ERR_ESP_NETIF_DHCP_ALREADY_STARTED