summaryrefslogtreecommitdiff
path: root/src/libnm-platform/nm-platform.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/libnm-platform/nm-platform.h')
-rw-r--r--src/libnm-platform/nm-platform.h32
1 files changed, 28 insertions, 4 deletions
diff --git a/src/libnm-platform/nm-platform.h b/src/libnm-platform/nm-platform.h
index 1fe0b3cbe7..d987287c74 100644
--- a/src/libnm-platform/nm-platform.h
+++ b/src/libnm-platform/nm-platform.h
@@ -169,6 +169,16 @@ struct _NMPlatformObjWithIfindex {
__NMPlatformObjWithIfindex_COMMON;
} _nm_alignas(NMPlatformObject);
+typedef struct {
+ gint32 prio;
+ guint16 queue_id;
+ bool prio_has : 1;
+} NMPlatformLinkBondPort;
+
+typedef union {
+ NMPlatformLinkBondPort bond;
+} NMPlatformLinkPortData;
+
struct _NMPlatformLink {
__NMPlatformObjWithIfindex_COMMON;
char name[NMP_IFNAMSIZ];
@@ -221,6 +231,12 @@ struct _NMPlatformLink {
NMPlatformLinkProps link_props;
+ /* an interface can only hold IFLA_INFO_SLAVE_DATA for one link type */
+ NMPlatformLinkPortData port_data;
+
+ /* IFLA_INFO_SLAVE_KIND */
+ NMPortKind port_kind;
+
/* @connected is mostly identical to (@n_ifi_flags & IFF_UP). Except for bridge/bond masters,
* where we coerce the link as disconnect if it has no slaves. */
bool connected : 1;
@@ -1012,6 +1028,8 @@ typedef enum {
* were added at the same time. */
NM_PLATFORM_KERNEL_SUPPORT_TYPE_FRA_IP_PROTO,
+ NM_PLATFORM_KERNEL_SUPPORT_TYPE_IFLA_BOND_SLAVE_PRIO,
+
_NM_PLATFORM_KERNEL_SUPPORT_NUM,
} NMPlatformKernelSupportType;
@@ -1112,10 +1130,12 @@ typedef struct {
NMLinkType type,
int ifindex,
gconstpointer extra_data);
- gboolean (*link_change)(NMPlatform *self,
- int ifindex,
- NMPlatformLinkProps *props,
- NMPlatformLinkChangeFlags flags);
+ gboolean (*link_change)(NMPlatform *self,
+ int ifindex,
+ NMPlatformLinkProps *props,
+ NMPortKind port_kind,
+ const NMPlatformLinkPortData *port_data,
+ NMPlatformLinkChangeFlags flags);
gboolean (*link_delete)(NMPlatform *self, int ifindex);
gboolean (*link_refresh)(NMPlatform *self, int ifindex);
gboolean (*link_set_netns)(NMPlatform *self, int ifindex, int netns_fd);
@@ -1955,6 +1975,7 @@ nm_platform_link_change_flags(NMPlatform *self, int ifindex, unsigned value, gbo
gboolean nm_platform_link_change(NMPlatform *self,
int ifindex,
NMPlatformLinkProps *props,
+ NMPlatformLinkBondPort *bond_port,
NMPlatformLinkChangeFlags flags);
gboolean nm_platform_link_get_udev_property(NMPlatform *self,
@@ -2455,6 +2476,9 @@ int nm_platform_tfilter_cmp(const NMPlatformTfilter *a, const NMPlatformTfilter
int nm_platform_mptcp_addr_cmp(const NMPlatformMptcpAddr *a, const NMPlatformMptcpAddr *b);
void nm_platform_link_hash_update(const NMPlatformLink *obj, NMHashState *h);
+void nm_platform_link_bond_port_hash_update(const NMPlatformLinkBondPort *obj, NMHashState *h);
+int nm_platform_link_bond_port_cmp(const NMPlatformLinkBondPort *a,
+ const NMPlatformLinkBondPort *b);
void nm_platform_ip4_route_hash_update(const NMPlatformIP4Route *obj,
NMPlatformIPRouteCmpType cmp_type,
NMHashState *h);