aboutsummaryrefslogtreecommitdiff
path: root/data-ipa-cfg-mgr/ipacm/src/IPACM_Iface.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'data-ipa-cfg-mgr/ipacm/src/IPACM_Iface.cpp')
-rw-r--r--data-ipa-cfg-mgr/ipacm/src/IPACM_Iface.cpp86
1 files changed, 44 insertions, 42 deletions
diff --git a/data-ipa-cfg-mgr/ipacm/src/IPACM_Iface.cpp b/data-ipa-cfg-mgr/ipacm/src/IPACM_Iface.cpp
index 04cb162..84132c9 100644
--- a/data-ipa-cfg-mgr/ipacm/src/IPACM_Iface.cpp
+++ b/data-ipa-cfg-mgr/ipacm/src/IPACM_Iface.cpp
@@ -642,48 +642,6 @@ int IPACM_Iface::init_fl_rule(ipa_ip_type iptype)
const char *dev_wlan1="wlan1";
const char *dev_ecm0="ecm0";
- /* update the iface ip-type to be IPA_IP_v4, IPA_IP_v6 or both*/
- if (iptype == IPA_IP_v4)
- {
-
- if ((ip_type == IPA_IP_v4) || (ip_type == IPA_IP_MAX))
- {
- IPACMDBG_H(" interface(%s:%d) already in ip-type %d\n", dev_name, ipa_if_num, ip_type);
- return res;
- }
-
- if (ip_type == IPA_IP_v6)
- {
- ip_type = IPA_IP_MAX;
- }
- else
- {
- ip_type = IPA_IP_v4;
- }
-
- IPACMDBG_H(" interface(%s:%d) now ip-type is %d\n", dev_name, ipa_if_num, ip_type);
- }
- else
- {
-
- if ((ip_type == IPA_IP_v6) || (ip_type == IPA_IP_MAX))
- {
- IPACMDBG_H(" interface(%s:%d) already in ip-type %d\n", dev_name, ipa_if_num, ip_type);
- return res;
- }
-
- if (ip_type == IPA_IP_v4)
- {
- ip_type = IPA_IP_MAX;
- }
- else
- {
- ip_type = IPA_IP_v6;
- }
-
- IPACMDBG_H(" interface(%s:%d) now ip-type is %d\n", dev_name, ipa_if_num, ip_type);
- }
-
/* ADD corresponding ipa_rm_resource_name of RX-endpoint before adding all IPV4V6 FT-rules */
if((IPACM_Iface::ipacmcfg->iface_table[ipa_if_num].if_cat== WAN_IF) || (IPACM_Iface::ipacmcfg->iface_table[ipa_if_num].if_cat== EMBMS_IF))
{
@@ -991,3 +949,47 @@ int IPACM_Iface::ipa_get_if_index
close(fd);
return IPACM_SUCCESS;
}
+
+void IPACM_Iface::config_ip_type(ipa_ip_type iptype)
+{
+ /* update the iface ip-type to be IPA_IP_v4, IPA_IP_v6 or both*/
+ if (iptype == IPA_IP_v4)
+ {
+ if ((ip_type == IPA_IP_v4) || (ip_type == IPA_IP_MAX))
+ {
+ IPACMDBG_H(" interface(%s:%d) already in ip-type %d\n", dev_name, ipa_if_num, ip_type);
+ return;
+ }
+
+ if (ip_type == IPA_IP_v6)
+ {
+ ip_type = IPA_IP_MAX;
+ }
+ else
+ {
+ ip_type = IPA_IP_v4;
+ }
+ IPACMDBG_H(" interface(%s:%d) now ip-type is %d\n", dev_name, ipa_if_num, ip_type);
+ }
+ else
+ {
+ if ((ip_type == IPA_IP_v6) || (ip_type == IPA_IP_MAX))
+ {
+ IPACMDBG_H(" interface(%s:%d) already in ip-type %d\n", dev_name, ipa_if_num, ip_type);
+ return;
+ }
+
+ if (ip_type == IPA_IP_v4)
+ {
+ ip_type = IPA_IP_MAX;
+ }
+ else
+ {
+ ip_type = IPA_IP_v6;
+ }
+
+ IPACMDBG_H(" interface(%s:%d) now ip-type is %d\n", dev_name, ipa_if_num, ip_type);
+ }
+
+ return;
+}