summaryrefslogtreecommitdiffstats
path: root/src/tuple_gen.cpp
diff options
context:
space:
mode:
authorwenxian li <wenxianl@cisco.com>2015-10-01 22:29:46 -0400
committerwenxian li <wenxianl@cisco.com>2015-10-01 22:29:46 -0400
commit894ec2ddcd9965f60c4bc7a0b48edf41bfc167d8 (patch)
treebe4c2a0a5be24c28d7666b29718877616fa20225 /src/tuple_gen.cpp
parentdbeb7ecc059bb78db54ec285a4216a661bbedd23 (diff)
Code change according to code review comments after Tuple Generator phase 2 commit.
Diffstat (limited to 'src/tuple_gen.cpp')
-rwxr-xr-xsrc/tuple_gen.cpp14
1 files changed, 7 insertions, 7 deletions
diff --git a/src/tuple_gen.cpp b/src/tuple_gen.cpp
index e408f275..d725de44 100755
--- a/src/tuple_gen.cpp
+++ b/src/tuple_gen.cpp
@@ -57,7 +57,7 @@ void CClientPool::Create(IP_DIST_t dist_value,
uint32_t max_ip,
double l_flow,
double t_cps,
- CFlowGenList* fl_list,
+ CFlowGenListMac* mac_info,
bool has_mac_map,
uint16_t tcp_aging,
uint16_t udp_aging) {
@@ -65,10 +65,10 @@ void CClientPool::Create(IP_DIST_t dist_value,
set_dist(dist_value);
uint32_t total_ip = max_ip - min_ip +1;
uint32_t avail_ip = total_ip;
- if (has_mac_map && (fl_list!=NULL)) {
+ if (has_mac_map && (mac_info!=NULL)) {
for(int idx=0;idx<total_ip;idx++){
mac_addr_align_t *mac_adr = NULL;
- mac_adr = get_mac_addr_by_ip(fl_list, min_ip+idx);
+ mac_adr = mac_info->get_mac_addr_by_ip(min_ip+idx);
if (mac_adr == NULL) {
avail_ip--;
}
@@ -86,7 +86,7 @@ void CClientPool::Create(IP_DIST_t dist_value,
if (has_mac_map) {
for(int idx=0;idx<total_ip;idx++){
mac_addr_align_t *mac_adr = NULL;
- mac_adr = get_mac_addr_by_ip(fl_list, min_ip+idx);
+ mac_adr = mac_info->get_mac_addr_by_ip( min_ip+idx);
if (mac_adr != NULL) {
m_ip_info[idx] = new CClientInfoL(has_mac_map);
m_ip_info[idx]->set_ip(min_ip+idx);
@@ -103,7 +103,7 @@ void CClientPool::Create(IP_DIST_t dist_value,
if (has_mac_map) {
for(int idx=0;idx<total_ip;idx++){
mac_addr_align_t *mac_adr = NULL;
- mac_adr = get_mac_addr_by_ip(fl_list, min_ip+idx);
+ mac_adr = mac_info->get_mac_addr_by_ip(min_ip+idx);
if (mac_adr != NULL) {
m_ip_info[idx] = new CClientInfo(has_mac_map);
m_ip_info[idx]->set_ip(min_ip+idx);
@@ -130,13 +130,13 @@ bool CTupleGeneratorSmart::add_client_pool(IP_DIST_t client_dist,
uint32_t max_client,
double l_flow,
double t_cps,
- CFlowGenList* fl_list,
+ CFlowGenListMac* mac_info,
uint16_t tcp_aging,
uint16_t udp_aging){
assert(max_client>=min_client);
CClientPool* pool = new CClientPool();
pool->Create(client_dist, min_client, max_client,
- l_flow, t_cps, fl_list, has_mac_mapping,
+ l_flow, t_cps, mac_info, has_mac_mapping,
tcp_aging, udp_aging);
m_client_pool.push_back(pool);