diff options
Diffstat (limited to 'src/platform/nm-platform.h')
-rw-r--r-- | src/platform/nm-platform.h | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/src/platform/nm-platform.h b/src/platform/nm-platform.h index c419855a98..19148deb4f 100644 --- a/src/platform/nm-platform.h +++ b/src/platform/nm-platform.h @@ -156,6 +156,12 @@ struct _NMPlatformLink { * initialized with memset(0) has and unset value.*/ guint8 inet6_addr_gen_mode_inv; + /* Statistics */ + guint64 rx_packets; + guint64 rx_bytes; + guint64 tx_packets; + guint64 tx_bytes; + /* @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; @@ -532,6 +538,9 @@ typedef struct { char * (*link_get_physical_port_id) (NMPlatform *, int ifindex); guint (*link_get_dev_id) (NMPlatform *, int ifindex); + gboolean (*link_get_stats) (NMPlatform *platform, int ifindex, + guint64 *rx_packets, guint64 *rx_bytes, + guint64 *tx_packets, guint64 *tx_bytes); gboolean (*link_get_wake_on_lan) (NMPlatform *, int ifindex); gboolean (*link_get_driver_info) (NMPlatform *, int ifindex, @@ -763,6 +772,9 @@ gboolean nm_platform_link_set_mtu (NMPlatform *self, int ifindex, guint32 mtu); char *nm_platform_link_get_physical_port_id (NMPlatform *self, int ifindex); guint nm_platform_link_get_dev_id (NMPlatform *self, int ifindex); +gboolean nm_platform_link_get_stats (NMPlatform *self, int ifindex, + guint64 *rx_packets, guint64 *rx_bytes, + guint64 *tx_packets, guint64 *tx_bytes); gboolean nm_platform_link_get_wake_on_lan (NMPlatform *self, int ifindex); gboolean nm_platform_link_get_driver_info (NMPlatform *self, int ifindex, |