本文整理汇总了C++中NM_IS_SETTING_IP4_CONFIG函数的典型用法代码示例。如果您正苦于以下问题:C++ NM_IS_SETTING_IP4_CONFIG函数的具体用法?C++ NM_IS_SETTING_IP4_CONFIG怎么用?C++ NM_IS_SETTING_IP4_CONFIG使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了NM_IS_SETTING_IP4_CONFIG函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: nm_setting_ip4_config_get_num_dns
/**
* nm_setting_ip4_config_get_num_dns:
* @setting: the #NMSettingIP4Config
*
* Returns: the number of configured DNS servers
**/
guint32
nm_setting_ip4_config_get_num_dns (NMSettingIP4Config *setting)
{
g_return_val_if_fail (NM_IS_SETTING_IP4_CONFIG (setting), 0);
return NM_SETTING_IP4_CONFIG_GET_PRIVATE (setting)->dns->len;
}
示例2: nm_setting_ip4_config_get_may_fail
/**
* nm_setting_ip4_config_get_may_fail:
* @setting: the #NMSettingIP4Config
*
* Returns the value contained in the #NMSettingIP4Config:may-fail
* property.
*
* Returns: %TRUE if this connection doesn't require IPv4 addressing to complete
* for the connection to succeed.
**/
gboolean
nm_setting_ip4_config_get_may_fail (NMSettingIP4Config *setting)
{
g_return_val_if_fail (NM_IS_SETTING_IP4_CONFIG (setting), FALSE);
return NM_SETTING_IP4_CONFIG_GET_PRIVATE (setting)->may_fail;
}
示例3: nm_setting_ip4_config_get_dhcp_client_id
const char *
nm_setting_ip4_config_get_dhcp_client_id (NMSettingIP4Config *setting)
{
g_return_val_if_fail (NM_IS_SETTING_IP4_CONFIG (setting), FALSE);
return NM_SETTING_IP4_CONFIG_GET_PRIVATE (setting)->dhcp_client_id;
}
示例4: nm_setting_ip4_config_get_ignore_auto_routes
/**
* nm_setting_ip4_config_get_ignore_auto_routes:
* @setting: the #NMSettingIP4Config
*
* Returns the value contained in the #NMSettingIP4Config:ignore-auto-routes
* property.
*
* Returns: %TRUE if automatically configured (ie via DHCP) routes should be
* ignored.
**/
gboolean
nm_setting_ip4_config_get_ignore_auto_routes (NMSettingIP4Config *setting)
{
g_return_val_if_fail (NM_IS_SETTING_IP4_CONFIG (setting), FALSE);
return NM_SETTING_IP4_CONFIG_GET_PRIVATE (setting)->ignore_auto_routes;
}
示例5: nm_setting_ip4_config_get_dhcp_send_hostname
/**
* nm_setting_ip4_config_get_dhcp_send_hostname:
* @setting: the #NMSettingIP4Config
*
* Returns the value contained in the #NMSettingIP4Config:dhcp-send-hostname
* property.
*
* Returns: %TRUE if NetworkManager should send the machine hostname to the
* DHCP server when requesting addresses to allow the server to automatically
* update DNS information for this machine.
**/
gboolean
nm_setting_ip4_config_get_dhcp_send_hostname (NMSettingIP4Config *setting)
{
g_return_val_if_fail (NM_IS_SETTING_IP4_CONFIG (setting), FALSE);
return NM_SETTING_IP4_CONFIG_GET_PRIVATE (setting)->dhcp_send_hostname;
}
示例6: nm_setting_ip4_config_get_method
/**
* nm_setting_ip4_config_get_method:
* @setting: the #NMSettingIP4Config
*
* Returns: the #NMSettingIP4Config:method property of the setting
**/
const char *
nm_setting_ip4_config_get_method (NMSettingIP4Config *setting)
{
g_return_val_if_fail (NM_IS_SETTING_IP4_CONFIG (setting), NULL);
return NM_SETTING_IP4_CONFIG_GET_PRIVATE (setting)->method;
}
示例7: nm_setting_ip4_config_get_dhcp_hostname
/**
* nm_setting_ip4_config_get_dhcp_hostname:
* @setting: the #NMSettingIP4Config
*
* Returns the value contained in the #NMSettingIP4Config:dhcp-hostname
* property.
*
* Returns: the configured hostname to send to the DHCP server
**/
const char *
nm_setting_ip4_config_get_dhcp_hostname (NMSettingIP4Config *setting)
{
g_return_val_if_fail (NM_IS_SETTING_IP4_CONFIG (setting), NULL);
return NM_SETTING_IP4_CONFIG_GET_PRIVATE (setting)->dhcp_hostname;
}
示例8: nm_setting_ip4_config_get_num_routes
/**
* nm_setting_ip4_config_get_num_routes:
* @setting: the #NMSettingIP4Config
*
* Returns: the number of configured routes
**/
guint32
nm_setting_ip4_config_get_num_routes (NMSettingIP4Config *setting)
{
g_return_val_if_fail (NM_IS_SETTING_IP4_CONFIG (setting), 0);
return g_slist_length (NM_SETTING_IP4_CONFIG_GET_PRIVATE (setting)->routes);
}
示例9: nm_setting_ip4_config_clear_dns_searches
/**
* nm_setting_ip4_config_clear_dns_searches:
* @setting: the #NMSettingIP4Config
*
* Removes all configured DNS search domains.
**/
void
nm_setting_ip4_config_clear_dns_searches (NMSettingIP4Config *setting)
{
g_return_if_fail (NM_IS_SETTING_IP4_CONFIG (setting));
nm_utils_slist_free (NM_SETTING_IP4_CONFIG_GET_PRIVATE (setting)->dns_search, g_free);
NM_SETTING_IP4_CONFIG_GET_PRIVATE (setting)->dns_search = NULL;
}
示例10: nm_setting_ip4_config_clear_dns
/**
* nm_setting_ip4_config_clear_dns:
* @setting: the #NMSettingIP4Config
*
* Removes all configured DNS servers.
**/
void
nm_setting_ip4_config_clear_dns (NMSettingIP4Config *setting)
{
NMSettingIP4ConfigPrivate *priv;
g_return_if_fail (NM_IS_SETTING_IP4_CONFIG (setting));
priv = NM_SETTING_IP4_CONFIG_GET_PRIVATE (setting);
g_array_remove_range (priv->dns, 0, priv->dns->len);
}
示例11: nm_setting_ip4_config_clear_routes
/**
* nm_setting_ip4_config_clear_routes:
* @setting: the #NMSettingIP4Config
*
* Removes all configured routes.
**/
void
nm_setting_ip4_config_clear_routes (NMSettingIP4Config *setting)
{
NMSettingIP4ConfigPrivate *priv = NM_SETTING_IP4_CONFIG_GET_PRIVATE (setting);
g_return_if_fail (NM_IS_SETTING_IP4_CONFIG (setting));
nm_utils_slist_free (priv->routes, (GDestroyNotify) nm_ip4_route_unref);
priv->routes = NULL;
}
示例12: nm_setting_ip4_config_get_dns
/**
* nm_setting_ip4_config_get_dns:
* @setting: the #NMSettingIP4Config
* @i: index number of the DNS server to return
*
* Returns: the IPv4 address (network byte order) of the DNS server at index
* @i
**/
guint32
nm_setting_ip4_config_get_dns (NMSettingIP4Config *setting, guint32 i)
{
NMSettingIP4ConfigPrivate *priv;
g_return_val_if_fail (NM_IS_SETTING_IP4_CONFIG (setting), 0);
priv = NM_SETTING_IP4_CONFIG_GET_PRIVATE (setting);
g_return_val_if_fail (i <= priv->dns->len, 0);
return g_array_index (priv->dns, guint32, i);
}
示例13: nm_setting_ip4_config_remove_dns
/**
* nm_setting_ip4_config_remove_dns:
* @setting: the #NMSettingIP4Config
* @i: index number of the DNS server to remove
*
* Removes the DNS server at index @i.
**/
void
nm_setting_ip4_config_remove_dns (NMSettingIP4Config *setting, guint32 i)
{
NMSettingIP4ConfigPrivate *priv;
g_return_if_fail (NM_IS_SETTING_IP4_CONFIG (setting));
priv = NM_SETTING_IP4_CONFIG_GET_PRIVATE (setting);
g_return_if_fail (i <= priv->dns->len);
g_array_remove_index (priv->dns, i);
}
示例14: nm_setting_ip4_config_get_dns_search
/**
* nm_setting_ip4_config_get_dns_search:
* @setting: the #NMSettingIP4Config
* @i: index number of the DNS search domain to return
*
* Returns: the DNS search domain at index @i
**/
const char *
nm_setting_ip4_config_get_dns_search (NMSettingIP4Config *setting, guint32 i)
{
NMSettingIP4ConfigPrivate *priv;
g_return_val_if_fail (NM_IS_SETTING_IP4_CONFIG (setting), NULL);
priv = NM_SETTING_IP4_CONFIG_GET_PRIVATE (setting);
g_return_val_if_fail (i <= g_slist_length (priv->dns_search), NULL);
return (const char *) g_slist_nth_data (priv->dns_search, i);
}
示例15: nm_setting_ip4_config_get_route
/**
* nm_setting_ip4_config_get_route:
* @setting: the #NMSettingIP4Config
* @i: index number of the route to return
*
* Returns: the route at index @i
**/
NMIP4Route *
nm_setting_ip4_config_get_route (NMSettingIP4Config *setting, guint32 i)
{
NMSettingIP4ConfigPrivate *priv;
g_return_val_if_fail (NM_IS_SETTING_IP4_CONFIG (setting), NULL);
priv = NM_SETTING_IP4_CONFIG_GET_PRIVATE (setting);
g_return_val_if_fail (i <= g_slist_length (priv->routes), NULL);
return (NMIP4Route *) g_slist_nth_data (priv->routes, i);
}