mirror of
https://gitlab.freedesktop.org/NetworkManager/NetworkManager.git
synced 2026-01-06 01:30:16 +01:00
l3cfg: add nm_l3cfg_get_pllink() helper
NML3Cfg already keeps track of the current NMPlatformLink object. Allow accessing it directly from an NML3Cfg instance, which saves a cache lookup from NMPlatform.
This commit is contained in:
parent
16e59cc37c
commit
3b8b683f8a
1 changed files with 22 additions and 0 deletions
|
|
@ -87,6 +87,28 @@ nm_l3cfg_get_ifname (const NML3Cfg *self)
|
|||
return nmp_object_link_get_ifname (self->priv.pllink);
|
||||
}
|
||||
|
||||
static inline const NMPObject *
|
||||
nm_l3cfg_get_plobj (const NML3Cfg *self)
|
||||
{
|
||||
if (!self)
|
||||
return NULL;
|
||||
|
||||
nm_assert (NM_IS_L3CFG (self));
|
||||
|
||||
return self->priv.pllink;
|
||||
}
|
||||
|
||||
static inline const NMPlatformLink *
|
||||
nm_l3cfg_get_pllink (const NML3Cfg *self)
|
||||
{
|
||||
if (!self)
|
||||
return NULL;
|
||||
|
||||
nm_assert (NM_IS_L3CFG (self));
|
||||
|
||||
return NMP_OBJECT_CAST_LINK (self->priv.pllink);
|
||||
}
|
||||
|
||||
static inline NMNetns *
|
||||
nm_l3cfg_get_netns (const NML3Cfg *self)
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue