mirror of
https://gitlab.freedesktop.org/NetworkManager/NetworkManager.git
synced 2025-12-30 19:00:11 +01:00
platform: Add support for IPv6 tokenized identifiers
(cherry picked from commit db5603e615)
This commit is contained in:
parent
06b30ad690
commit
3cbd7cdc03
2 changed files with 29 additions and 0 deletions
|
|
@ -779,6 +779,31 @@ nm_platform_link_uses_arp (int ifindex)
|
|||
return klass->link_uses_arp (platform, ifindex);
|
||||
}
|
||||
|
||||
/**
|
||||
* nm_platform_link_get_ipv6_token:
|
||||
* @ifindex: Interface index
|
||||
* @iid: Tokenized interface identifier
|
||||
*
|
||||
* Returns IPv6 tokenized interface identifier. If the platform or OS doesn't
|
||||
* support IPv6 tokenized interface identifiers, or the token is not set
|
||||
* this call will fail and return %FALSE.
|
||||
*
|
||||
* Returns: %TRUE a tokenized identifier was available
|
||||
*/
|
||||
gboolean
|
||||
nm_platform_link_get_ipv6_token (int ifindex, NMUtilsIPv6IfaceId *iid)
|
||||
{
|
||||
reset_error ();
|
||||
|
||||
g_return_val_if_fail (ifindex >= 0, FALSE);
|
||||
g_return_val_if_fail (iid, FALSE);
|
||||
|
||||
if (klass->link_get_ipv6_token)
|
||||
return klass->link_get_ipv6_token (platform, ifindex, iid);
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* nm_platform_link_get_user_ip6vll_enabled:
|
||||
* @ifindex: Interface index
|
||||
|
|
|
|||
|
|
@ -379,6 +379,8 @@ typedef struct {
|
|||
gboolean (*link_is_connected) (NMPlatform *, int ifindex);
|
||||
gboolean (*link_uses_arp) (NMPlatform *, int ifindex);
|
||||
|
||||
gboolean (*link_get_ipv6_token) (NMPlatform *, int ifindex, NMUtilsIPv6IfaceId *iid);
|
||||
|
||||
gboolean (*link_get_user_ipv6ll_enabled) (NMPlatform *, int ifindex);
|
||||
gboolean (*link_set_user_ipv6ll_enabled) (NMPlatform *, int ifindex, gboolean enabled);
|
||||
|
||||
|
|
@ -528,6 +530,8 @@ gboolean nm_platform_link_is_up (int ifindex);
|
|||
gboolean nm_platform_link_is_connected (int ifindex);
|
||||
gboolean nm_platform_link_uses_arp (int ifindex);
|
||||
|
||||
gboolean nm_platform_link_get_ipv6_token (int ifindex, NMUtilsIPv6IfaceId *iid);
|
||||
|
||||
gboolean nm_platform_link_get_user_ipv6ll_enabled (int ifindex);
|
||||
gboolean nm_platform_link_set_user_ipv6ll_enabled (int ifindex, gboolean enabled);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue