diff options
author | Jonathan McCrohan <jmccrohan@gmail.com> | 2017-01-02 22:42:43 +0000 |
---|---|---|
committer | Jonathan McCrohan <jmccrohan@gmail.com> | 2017-01-02 22:42:43 +0000 |
commit | 5744c3a0214950433c3a4375798c1c8eba1b398c (patch) | |
tree | 81c2e9edf2941e9144a7d9e4001c3002d32a754e /iw_if.h | |
parent | 0b0aac6ce21bcb38d7e03dc2b3ff419861476a24 (diff) | |
download | wavemon-5744c3a0214950433c3a4375798c1c8eba1b398c.tar.gz |
New upstream version 0.8.1upstream/0.8.1
Diffstat (limited to 'iw_if.h')
-rw-r--r-- | iw_if.h | 44 |
1 files changed, 3 insertions, 41 deletions
@@ -181,18 +181,6 @@ extern void dyn_info_get(struct iw_dyn_info *info, extern void dyn_info_cleanup(struct iw_dyn_info *info); -/** - * struct if_stat - Packet/byte counts for interfaces - */ -struct if_stat { - unsigned long long rx_packets, - tx_packets; - unsigned long long rx_bytes, - tx_bytes; -}; - -extern void if_getstat(const char *ifname, struct if_stat *stat); - /* * Structs to communicate WiFi statistics */ @@ -206,11 +194,10 @@ struct iw_levelstat { extern void iw_getinf_range(const char *ifname, struct iw_range *range); /* - * Periodic sampling of wireless statistics via timer alarm + * Periodic sampling of wireless statistics */ -extern void sampling_init(void (*sampling_handler)(int)); -extern void sampling_do_poll(void); -static inline void sampling_stop(void) { alarm(0); } +extern void sampling_init(void); +extern void sampling_stop(void); /* * Organization of scan results @@ -457,31 +444,6 @@ static inline char *format_key(const struct iw_key *const iwk) return buf; } -/* Human-readable representation of IW_ENC_CAPA_ types */ -static inline const char *format_enc_capab(const uint32_t capa, const char *sep) -{ - static char buf[32]; - size_t len = 0, max = sizeof(buf); - - if (capa & IW_ENC_CAPA_WPA) - len = snprintf(buf, max, "WPA"); - if (capa & IW_ENC_CAPA_WPA2) - len += snprintf(buf + len, max - len, "%sWPA2", len ? sep : ""); - if (capa & IW_ENC_CAPA_CIPHER_TKIP) - len += snprintf(buf + len, max - len, "%sTKIP", len ? sep : ""); - if (capa & IW_ENC_CAPA_CIPHER_CCMP) - len += snprintf(buf + len, max - len, "%sCCMP", len ? sep : ""); - buf[len] = '\0'; - return buf; -} - -/* Display only the supported WPA type */ -#define IW_WPA_MASK (IW_ENC_CAPA_WPA|IW_ENC_CAPA_WPA2) -static inline const char *format_wpa(struct iw_range *ir) -{ - return format_enc_capab(ir->enc_capa & IW_WPA_MASK, "/"); -} - static inline char *format_retry(const struct iw_param *retry, const struct iw_range *range) { |