diff options
author | rbuj <[email protected]> | 2020-07-02 18:39:24 +0200 |
---|---|---|
committer | raveit65 <[email protected]> | 2020-07-19 16:07:11 +0200 |
commit | bff29f926f56aba490e3f7b6f2d11e6a1aae46c7 (patch) | |
tree | 5e1cb37be1071f64665097820ab92d4e08a8ce4c /netspeed/src/backend.h | |
parent | 46329dddf49af7a60e04d26c550c5919bbda9909 (diff) | |
download | mate-applets-bff29f926f56aba490e3f7b6f2d11e6a1aae46c7.tar.bz2 mate-applets-bff29f926f56aba490e3f7b6f2d11e6a1aae46c7.tar.xz |
netspeed: add netlink support
Diffstat (limited to 'netspeed/src/backend.h')
-rw-r--r-- | netspeed/src/backend.h | 22 |
1 files changed, 17 insertions, 5 deletions
diff --git a/netspeed/src/backend.h b/netspeed/src/backend.h index 7abccdf2..3ad13e94 100644 --- a/netspeed/src/backend.h +++ b/netspeed/src/backend.h @@ -37,6 +37,10 @@ #define SIOCGIWNAME 0x8B01 /* get name == wireless protocol */ #define SIOCGIWENCODE 0x8B2B /* get encoding token & mode */ +#define ETH_ALEN 8 +#define ETH_LEN 20 +#define MAX_FORMAT_SIZE 15 + /* Different types of interfaces */ typedef enum { @@ -57,16 +61,24 @@ typedef struct char *name; char *ip; char *netmask; - char *hwaddr; + guint8 hwaddr[ETH_ALEN]; char *ptpip; char *ipv6; char *essid; gboolean up, running; guint64 tx, rx; int qual; - char *tx_rate; - char *rx_rate; - char *sum_rate; + char rx_rate[MAX_FORMAT_SIZE]; + char tx_rate[MAX_FORMAT_SIZE]; + char sum_rate[MAX_FORMAT_SIZE]; +#ifdef HAVE_NL + int rssi; + char *tx_bitrate; + char *rx_bitrate; + char *channel; + guint32 connected_time; + unsigned char station_mac_addr[ETH_ALEN]; +#endif /* HAVE_NL */ } DevInfo; GList* @@ -90,6 +102,6 @@ get_device_info(const char *device, DevInfo *info); gboolean compare_device_info(const DevInfo *a, const DevInfo *b); -void +void get_wireless_info (DevInfo *devinfo); #endif /* _BACKEND_H */ |