summaryrefslogtreecommitdiffstats
path: root/src/main.cpp
diff options
context:
space:
mode:
authorHanoh Haim <hhaim@cisco.com>2016-02-15 14:19:03 +0200
committerHanoh Haim <hhaim@cisco.com>2016-02-15 14:19:03 +0200
commitf6901ca1f2cca419eeba2e1a35a38fe06a6650be (patch)
treeaa998cd7f1005cc3efa192cc88c38b7d5dfcb650 /src/main.cpp
parent1f60016f591ebd2e260e501c8c5da10c11d0c7ad (diff)
add support for dp mac replace mode-golden were changed
Diffstat (limited to 'src/main.cpp')
-rwxr-xr-xsrc/main.cpp10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/main.cpp b/src/main.cpp
index a2d06067..6ee3a03d 100755
--- a/src/main.cpp
+++ b/src/main.cpp
@@ -238,6 +238,15 @@ static int parse_options(int argc,
return 0;
}
+void set_default_mac_addr(){
+
+ int i;
+ for (i=0; i<4; i++) {
+ memset(CGlobalInfo::m_options.get_dst_src_mac_addr(i),((i+1)<<4),6);
+ memset(CGlobalInfo::m_options.get_src_mac_addr(i),((i+1)<<4)+8,6);
+ }
+}
+
int main(int argc , char * argv[]){
@@ -246,6 +255,7 @@ int main(int argc , char * argv[]){
if ( parse_options(argc, argv, &CGlobalInfo::m_options , params) != 0) {
exit(-1);
}
+ set_default_mac_addr();
opt_type_e type = (opt_type_e) params["type"];