diff options
author | Skylar Chang <chiaweic@codeaurora.org> | 2015-08-08 00:03:21 -0700 |
---|---|---|
committer | Skylar Chang <chiaweic@codeaurora.org> | 2015-09-30 13:29:14 -0700 |
commit | 6d768a0e67b81da9d296149c55c7f2d1cca9936e (patch) | |
tree | 074f6c30974362ba9cabdb64a3003855e2dbe859 /ipacm/inc/IPACM_Wan.h | |
parent | aec4d3a28128534078da7cb2cbcc6ba85c0cd7f0 (diff) | |
download | ipacfg-mgr-6d768a0e67b81da9d296149c55c7f2d1cca9936e.tar.gz |
IPACM: Add support to get tether stats
This changes provides the support to
to get tether stats.
Change-Id: I668a8fa3ffbab2c714d09543e6d2a7e67ff55eff
Diffstat (limited to 'ipacm/inc/IPACM_Wan.h')
-rw-r--r-- | ipacm/inc/IPACM_Wan.h | 44 |
1 files changed, 41 insertions, 3 deletions
diff --git a/ipacm/inc/IPACM_Wan.h b/ipacm/inc/IPACM_Wan.h index 159cc46..65f788f 100644 --- a/ipacm/inc/IPACM_Wan.h +++ b/ipacm/inc/IPACM_Wan.h @@ -97,18 +97,43 @@ public: static uint8_t xlat_mux_id; /* IPACM interface name */ static char wan_up_dev_name[IF_NAME_LEN]; - IPACM_Wan(int, ipacm_wan_iface_type, uint8_t *); virtual ~IPACM_Wan(); - static bool isWanUP() + static bool isWanUP(int ipa_if_num_tether) { +#ifdef FEATURE_IPA_ANDROID + int i; + for (i=1; i < ipa_if_num_tether_v4_total;i++) + { + if (ipa_if_num_tether_v4[i] == ipa_if_num_tether) + { + return wan_up; + break; + } + } + return false; +#else return wan_up; +#endif } - static bool isWanUP_V6() + static bool isWanUP_V6(int ipa_if_num_tether) { +#ifdef FEATURE_IPA_ANDROID + int i; + for (i=1; i < ipa_if_num_tether_v6_total;i++) + { + if (ipa_if_num_tether_v6[i] == ipa_if_num_tether) + { + return wan_up_v6; + break; + } + } + return false; +#else return wan_up_v6; +#endif } static bool getXlat_Mux_Id() @@ -137,6 +162,13 @@ public: { return backhaul_is_wan_bridge; } +#ifdef FEATURE_IPA_ANDROID + /* IPACM interface id */ + static int ipa_if_num_tether_v4_total; + static int ipa_if_num_tether_v4[IPA_MAX_IFACE_ENTRIES]; + static int ipa_if_num_tether_v6_total; + static int ipa_if_num_tether_v6[IPA_MAX_IFACE_ENTRIES]; +#endif private: @@ -341,6 +373,12 @@ private: bool check_dft_firewall_rules_attr_mask(IPACM_firewall_conf_t *firewall_config); +#ifdef FEATURE_IPA_ANDROID + /* wan posting supported tether_iface */ + int post_wan_up_tether_evt(ipa_ip_type iptype, int ipa_if_num_tether); + + int post_wan_down_tether_evt(ipa_ip_type iptype, int ipa_if_num_tether); +#endif int config_dft_firewall_rules(ipa_ip_type iptype); /* configure the initial firewall filter rules */ |