Skip to content

Commit

Permalink
Update ipa-cfg-mgr from LA.UM.5.5.r1-02300-8x96.0
Browse files Browse the repository at this point in the history
Change-Id: I5dfcd7da78ca181584a2b75139c696bb44c12a7e
  • Loading branch information
kyryljan-serhij authored and csolanol committed Jan 9, 2017
1 parent 500ac89 commit b1da28a
Show file tree
Hide file tree
Showing 43 changed files with 4,541 additions and 10,934 deletions.
19 changes: 18 additions & 1 deletion data-ipa-cfg-mgr/Android.mk
@@ -1 +1,18 @@
include $(call all-subdir-makefiles)
#
# Copyright (C) 2015 The CyanogenMod Project
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

LOCAL_PATH := $(call my-dir)

include $(call first-makefiles-under,$(LOCAL_PATH))
1 change: 0 additions & 1 deletion data-ipa-cfg-mgr/ipacm/Android.mk

This file was deleted.

8 changes: 5 additions & 3 deletions data-ipa-cfg-mgr/ipacm/inc/IPACM_CmdQueue.h
@@ -1,5 +1,5 @@
/*
Copyright (c) 2013, The Linux Foundation. All rights reserved.
Copyright (c) 2013-2016, The Linux Foundation. All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are
Expand Down Expand Up @@ -85,7 +85,8 @@ class MessageQueue
Message *Head;
Message *Tail;
Message* dequeue(void);
static MessageQueue *inst;
static MessageQueue *inst_internal;
static MessageQueue *inst_external;

MessageQueue()
{
Expand All @@ -99,7 +100,8 @@ class MessageQueue
void enqueue(Message *item);

static void* Process(void *);
static MessageQueue* getInstance();
static MessageQueue* getInstanceInternal();
static MessageQueue* getInstanceExternal();

};

Expand Down
11 changes: 6 additions & 5 deletions data-ipa-cfg-mgr/ipacm/inc/IPACM_Config.h
@@ -1,5 +1,5 @@
/*
Copyright (c) 2013, The Linux Foundation. All rights reserved.
Copyright (c) 2013-2016, The Linux Foundation. All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are
Expand Down Expand Up @@ -62,7 +62,7 @@ typedef struct _ipa_rm_client
bool rx_bypass_ipa; /* support WLAN may not register RX-property, should not add dependency */
}ipa_rm_client;

#define MAX_NUM_EXT_PROPS 15
#define MAX_NUM_EXT_PROPS 25

/* used to hold extended properties */
typedef struct
Expand Down Expand Up @@ -115,6 +115,8 @@ class IPACM_Config

bool ipacm_odu_embms_enable;

bool ipacm_ip_passthrough_mode;

int ipa_nat_iface_entries;

/* Store the total number of wlan guest ap configured */
Expand All @@ -139,16 +141,15 @@ class IPACM_Config
/* IPACM routing table name for v4/v6 */
struct ipa_ioc_get_rt_tbl rt_tbl_lan_v4, rt_tbl_wan_v4, rt_tbl_default_v4, rt_tbl_v6, rt_tbl_wan_v6;
struct ipa_ioc_get_rt_tbl rt_tbl_wan_dl;
struct ipa_ioc_get_rt_tbl rt_tbl_lan2lan_v4, rt_tbl_lan2lan_v6;
struct ipa_ioc_get_rt_tbl rt_tbl_odu_v4, rt_tbl_odu_v6;
struct ipa_ioc_get_rt_tbl rt_tbl_eth_bridge_lan_lan_v4, rt_tbl_eth_bridge_lan_wlan_v4, rt_tbl_eth_bridge_wlan_wlan_v4;
struct ipa_ioc_get_rt_tbl rt_tbl_eth_bridge_lan_lan_v6, rt_tbl_eth_bridge_lan_wlan_v6, rt_tbl_eth_bridge_wlan_wlan_v6;

bool isMCC_Mode;

/* To return the instance */
static IPACM_Config* GetInstance();

const char* getEventName(ipa_cm_event_id event_id);

inline void increaseFltRuleCount(int index, ipa_ip_type iptype, int increment)
{
if((index >= IPA_CLIENT_CONS - IPA_CLIENT_PROD) || (index < 0))
Expand Down
26 changes: 22 additions & 4 deletions data-ipa-cfg-mgr/ipacm/inc/IPACM_ConntrackListener.h
@@ -1,5 +1,5 @@
/*
Copyright (c) 2013, The Linux Foundation. All rights reserved.
Copyright (c) 2013-2016, The Linux Foundation. All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are
Expand Down Expand Up @@ -46,11 +46,21 @@ IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#include "IPACM_LanToLan.h"
#endif

#define MAX_NAT_IFACES 50
#define MAX_IFACE_ADDRESS 50
#define MAX_STA_CLNT_IFACES 10
#define STA_CLNT_SUBNET_MASK 0xFFFFFF00

using namespace std;

typedef struct _nat_entry_bundle
{
struct nf_conntrack *ct;
enum nf_conntrack_msg_type type;
nat_table_entry *rule;
bool isTempEntry;

}nat_entry_bundle;

class IPACM_ConntrackListener : public IPACM_Listener
{

Expand All @@ -63,8 +73,8 @@ class IPACM_ConntrackListener : public IPACM_Listener
int NatIfaceCnt;
int StaClntCnt;
NatIfaces *pNatIfaces;
uint32_t nat_iface_ipv4_addr[MAX_NAT_IFACES];
uint32_t nonnat_iface_ipv4_addr[MAX_NAT_IFACES];
uint32_t nat_iface_ipv4_addr[MAX_IFACE_ADDRESS];
uint32_t nonnat_iface_ipv4_addr[MAX_IFACE_ADDRESS];
uint32_t sta_clnt_ipv4_addr[MAX_STA_CLNT_IFACES];
IPACM_Config *pConfig;
#ifdef CT_OPT
Expand All @@ -78,9 +88,17 @@ class IPACM_ConntrackListener : public IPACM_Listener
void TriggerWANDown(uint32_t);
int CreateNatThreads(void);
int CreateConnTrackThreads(void);
bool AddIface(nat_table_entry *, bool *);
void AddORDeleteNatEntry(const nat_entry_bundle *);
void PopulateTCPorUDPEntry(struct nf_conntrack *, uint32_t, nat_table_entry *);
void CheckSTAClient(const nat_table_entry *, bool *);
int CheckNatIface(ipacm_event_data_all *, bool *);
void HandleNonNatIPAddr(void *, bool);

#ifdef CT_OPT
void ProcessCTV6Message(void *);
void HandleLan2Lan(struct nf_conntrack *,
enum nf_conntrack_msg_type, nat_table_entry* );
#endif

public:
Expand Down
4 changes: 2 additions & 2 deletions data-ipa-cfg-mgr/ipacm/inc/IPACM_Conntrack_NATApp.h
@@ -1,5 +1,5 @@
/*
Copyright (c) 2013-2015, The Linux Foundation. All rights reserved.
Copyright (c) 2013-2016, The Linux Foundation. All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are
Expand Down Expand Up @@ -125,7 +125,7 @@ class NatApp
void AddTempEntry(const nat_table_entry *);
void CacheEntry(const nat_table_entry *);
void DeleteTempEntry(const nat_table_entry *);
void FlushTempEntries(uint32_t, bool);
void FlushTempEntries(uint32_t, bool, bool isDummy = false);
};


Expand Down

0 comments on commit b1da28a

Please sign in to comment.