/* This function will control network interface device DHCP capability enable or disable. */
int netdev_dhcp_enabled(struct netdev *netdev, bool is_enabled)
/* This function will control network interface device DHCP capability enable or disable. */
int netdev_dhcp_enabled(struct netdev *netdev, bool is_enabled)
{
    ASSERT(netdev);
    if (!netdev->ops || !netdev->ops->set_dhcp)
    {
        LOGE(TAG, "The network interface device(%s) not support to set DHCP status.", netdev->name);
        return -1;
    }
    if (netdev_is_dhcp_enabled(netdev) == is_enabled)
    {
        return 0;
    }
    return netdev->ops->set_dhcp(netdev, is_enabled);
}