diff options
author | Lubomir Rintel <lkundrak@v3.sk> | 2014-09-27 09:03:56 +0200 |
---|---|---|
committer | Lubomir Rintel <lkundrak@v3.sk> | 2015-01-26 13:05:06 +0100 |
commit | db5603e615f502e2fc96040e7f6b83a13fcb0f98 (patch) | |
tree | 5623c9b8a207e3b0a0446fc59b56ecd186c250da | |
parent | 0d59984ce837581ff78ce747d1fcf6e393b6beb5 (diff) | |
download | NetworkManager-db5603e615f502e2fc96040e7f6b83a13fcb0f98.tar.gz |
platform: Add support for IPv6 tokenized identifiers
-rw-r--r-- | src/platform/nm-platform.c | 25 | ||||
-rw-r--r-- | src/platform/nm-platform.h | 4 |
2 files changed, 29 insertions, 0 deletions
diff --git a/src/platform/nm-platform.c b/src/platform/nm-platform.c index a2fd8f39a4..0540af8046 100644 --- a/src/platform/nm-platform.c +++ b/src/platform/nm-platform.c @@ -748,6 +748,31 @@ nm_platform_link_uses_arp (int 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 * diff --git a/src/platform/nm-platform.h b/src/platform/nm-platform.h index b202de32a1..52362e4398 100644 --- a/src/platform/nm-platform.h +++ b/src/platform/nm-platform.h @@ -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); |