mirror of
https://gitlab.freedesktop.org/NetworkManager/NetworkManager.git
synced 2025-12-30 22:30:11 +01:00
platform: Add support for IPv6 tokenized identifiers
This commit is contained in:
parent
0d59984ce8
commit
db5603e615
2 changed files with 29 additions and 0 deletions
|
|
@ -747,6 +747,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
|
||||
|
|
|
|||
|
|
@ -362,6 +362,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);
|
||||
|
||||
|
|
@ -509,6 +511,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